All of lore.kernel.org
 help / color / mirror / Atom feed
From: Malcolm Crossley <malcolm.crossley@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Ian.Jackson@citrix.com, Paul.Durrant@citrix.com,
	Ian.Campbell@citrix.com, xen-devel@lists.xen.org
Subject: Re: [PATCH v3] hw/passthrough: Prevent QEMU from mapping PCI option ROM at address 0
Date: Mon, 12 May 2014 16:32:29 +0100	[thread overview]
Message-ID: <5370E98D.6090409@citrix.com> (raw)
In-Reply-To: <5370FC910200007800011815@mail.emea.novell.com>

On 12/05/14 15:53, Jan Beulich wrote:
>>>> On 12.05.14 at 16:37, <malcolm.crossley@citrix.com> wrote:
>> 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 bits 0-10 (4k page) parts of the BAR
>> before comparing the address to 0.
> 
> Sorry, but to avoid confusing (future) readers - this is 2k units, not
> 4k pages.
> 
Thanks for pointing that out Jan, I was actually intending to ensure
nothing is allowed to be mapped to the 0 page and did not realise the
option ROM BAR is 2k aligned instead of 4k. I will submit a new patch
using XC_PAGE_MASK instead.

>> Signed-off-by: Malcolm Crossley <malcolm.crossley@citrix.com>
> 
> With the description corrected:
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
> 
> 

      reply	other threads:[~2014-05-12 15:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-12 14:37 [PATCH v3] hw/passthrough: Prevent QEMU from mapping PCI option ROM at address 0 Malcolm Crossley
2014-05-12 14:53 ` Jan Beulich
2014-05-12 15:32   ` Malcolm Crossley [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5370E98D.6090409@citrix.com \
    --to=malcolm.crossley@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=Paul.Durrant@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.