All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhao Liu <zhao1.liu@intel.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: "Markus Armbruster" <armbru@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Mark Burton" <mburton@qti.qualcomm.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Alessandro Di Federico" <ale@rev.ng>,
	"Alistair Francis" <alistair.francis@wdc.com>,
	"Anton Johansson" <anjo@rev.ng>, "Brian Cain" <bcain@quicinc.com>,
	"Chao Peng" <chao.p.peng@linux.intel.com>,
	"Neo Jia" <cjia@nvidia.com>, "Cédric Le Goater" <clg@kaod.org>,
	"Wedgwood, Chris" <cw@f00f.org>,
	dhedde@kalrayinc.com, "Eric Blake" <eblake@redhat.com>,
	eblot@rivosinc.com,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	"Elena Ufimtseva" <elena.ufimtseva@oracle.com>,
	"Auger Eric" <eric.auger@redhat.com>,
	"Felipe Franciosi" <felipe@nutanix.com>,
	iggy@theiggy.com, "Warner Losh" <imp@bsdimp.com>,
	"Jan Kiszka" <jan.kiszka@web.de>,
	"Jason Gunthorpe" <jgg@nvidia.com>,
	"Jidong Xiao" <jidong.xiao@gmail.com>,
	"Jim Shu" <jim.shu@sifive.com>,
	"Joao Martins" <joao.m.martins@oracle.com>,
	"Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
	"Luc Michel" <luc@lmichel.fr>,
	"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
	"Max Chou" <max.chou@sifive.com>,
	"Meirav Dean" <mdean@redhat.com>,
	mimu@linux.vnet.ibm.com, "Ho, Nelson" <nelson.ho@windriver.com>,
	"Paul Walmsley" <paul.walmsley@sifive.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Roberto Campesato" <rbc@meta.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Shameerali Kolothum Thodi"
	<shameerali.kolothum.thodi@huawei.com>,
	"Bernhard Beschow" <shentey@gmail.com>,
	"Stefan Hajnoczi" <stefanha@gmail.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Wei Wang" <wei.w.wang@intel.com>,
	z.huo@139.com, "LIU Zhiwei" <zhiwei_liu@linux.alibaba.com>,
	"Wu, Zhiyong" <zwu.kernel@gmail.com>
Subject: Re: KVM/QEMU Community call 29/04/2025 agenda items?
Date: Wed, 7 May 2025 16:24:23 +0800	[thread overview]
Message-ID: <aBsYt/nm/6+8tHtx@intel.com> (raw)
In-Reply-To: <aBIGdQab_PufZ2X6@redhat.com>

Ping Philippe?

> > Another example: the KVM PMU filter series linked above wants to define
> > 
> >     { 'enum': 'KvmPmuEventFormat',
> >       'data': ['raw', 'x86-select-umask', 'x86-masked-entry'] }
> > 
> > The enum makes sense only when we have CONFIG_KVM.  Member @raw makes
> > sense regardless of target then.  The other two only for TARGET_I386.
> 
> NB, ...makes sense only when we have CONFIG_KVM **and** the QEMU
> process was launched with '-accel kvm'.
> 
> It feels strange that we want our reported schema show a difference when
> we launch "qemu-system-x86_64 -accel tcg" between two builds one with
> and without CONFIG_KVM, when KVM is not in use ? 
> 
> Or to reverse the question, why does it matter if we report existence
> of KvmPmuEventFormat unconditionally ?
> 
> > We could elect to forgo such conditionals.  The main disadvantage is
> > loss of precision in query-qmp-schema.  Which may or may not matter, and
> > may or may not box us into corners.
> 
> Is the precision we have justifiable ?
> 
> When it comes to runtime configuration QMP is already imprecise.
> 
> eg set-cpu-topology on x390 is KVM only but still there
>    when running with TCG
> 
> eg reporting query-hotpluggable-cpus on machine types that
>    lack hotplug
> 
> eg reporting set-numa-node on arches/machines that lack NUMA
> 
> eg reporting query-balloon when no balloon device is present
> 
> eg reporting various xen- commands when either the target
>    or machine type lack Xen support
> 
> eg reporting many cxl-* commands when either the target
>    or machine type lacks CXL support.

Indeed, I think Daniel's examples are great. @Philipppe, are these cases
considered in the context of single binary/heterogeneous emulation?

> IOW the use of TARGET_ conditionals are only addressing a very
> narrow area of (im)precision, whose rationale is largely an
> artifact of our historical separate binary / multiple builds
> choice. The only real justification for continuing with this
> is that we've always done it.
> 
> Creating a general runtime conditional mechanism in QAPI feels
> like opening a pandora's box.
> 
> We'll have a mechanism but it will be impractical to use it fully
> enough to be able to claim we are actually precise. The scope of
> runtime choices/conditions is too huge.
> 
> It risks creating a mechanism that requires a never ending stream
> of patches to address continually reported gaps. A potentially
> significant maintainer burden.
> 
> By comparison the CONFIG_ conditionals in QAPI, both the scope
> and semantics clear and it is a fairly tractable problem, although
> even there we miss them eg lack of CONFIG_XEN conditions on xen
> commands.
> 


  reply	other threads:[~2025-05-07  8:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-28 11:05 KVM/QEMU Community call 29/04/2025 agenda items? Alex Bennée
2025-04-28 12:57 ` Philippe Mathieu-Daudé
2025-04-29 10:09   ` Philippe Mathieu-Daudé
2025-04-29 14:24   ` Paolo Bonzini
2025-04-30 10:41     ` Markus Armbruster
2025-04-30 11:16       ` Daniel P. Berrangé
2025-05-07  8:24         ` Zhao Liu [this message]
2025-05-07 14:34           ` Philippe Mathieu-Daudé
2025-04-30 14:36       ` Philippe Mathieu-Daudé
2025-05-07 15:11         ` Markus Armbruster
2025-05-08  8:47           ` Zhao Liu
2025-05-08 12:32             ` Markus Armbruster
2025-05-08 14:09           ` Daniel P. Berrangé
2025-04-29 15:20 ` Alex Bennée

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=aBsYt/nm/6+8tHtx@intel.com \
    --to=zhao1.liu@intel.com \
    --cc=ale@rev.ng \
    --cc=alex.bennee@linaro.org \
    --cc=alistair.francis@wdc.com \
    --cc=anjo@rev.ng \
    --cc=armbru@redhat.com \
    --cc=bcain@quicinc.com \
    --cc=berrange@redhat.com \
    --cc=chao.p.peng@linux.intel.com \
    --cc=cjia@nvidia.com \
    --cc=clg@kaod.org \
    --cc=cw@f00f.org \
    --cc=dhedde@kalrayinc.com \
    --cc=eblake@redhat.com \
    --cc=eblot@rivosinc.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=eduardo@habkost.net \
    --cc=elena.ufimtseva@oracle.com \
    --cc=eric.auger@redhat.com \
    --cc=felipe@nutanix.com \
    --cc=iggy@theiggy.com \
    --cc=imp@bsdimp.com \
    --cc=jan.kiszka@web.de \
    --cc=jgg@nvidia.com \
    --cc=jidong.xiao@gmail.com \
    --cc=jim.shu@sifive.com \
    --cc=joao.m.martins@oracle.com \
    --cc=konrad.wilk@oracle.com \
    --cc=luc@lmichel.fr \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=max.chou@sifive.com \
    --cc=mburton@qti.qualcomm.com \
    --cc=mdean@redhat.com \
    --cc=mimu@linux.vnet.ibm.com \
    --cc=nelson.ho@windriver.com \
    --cc=paul.walmsley@sifive.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rbc@meta.com \
    --cc=richard.henderson@linaro.org \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=shentey@gmail.com \
    --cc=stefanha@gmail.com \
    --cc=thuth@redhat.com \
    --cc=wei.w.wang@intel.com \
    --cc=z.huo@139.com \
    --cc=zhiwei_liu@linux.alibaba.com \
    --cc=zwu.kernel@gmail.com \
    /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.