Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port

2013-07-27 Thread Andreas Färber
Am 25.07.2013 14:23, schrieb Michael S. Tsirkin: > On Thu, Jul 25, 2013 at 02:03:33PM +0200, Gerd Hoffmann wrote: >> On 07/25/13 13:22, Michael S. Tsirkin wrote: >>> On Thu, Jul 25, 2013 at 01:05:12PM +0200, Gerd Hoffmann wrote: > I can change the implementation but I don't think it's > a g

Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port

2013-07-25 Thread Michael S. Tsirkin
On Thu, Jul 25, 2013 at 02:03:33PM +0200, Gerd Hoffmann wrote: > On 07/25/13 13:22, Michael S. Tsirkin wrote: > > On Thu, Jul 25, 2013 at 01:05:12PM +0200, Gerd Hoffmann wrote: > >> Hi, > >> > >>> I can change the implementation but I don't think it's > >>> a good idea to copy property names arou

Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port

2013-07-25 Thread Gerd Hoffmann
On 07/25/13 13:22, Michael S. Tsirkin wrote: > On Thu, Jul 25, 2013 at 01:05:12PM +0200, Gerd Hoffmann wrote: >> Hi, >> >>> I can change the implementation but I don't think it's >>> a good idea to copy property names around: >>> it's too fragile, compiler won't warn us if we >>> change the name

Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port

2013-07-25 Thread Michael S. Tsirkin
On Thu, Jul 25, 2013 at 01:05:12PM +0200, Gerd Hoffmann wrote: > Hi, > > > I can change the implementation but I don't think it's > > a good idea to copy property names around: > > it's too fragile, compiler won't warn us if we > > change the name or value semantics, > > I'm not worried. Chang

Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port

2013-07-25 Thread Gerd Hoffmann
Hi, > I can change the implementation but I don't think it's > a good idea to copy property names around: > it's too fragile, compiler won't warn us if we > change the name or value semantics, I'm not worried. Changing the strings will break the command line interface too (qemu -device pvpanic

Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port

2013-07-25 Thread Michael S. Tsirkin
On Thu, Jul 25, 2013 at 01:55:26PM +0300, Michael S. Tsirkin wrote: > On Thu, Jul 25, 2013 at 12:29:52PM +0200, Gerd Hoffmann wrote: > > On 07/24/13 18:02, Michael S. Tsirkin wrote: > > > Add API to find pvpanic device and get its io port. > > > Will be used to fill in guest info structure. > > >

Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port

2013-07-25 Thread Michael S. Tsirkin
On Thu, Jul 25, 2013 at 12:29:52PM +0200, Gerd Hoffmann wrote: > On 07/24/13 18:02, Michael S. Tsirkin wrote: > > Add API to find pvpanic device and get its io port. > > Will be used to fill in guest info structure. > > > +uint16_t pvpanic_port(void) > > +{ > > +Object *o = object_resolve_path

Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port

2013-07-25 Thread Gerd Hoffmann
On 07/24/13 18:02, Michael S. Tsirkin wrote: > Add API to find pvpanic device and get its io port. > Will be used to fill in guest info structure. > +uint16_t pvpanic_port(void) > +{ > +Object *o = object_resolve_path_type("", TYPE_ISA_PVPANIC_DEVICE, NULL); > +PVPanicState *s; > +if (

[Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port

2013-07-24 Thread Michael S. Tsirkin
Add API to find pvpanic device and get its io port. Will be used to fill in guest info structure. Signed-off-by: Michael S. Tsirkin --- hw/misc/pvpanic.c| 11 +++ include/hw/i386/pc.h | 1 + 2 files changed, 12 insertions(+) diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c index