qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, "Thomas Huth" <thuth@redhat.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH v2 10/32] hw/core: report security status in query-machines
Date: Fri, 24 Oct 2025 14:32:24 +0100	[thread overview]
Message-ID: <aPt_6NX7n8Uqb76J@redhat.com> (raw)
In-Reply-To: <87zf9h6cd5.fsf@pond.sub.org>

On Thu, Oct 23, 2025 at 02:17:42PM +0200, Markus Armbruster wrote:
> Daniel P. Berrangé <berrange@redhat.com> writes:
> 
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > ---
> >  hw/core/machine-qmp-cmds.c | 1 +
> >  qapi/machine.json          | 8 +++++++-
> >  2 files changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
> > index 6aca1a626e..4d9906f64a 100644
> > --- a/hw/core/machine-qmp-cmds.c
> > +++ b/hw/core/machine-qmp-cmds.c
> > @@ -100,6 +100,7 @@ MachineInfoList *qmp_query_machines(bool has_compat_props, bool compat_props,
> >          if (mc->default_ram_id) {
> >              info->default_ram_id = g_strdup(mc->default_ram_id);
> >          }
> > +        info->secure = object_class_is_secure(OBJECT_CLASS(mc));
> >  
> >          if (compat_props && mc->compat_props) {
> >              int i;
> > diff --git a/qapi/machine.json b/qapi/machine.json
> > index 038eab281c..bb2b308ccd 100644
> > --- a/qapi/machine.json
> > +++ b/qapi/machine.json
> > @@ -194,6 +194,11 @@
> >  #     present when `query-machines` argument @compat-props is true.
> >  #     (since 9.1)
> >  #
> > +# @secure: If true, the machine is declared to provide a security
> > +#     boundary from the guest; if false the machine is either
> > +#     not providing a security boundary, or its status is undefined.
> > +#     (since 10.2)
> > +#
> >  # Features:
> >  #
> >  # @unstable: Member @compat-props is experimental.
> > @@ -207,7 +212,8 @@
> >              'deprecated': 'bool', '*default-cpu-type': 'str',
> >              '*default-ram-id': 'str', 'acpi': 'bool',
> >              '*compat-props': { 'type': ['CompatProperty'],
> > -                               'features': ['unstable'] } } }
> > +                               'features': ['unstable'] },
> > +            'secure': 'bool' } }
> >  
> >  ##
> >  # @query-machines:
> 
> Isn't this redundant with qom-list-types?
> 
> {"execute": "qom-list-types", "arguments": {"implements": "machine"}}

Well if the mgmt app is already using 'query-machines' for other reasons,
and doesn't currently use 'qom-list-types', then it is useful to have
the info reported in the former too.  Also I viewed the 'secure' flag
as being conceptually twinned with the 'deprecated' flag which is also
here in 'query-machines'.


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2025-10-24 13:33 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-26 14:01 [PATCH v2 00/32] Encode object type security status in code Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 01/32] qom: replace 'abstract' with 'flags' Daniel P. Berrangé
2025-10-23 10:26   ` Markus Armbruster
2025-10-24 13:39     ` Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 02/32] qom: add tracking of security state of object types Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 03/32] qapi: add 'insecure-types' option for -compat argument Daniel P. Berrangé
2025-10-23 10:38   ` Markus Armbruster
2025-09-26 14:01 ` [PATCH v2 04/32] system: check security for accelerator types Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 05/32] system: report acclerator security status in help output Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 06/32] system: check security for machine types Daniel P. Berrangé
2025-10-23 11:51   ` Markus Armbruster
2025-09-26 14:01 ` [PATCH v2 07/32] system: report machine security status in help output Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 08/32] system: check security of device types Daniel P. Berrangé
2025-10-23 11:54   ` Markus Armbruster
2025-10-24 13:28     ` Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 09/32] system: report device security status in help output Daniel P. Berrangé
2025-10-23 11:57   ` Markus Armbruster
2025-09-26 14:01 ` [PATCH v2 10/32] hw/core: report security status in query-machines Daniel P. Berrangé
2025-10-23 12:17   ` Markus Armbruster
2025-10-24 13:32     ` Daniel P. Berrangé [this message]
2025-09-26 14:01 ` [PATCH v2 11/32] qom: report & filter on security status in qom-list-types Daniel P. Berrangé
2025-10-23 10:58   ` Markus Armbruster
2025-10-24 13:38     ` Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 12/32] docs: expand security docs with info about security status Daniel P. Berrangé
2025-10-23 12:22   ` Markus Armbruster
2025-10-24 13:42     ` Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 13/32] machine: add helpers for declaring secure/insecure machine types Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 14/32] hw: mark x86, s390, ppc, arm versioned machine types as secure Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 15/32] hw: declare Xen & microvm machines as secure, isapc as insecure Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 16/32] hw/core: declare 'none' machine to be insecure Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 17/32] accel: mark kvm, xen & hvf as secure; tcg & qtest as insecure Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 18/32] hw: mark all virtio PCI devices as secure Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 19/32] hw: mark all virtio CCW " Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 20/32] hw: mark all vhost devices a secure Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 21/32] hw: mark all remaining virtio object types as secure Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 22/32] hw/vfio: mark all VFIO object classes " Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 23/32] hw/xen: mark all Xen related object types as being secure Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 24/32] hw/net: mark most non-virtio NICs as insecure Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 25/32] hw/usb: mark most USB devices/hosts as secure Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 26/32] hw/watchdog: mark some watchdog devices " Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 27/32] hw/scsi: mark most SCSI controllers as insecure / " Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 28/32] hw/ide: mark ICH9 and ide-hd/ide-cd " Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 29/32] hw: mark test/demo devices as insecure Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 30/32] hw: define most common PCI types as secure Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 31/32] hw/pci-host: define some PCI hosts " Daniel P. Berrangé
2025-09-26 14:01 ` [PATCH v2 32/32] hw/display: mark most display adapters as insecure Daniel P. Berrangé
2025-10-23  7:23 ` [PATCH v2 00/32] Encode object type security status in code Markus Armbruster
2025-10-23  9:00   ` Daniel P. Berrangé
2025-10-23 12:38 ` Markus Armbruster

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=aPt_6NX7n8Uqb76J@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=thuth@redhat.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 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).