Re: [PATCH] memory: Do not allow subregion out of the parent region range

2019-12-17 Thread Philippe Mathieu-Daudé
On 12/17/19 7:52 PM, Alex Williamson wrote: On Tue, 17 Dec 2019 19:31:41 +0100 Paolo Bonzini wrote: On 17/12/19 19:17, Peter Maydell wrote: On Tue, 17 Dec 2019 at 16:57, Richard Henderson wrote: On 12/17/19 1:58 AM, Christophe de Dinechin wrote: On 17 Dec 2019, at 11:51, Paolo

Re: [PATCH] memory: Do not allow subregion out of the parent region range

2019-12-17 Thread Alex Williamson
On Tue, 17 Dec 2019 19:31:41 +0100 Paolo Bonzini wrote: > On 17/12/19 19:17, Peter Maydell wrote: > > On Tue, 17 Dec 2019 at 16:57, Richard Henderson > > wrote: > >> > >> On 12/17/19 1:58 AM, Christophe de Dinechin wrote: > >>> > >>> > On 17 Dec 2019, at 11:51, Paolo Bonzini wrote:

Re: [PATCH] memory: Do not allow subregion out of the parent region range

2019-12-17 Thread Paolo Bonzini
On 17/12/19 19:17, Peter Maydell wrote: > On Tue, 17 Dec 2019 at 16:57, Richard Henderson > wrote: >> >> On 12/17/19 1:58 AM, Christophe de Dinechin wrote: >>> >>> On 17 Dec 2019, at 11:51, Paolo Bonzini wrote: Yes, the idea is that you could have for one version of the device

Re: [PATCH] memory: Do not allow subregion out of the parent region range

2019-12-17 Thread Peter Maydell
On Tue, 17 Dec 2019 at 16:57, Richard Henderson wrote: > > On 12/17/19 1:58 AM, Christophe de Dinechin wrote: > > > > > >> On 17 Dec 2019, at 11:51, Paolo Bonzini wrote: > >> Yes, the idea is that you could have for one version of the device > >> > >> parent 0x000-0x7ff > >> stuff

Re: [PATCH] memory: Do not allow subregion out of the parent region range

2019-12-17 Thread Richard Henderson
On 12/17/19 1:58 AM, Christophe de Dinechin wrote: > > >> On 17 Dec 2019, at 11:51, Paolo Bonzini wrote: >> >> On 16/12/19 18:46, Philippe Mathieu-Daudé wrote: > I think in some cases this could be intentional, for example if you have different models with different BAR sizes

Re: [PATCH] memory: Do not allow subregion out of the parent region range

2019-12-17 Thread Christophe de Dinechin
> On 17 Dec 2019, at 11:51, Paolo Bonzini wrote: > > On 16/12/19 18:46, Philippe Mathieu-Daudé wrote: >>> >>> I think in some cases this could be intentional, for example if you have >>> different models with different BAR sizes and you organize this with the >>> same tree of

Re: [PATCH] memory: Do not allow subregion out of the parent region range

2019-12-17 Thread Paolo Bonzini
On 16/12/19 18:46, Philippe Mathieu-Daudé wrote: >>> >> >> I think in some cases this could be intentional, for example if you have >> different models with different BAR sizes and you organize this with the >> same tree of MemoryRegion and different sizes for the parent. > > But if a child is

Re: [PATCH] memory: Do not allow subregion out of the parent region range

2019-12-16 Thread Philippe Mathieu-Daudé
On 12/16/19 2:08 PM, Paolo Bonzini wrote: On 14/12/19 17:02, Philippe Mathieu-Daudé wrote: If a subregion is mapped out of the parent region range, it will never get accessed. Since this is a bug, abort to help the developer notice the mistake. Signed-off-by: Philippe Mathieu-Daudé ---

Re: [PATCH] memory: Do not allow subregion out of the parent region range

2019-12-16 Thread Paolo Bonzini
On 14/12/19 17:02, Philippe Mathieu-Daudé wrote: > If a subregion is mapped out of the parent region range, it > will never get accessed. Since this is a bug, abort to help > the developer notice the mistake. > > Signed-off-by: Philippe Mathieu-Daudé > --- > memory.c | 1 + > 1 file changed, 1

[PATCH] memory: Do not allow subregion out of the parent region range

2019-12-14 Thread Philippe Mathieu-Daudé
If a subregion is mapped out of the parent region range, it will never get accessed. Since this is a bug, abort to help the developer notice the mistake. Signed-off-by: Philippe Mathieu-Daudé --- memory.c | 1 + 1 file changed, 1 insertion(+) diff --git a/memory.c b/memory.c index