From 915be26ae2cdae170bd66dd84b850d4f2468ad66 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Mon, 29 Oct 2007 17:42:54 +0000 Subject: [PATCH] Sync Xen public headers. Signed-off-by: Keir Fraser --- include/xen/interface/arch-ia64.h | 5 +++++ include/xen/interface/domctl.h | 26 ++++++++++++++++++++++++++ include/xen/interface/platform.h | 22 ++++++++++++++++++---- include/xen/interface/sysctl.h | 21 +++++++++++++++------ include/xen/interface/vcpu.h | 3 +++ 5 files changed, 67 insertions(+), 10 deletions(-) diff --git a/include/xen/interface/arch-ia64.h b/include/xen/interface/arch-ia64.h index d65a4863..511998bc 100644 --- a/include/xen/interface/arch-ia64.h +++ b/include/xen/interface/arch-ia64.h @@ -427,6 +427,11 @@ struct vcpu_guest_context { struct vcpu_guest_context_regs regs; unsigned long event_callback_ip; + + /* xen doesn't share privregs pages with hvm domain so that this member + * doesn't make sense for hvm domain. + * ~0UL is already used for INVALID_P2M_ENTRY. */ +#define VGC_PRIVREGS_HVM (~(-2UL)) unsigned long privregs_pfn; }; typedef struct vcpu_guest_context vcpu_guest_context_t; diff --git a/include/xen/interface/domctl.h b/include/xen/interface/domctl.h index d44e04f4..d9f9f5de 100644 --- a/include/xen/interface/domctl.h +++ b/include/xen/interface/domctl.h @@ -515,6 +515,31 @@ typedef struct xen_domctl_pin_mem_cacheattr xen_domctl_pin_mem_cacheattr_t; DEFINE_XEN_GUEST_HANDLE(xen_domctl_pin_mem_cacheattr_t); +#define XEN_DOMCTL_set_ext_vcpucontext 42 +#define XEN_DOMCTL_get_ext_vcpucontext 43 +struct xen_domctl_ext_vcpucontext { + /* IN: VCPU that this call applies to. */ + uint32_t vcpu; + /* + * SET: Size of struct (IN) + * GET: Size of struct (OUT) + */ + uint32_t size; +#if defined(__i386__) || defined(__x86_64__) + /* SYSCALL from 32-bit mode and SYSENTER callback information. */ + /* NB. SYSCALL from 64-bit mode is contained in vcpu_guest_context_t */ + uint64_aligned_t syscall32_callback_eip; + uint64_aligned_t sysenter_callback_eip; + uint16_t syscall32_callback_cs; + uint16_t sysenter_callback_cs; + uint8_t syscall32_disables_events; + uint8_t sysenter_disables_events; +#endif +}; +typedef struct xen_domctl_ext_vcpucontext xen_domctl_ext_vcpucontext_t; +DEFINE_XEN_GUEST_HANDLE(xen_domctl_ext_vcpucontext_t); + + struct xen_domctl { uint32_t cmd; uint32_t interface_version; /* XEN_DOMCTL_INTERFACE_VERSION */ @@ -549,6 +574,7 @@ struct xen_domctl { struct xen_domctl_memory_mapping memory_mapping; struct xen_domctl_ioport_mapping ioport_mapping; struct xen_domctl_pin_mem_cacheattr pin_mem_cacheattr; + struct xen_domctl_ext_vcpucontext ext_vcpucontext; uint8_t pad[128]; } u; }; diff --git a/include/xen/interface/platform.h b/include/xen/interface/platform.h index 16bf686d..3998989e 100644 --- a/include/xen/interface/platform.h +++ b/include/xen/interface/platform.h @@ -174,13 +174,27 @@ struct xenpf_change_freq { typedef struct xenpf_change_freq xenpf_change_freq_t; DEFINE_XEN_GUEST_HANDLE(xenpf_change_freq_t); +/* + * Get idle times (nanoseconds since boot) for physical CPUs specified in the + * @cpumap_bitmap with range [0..@cpumap_nr_cpus-1]. The @idletime array is + * indexed by CPU number; only entries with the corresponding @cpumap_bitmap + * bit set are written to. On return, @cpumap_bitmap is modified so that any + * non-existent CPUs are cleared. Such CPUs have their @idletime array entry + * cleared. + */ #define XENPF_getidletime 53 struct xenpf_getidletime { - /* IN variables. */ - uint32_t max_cpus; + /* IN/OUT variables */ + /* IN: CPUs to interrogate; OUT: subset of IN which are present */ + XEN_GUEST_HANDLE(uint8_t) cpumap_bitmap; + /* IN variables */ + /* Size of cpumap bitmap. */ + uint32_t cpumap_nr_cpus; + /* Must be indexable for every cpu in cpumap_bitmap. */ XEN_GUEST_HANDLE(uint64_t) idletime; - /* OUT variables. */ - uint32_t nr_cpus; + /* OUT variables */ + /* System time when the idletime snapshots were taken. */ + uint64_t now; }; typedef struct xenpf_getidletime xenpf_getidletime_t; DEFINE_XEN_GUEST_HANDLE(xenpf_getidletime_t); diff --git a/include/xen/interface/sysctl.h b/include/xen/interface/sysctl.h index 0ea67c5b..59db4c49 100644 --- a/include/xen/interface/sysctl.h +++ b/include/xen/interface/sysctl.h @@ -34,18 +34,27 @@ #include "xen.h" #include "domctl.h" -#define XEN_SYSCTL_INTERFACE_VERSION 0x00000005 +#define XEN_SYSCTL_INTERFACE_VERSION 0x00000006 /* * Read console content from Xen buffer ring. */ #define XEN_SYSCTL_readconsole 1 struct xen_sysctl_readconsole { - /* IN variables. */ - uint32_t clear; /* Non-zero -> clear after reading. */ - XEN_GUEST_HANDLE_64(char) buffer; /* Buffer start */ - /* IN/OUT variables. */ - uint32_t count; /* In: Buffer size; Out: Used buffer size */ + /* IN: Non-zero -> clear after reading. */ + uint8_t clear; + /* IN: Non-zero -> start index specified by @index field. */ + uint8_t incremental; + uint8_t pad0, pad1; + /* + * IN: Start index for consuming from ring buffer (if @incremental); + * OUT: End index after consuming from ring buffer. + */ + uint32_t index; + /* IN: Virtual address to write console data. */ + XEN_GUEST_HANDLE_64(char) buffer; + /* IN: Size of buffer; OUT: Bytes written to buffer. */ + uint32_t count; }; typedef struct xen_sysctl_readconsole xen_sysctl_readconsole_t; DEFINE_XEN_GUEST_HANDLE(xen_sysctl_readconsole_t); diff --git a/include/xen/interface/vcpu.h b/include/xen/interface/vcpu.h index a84eb513..4cd4229d 100644 --- a/include/xen/interface/vcpu.h +++ b/include/xen/interface/vcpu.h @@ -179,6 +179,9 @@ struct vcpu_register_vcpu_info { typedef struct vcpu_register_vcpu_info vcpu_register_vcpu_info_t; DEFINE_XEN_GUEST_HANDLE(vcpu_register_vcpu_info_t); +/* Send an NMI to the specified VCPU. @extra_arg == NULL. */ +#define VCPUOP_send_nmi 11 + #endif /* __XEN_PUBLIC_VCPU_H__ */ /* -- 2.39.5