On Wed, Dec 15, 2021 at 07:24:21PM +0100, Philippe Mathieu-Daudé wrote: > Add the 'memory' bit to the memory attributes to restrict bus > controller accesses to memories. > > Introduce flatview_access_allowed() to check bus permission > before running any bus transaction. > > Have read/write accessors return MEMTX_BUS_ERROR if an access is > restricted. > > There is no change for the default case where 'memory' is not set. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/exec/memattrs.h | 9 +++++++++ > softmmu/physmem.c | 43 +++++++++++++++++++++++++++++++++++++++-- > 2 files changed, 50 insertions(+), 2 deletions(-) Reviewed-by: Stefan Hajnoczi