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

Re: [Xen-devel] [PATCH] hw/passthrough: Prevent QEMU from mapping PCI option ROM at address 0



> -----Original Message-----
> From: xen-devel-bounces@xxxxxxxxxxxxx [mailto:xen-devel-
> bounces@xxxxxxxxxxxxx] On Behalf Of Malcolm Crossley
> Sent: 12 May 2014 05:43
> To: xen-devel@xxxxxxxxxxxxx; Ian Jackson
> Cc: Malcolm Crossley
> Subject: [Xen-devel] [PATCH] hw/passthrough: Prevent QEMU from
> mapping PCI option ROM at address 0
> 
> The PCI option ROM BAR uses the LSB to indicate if the BAR is enabled.
> The AMD graphics driver sets the address bit's of the BAR to 0 but leaves the
> LSB set to 1. Whilst this is not good practice, QEMU should be ignoring the
> non address parts of the BAR.
> 
> This patch adds masking of the non address parts of the BAR before
> comparing
> the address to 0.

Is this for trad, upstream, or both?

You also need a s-o-b on your patch.

  Paul

> ---
>  hw/pass-through.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/hw/pass-through.c b/hw/pass-through.c
> index 304c438..7d6aefc 100644
> --- a/hw/pass-through.c
> +++ b/hw/pass-through.c
> @@ -2208,7 +2208,7 @@ static void pt_bar_mapping_one(struct pt_dev
> *ptdev, int bar, int io_enable,
>      }
> 
>      /* prevent guest software mapping memory resource to 00000000h */
> -    if ((base->bar_flag == PT_BAR_FLAG_MEM) && (r_addr == 0))
> +    if ((base->bar_flag == PT_BAR_FLAG_MEM) && ((r_addr &
> PCI_BASE_ADDRESS_MEM_MASK) == 0))
>          r_addr = -1;
> 
>      /* align resource size (memory type only) */
> --
> 1.7.1
> 
> 
> _______________________________________________
> 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®.