[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port |
Date: |
Thu, 25 Jul 2013 15:23:59 +0300 |
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 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,ioport=...), so that isn't going to
> >> happen.
> >>
> >> cheers,
> >> Gerd
> >
> > What will catch this breakage?
> > There are 0 users actually tweaking the port
> > number so I'm sure no one will notice this.
> >
> > In any case, catching errors at compile time
> > is much better than at runtime.
> >
> > What exactly are advantages of duplicating
> > property names in this way? I don't see any.
>
> You don't need access to pvpanic internals then and thus the code can be
> moved over to the acpi generator. At least in this case where all info
> needed is already available via properties.
>
> cheers,
> Gerd
We'll have to disagree here.
There's no access to internals with an API.
I prefer using APIs, since they are compiler-checked.
--
MST
- Re: [Qemu-devel] [PATCH v3 10/14] ich9: APIs for pc guest info, (continued)
- [Qemu-devel] [PATCH v3 04/14] acpi: pre-compiled ASL files, Michael S. Tsirkin, 2013/07/24
- [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port, Michael S. Tsirkin, 2013/07/24
- Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port, Gerd Hoffmann, 2013/07/25
- Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port, Michael S. Tsirkin, 2013/07/25
- Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port, Michael S. Tsirkin, 2013/07/25
- Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port, Gerd Hoffmann, 2013/07/25
- Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port, Michael S. Tsirkin, 2013/07/25
- Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port, Gerd Hoffmann, 2013/07/25
- Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port,
Michael S. Tsirkin <=
- Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port, Andreas Färber, 2013/07/27
[Qemu-devel] [PATCH v3 13/14] hpet: add API to find it, Michael S. Tsirkin, 2013/07/24
[Qemu-devel] [PATCH v3 11/14] piix: APIs for pc guest info, Michael S. Tsirkin, 2013/07/24