Re: [Qemu-devel] [PATCH 3/6] sysbus: Add user map hints

2014-07-02 Thread Paolo Bonzini
Il 02/07/2014 11:19, Alexander Graf ha scritto: On 02.07.14 11:17, Paolo Bonzini wrote: Il 02/07/2014 11:07, Alexander Graf ha scritto: So the way this is handled for links is its an open coded check function added by the property adder. Check qdev_prop_allow_set_link_before_realize() for a pr

Re: [Qemu-devel] [PATCH 3/6] sysbus: Add user map hints

2014-07-02 Thread Alexander Graf
On 02.07.14 11:17, Paolo Bonzini wrote: Il 02/07/2014 11:07, Alexander Graf ha scritto: So the way this is handled for links is its an open coded check function added by the property adder. Check qdev_prop_allow_set_link_before_realize() for a precedent. However, unlike Alex's case the link s

Re: [Qemu-devel] [PATCH 3/6] sysbus: Add user map hints

2014-07-02 Thread Paolo Bonzini
Il 02/07/2014 11:07, Alexander Graf ha scritto: So the way this is handled for links is its an open coded check function added by the property adder. Check qdev_prop_allow_set_link_before_realize() for a precedent. However, unlike Alex's case the link setter is complicated and a simple tail ca

Re: [Qemu-devel] [PATCH 3/6] sysbus: Add user map hints

2014-07-02 Thread Alexander Graf
On 02.07.14 11:03, Peter Crosthwaite wrote: On Wed, Jul 2, 2014 at 6:24 PM, Alexander Graf wrote: On 02.07.14 06:12, Peter Crosthwaite wrote: On Wed, Jul 2, 2014 at 7:49 AM, Alexander Graf wrote: We want to give the user the ability to tell our machine file where he wants to have devices ma

Re: [Qemu-devel] [PATCH 3/6] sysbus: Add user map hints

2014-07-02 Thread Peter Crosthwaite
On Wed, Jul 2, 2014 at 6:24 PM, Alexander Graf wrote: > > On 02.07.14 06:12, Peter Crosthwaite wrote: >> >> On Wed, Jul 2, 2014 at 7:49 AM, Alexander Graf wrote: >>> >>> We want to give the user the ability to tell our machine file where he >>> wants >>> to have devices mapped to. This patch adds

Re: [Qemu-devel] [PATCH 3/6] sysbus: Add user map hints

2014-07-02 Thread Paolo Bonzini
Il 02/07/2014 10:24, Alexander Graf ha scritto: So this suggests your reasoning for side effected _ptr write is just for validity checking. So another approach could be to add a "check" function to the _ptr variants (rather than an open coded) setter. This has the advantage of being consistent

Re: [Qemu-devel] [PATCH 3/6] sysbus: Add user map hints

2014-07-02 Thread Alexander Graf
On 02.07.14 06:12, Peter Crosthwaite wrote: On Wed, Jul 2, 2014 at 7:49 AM, Alexander Graf wrote: We want to give the user the ability to tell our machine file where he wants to have devices mapped to. This patch adds code to create these hints dynamically and expose them as object properties

Re: [Qemu-devel] [PATCH 3/6] sysbus: Add user map hints

2014-07-01 Thread Peter Crosthwaite
On Wed, Jul 2, 2014 at 7:49 AM, Alexander Graf wrote: > We want to give the user the ability to tell our machine file where he wants > to have devices mapped to. This patch adds code to create these hints > dynamically and expose them as object properties that can only be modified > before device

[Qemu-devel] [PATCH 3/6] sysbus: Add user map hints

2014-07-01 Thread Alexander Graf
We want to give the user the ability to tell our machine file where he wants to have devices mapped to. This patch adds code to create these hints dynamically and expose them as object properties that can only be modified before device realization. Signed-off-by: Alexander Graf --- hw/core/sysbu