From: Peter Xu <peterx@redhat.com>
To: "Cédric Le Goater" <clg@redhat.com>
Cc: qemu-devel@nongnu.org,
"Dr . David Alan Gilbert" <dave@treblig.org>,
"Jason Wang" <jasowang@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Fabiano Rosas" <farosas@suse.de>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Laurent Vivier" <lvivier@redhat.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Alexandr Moshkov" <dtalexundeer@yandex-team.ru>,
"Vladimir Sementsov-Ogievskiy" <vsementsov@yandex-team.ru>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Thomas Huth" <thuth@redhat.com>, "Kevin Wolf" <kwolf@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Juraj Marcin" <jmarcin@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Akihiko Odaki" <odaki@rsg.ci.i.u-tokyo.ac.jp>,
"Daniel P . Berrangé" <berrange@redhat.com>,
"Eric Blake" <eblake@redhat.com>
Subject: Re: [PATCH RFC 00/10] QOM: Introduce OBJECT_COMPAT class
Date: Thu, 11 Dec 2025 12:14:48 -0500 [thread overview]
Message-ID: <aTr8CDd1vBuOIx_B@x1.local> (raw)
In-Reply-To: <ab8ac8e1-b371-410d-88da-21e93a5985b0@redhat.com>
On Thu, Dec 11, 2025 at 05:29:37PM +0100, Cédric Le Goater wrote:
> On 12/9/25 17:28, Peter Xu wrote:
> > [This is an RFC series, as being marked out. It is trying to collect
> > opinions. It's not for merging yet]
> >
> > Background
> > ==========
> >
> > It all starts with machine compat properties..
> >
> > Machine compat properties are the major weapon we use currently in QEMU to
> > define a proper guest ABI, so that whenever we migration a VM instance from
> > whatever QEMU version1 to another QEMU version2, as long as the machine
> > type is the same, logically the ABI is guaranteed, and migration should
> > succeed. If it didn't, it's a bug.
>
> On the PPC pseries machines, we had to introduce a capability concept
> and infrastructure on top of the machine versions to handle cases where
> the features advertised to the guest (also visible to the OS) could
> differ from one host to another and generate migration errors. See :
>
> hw/ppc/spapr_caps.c
>
> These capabilities can be tweaked on the command line to adjust source
> and target host support. It's mostly related to CPU and MM features.
> Initially these difference were related to CPU bugs IIRC and different
> FW levels on the host.
>
> Is your proposal doing something similar ? Is my understanding correct ?
Maybe not exactly.
I only roughly read through SPAPR_CAP_HTM as an example, please help double
check if I misread it - I think such falls more into what Dan mentioned on
query-platform.
I am guessing CPU class of other archs should use similar concept, but I'm
not familiar with how it was done right now with QEMU/Libvirt.
So we have two standard categories of problems:
(1) A new feature, the feature should almost always be enabled on new
QEMUs, but need to be kept disabled when it can be migrated from old
QEMUs. It has nothing to do with the host / platform.
(2) A new feature, the feature should normally be enabled only whenever
the host HW/kernel supports it.
This series should try to solve problem (1) on non-qdev objects; it was
working properly for TYPE_DEVICE even before this series. It doesn't yet
solve problem (2). Problem (2), as a generic approach, may need something
like query-platform as Dan used to suggest.
IIUC all the spapr caps will still be needed, and I believe Libvirt knows
how to query caps in this case for spapr. It's a matter of if we should
have an unified interface to probe all of host capabilities, which should
not only include things like kvmppc_has_cap_htm(), but all the rest
platform info like TAP USO supports, in one batch to Libvirt. So Libvirt
takes it as "host information", plus user decisions to further decide the
QEMU cmdlines (or QMP commands used to create the system emulation).
That'll also include the -M cap-htm=XX properties to be used.
Considering that we should have ways Libvirt probing these.. maybe we do
not need to merge everything into a new QMP query-platform, but we can
consider putting all the new host info into that one command from now on.
Thanks,
--
Peter Xu
prev parent reply other threads:[~2025-12-11 17:15 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-09 16:28 [PATCH RFC 00/10] QOM: Introduce OBJECT_COMPAT class Peter Xu
2025-12-09 16:28 ` [PATCH RFC 01/10] qom: Introduce object-compat Peter Xu
2025-12-09 16:28 ` [PATCH RFC 02/10] qdev: Inherit from TYPE_OBJECT_COMPAT Peter Xu
2025-12-09 16:28 ` [PATCH RFC 03/10] hostmem: " Peter Xu
2025-12-09 16:28 ` [PATCH RFC 04/10] accel: " Peter Xu
2025-12-09 16:28 ` [PATCH RFC 05/10] confidential guest support: " Peter Xu
2025-12-09 16:28 ` [PATCH RFC 06/10] qom: Unexport object_apply_compat_props() Peter Xu
2025-12-09 16:28 ` [PATCH RFC 07/10] qdev: Pave way for exporting Property to be used in non-qdev Peter Xu
2025-12-09 16:28 ` [PATCH RFC 08/10] qdev: Introduce helper object_apply_globals() Peter Xu
2025-12-09 16:28 ` [PATCH RFC 09/10] qdev: Refactor and rename of qdev_class_add_property() Peter Xu
2025-12-09 16:28 ` [PATCH RFC 10/10] migration: Inherit from TYPE_OBJECT_COMPAT Peter Xu
2025-12-10 11:27 ` [PATCH RFC 00/10] QOM: Introduce OBJECT_COMPAT class Kevin Wolf
2025-12-10 11:52 ` Daniel P. Berrangé
2025-12-10 16:17 ` Peter Xu
2025-12-10 18:25 ` Vladimir Sementsov-Ogievskiy
2025-12-10 20:15 ` Peter Xu
2025-12-11 9:48 ` Daniel P. Berrangé
2025-12-11 15:09 ` Peter Xu
2025-12-11 15:26 ` Daniel P. Berrangé
2025-12-11 16:05 ` Peter Xu
2025-12-11 15:28 ` Akihiko Odaki
2025-12-11 15:57 ` Peter Xu
2025-12-12 5:38 ` Akihiko Odaki
2025-12-12 17:54 ` Peter Xu
2025-12-11 16:29 ` Cédric Le Goater
2025-12-11 17:14 ` Peter Xu [this message]
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=aTr8CDd1vBuOIx_B@x1.local \
--to=peterx@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=clg@redhat.com \
--cc=dave@treblig.org \
--cc=dtalexundeer@yandex-team.ru \
--cc=eblake@redhat.com \
--cc=farosas@suse.de \
--cc=jasowang@redhat.com \
--cc=jmarcin@redhat.com \
--cc=kwolf@redhat.com \
--cc=lvivier@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mst@redhat.com \
--cc=odaki@rsg.ci.i.u-tokyo.ac.jp \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=stefanha@redhat.com \
--cc=thuth@redhat.com \
--cc=vsementsov@yandex-team.ru \
/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.