iPXE
Data Structures | Macros | Functions
hvm.h File Reference

Xen HVM driver. More...

#include <stdint.h>
#include <ipxe/xen.h>
#include <xen/hvm/hvm_op.h>
#include <xen/hvm/params.h>

Go to the source code of this file.

Data Structures

struct  hvm_device
 A Xen HVM device. More...
 

Macros

#define HVM_CPUID_MIN   0x40000000UL
 Minimum CPUID base. More...
 
#define HVM_CPUID_MAX   0x4000ff00UL
 Maximum CPUID base. More...
 
#define HVM_CPUID_STEP   0x00000100UL
 Increment between CPUID bases. More...
 
#define HVM_CPUID_MAGIC   "XenVMMXenVMM"
 Magic signature. More...
 
#define HVM_CPUID_VERSION   1
 Get Xen version. More...
 
#define HVM_CPUID_PAGES   2
 Get number of hypercall pages. More...
 
#define HVM_MMIO_BAR   PCI_BASE_ADDRESS_1
 PCI MMIO BAR. More...
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
static int xen_hvm_get_param (struct xen_hypervisor *xen, unsigned int index, uint64_t *value)
 Get HVM parameter value. More...
 

Detailed Description

Xen HVM driver.

Definition in file hvm.h.

Macro Definition Documentation

◆ HVM_CPUID_MIN

#define HVM_CPUID_MIN   0x40000000UL

Minimum CPUID base.

Definition at line 18 of file hvm.h.

◆ HVM_CPUID_MAX

#define HVM_CPUID_MAX   0x4000ff00UL

Maximum CPUID base.

Definition at line 21 of file hvm.h.

◆ HVM_CPUID_STEP

#define HVM_CPUID_STEP   0x00000100UL

Increment between CPUID bases.

Definition at line 24 of file hvm.h.

◆ HVM_CPUID_MAGIC

#define HVM_CPUID_MAGIC   "XenVMMXenVMM"

Magic signature.

Definition at line 27 of file hvm.h.

◆ HVM_CPUID_VERSION

#define HVM_CPUID_VERSION   1

Get Xen version.

Definition at line 30 of file hvm.h.

◆ HVM_CPUID_PAGES

#define HVM_CPUID_PAGES   2

Get number of hypercall pages.

Definition at line 33 of file hvm.h.

◆ HVM_MMIO_BAR

#define HVM_MMIO_BAR   PCI_BASE_ADDRESS_1

PCI MMIO BAR.

Definition at line 36 of file hvm.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ xen_hvm_get_param()

static int xen_hvm_get_param ( struct xen_hypervisor xen,
unsigned int  index,
uint64_t value 
)
inlinestatic

Get HVM parameter value.

Parameters
xenXen hypervisor
indexParameter index
valueValue to fill in
Return values
xenrcXen status code

Definition at line 62 of file hvm.h.

63  {
64  struct xen_hvm_param param;
65  int xenrc;
66 
67  param.domid = DOMID_SELF;
68  param.index = index;
69  xenrc = xen_hypercall_2 ( xen, __HYPERVISOR_hvm_op, HVMOP_get_param,
70  virt_to_phys ( &param ) );
71  *value = param.value;
72  return xenrc;
73 }
static __always_inline unsigned long virt_to_phys(volatile const void *addr)
Convert virtual address to a physical address.
Definition: uaccess.h:287
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
struct hv_monitor_parameter param[4][32]
Parameters.
Definition: hyperv.h:24
#define HVMOP_get_param
Definition: hvm_op.h:32
#define DOMID_SELF
Definition: xen.h:501
uint64_t index
Index of the first segment within the content.
Definition: pccrc.h:21
#define __HYPERVISOR_hvm_op
Definition: xen.h:100

References __HYPERVISOR_hvm_op, DOMID_SELF, HVMOP_get_param, index, param, value, and virt_to_phys().

Referenced by hvm_map_xenstore().