From: "Andreas Färber" <afaerber@suse.de>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-devel@nongnu.org, Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: [Qemu-devel] [PATCH v3 00/14] qemu: generate acpi tables for the guest
Date: Fri, 26 Jul 2013 14:19:07 +0200 [thread overview]
Message-ID: <51F2693B.5070000@suse.de> (raw)
In-Reply-To: <20130725161917.GA7079@redhat.com>
Am 25.07.2013 18:19, schrieb Michael S. Tsirkin:
> On Thu, Jul 25, 2013 at 05:50:55PM +0200, Andreas Färber wrote:
>> Am 24.07.2013 18:01, schrieb Michael S. Tsirkin:
>>> This code can also be found here:
>>> git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git acpi
>>>
>>> Please review, and consider for 1.6.
>>
>> Quite frankly, this is still not looking the way I imagined it based on
>> the KVM call discussion and Anthony's comments that I remember:
>>
>> I believe Anthony asked to extract the information from the QOM tree,
>> originally from the SeaBIOS side, then later agreeing to do it on the
>> QEMU side.
>>
>> However here I am still seeing *functions* added in device code to check
>> device existence and to extract individual fields. I was assuming (and
>> clearly prefer) such code to live in a central place, be it acpi-build.c
>> or something else, and to use QOM *API*s to obtain information when
>> needed rather than building up lots of new structs duplicating that
>> data. That would at the same time be a test case for how useful the QOM
>> tree is
>>
>> I'm not sure if there was a misunderstanding or whether the PC QOM model
>> still sucks^W is incomplete? Anthony and Ping Fang(?) had both posted
>> patches to improve the composition tree once. If there's properties
>> missing that you need to access for ACPI, we should simply add them.
>> For i440fx we have /machine/i440fx.
>> For q35 I encountered an mch child on q35-pcihost, but what's trivially
>> missing apparently is to add q35-pcihost as a child to /machine, e.g.
>> /machine/q35.
>> Then you'll end up doing
>> Object *obj = object_resolve_path_component(qdev_get_machine(), "q35/mch");
>> object_property_get_int(obj, "foo", &err);
>> object_property_get_string(obj, "bar", &err);
>> and so on. No need to do the TYPE_... based search for everything.
>>
>> User-added -devices will show up in /machine/peripheral or
>> /machine/peripheral-anon depending on whether id= is used, so there a
>> type-based search probably makes sense. And there is nothing wrong with
>> moving the TYPE_* constants to a device header where not yet the case,
>> to allow that from generic code.
>>
>> Similarly, please don't open-code OBJECT_CHECK()s, do a trivial patch
>> with a macro that we can then reuse elsewhere. I'd be happy to review
>> such QOM patches and help fast-track them into master.
>>
>> Will take a closer look at the implementation later.
>
> This is not my understanding of previous comments on list
> or on KVM call.
>
> Basically it sounds like you want to make my work depend on completion
> of QOM conversion.
> I think we explicitly agreed full QOM convertion is not a blocker.
Not sure what you mean with "completion of QOM conversion" or "full QOM
conversion". What I am saying is that instead of spending time adding
functions to devices that fulfill your own ACPI needs only, that time
were better spent adding QOM properties where not yet existent.
Because then what you can access for ACPI can also be accessed by
libvirt and other management tools as well as qtest - I consider it a
test case. QMP does not offer an instance/path search by type.
> Meanwhile, I'm adding APIs in particular so you can work on converting
> things to QOM without bothering with ACPI. If you want to know what is
> missing, you only need to look at the patches themselves, once they are
> merged you can rework them internally without need to touch acpi code.
I do intend to look at them but did not have time yesterday.
I brought up my comments early because Hard Freeze is approaching fast
and I fear that if your v3 series is applied to 1.6 and is working, you
will not bother to send follow-up fixes after 1.6 anymore because you do
not care about whether that code is considered bad design by others, and
thus things will likely stay in a bad shape. You cannot expect me to do
everything (not to mention that it was Anthony's idea in the first place).
> As for your suggestion to poke at internal structures in a central place -
I never suggested that, on the contrary. See my example above using
Object: There is no need to even expose structs to ACPI to access things
via QOM properties.
Regards,
Andreas
> generally, I don't see why poking at internal field or properties of all
> kind of device structures or hard-coding paths in acpi-build is a good
> idea, surely accessing structures through APIs is the basic idea of data
> hiding.
>
> Using QOM to find devices rather than passing pointers around makes
> sense to me since this removes the need to depend on initialization
> order.
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2013-07-26 12:19 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-24 16:01 [Qemu-devel] [PATCH v3 00/14] qemu: generate acpi tables for the guest Michael S. Tsirkin
2013-07-24 16:01 ` [Qemu-devel] [PATCH v3 01/14] hw/i386/pc.c: move IO_APIC_DEFAULT_ADDRESS to include/hw/i386/apic.h Michael S. Tsirkin
2013-07-25 12:05 ` Gerd Hoffmann
2013-07-28 0:44 ` Andreas Färber
2013-07-24 16:01 ` [Qemu-devel] [PATCH v3 02/14] i386: add ACPI table files from seabios Michael S. Tsirkin
2013-07-24 16:01 ` [Qemu-devel] [PATCH v3 03/14] acpi: add rules to compile ASL source Michael S. Tsirkin
2013-07-25 12:09 ` Gerd Hoffmann
2013-07-24 16:01 ` [Qemu-devel] [PATCH v3 04/14] acpi: pre-compiled ASL files Michael S. Tsirkin
2013-07-24 16:01 ` [Qemu-devel] [PATCH v3 05/14] loader: use file path size from fw_cfg.h Michael S. Tsirkin
2013-07-24 23:42 ` Andreas Färber
2013-07-25 12:10 ` Gerd Hoffmann
2013-07-24 16:01 ` [Qemu-devel] [PATCH v3 06/14] i386: add bios linker/loader Michael S. Tsirkin
2013-07-25 12:11 ` Gerd Hoffmann
2013-07-26 9:42 ` Gerd Hoffmann
2013-07-28 8:08 ` Michael S. Tsirkin
2013-07-24 16:01 ` [Qemu-devel] [PATCH v3 07/14] loader: support for unmapped ROM blobs Michael S. Tsirkin
2013-07-25 12:14 ` Gerd Hoffmann
2013-07-25 12:28 ` Michael S. Tsirkin
2013-07-25 12:43 ` Gerd Hoffmann
2013-07-25 13:03 ` Michael S. Tsirkin
2013-07-25 19:57 ` Michael S. Tsirkin
2013-07-24 16:02 ` [Qemu-devel] [PATCH v3 08/14] loader: allow adding ROMs in done callbacks Michael S. Tsirkin
2013-07-25 12:15 ` Gerd Hoffmann
2013-07-24 16:02 ` [Qemu-devel] [PATCH v3 09/14] i386: define pc guest info Michael S. Tsirkin
2013-07-25 12:31 ` Gerd Hoffmann
2013-07-28 0:41 ` Andreas Färber
2013-07-28 7:36 ` Michael S. Tsirkin
2013-07-24 16:02 ` [Qemu-devel] [PATCH v3 10/14] ich9: APIs for " Michael S. Tsirkin
2013-07-25 12:33 ` Gerd Hoffmann
2013-07-28 0:37 ` Andreas Färber
2013-07-28 7:35 ` Michael S. Tsirkin
2013-07-24 16:02 ` [Qemu-devel] [PATCH v3 11/14] piix: " Michael S. Tsirkin
2013-07-25 9:32 ` Michael S. Tsirkin
2013-07-28 0:12 ` Andreas Färber
2013-07-28 7:30 ` Michael S. Tsirkin
2013-07-28 9:38 ` Andreas Färber
2013-07-28 10:14 ` Michael S. Tsirkin
2013-07-28 10:31 ` Andreas Färber
2013-07-28 11:08 ` Andreas Färber
2013-07-28 12:19 ` Michael S. Tsirkin
2013-07-25 12:34 ` Gerd Hoffmann
2013-07-24 16:02 ` [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port Michael S. Tsirkin
2013-07-25 10:29 ` Gerd Hoffmann
2013-07-25 10:55 ` Michael S. Tsirkin
2013-07-25 10:58 ` Michael S. Tsirkin
2013-07-25 11:05 ` Gerd Hoffmann
2013-07-25 11:22 ` Michael S. Tsirkin
2013-07-25 12:03 ` Gerd Hoffmann
2013-07-25 12:23 ` Michael S. Tsirkin
2013-07-27 23:58 ` Andreas Färber
2013-07-24 16:02 ` [Qemu-devel] [PATCH v3 13/14] hpet: add API to find it Michael S. Tsirkin
2013-07-25 12:36 ` Gerd Hoffmann
2013-07-27 23:38 ` Andreas Färber
2013-07-24 16:02 ` [Qemu-devel] [PATCH v3 14/14] i386: ACPI table generation code from seabios Michael S. Tsirkin
2013-07-25 13:06 ` Gerd Hoffmann
2013-07-25 13:23 ` Michael S. Tsirkin
2013-07-25 14:58 ` Gerd Hoffmann
2013-07-25 15:14 ` Michael S. Tsirkin
2013-07-26 9:06 ` Gerd Hoffmann
2013-07-26 15:30 ` Gerd Hoffmann
2013-07-28 7:00 ` Michael S. Tsirkin
2013-07-25 15:50 ` [Qemu-devel] [PATCH v3 00/14] qemu: generate acpi tables for the guest Andreas Färber
2013-07-25 16:19 ` Michael S. Tsirkin
2013-07-26 12:19 ` Andreas Färber [this message]
2013-07-27 23:22 ` Andreas Färber
2013-09-11 9:57 ` Michael S. Tsirkin
2013-07-25 17:18 ` Michael S. Tsirkin
2013-07-26 12:25 ` Andreas Färber
2013-07-29 15:27 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51F2693B.5070000@suse.de \
--to=afaerber@suse.de \
--cc=anthony@codemonkey.ws \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).