From: Markus Armbruster <armbru@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Natalia Fursova" <Natalia.Fursova@ispras.ru>,
"Andreas Färber" <afaerber@suse.de>,
'Паша' <Pavel.Dovgaluk@ispras.ru>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qgraph
Date: Tue, 11 Jun 2019 10:56:18 +0200 [thread overview]
Message-ID: <87o934sdot.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <c49abf01-c209-b206-edee-507c31269011@redhat.com> (Paolo Bonzini's message of "Mon, 10 Jun 2019 18:18:31 +0200")
Paolo Bonzini <pbonzini@redhat.com> writes:
> On 10/06/19 18:12, Andreas Färber wrote:
>> Am 10.06.19 um 15:52 schrieb Paolo Bonzini:
>>> On 10/06/19 15:28, Andreas Färber wrote:
>>>> Am 10.06.19 um 14:03 schrieb Paolo Bonzini:
>>>>> Well, that was explained upthread---finding out what device can be
>>>>> plugged where.
Fair feature request. It has come up before.
[...]
>>>> So if we want a new QMP operation, the most sense would probably make
>>>> where-can-I-attach-type(foo) returning a list of QOM paths, showing only
>>>> the first free slot per bus. That would allow a more efficient lookup
>>>> implementation inside QEMU than needing to check each slot[n] property
>>>> via qom-get after discovering it with qom-list.
>>>
>>> Note that what Natalia is seeking is an introspection mechanism to be
>>> used _before_ creating a virtual machine though.
This requires introspecting the machine to find its onboard devices,
then introspecting onboard devices to find relevant sockets. Perhaps
even introspect the devices that could be plugged into available sockets
to find more sockets.
I'm afraid this founders right on the first step: we can't introspect
machines that way, can we?
Instead, we need to run with -M $machine_of_interest, then walk the QOM
tree to find the onboard devices.
>> QMP implied creating a virtual machine though.
>
> Yes, but you can start QEMU with -M none and just invoke QOM
> introspection commands.
Yes, this is how introspection (both QMP and QOM) is commonly used.
Just keep in mind one difference: QMP is static, QOM is dynamic.
QMP being static means it's defined at compile time. So is the value of
query-qmp-schema. Same QEMU build, same value. This permits caching.
QOM being dynamic means to introspect an object's properties, you have
to create it. Worse, an object's properties may (in theory) change at
any time. *Properties*, not just property *values*. In practice, I'd
expect properties to change only at realize time.
QOM introspection can only see the properties in a newly created object.
Even these could (in theory) depend on state, i.e. the next time you
introspect, you could get a different result. Even in the same process.
I never quite understood why QOM needs *that* much flexibility. But it
is how it is. The common way for a management application to deal with
it is to assume what introspection shows us is for all practical
purposes close enough to what we'll actually get.
[...]
next prev parent reply other threads:[~2019-06-11 8:58 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5cf62de9.1c69fb81.66fc.8f4fSMTPIN_ADDED_BROKEN@mx.google.com>
2019-06-04 15:06 ` [Qemu-devel] qgraph Paolo Bonzini
2019-06-05 12:34 ` Natalia Fursova
[not found] ` <5cf7b6e6.1c69fb81.1cdca.e260SMTPIN_ADDED_BROKEN@mx.google.com>
2019-06-05 13:07 ` Paolo Bonzini
2019-06-05 14:22 ` Natalia Fursova
2019-06-10 9:53 ` Natalia Fursova
2019-06-10 11:57 ` Andreas Färber
2019-06-10 12:03 ` Paolo Bonzini
2019-06-10 13:28 ` Andreas Färber
2019-06-10 13:52 ` Paolo Bonzini
2019-06-10 16:12 ` Andreas Färber
2019-06-10 16:18 ` Paolo Bonzini
2019-06-11 8:56 ` Markus Armbruster [this message]
2019-06-11 10:31 ` Paolo Bonzini
2019-06-11 13:39 ` Markus Armbruster
2019-06-11 13:44 ` Paolo Bonzini
2019-07-02 11:44 ` Natalia Fursova
2019-07-02 15:26 ` Markus Armbruster
2019-07-03 8:19 ` Natalia Fursova
[not found] ` <5d1b4524.1c69fb81.ddba5.77bdSMTPIN_ADDED_BROKEN@mx.google.com>
2019-07-02 11:54 ` Peter Maydell
2019-06-11 13:51 ` Andreas Färber
2019-06-04 8:37 Natalia Fursova
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=87o934sdot.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=Natalia.Fursova@ispras.ru \
--cc=Pavel.Dovgaluk@ispras.ru \
--cc=afaerber@suse.de \
--cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.