[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [SeaBIOS] [PATCH v2 3/4] i386: generate pc guest info
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [SeaBIOS] [PATCH v2 3/4] i386: generate pc guest info |
Date: |
Wed, 24 Jul 2013 16:52:05 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 |
Hi Gerd,
Am 24.07.2013 16:42, schrieb Gerd Hoffmann:
>>> This does not satisfy the "should use QOM properties" requirement that
>>> we discussed in the RFC thread.
>>
>> I don't know which part of the RFC thread still applied and
>> which doesn't: at that point you were rejecting the whole
>> approach.
>>
>> I found a mail where you said:
>> I'd be a lot happier if we were passing more information to this routine
>> and not hard coding it. For instance, the PCI interrupt assignments,
>> the APIC ids, the number of available CPUs, etc.
>>
>> So this is exactly what this code does.
>> What, exactly, would you like to see instead?
>> Create a guest info QOM object, and encode all information used by ACPI
>> generation as properties of this object?
>
> Don't touch device code for this.
>
>>>> -void pvpanic_init(ISABus *bus)
>>>> +void pvpanic_init(ISABus *bus, PcGuestInfo *guest_info)
>>>> {
>>>> ISADevice *dev;
>>>> - FWCfgState *fw_cfg = fw_cfg_find();
>>>> + FWCfgState *fw_cfg = guest_info->fw_cfg;
>>>> if (!fw_cfg) {
>>>> return;
>>>> }
>>>> dev = isa_create_simple (bus, TYPE_ISA_PVPANIC_DEVICE);
>>>> - pvpanic_fw_cfg(dev, fw_cfg);
>>>> + pvpanic_guest_info(dev, guest_info);
>>>> }
>
> To pick this one as example: Instead of patching pvpanic code to stuff
> config info into GuestInfo you should (1) search the device object tree
> for a pvpanic device and (b) if present read the ioport property to
> figure the base address.
Yeah, the above does not feel so nice from a QOM view (didn't review the
ACPI series yet).
> /me suggests to check out qmp_qom_get() in qmp.c. Some qom aequivalent
> for qdev_find_recursive would be handy, dunno whenever such a thing
> exists already, Andreas?
Not sure what's needed here? object_resolve_path() and
object_foreach_child() come to mind...
Regards,
Andreas
> I'd tend to accept GuestInfo as temporary thing for stuff which can't be
> figured using qom properties today. Anthony might disagree though.
>
> cheers,
> Gerd
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- [Qemu-devel] [PATCH v2 0/4] qemu: generate acpi tables for the guest, Michael S. Tsirkin, 2013/07/08
- [Qemu-devel] [PATCH v2 2/4] loader: allow adding ROMs in done callbacks, Michael S. Tsirkin, 2013/07/08
- [Qemu-devel] [PATCH v2 1/4] loader: support for unmapped ROM blobs, Michael S. Tsirkin, 2013/07/08
- [Qemu-devel] [PATCH v2 4/4] i386: ACPI table generation code from seabios, Michael S. Tsirkin, 2013/07/08
- [Qemu-devel] [PATCH v2 3/4] i386: generate pc guest info, Michael S. Tsirkin, 2013/07/08
- Re: [Qemu-devel] [SeaBIOS] [PATCH v2 3/4] i386: generate pc guest info, Anthony Liguori, 2013/07/08
- Re: [Qemu-devel] [SeaBIOS] [PATCH v2 3/4] i386: generate pc guest info, Michael S. Tsirkin, 2013/07/08
- Re: [Qemu-devel] [SeaBIOS] [PATCH v2 3/4] i386: generate pc guest info, Gerd Hoffmann, 2013/07/24
- Re: [Qemu-devel] [SeaBIOS] [PATCH v2 3/4] i386: generate pc guest info,
Andreas Färber <=
- Re: [Qemu-devel] [SeaBIOS] [PATCH v2 3/4] i386: generate pc guest info, Gerd Hoffmann, 2013/07/24
- Re: [Qemu-devel] [SeaBIOS] [PATCH v2 3/4] i386: generate pc guest info, Andreas Färber, 2013/07/24
- Re: [Qemu-devel] [SeaBIOS] [PATCH v2 3/4] i386: generate pc guest info, Paolo Bonzini, 2013/07/24
- Re: [Qemu-devel] [SeaBIOS] [PATCH v2 3/4] i386: generate pc guest info, Michael S. Tsirkin, 2013/07/24
- Re: [Qemu-devel] [SeaBIOS] [PATCH v2 3/4] i386: generate pc guest info, Michael S. Tsirkin, 2013/07/24
- Re: [Qemu-devel] [PATCH v2 3/4] i386: generate pc guest info, Michael S. Tsirkin, 2013/07/11
Re: [Qemu-devel] [PATCH v2 0/4] qemu: generate acpi tables for the guest, Laszlo Ersek, 2013/07/09