diff options
author | Paul Durrant <paul.durrant@citrix.com> | 2011-09-17 16:22:13 +0100 |
---|---|---|
committer | Paul Durrant <paul.durrant@citrix.com> | 2011-09-17 16:22:13 +0100 |
commit | 251d889009995640af7c2d53eb018639d77ae98a (patch) | |
tree | 87f8c965469dd26ea241459bf6811c7c440ec604 /xen/include/asm-x86 | |
parent | d285a773d6f5d7fb4e654291b5fce90bb8ec8852 (diff) | |
download | xen-251d889009995640af7c2d53eb018639d77ae98a.tar.gz xen-251d889009995640af7c2d53eb018639d77ae98a.tar.bz2 xen-251d889009995640af7c2d53eb018639d77ae98a.zip |
x86/hvm: Tidy up the viridian code a little and flesh out the APIC
assist MSR handling code.
We don't say we that handle that MSR but Windows assumes it. In
Windows 7 it just wrote to the MSR and we used to handle that
ok. Windows 8 also reads from the MSR so we need to keep a record of
the contents.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Diffstat (limited to 'xen/include/asm-x86')
-rw-r--r-- | xen/include/asm-x86/hvm/vcpu.h | 3 | ||||
-rw-r--r-- | xen/include/asm-x86/hvm/viridian.h | 15 | ||||
-rw-r--r-- | xen/include/asm-x86/perfc_defn.h | 2 |
3 files changed, 20 insertions, 0 deletions
diff --git a/xen/include/asm-x86/hvm/vcpu.h b/xen/include/asm-x86/hvm/vcpu.h index 8c225a51eb..d899c9a713 100644 --- a/xen/include/asm-x86/hvm/vcpu.h +++ b/xen/include/asm-x86/hvm/vcpu.h @@ -23,6 +23,7 @@ #include <xen/tasklet.h> #include <asm/hvm/io.h> #include <asm/hvm/vlapic.h> +#include <asm/hvm/viridian.h> #include <asm/hvm/vmx/vmcs.h> #include <asm/hvm/vmx/vvmx.h> #include <asm/hvm/svm/vmcb.h> @@ -163,6 +164,8 @@ struct hvm_vcpu { int inject_trap; /* -1 for nothing to inject */ int inject_error_code; unsigned long inject_cr2; + + struct viridian_vcpu viridian; }; #endif /* __ASM_X86_HVM_VCPU_H__ */ diff --git a/xen/include/asm-x86/hvm/viridian.h b/xen/include/asm-x86/hvm/viridian.h index d8509cb081..496da33ed5 100644 --- a/xen/include/asm-x86/hvm/viridian.h +++ b/xen/include/asm-x86/hvm/viridian.h @@ -9,6 +9,21 @@ #ifndef __ASM_X86_HVM_VIRIDIAN_H__ #define __ASM_X86_HVM_VIRIDIAN_H__ +union viridian_apic_assist +{ uint64_t raw; + struct + { + uint64_t enabled:1; + uint64_t reserved_preserved:11; + uint64_t pfn:48; + } fields; +}; + +struct viridian_vcpu +{ + union viridian_apic_assist apic_assist; +}; + union viridian_guest_os_id { uint64_t raw; diff --git a/xen/include/asm-x86/perfc_defn.h b/xen/include/asm-x86/perfc_defn.h index 274533e4f3..05bad415d4 100644 --- a/xen/include/asm-x86/perfc_defn.h +++ b/xen/include/asm-x86/perfc_defn.h @@ -120,12 +120,14 @@ PERFCOUNTER(mshv_rdmsr_hc_page, "MS Hv rdmsr hypercall page") PERFCOUNTER(mshv_rdmsr_vp_index, "MS Hv rdmsr vp index") PERFCOUNTER(mshv_rdmsr_icr, "MS Hv rdmsr icr") PERFCOUNTER(mshv_rdmsr_tpr, "MS Hv rdmsr tpr") +PERFCOUNTER(mshv_rdmsr_apic_assist, "MS Hv rdmsr APIC assist") PERFCOUNTER(mshv_wrmsr_osid, "MS Hv wrmsr Guest OS ID") PERFCOUNTER(mshv_wrmsr_hc_page, "MS Hv wrmsr hypercall page") PERFCOUNTER(mshv_wrmsr_vp_index, "MS Hv wrmsr vp index") PERFCOUNTER(mshv_wrmsr_icr, "MS Hv wrmsr icr") PERFCOUNTER(mshv_wrmsr_tpr, "MS Hv wrmsr tpr") PERFCOUNTER(mshv_wrmsr_eoi, "MS Hv wrmsr eoi") +PERFCOUNTER(mshv_wrmsr_apic_assist, "MS Hv wrmsr APIC assist") PERFCOUNTER(realmode_emulations, "realmode instructions emulated") PERFCOUNTER(realmode_exits, "vmexits from realmode") |