qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>,
	Richard Henderson <richard.henderson@linaro.org>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	"Alexey Kardashevskiy" <aik@ozlabs.ru>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Alex Williamson" <alex.williamson@redhat.com>,
	"Christophe de Dinechin" <dinechin@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [PATCH] memory: Do not allow subregion out of the parent region range
Date: Tue, 17 Dec 2019 19:31:41 +0100	[thread overview]
Message-ID: <ab832e97-f583-c347-0b4d-0d2e11f6b2b3@redhat.com> (raw)
In-Reply-To: <CAFEAcA955AwoDiuYxm0mJKV1qzyBorAz06dqi0tg2kMBT9GMTA@mail.gmail.com>

On 17/12/19 19:17, Peter Maydell wrote:
> On Tue, 17 Dec 2019 at 16:57, Richard Henderson
> <richard.henderson@linaro.org> wrote:
>>
>> On 12/17/19 1:58 AM, Christophe de Dinechin wrote:
>>>
>>>
>>>> On 17 Dec 2019, at 11:51, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>>> Yes, the idea is that you could have for one version of the device
>>>>
>>>>   parent 0x000-0x7ff
>>>>     stuff 0x000-0x3ff
>>>>     morestuff 0x400-0x7ff
>>>>
>>>> and for another
>>>>
>>>>   parent 0x000-0x3ff
>>>>     stuff 0x000-0x3ff
>>>>     morestuff 0x400-0x7ff
>>>>
>>>> where parent is the BAR, and you can share the code to generate the tree
>>>> underneath parent.
>>>
>>> I can see why you would have code reuse reasons to do that,
>>> but frankly it looks buggy and confusing. In the rare cases
>>> where this is indented, maybe add a flag making it explicit?
>>
>> The guest OS is programming the BAR, producing a configuration that, while it
>> doesn't make sense, is also legal per PCI.  QEMU cannot abort for this
>> configuration.
> 
> Does guest programming of the PCI BAR size actually change the size
> of the 'parent' region, or does it just result in the creation
> of an appropriately sized alias into 'parent' ?

Resizable BARs are not handled by the PCI host bridge but rather from
the device itself, so the device is free to handle them either way.

Paolo



  reply	other threads:[~2019-12-17 18:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-14 16:02 [PATCH] memory: Do not allow subregion out of the parent region range Philippe Mathieu-Daudé
2019-12-16 13:08 ` Paolo Bonzini
2019-12-16 17:46   ` Philippe Mathieu-Daudé
2019-12-17 10:51     ` Paolo Bonzini
2019-12-17 11:58       ` Christophe de Dinechin
2019-12-17 16:57         ` Richard Henderson
2019-12-17 18:17           ` Peter Maydell
2019-12-17 18:31             ` Paolo Bonzini [this message]
2019-12-17 18:52               ` Alex Williamson
2019-12-17 19:17                 ` Philippe Mathieu-Daudé

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=ab832e97-f583-c347-0b4d-0d2e11f6b2b3@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=aik@ozlabs.ru \
    --cc=alex.williamson@redhat.com \
    --cc=dinechin@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).