aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2007-12-27 12:03:02 +0000
committerKeir Fraser <keir.fraser@citrix.com>2007-12-27 12:03:02 +0000
commite88a23b123a58edde070f6678d1b1bee80574414 (patch)
treedd1c1290b5aa4110aafbb077f0c79a0958d56dc6
parent5e1b25eac4788497e8f8d6117794ae4803d3a4f5 (diff)
downloadxen-e88a23b123a58edde070f6678d1b1bee80574414.tar.gz
xen-e88a23b123a58edde070f6678d1b1bee80574414.tar.bz2
xen-e88a23b123a58edde070f6678d1b1bee80574414.zip
vmx: Map the VLAPIC access page as mmio-direct in the p2m. This
prevents emulated accesses to this page, which would not be handled in the correct way (VMX handles accesses to that page in non-root mode in a very super-special way). Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
-rw-r--r--xen/arch/x86/hvm/vmx/vmx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index ddf60430d3..1e700d8d2e 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -2432,8 +2432,8 @@ static int vmx_alloc_vlapic_mapping(struct domain *d)
if ( apic_va == NULL )
return -ENOMEM;
share_xen_page_with_guest(virt_to_page(apic_va), d, XENSHARE_writable);
- guest_physmap_add_page(
- d, paddr_to_pfn(APIC_DEFAULT_PHYS_BASE), virt_to_mfn(apic_va));
+ set_mmio_p2m_entry(
+ d, paddr_to_pfn(APIC_DEFAULT_PHYS_BASE), _mfn(virt_to_mfn(apic_va)));
d->arch.hvm_domain.vmx_apic_access_mfn = virt_to_mfn(apic_va);
return 0;