On Thu, 2024-06-27 at 10:14 +0100, Daniel P. Berrangé wrote:
> On Thu, Jun 27, 2024 at 11:06:50AM +0200, Stefano Garzarella wrote:
> > On Fri, Jun 21, 2024 at 03:29:06PM GMT, Roy Hopkins wrote:
> > > Adds an IGVM loader to QEMU which processes a given IGVM file and
> > > applies the directives within the file to the current guest
> > > configuration.
> > > 
> > > The IGVM loader can be used to configure both confidential and
> > > non-confidential guests. For confidential guests, the
> > > ConfidentialGuestSupport object for the system is used to encrypt
> > > memory, apply the initial CPU state and perform other confidential guest
> > > operations.
> > > 
> > > The loader is configured via a new IgvmCfg QOM object which allows the
> > > user to provide a path to the IGVM file to process.
> > > 
> > > Signed-off-by: Roy Hopkins <roy.hopk...@suse.com>
> > > ---
> > > qapi/qom.json             |  16 +
> > > backends/igvm.h           |  37 ++
> > > include/sysemu/igvm-cfg.h |  54 +++
> > > backends/igvm-cfg.c       |  66 ++++
> > > backends/igvm.c           | 791 ++++++++++++++++++++++++++++++++++++++
> > > backends/meson.build      |   2 +
> > > 6 files changed, 966 insertions(+)
> > > create mode 100644 backends/igvm.h
> > > create mode 100644 include/sysemu/igvm-cfg.h
> > > create mode 100644 backends/igvm-cfg.c
> > > create mode 100644 backends/igvm.c
> > > 
> > > diff --git a/qapi/qom.json b/qapi/qom.json
> > > index 8bd299265e..e586707c4c 100644
> > > --- a/qapi/qom.json
> > > +++ b/qapi/qom.json
> > > @@ -874,6 +874,18 @@
> > >   'base': 'RngProperties',
> > >   'data': { '*filename': 'str' } }
> > > 
> > > +##
> > > +# @IgvmCfgProperties:
> > > +#
> > > +# Properties common to objects that handle IGVM files.
> > > +#
> > > +# @file: IGVM file to use to configure guest (default: none)
> > > +#
> > > +# Since: 9.1
> > > +##
> > > +{ 'struct': 'IgvmCfgProperties',
> > > +  'data': { '*file': 'str' } }
> > 
> >     'if': 'CONFIG_IGVM'
> > 
> > I recently did a similar modification to QAPIs and Markus suggested to add
> > the if here as well, see
> > https://lore.kernel.org/qemu-devel/87zfs2z7jo....@pond.sub.org/
> 
> Yes, it avoids the code generator emitting an otherwise unusd
> struct when CONFIG_IGVM is unset.

Thanks. I'll add that change.

> 
> 
> With regards,
> Daniel


Reply via email to