On Mon, Nov 25, 2024 at 07:56:01PM +0000, Jean-Philippe Brucker wrote: > Add a new RmeGuest object, inheriting from ConfidentialGuestSupport, to > support the Arm Realm Management Extension (RME). It is instantiated by > passing on the command-line: > > -M virt,confidential-guest-support=<id> > -object rme-guest,id=<id>[,options...] > > This is only the skeleton. Support will be added in following patches. > > Cc: Eric Blake <ebl...@redhat.com> > Cc: Markus Armbruster <arm...@redhat.com> > Cc: Daniel P. Berrangé <berra...@redhat.com> > Cc: Eduardo Habkost <edua...@habkost.net> > Acked-by: Markus Armbruster <arm...@redhat.com> > Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> > Reviewed-by: Richard Henderson <richard.hender...@linaro.org> > Signed-off-by: Jean-Philippe Brucker <jean-phili...@linaro.org> > --- > v2->v3: remove some boilerplate with OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES > --- > docs/system/confidential-guest-support.rst | 1 + > target/arm/kvm-rme.c | 40 ++++++++++++++++++++++ > target/arm/meson.build | 7 +++- > 3 files changed, 47 insertions(+), 1 deletion(-) > create mode 100644 target/arm/kvm-rme.c > > diff --git a/docs/system/confidential-guest-support.rst > b/docs/system/confidential-guest-support.rst > index 0c490dbda2..acf46d8856 100644 > --- a/docs/system/confidential-guest-support.rst > +++ b/docs/system/confidential-guest-support.rst > @@ -40,5 +40,6 @@ Currently supported confidential guest mechanisms are: > * AMD Secure Encrypted Virtualization (SEV) (see > :doc:`i386/amd-memory-encryption`) > * POWER Protected Execution Facility (PEF) (see > :ref:`power-papr-protected-execution-facility-pef`) > * s390x Protected Virtualization (PV) (see :doc:`s390x/protvirt`) > +* Arm Realm Management Extension (RME) > > Other mechanisms may be supported in future. > diff --git a/target/arm/kvm-rme.c b/target/arm/kvm-rme.c > new file mode 100644 > index 0000000000..67909349c1 > --- /dev/null > +++ b/target/arm/kvm-rme.c > @@ -0,0 +1,40 @@ > +/* > + * QEMU Arm RME support > + * > + * Copyright Linaro 2024 > + */ > + > +#include "qemu/osdep.h" > + > +#include "exec/confidential-guest-support.h" > +#include "hw/boards.h" > +#include "hw/core/cpu.h" > +#include "kvm_arm.h" > +#include "migration/blocker.h" > +#include "qapi/error.h" > +#include "qom/object_interfaces.h" > +#include "sysemu/kvm.h" > +#include "sysemu/runstate.h" > + > +#define TYPE_RME_GUEST "rme-guest" > +OBJECT_DECLARE_SIMPLE_TYPE(RmeGuest, RME_GUEST) > + > +struct RmeGuest { > + ConfidentialGuestSupport parent_obj; > +}; > + > +OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES(RmeGuest, rme_guest, RME_GUEST, > + CONFIDENTIAL_GUEST_SUPPORT, > + { TYPE_USER_CREATABLE }, { }) > + > +static void rme_guest_class_init(ObjectClass *oc, void *data) > +{ > +} > + > +static void rme_guest_init(Object *obj) > +{ > +} > + > +static void rme_guest_finalize(Object *obj) > +{ > +}
When you create a new "user creatable" object, there should also be a corresponding addition to qapi/qom.json. I believe you have the qom.json addition in a later patch, but it should actually be here 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 :|