Re: [PATCH v7 4/6] memory: Add sanity check in address_space_to_flatview

2023-03-10 Thread Peter Xu
On Fri, Mar 10, 2023 at 10:24:23AM +0800, Chuang Xu wrote: > Before using any flatview, sanity check whether BQL or rcu is held. And > if we're during a memory region transaction, try to immediately update > mappings, or the map can be invalid. Sorry I didn't read into details in the previous vers

[PATCH v7 4/6] memory: Add sanity check in address_space_to_flatview

2023-03-09 Thread Chuang Xu
Before using any flatview, sanity check whether BQL or rcu is held. And if we're during a memory region transaction, try to immediately update mappings, or the map can be invalid. Signed-off-by: Chuang Xu --- include/exec/memory.h | 23 +++ softmmu/memory.c | 5 + 2