All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Roy Hopkins <roy.hopkins@suse.com>
Cc: "Stefano Garzarella" <sgarzare@redhat.com>,
	qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Marcelo Tosatti" <mtosatti@redhat.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Sergio Lopez" <slp@redhat.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Alistair Francis" <alistair@alistair23.me>,
	"Peter Xu" <peterx@redhat.com>,
	"David Hildenbrand" <david@redhat.com>,
	"Igor Mammedov" <imammedo@redhat.com>,
	"Tom Lendacky" <thomas.lendacky@amd.com>,
	"Michael Roth" <michael.roth@amd.com>,
	"Jörg Roedel" <jroedel@suse.com>
Subject: Re: [PATCH 2/9] backends/confidential-guest-support: Add IGVM file parameter
Date: Wed, 20 Mar 2024 14:55:24 +0000	[thread overview]
Message-ID: <Zfr43LCD4A-Td8o0@redhat.com> (raw)
In-Reply-To: <e68e95c67048c732f15d54f7bd75732c749072f9.camel@suse.com>

On Wed, Mar 20, 2024 at 02:44:17PM +0000, Roy Hopkins wrote:
> On Tue, 2024-03-19 at 16:10 +0100, Stefano Garzarella wrote:
> > On Tue, Feb 27, 2024 at 02:50:08PM +0000, Roy Hopkins wrote:
> > > In order to add support for parsing IGVM files for secure virtual
> > > machines, a the path to an IGVM file needs to be specified as
> > > part of the guest configuration. It makes sense to add this to
> > > the ConfidentialGuestSupport object as this is common to all secure
> > > virtual machines that potentially could support IGVM based
> > > configuration.
> > > 
> > > This patch allows the filename to be configured via the QEMU
> > > object model in preparation for subsequent patches that will read and
> > > parse the IGVM file.
> > > 
> > > Signed-off-by: Roy Hopkins <roy.hopkins@suse.com>
> > > ---
> > > backends/confidential-guest-support.c     | 21 +++++++++++++++++++++
> > > include/exec/confidential-guest-support.h |  9 +++++++++
> > > qapi/qom.json                             | 13 +++++++++++++
> > > qemu-options.hx                           |  8 +++++++-
> > > 4 files changed, 50 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/backends/confidential-guest-support.c b/backends/confidential-
> > > guest-support.c
> > > index 052fde8db0..da436fb736 100644
> > > --- a/backends/confidential-guest-support.c
> > > +++ b/backends/confidential-guest-support.c
> > > @@ -20,8 +20,29 @@ OBJECT_DEFINE_ABSTRACT_TYPE(ConfidentialGuestSupport,
> > >                             CONFIDENTIAL_GUEST_SUPPORT,
> > >                             OBJECT)
> > > 
> > > +#if defined(CONFIG_IGVM)
> > > +static char *get_igvm(Object *obj, Error **errp)
> > > +{
> > > +    ConfidentialGuestSupport *cgs = CONFIDENTIAL_GUEST_SUPPORT(obj);
> > > +    return g_strdup(cgs->igvm_filename);
> > > +}
> > > +
> > > +static void set_igvm(Object *obj, const char *value, Error **errp)
> > > +{
> > > +    ConfidentialGuestSupport *cgs = CONFIDENTIAL_GUEST_SUPPORT(obj);
> > > +    g_free(cgs->igvm_filename);
> > > +    cgs->igvm_filename = g_strdup(value);
> > > +}
> > > +#endif
> > > +
> > > static void confidential_guest_support_class_init(ObjectClass *oc, void
> > > *data)
> > > {
> > > +#if defined(CONFIG_IGVM)
> > > +    object_class_property_add_str(oc, "igvm-file",
> > > +        get_igvm, set_igvm);
> > > +    object_class_property_set_description(oc, "igvm-file",
> > > +        "Set the IGVM filename to use");
> > > +#endif
> > > }
> > > 
> > > static void confidential_guest_support_init(Object *obj)
> > > diff --git a/include/exec/confidential-guest-support.h
> > > b/include/exec/confidential-guest-support.h
> > > index ba2dd4b5df..b08ad8de4d 100644
> > > --- a/include/exec/confidential-guest-support.h
> > > +++ b/include/exec/confidential-guest-support.h
> > > @@ -51,6 +51,15 @@ struct ConfidentialGuestSupport {
> > >      * so 'ready' is not set, we'll abort.
> > >      */
> > >     bool ready;
> > > +
> > > +#if defined(CONFIG_IGVM)
> > > +    /*
> > > +     * igvm_filename: Optional filename that specifies a file that contains
> > > +     *                the configuration of the guest in Isolated Guest
> > > +     *                Virtual Machine (IGVM) format.
> > > +     */
> > > +    char *igvm_filename;
> > > +#endif
> > > };
> > > 
> > > typedef struct ConfidentialGuestSupportClass {
> > > diff --git a/qapi/qom.json b/qapi/qom.json
> > > index 2a6e49365a..570bdd7d55 100644
> > > --- a/qapi/qom.json
> > > +++ b/qapi/qom.json
> > > @@ -859,6 +859,18 @@
> > >   'base': 'RngProperties',
> > >   'data': { '*filename': 'str' } }
> > > 
> > > +##
> > > +# @ConfidentialGuestProperties:
> > > +#
> > > +# Properties common to objects that are derivatives of confidential-guest-
> > > support.
> > > +#
> > > +# @igvm-file: IGVM file to use to configure guest (default: none)
> > > +#
> > > +# Since: 8.2
> > 
> > Should it be 9.0 or maybe 9.1 ?
> 
> Good question. Obviously it is hard to predict which version this will
> potentially land in. I can update it to 9.1 because it is unlikely to be in any
> version prior to this, but what is the normal convention for choosing a version
> number here?

Pick the version number that is soonest release accepting merge
of features.

IOW, most of the time you can pick the version number in current
QEMU git master HEAD. During release freeze (ie right now), you
have to pick the next version number, since features aren't accepted
during freeze.

So choosing '9.1' right now is correct.

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:[~2024-03-20 14:56 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-27 14:50 [PATCH 0/9] Introduce support for IGVM files Roy Hopkins
2024-02-27 14:50 ` [PATCH 1/9] meson: Add optional dependency on IGVM library Roy Hopkins
2024-02-27 14:50 ` [PATCH 2/9] backends/confidential-guest-support: Add IGVM file parameter Roy Hopkins
2024-03-19 15:10   ` Stefano Garzarella
2024-03-20 14:44     ` Roy Hopkins
2024-03-20 14:55       ` Daniel P. Berrangé [this message]
2024-02-27 14:50 ` [PATCH 3/9] backends/confidential-guest-support: Add functions to support IGVM Roy Hopkins
2024-03-01 16:37   ` Daniel P. Berrangé
2024-03-12 11:43     ` Roy Hopkins
2024-02-27 14:50 ` [PATCH 4/9] backends/igvm: Implement parsing and processing of IGVM files Roy Hopkins
2024-03-01 16:51   ` Daniel P. Berrangé
2024-03-12 11:58     ` Roy Hopkins
2024-02-27 14:50 ` [PATCH 5/9] i386/pc: Process IGVM file during PC initialization if present Roy Hopkins
2024-02-27 14:50 ` [PATCH 6/9] i386/pc: Skip initialization of system FW when using IGVM Roy Hopkins
2024-03-01 16:54   ` Daniel P. Berrangé
2024-03-12 12:04     ` Roy Hopkins
2024-03-27 13:28   ` Ani Sinha
2024-03-27 14:13     ` Roy Hopkins
2024-03-28 10:34       ` Ani Sinha
2024-03-28 11:03         ` Ani Sinha
2024-02-27 14:50 ` [PATCH 7/9] i386/sev: Refactor setting of reset vector and initial CPU state Roy Hopkins
2024-03-01 17:01   ` Daniel P. Berrangé
2024-03-12 15:45     ` Roy Hopkins
2024-03-12 16:12       ` Daniel P. Berrangé
2024-03-18 11:49         ` Roy Hopkins
2024-02-27 14:50 ` [PATCH 8/9] i386/sev: Implement ConfidentialGuestSupport functions for SEV Roy Hopkins
2024-02-27 14:50 ` [PATCH 9/9] docs/system: Add documentation on support for IGVM Roy Hopkins
2024-03-01 17:10   ` Daniel P. Berrangé
2024-03-18 15:59     ` Roy Hopkins
2024-03-18 16:21       ` Daniel P. Berrangé
2024-03-20 15:45         ` Roy Hopkins
2024-03-20 15:52           ` Daniel P. Berrangé
2024-03-19 15:07 ` [PATCH 0/9] Introduce support for IGVM files Stefano Garzarella
2024-03-20 14:40   ` Roy Hopkins
2024-03-20 15:35 ` Ani Sinha

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=Zfr43LCD4A-Td8o0@redhat.com \
    --to=berrange@redhat.com \
    --cc=alistair@alistair23.me \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=imammedo@redhat.com \
    --cc=jroedel@suse.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=michael.roth@amd.com \
    --cc=mst@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=roy.hopkins@suse.com \
    --cc=sgarzare@redhat.com \
    --cc=slp@redhat.com \
    --cc=thomas.lendacky@amd.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.