Re: [RFC PATCH v2 3/5] exec/memattrs: Introduce MemTxAttrs::bus_perm field

2021-12-15 Thread Philippe Mathieu-Daudé
On 8/23/21 21:04, David Hildenbrand wrote: > On 23.08.21 20:41, Peter Xu wrote: >> On Mon, Aug 23, 2021 at 06:41:55PM +0200, Philippe Mathieu-Daudé wrote: >>> +/* Permission to restrict bus memory accesses. See >>> MemTxAttrs::bus_perm */ >>> +enum { >>> +    MEMTXPERM_UNSPECIFIED   = 0, >>> +   

Re: [RFC PATCH v2 3/5] exec/memattrs: Introduce MemTxAttrs::bus_perm field

2021-12-15 Thread Philippe Mathieu-Daudé
On 8/24/21 15:08, Stefan Hajnoczi wrote: > On Mon, Aug 23, 2021 at 06:41:55PM +0200, Philippe Mathieu-Daudé wrote: >> Add the 'direct_access' bit to the memory attributes to restrict >> bus master access to ROM/RAM. >> Have read/write accessors return MEMTX_BUS_ERROR if an access is >> restricted

Re: [RFC PATCH v2 3/5] exec/memattrs: Introduce MemTxAttrs::bus_perm field

2021-08-24 Thread Stefan Hajnoczi
On Mon, Aug 23, 2021 at 06:41:55PM +0200, Philippe Mathieu-Daudé wrote: > Add the 'direct_access' bit to the memory attributes to restrict > bus master access to ROM/RAM. > Have read/write accessors return MEMTX_BUS_ERROR if an access is > restricted and the region is not ROM/RAM ('direct'). > Add

Re: [RFC PATCH v2 3/5] exec/memattrs: Introduce MemTxAttrs::bus_perm field

2021-08-23 Thread David Hildenbrand
On 23.08.21 20:41, Peter Xu wrote: On Mon, Aug 23, 2021 at 06:41:55PM +0200, Philippe Mathieu-Daudé wrote: +/* Permission to restrict bus memory accesses. See MemTxAttrs::bus_perm */ +enum { +MEMTXPERM_UNSPECIFIED = 0, +MEMTXPERM_UNRESTRICTED = 1, +MEMTXPERM_RAM_DEVICE= 2,

Re: [RFC PATCH v2 3/5] exec/memattrs: Introduce MemTxAttrs::bus_perm field

2021-08-23 Thread Peter Xu
On Mon, Aug 23, 2021 at 06:41:55PM +0200, Philippe Mathieu-Daudé wrote: > +/* Permission to restrict bus memory accesses. See MemTxAttrs::bus_perm */ > +enum { > +MEMTXPERM_UNSPECIFIED = 0, > +MEMTXPERM_UNRESTRICTED = 1, > +MEMTXPERM_RAM_DEVICE= 2, > +}; Is there a difference

[RFC PATCH v2 3/5] exec/memattrs: Introduce MemTxAttrs::bus_perm field

2021-08-23 Thread Philippe Mathieu-Daudé
Add the 'direct_access' bit to the memory attributes to restrict bus master access to ROM/RAM. Have read/write accessors return MEMTX_BUS_ERROR if an access is restricted and the region is not ROM/RAM ('direct'). Add corresponding trace events. Signed-off-by: Philippe Mathieu-Daudé ---