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

[Xen-changelog] [xen master] evtchn/fifo: map correct pages when guest is HVM



commit cb84b989ee11d2368ec78e9669bb72f8c7a95c03
Author:     David Vrabel <david.vrabel@xxxxxxxxxx>
AuthorDate: Mon Dec 16 10:51:24 2013 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Dec 16 10:51:24 2013 +0100

    evtchn/fifo: map correct pages when guest is HVM
    
    If a HVM guest attempts to use the FIFO-based ABI it will not receive
    any events and destroying the guest may crash Xen or trigger an assert
    when attempting to unmap a control block page.  This occurs because
    Xen maps the wrong page for both the control blocks and the event
    arrays.
    
    In map_guest_page(), use the MFN of the guest's page and not the GFN
    when calling map_domain_page_global().
    
    Reported-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
    Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx>
---
 xen/common/event_fifo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xen/common/event_fifo.c b/xen/common/event_fifo.c
index 6048784..b0d3fc2 100644
--- a/xen/common/event_fifo.c
+++ b/xen/common/event_fifo.c
@@ -284,7 +284,7 @@ static int map_guest_page(struct domain *d, uint64_t gfn, 
void **virt)
         return -EINVAL;
     }
 
-    *virt = map_domain_page_global(gfn);
+    *virt = __map_domain_page_global(p);
     if ( !*virt )
     {
         put_page_and_type(p);
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.