[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Making QEMU easier for management tools and applications
From: |
Markus Armbruster |
Subject: |
Re: Making QEMU easier for management tools and applications |
Date: |
Mon, 27 Jan 2020 10:30:16 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Paolo Bonzini <address@hidden> writes:
> Il mer 15 gen 2020, 10:21 Markus Armbruster <address@hidden> ha scritto:
>
>> > We don’t want the QAPI to let arbitrary fields of a QOM object
>> > be modified, do we?
>>
>> We already do: QMP command qom-set. If it breaks your guest, you get to
>> keep the pieces.
>>
>
> That's not true. We chose not to make that a "recommended" interface, and
> instead we add new commands. However that's mostly to avoid tying our hands
> and not making too much of QOM part of the API. But I would be very
> surprised if a guest could be broken with qom-set.
>
> This was definitely not the case when QOM was introduced in a half-baked
> state, but let's not indulge in self-flagellation more than it's actually
> necessary.
Nobody thinks of qom-set when adding a QOM property.
qom-set runs a setter function that can do anything. Is that safe at
any point of time? Depends.
Fortunately, most setters merely write to some object instance variable.
Often, the object's code reads the instance variable only in realize(),
and never writes to it. qom-set is safe then, but not terribly useful.
More interesting are the ones that are read and written throughout the
object's life cycle. Is qom-set safe at any point of time? Depends.
Your belief qom-set can't break a guest in practice is reassuring.
However, the point I was trying to make with "you get to keep the
pieces" is precisely that we're "not making too much of QOM part of the
API".
An additional point I'd like to repeat now: which parts of QOM are is
pretty much anybody's guess.
- Re: Integrating QOM into QAPI, (continued)
- Re: Integrating QOM into QAPI, Christophe de Dinechin, 2020/01/26
- Re: Integrating QOM into QAPI, Marc-André Lureau, 2020/01/26
- Re: Integrating QOM into QAPI, Paolo Bonzini, 2020/01/26
- Re: Integrating QOM into QAPI, Peter Maydell, 2020/01/26
- Re: Making QEMU easier for management tools and applications, Marc-André Lureau, 2020/01/15
- Re: Making QEMU easier for management tools and applications, Markus Armbruster, 2020/01/15
- Re: Making QEMU easier for management tools and applications, Paolo Bonzini, 2020/01/25
- Re: Making QEMU easier for management tools and applications,
Markus Armbruster <=
Re: Making QEMU easier for management tools and applications, Stefan Hajnoczi, 2020/01/13
Re: Making QEMU easier for management tools and applications, John Snow, 2020/01/22
- Re: Making QEMU easier for management tools and applications, Markus Armbruster, 2020/01/23
- Re: Making QEMU easier for management tools and applications, John Snow, 2020/01/23
- Re: Making QEMU easier for management tools and applications, Daniel P . Berrangé, 2020/01/23
- Re: Making QEMU easier for management tools and applications, John Snow, 2020/01/23
- Re: Making QEMU easier for management tools and applications, Markus Armbruster, 2020/01/24
- Re: Making QEMU easier for management tools and applications, Daniel P . Berrangé, 2020/01/24
- Re: Making QEMU easier for management tools and applications, Kevin Wolf, 2020/01/24
- Re: Making QEMU easier for management tools and applications, John Snow, 2020/01/24