Re: [RFC v3 1/3] memory: add depth assert in address_space_to_flatview

2022-12-20 Thread Peter Xu
On Tue, Dec 20, 2022 at 06:28:40AM -0800, Chuang Xu wrote: > Yes, Maybe we should add a function to acquire the value.. Or making it non-static would work too. -- Peter Xu

Re: [RFC v3 1/3] memory: add depth assert in address_space_to_flatview

2022-12-20 Thread Chuang Xu
On 2022/12/16 上午12:04, Peter Xu wrote: On Wed, Dec 14, 2022 at 04:38:52PM -0500, Peter Xu wrote: On Wed, Dec 14, 2022 at 08:03:38AM -0800, Chuang Xu wrote: On 2022/12/13 下午9:35, Chuang Xu wrote: Before using any flatview, sanity check we're not during a memory region transaction or the map can

Re: [RFC v3 1/3] memory: add depth assert in address_space_to_flatview

2022-12-20 Thread Chuang Xu
On 2022/12/16 上午12:51, Peter Maydell wrote: On Tue, 13 Dec 2022 at 13:36, Chuang Xu wrote: Before using any flatview, sanity check we're not during a memory region transaction or the map can be invalid. Signed-off-by: Chuang Xu --- include/exec/memory.h | 9 + softmmu/memory.c

Re: [RFC v3 1/3] memory: add depth assert in address_space_to_flatview

2022-12-15 Thread Peter Maydell
On Tue, 13 Dec 2022 at 13:36, Chuang Xu wrote: > > Before using any flatview, sanity check we're not during a memory > region transaction or the map can be invalid. > > Signed-off-by: Chuang Xu > --- > include/exec/memory.h | 9 + > softmmu/memory.c | 1 - > 2 files changed, 9 inser

Re: [RFC v3 1/3] memory: add depth assert in address_space_to_flatview

2022-12-15 Thread Peter Xu
On Wed, Dec 14, 2022 at 04:38:52PM -0500, Peter Xu wrote: > On Wed, Dec 14, 2022 at 08:03:38AM -0800, Chuang Xu wrote: > > On 2022/12/13 下午9:35, Chuang Xu wrote: > > > > Before using any flatview, sanity check we're not during a memory > > region transaction or the map can be invalid. > > > > Sig

Re: [RFC v3 1/3] memory: add depth assert in address_space_to_flatview

2022-12-14 Thread Peter Xu
On Wed, Dec 14, 2022 at 08:03:38AM -0800, Chuang Xu wrote: > On 2022/12/13 下午9:35, Chuang Xu wrote: > > Before using any flatview, sanity check we're not during a memory > region transaction or the map can be invalid. > > Signed-off-by: Chuang Xu > > --- > include/exec/memory.h | 9 + >

Re: [RFC v3 1/3] memory: add depth assert in address_space_to_flatview

2022-12-14 Thread Chuang Xu
On 2022/12/13 下午9:35, Chuang Xu wrote: Before using any flatview, sanity check we're not during a memory region transaction or the map can be invalid. Signed-off-by: Chuang Xu --- include/exec/memory.h | 9 + softmmu/memory.c | 1 - 2 files changed, 9 insertions(+), 1 deletion(-)

[RFC v3 1/3] memory: add depth assert in address_space_to_flatview

2022-12-13 Thread Chuang Xu
Before using any flatview, sanity check we're not during a memory region transaction or the map can be invalid. Signed-off-by: Chuang Xu --- include/exec/memory.h | 9 + softmmu/memory.c | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/exec/memory.h b/inc