iPXE
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.
#define HVM_CPUID_MAX   0x4000ff00UL
 Maximum CPUID base.
#define HVM_CPUID_STEP   0x00000100UL
 Increment between CPUID bases.
#define HVM_CPUID_MAGIC   "XenVMMXenVMM"
 Magic signature.
#define HVM_CPUID_VERSION   1
 Get Xen version.
#define HVM_CPUID_PAGES   2
 Get number of hypercall pages.
#define HVM_MMIO_BAR   PCI_BASE_ADDRESS_1
 PCI MMIO BAR.

Functions

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

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 19 of file hvm.h.

Referenced by hvm_cpuid_base().

◆ HVM_CPUID_MAX

#define HVM_CPUID_MAX   0x4000ff00UL

Maximum CPUID base.

Definition at line 22 of file hvm.h.

Referenced by hvm_cpuid_base().

◆ HVM_CPUID_STEP

#define HVM_CPUID_STEP   0x00000100UL

Increment between CPUID bases.

Definition at line 25 of file hvm.h.

Referenced by hvm_cpuid_base().

◆ HVM_CPUID_MAGIC

#define HVM_CPUID_MAGIC   "XenVMMXenVMM"

Magic signature.

Definition at line 28 of file hvm.h.

Referenced by hvm_cpuid_base().

◆ HVM_CPUID_VERSION

#define HVM_CPUID_VERSION   1

Get Xen version.

Definition at line 31 of file hvm.h.

Referenced by hvm_cpuid_base().

◆ HVM_CPUID_PAGES

#define HVM_CPUID_PAGES   2

Get number of hypercall pages.

Definition at line 34 of file hvm.h.

Referenced by hvm_map_hypercall().

◆ HVM_MMIO_BAR

#define HVM_MMIO_BAR   PCI_BASE_ADDRESS_1

PCI MMIO BAR.

Definition at line 37 of file hvm.h.

Referenced by hvm_probe().

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED )

◆ xen_hvm_get_param()

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 65 of file hvm.h.

66 {
67 struct xen_hvm_param param;
68 int xenrc;
69
70 param.domid = DOMID_SELF;
71 param.index = index;
72 xenrc = xen_hypercall_2 ( xen, __HYPERVISOR_hvm_op, HVMOP_get_param,
73 virt_to_phys ( &param ) );
74 *value = param.value;
75 return xenrc;
76}
pseudo_bit_t value[0x00020]
Definition arbel.h:2
long index
Definition bigint.h:65
#define HVMOP_get_param
Definition hvm_op.h:18
struct hv_monitor_parameter param[4][32]
Parameters.
Definition hyperv.h:13
#define __HYPERVISOR_hvm_op
Definition xen.h:115
#define DOMID_SELF
Definition xen.h:581

References __HYPERVISOR_hvm_op, DOMID_SELF, HVMOP_get_param, index, param, and value.

Referenced by hvm_map_xenstore().