[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.1-testing] vmx: Do not allow emulated accesses to the vlapic mmap'ed 'magic



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1198796261 0
# Node ID 690a80169633678512629bf68da972bc7f389ec5
# Parent  b14bedd3139094b010439ea40c2d7297154be4ad
vmx: Do not allow emulated accesses to the vlapic mmap'ed 'magic
page'.

This is the equivalent of:
xen-unstable changeset:   16663:d5f0afb58589
xen-unstable date:        Thu Dec 27 12:03:02 2007 +0000
---
 xen/arch/x86/hvm/hvm.c         |    5 ++++-
 xen/arch/x86/mm/shadow/multi.c |    3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff -r b14bedd31390 -r 690a80169633 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Thu Dec 27 22:50:59 2007 +0000
+++ b/xen/arch/x86/hvm/hvm.c    Thu Dec 27 22:57:41 2007 +0000
@@ -222,6 +222,8 @@ int hvm_domain_initialise(struct domain 
         return -EINVAL;
     }
 
+    d->arch.hvm_domain.vmx_apic_access_mfn = INVALID_MFN;
+
     spin_lock_init(&d->arch.hvm_domain.pbuf_lock);
     spin_lock_init(&d->arch.hvm_domain.irq_lock);
 
@@ -591,7 +593,8 @@ static enum hvm_copy_result __hvm_copy(
 
         mfn = get_mfn_from_gpfn(gfn);
 
-        if ( mfn == INVALID_MFN )
+        if ( (mfn == current->domain->arch.hvm_domain.vmx_apic_access_mfn) ||
+             (mfn == INVALID_MFN) )
         {
             rc = HVMCOPY_bad_gfn_to_mfn;
             goto out;
diff -r b14bedd31390 -r 690a80169633 xen/arch/x86/mm/shadow/multi.c
--- a/xen/arch/x86/mm/shadow/multi.c    Thu Dec 27 22:50:59 2007 +0000
+++ b/xen/arch/x86/mm/shadow/multi.c    Thu Dec 27 22:57:41 2007 +0000
@@ -4015,7 +4015,8 @@ static inline void *emulate_map_dest(str
     if ( !(flags & _PAGE_RW) ) 
         goto page_fault;
 
-    if ( mfn_valid(mfn) )
+    if ( mfn_valid(mfn) &&
+         (mfn_x(mfn) != v->domain->arch.hvm_domain.vmx_apic_access_mfn) )
     {
         *mfnp = mfn;
         v->arch.paging.last_write_was_pt = !!sh_mfn_is_a_page_table(mfn);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.