[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] memory: Do not allow subregion out of the parent region rang
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH] memory: Do not allow subregion out of the parent region range |
Date: |
Tue, 17 Dec 2019 19:31:41 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 |
On 17/12/19 19:17, Peter Maydell wrote:
> On Tue, 17 Dec 2019 at 16:57, Richard Henderson
> <address@hidden> wrote:
>>
>> On 12/17/19 1:58 AM, Christophe de Dinechin wrote:
>>>
>>>
>>>> On 17 Dec 2019, at 11:51, Paolo Bonzini <address@hidden> 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
- [PATCH] memory: Do not allow subregion out of the parent region range, Philippe Mathieu-Daudé, 2019/12/14
- Re: [PATCH] memory: Do not allow subregion out of the parent region range, Paolo Bonzini, 2019/12/16
- Re: [PATCH] memory: Do not allow subregion out of the parent region range, Philippe Mathieu-Daudé, 2019/12/16
- Re: [PATCH] memory: Do not allow subregion out of the parent region range, Paolo Bonzini, 2019/12/17
- Re: [PATCH] memory: Do not allow subregion out of the parent region range, Christophe de Dinechin, 2019/12/17
- Re: [PATCH] memory: Do not allow subregion out of the parent region range, Richard Henderson, 2019/12/17
- Re: [PATCH] memory: Do not allow subregion out of the parent region range, Peter Maydell, 2019/12/17
- Re: [PATCH] memory: Do not allow subregion out of the parent region range,
Paolo Bonzini <=
- Re: [PATCH] memory: Do not allow subregion out of the parent region range, Alex Williamson, 2019/12/17
- Re: [PATCH] memory: Do not allow subregion out of the parent region range, Philippe Mathieu-Daudé, 2019/12/17