diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-05-30 16:48:28 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-05-30 16:48:28 +0100 |
commit | 9d2eebd1f15e102181fcf9043489c71dd01bd7a2 (patch) | |
tree | ea30af9a5fd79e2db516f1c1bf881e4c4ffcb741 /xen/include/asm-x86/hvm/vlapic.h | |
parent | 0055a08a1aa38080c32d05171169ee1a78f02288 (diff) | |
download | xen-9d2eebd1f15e102181fcf9043489c71dd01bd7a2.tar.gz xen-9d2eebd1f15e102181fcf9043489c71dd01bd7a2.tar.bz2 xen-9d2eebd1f15e102181fcf9043489c71dd01bd7a2.zip |
Add VMX memory-mapped Local APIC access optimization.
Some operating systems access the local APIC TPR very frequently, and
we handle that using software-based local APIC virtualization in Xen
today. Such virtualization incurs a number of VM exits from the
memory-access instructions against the APIC page in the guest.
The attached patch enables the TPR shadow feature that provides APIC
TPR virtualization in hardware. Our tests indicate it can
significantly boost the performance of such guests including 32-bit
Windows XP/2003.
Moreover, with the patch, local APIC accesses other than TPR in guests
are intercepted directly as APIC_ACCESS VM exits rather than
PAGE_FAULT VM exits; this can lower the emulation cost of such
accesses.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Diffstat (limited to 'xen/include/asm-x86/hvm/vlapic.h')
-rw-r--r-- | xen/include/asm-x86/hvm/vlapic.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/xen/include/asm-x86/hvm/vlapic.h b/xen/include/asm-x86/hvm/vlapic.h index 6d174ebfd6..80cd32ec56 100644 --- a/xen/include/asm-x86/hvm/vlapic.h +++ b/xen/include/asm-x86/hvm/vlapic.h @@ -49,12 +49,17 @@ #define vlapic_disabled(vlapic) ((vlapic)->hw.disabled) #define vlapic_enabled(vlapic) (!vlapic_disabled(vlapic)) +#define vlapic_base_address(vlapic) \ + (vlapic->hw.apic_base_msr & MSR_IA32_APICBASE_BASE) + struct vlapic { struct hvm_hw_lapic hw; struct hvm_hw_lapic_regs *regs; struct periodic_time pt; s_time_t timer_last_update; struct page_info *regs_page; + + int mmap_vtpr_enabled : 1; }; static inline uint32_t vlapic_get_reg(struct vlapic *vlapic, uint32_t reg) |