Re: [Qemu-devel] [PATCH 01/14] memory: Define API for MemoryRegionOps to take attrs and return status

2015-04-11 Thread Edgar E. Iglesias
On Fri, Apr 10, 2015 at 03:51:07PM +0100, Peter Maydell wrote: On 10 April 2015 at 03:07, Edgar E. Iglesias edgar.igles...@gmail.com wrote: On Thu, Apr 09, 2015 at 11:21:26AM +0200, Paolo Bonzini wrote: On 09/04/2015 11:04, Peter Maydell wrote: We discussed this last time round, I think.

Re: [Qemu-devel] [PATCH 01/14] memory: Define API for MemoryRegionOps to take attrs and return status

2015-04-09 Thread Peter Maydell
On 9 April 2015 at 09:55, Edgar E. Iglesias edgar.igles...@gmail.com wrote: Did you consider using a struct here? e.g: typedef struct MemTxAttrs { unsigned int secure : 1; unsigned int master_id : 10; unsigned int etc : 1; } MemTxAttrs; I think you could still pass it by

Re: [Qemu-devel] [PATCH 01/14] memory: Define API for MemoryRegionOps to take attrs and return status

2015-04-09 Thread Edgar E. Iglesias
On Tue, Apr 07, 2015 at 09:09:47PM +0100, Peter Maydell wrote: Define an API so that devices can register MemoryRegionOps whose read and write callback functions are passed an arbitrary pointer to some transaction attributes and can return a success-or-failure status code. This will allow us

Re: [Qemu-devel] [PATCH 01/14] memory: Define API for MemoryRegionOps to take attrs and return status

2015-04-09 Thread Paolo Bonzini
On 09/04/2015 11:04, Peter Maydell wrote: We discussed this last time round, I think. Whether structs get passed in registers depends on the host CPU ABI/calling convention. Because of C++, structs up to pointer size are in practice always passed in registers. 64-bit structs may or may not.

Re: [Qemu-devel] [PATCH 01/14] memory: Define API for MemoryRegionOps to take attrs and return status

2015-04-09 Thread Edgar E. Iglesias
On Thu, Apr 09, 2015 at 10:04:39AM +0100, Peter Maydell wrote: On 9 April 2015 at 09:55, Edgar E. Iglesias edgar.igles...@gmail.com wrote: Did you consider using a struct here? e.g: typedef struct MemTxAttrs { unsigned int secure : 1; unsigned int master_id : 10;

Re: [Qemu-devel] [PATCH 01/14] memory: Define API for MemoryRegionOps to take attrs and return status

2015-04-08 Thread Paolo Bonzini
On 07/04/2015 22:09, Peter Maydell wrote: Define an API so that devices can register MemoryRegionOps whose read and write callback functions are passed an arbitrary pointer to some transaction attributes and can return a success-or-failure status code. This will allow us to model devices

[Qemu-devel] [PATCH 01/14] memory: Define API for MemoryRegionOps to take attrs and return status

2015-04-07 Thread Peter Maydell
Define an API so that devices can register MemoryRegionOps whose read and write callback functions are passed an arbitrary pointer to some transaction attributes and can return a success-or-failure status code. This will allow us to model devices which: * behave differently for ARM