From: Anthony Liguori <anthony@codemonkey.ws>
To: Kevin O'Connor <kevin@koconnor.net>
Cc: Peter Maydell <peter.maydell@linaro.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
Laszlo Ersek <lersek@redhat.com>,
seabios@seabios.org, qemu-devel@nongnu.org,
Gerd Hoffmann <kraxel@redhat.com>,
Jordan Justen <jljusten@gmail.com>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [Qemu-devel] [PATCH] qemu: piix: PCI bridge ACPI hotplug support
Date: Mon, 10 Jun 2013 18:34:29 -0500 [thread overview]
Message-ID: <871u89v8u2.fsf@codemonkey.ws> (raw)
In-Reply-To: <20130610230557.GA13553@morn.localdomain>
Kevin O'Connor <kevin@koconnor.net> writes:
> On Mon, Jun 10, 2013 at 04:45:53PM -0500, Anthony Liguori wrote:
>> This discussion comes down to two things I think: (a) our existing
>> firmware interface is pretty poor (b) we are duplicating work because of
>> firmware licensing.
>>
>> We can fix (a) and there's lots of value in doing that in terms of
>> improving support for other architectures. We've discussed (b) in other
>> threads and I've stated my opinion on the direction we need to take.
>
> I'm not concerned about (b).
>
> I'm quite curious how you are planning to solve (a). I think it would
> help move this conversation forward if you could take a couple acpi
> tables in use today (eg, madt, srat) and describe the future format
> and location for each field in those tables.
Sure. Today we expose the device model through a graph that can be
losely mapped to a filesystem. We expose two methods of interest as
part of our management api:
{ 'type': 'ObjectPropertyInfo',
'data': { 'name': 'str', 'type': 'str' } }
{ 'command': 'qom-list',
'data': { 'path': 'str' },
'returns': [ 'ObjectPropertyInfo' ] }
{ 'command': 'qom-get',
'data': { 'path': 'str', 'property': 'str' },
'returns': 'visitor',
'gen': 'no' }
I am proposing that we replace fw_cfg with a device that exports the QOM
tree (read-only) via firmware.
We have a utility called qom-fuse that can mount a fuse filesystem that
exports this as a proper filesystem too.
Here's a small example:
[06:26 PM] anthony🐵 titi:~/git/qemu/QMP/tmp$ find
.
./machine
./machine/i440fx
./machine/i440fx/ioapic
./machine/i440fx/ioapic/parent_bus
./machine/i440fx/ioapic/realized
./machine/i440fx/ioapic/type
./machine/i440fx/pci.0
./machine/i440fx/pci.0/child[5]
./machine/i440fx/pci.0/child[4]
./machine/i440fx/pci.0/child[3]
./machine/i440fx/pci.0/child[2]
./machine/i440fx/pci.0/child[1]
./machine/i440fx/pci.0/child[0]
...
For the MADT table, right now SeaBIOS needs the CPU count. That can be
found by counting the number of CPU nodes. Today cpus are unattached so
they appear in /machine/unattached but we should put them in a
/machine/cpu container for clarity.
Presumably it would be good to expose the apic id too. This is already
in the QOM tree.
QOM is the full representation of the device state so we should not ever
need to add additional things to fw_cfg. More likely than not, when
SeaBIOS needs more information, it's already there so added
functionality will probably Just Work with older QEMUs.
> I think it would also be
> useful if you could do the same for a couple DSDT entries (eg,
> \_SB.PCI0, \_SB.PCI0.ISA) and also describe how you plan to have the
> guest build the AML from that info.
Likewise the slot count should be available too. We hard code slots
today but it is something we should model properly. We would model it
using QOM of course.
Internally within QEMU, this initial discussion started by saying that
any ACPI generation within QEMU should happen strictly with QOM
methods. This was the crux of my argument, if QOM is the only interface
we need, everything is there for the firmware to do the same job that
QEMU would be doing.
Regards,
Anthony Liguori
>
> -Kevin
next prev parent reply other threads:[~2013-06-10 23:34 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-10 16:41 [Qemu-devel] [PATCH] qemu: piix: PCI bridge ACPI hotplug support Michael S. Tsirkin
2013-06-10 18:58 ` Anthony Liguori
2013-06-10 19:17 ` Peter Maydell
2013-06-10 19:50 ` Anthony Liguori
2013-06-10 19:43 ` Laszlo Ersek
2013-06-10 19:57 ` Anthony Liguori
2013-06-10 20:43 ` Laszlo Ersek
2013-06-10 21:14 ` Laszlo Ersek
2013-06-10 21:45 ` Anthony Liguori
2013-06-10 23:05 ` Kevin O'Connor
2013-06-10 23:34 ` Anthony Liguori [this message]
2013-06-10 23:52 ` David Woodhouse
2013-06-11 0:11 ` Anthony Liguori
2013-06-11 14:11 ` David Woodhouse
2013-06-11 0:23 ` Kevin O'Connor
2013-06-11 0:51 ` Anthony Liguori
2013-06-11 1:19 ` Kevin O'Connor
2013-06-11 1:25 ` Anthony Liguori
2013-06-11 1:49 ` Kevin O'Connor
2013-06-11 6:49 ` Michael S. Tsirkin
2013-06-11 0:28 ` Jordan Justen
2013-06-11 1:03 ` Anthony Liguori
2013-06-11 1:32 ` Jordan Justen
2013-06-11 7:35 ` Michael S. Tsirkin
2013-06-13 23:05 ` Paolo Bonzini
2013-06-14 0:59 ` Anthony Liguori
2013-06-14 1:23 ` [Qemu-devel] [SeaBIOS] " Peter Stuge
2013-06-11 14:04 ` David Woodhouse
2013-06-13 23:02 ` [Qemu-devel] " Paolo Bonzini
2013-06-14 0:26 ` Laszlo Ersek
2013-06-16 10:00 ` Laszlo Ersek
2013-06-11 5:22 ` Michael S. Tsirkin
2013-06-11 5:33 ` Gerd Hoffmann
2013-06-11 6:55 ` Michael S. Tsirkin
2013-06-11 7:42 ` Gerd Hoffmann
2013-06-11 7:53 ` Michael S. Tsirkin
2013-06-11 8:00 ` Gerd Hoffmann
2013-06-11 8:18 ` Michael S. Tsirkin
2013-06-11 8:27 ` Michael S. Tsirkin
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=871u89v8u2.fsf@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=dwmw2@infradead.org \
--cc=jljusten@gmail.com \
--cc=kevin@koconnor.net \
--cc=kraxel@redhat.com \
--cc=lersek@redhat.com \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=seabios@seabios.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).