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

Re: [Xen-devel] [PATCH] evtchn/fifo: map correct pages when guest is HVM



On Fri, Dec 13, 2013 at 02:49:53PM +0000, David Vrabel wrote:
> From: David Vrabel <david.vrabel@xxxxxxxxxx>
> 
> 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().
> 

Should you have the Reported-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
flag?

> 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 fc43e62..a815b2d 100644
> --- a/xen/common/event_fifo.c
> +++ b/xen/common/event_fifo.c
> @@ -357,7 +357,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(page_to_mfn(p));
>      if ( !*virt )
>      {
>          put_page_and_type(p);
> -- 
> 1.7.2.5
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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