Re: [Qemu-devel] [PATCH 03/12] qdev: separate core from the code used only by qemu-system-*

2012-10-19 Thread Eduardo Habkost
On Fri, Oct 19, 2012 at 09:31:00AM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > > On Wed, Oct 17, 2012 at 01:00:55PM -0500, Anthony Liguori wrote: > [...] > >> I don't really understand the split here and the 'system' suffix really > >> doesn't explain it for me. Could you at le

Re: [Qemu-devel] [PATCH 03/12] qdev: separate core from the code used only by qemu-system-*

2012-10-19 Thread Markus Armbruster
Eduardo Habkost writes: > On Wed, Oct 17, 2012 at 01:00:55PM -0500, Anthony Liguori wrote: [...] >> I don't really understand the split here and the 'system' suffix really >> doesn't explain it for me. Could you at least add a comment to each of >> these files explaining what belongs in them? >

Re: [Qemu-devel] [PATCH 03/12] qdev: separate core from the code used only by qemu-system-*

2012-10-17 Thread Eduardo Habkost
On Wed, Oct 17, 2012 at 01:00:55PM -0500, Anthony Liguori wrote: > Igor Mammedov writes: > > > From: Eduardo Habkost > > > > This change should help on two things: > > - Allowing DeviceState to be used by *-user; > > - Writing qdev unit tests without pulling too many dependencies. > > > > Note

Re: [Qemu-devel] [PATCH 03/12] qdev: separate core from the code used only by qemu-system-*

2012-10-17 Thread Anthony Liguori
Igor Mammedov writes: > From: Eduardo Habkost > > This change should help on two things: > - Allowing DeviceState to be used by *-user; > - Writing qdev unit tests without pulling too many dependencies. > > Note that there are two parts that depend on code compiled only on > qemu-system-*, but

[Qemu-devel] [PATCH 03/12] qdev: separate core from the code used only by qemu-system-*

2012-10-16 Thread Eduardo Habkost
This change should help on two things: - Allowing DeviceState to be used by *-user; - Writing qdev unit tests without pulling too many dependencies. Note that there are two parts that depend on code compiled only on qemu-system-*, but are still inside qdev.c: - vmstate handling - reset functio

Re: [Qemu-devel] [PATCH 03/12] qdev: separate core from the code used only by qemu-system-*

2012-10-16 Thread Eduardo Habkost
On Tue, Oct 16, 2012 at 03:57:15AM +0200, Igor Mammedov wrote: [...] > @@ -0,0 +1,68 @@ > +#include "qdev.h" > + > +void qdev_init_gpio_in(DeviceState *dev, qemu_irq_handler handler, int n) > +{ > +assert(dev->num_gpio_in == 0); > +dev->num_gpio_in = n; > +dev->gpio_in = qemu_allocate_i

[Qemu-devel] [PATCH 03/12] qdev: separate core from the code used only by qemu-system-*

2012-10-15 Thread Igor Mammedov
From: Eduardo Habkost This change should help on two things: - Allowing DeviceState to be used by *-user; - Writing qdev unit tests without pulling too many dependencies. Note that there are two parts that depend on code compiled only on qemu-system-*, but are still inside qdev.c: - vmstate h