ia64/xen-unstable

changeset 16663:d5f0afb58589

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>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Dec 27 12:03:02 2007 +0000 (2007-12-27)
parents e818c24cec03
children 9fe92a88912b
files xen/arch/x86/hvm/vmx/vmx.c
line diff
     1.1 --- a/xen/arch/x86/hvm/vmx/vmx.c	Thu Dec 27 12:00:30 2007 +0000
     1.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c	Thu Dec 27 12:03:02 2007 +0000
     1.3 @@ -2432,8 +2432,8 @@ static int vmx_alloc_vlapic_mapping(stru
     1.4      if ( apic_va == NULL )
     1.5          return -ENOMEM;
     1.6      share_xen_page_with_guest(virt_to_page(apic_va), d, XENSHARE_writable);
     1.7 -    guest_physmap_add_page(
     1.8 -        d, paddr_to_pfn(APIC_DEFAULT_PHYS_BASE), virt_to_mfn(apic_va));
     1.9 +    set_mmio_p2m_entry(
    1.10 +        d, paddr_to_pfn(APIC_DEFAULT_PHYS_BASE), _mfn(virt_to_mfn(apic_va)));
    1.11      d->arch.hvm_domain.vmx_apic_access_mfn = virt_to_mfn(apic_va);
    1.12  
    1.13      return 0;