[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 02/26] target/arm: Add confidential guest support
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH v3 02/26] target/arm: Add confidential guest support |
Date: |
Tue, 26 Nov 2024 12:37:02 +0000 |
User-agent: |
Mutt/2.2.12 (2023-09-09) |
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 <eblake@redhat.com>
> Cc: Markus Armbruster <armbru@redhat.com>
> Cc: Daniel P. Berrangé <berrange@redhat.com>
> Cc: Eduardo Habkost <eduardo@habkost.net>
> Acked-by: Markus Armbruster <armbru@redhat.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Jean-Philippe Brucker <jean-philippe@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 :|
- [PATCH v3 00/26] arm: Run Arm CCA VMs with KVM, Jean-Philippe Brucker, 2024/11/25
- [PATCH v3 01/26] kvm: Merge kvm_check_extension() and kvm_vm_check_extension(), Jean-Philippe Brucker, 2024/11/25
- [PATCH v3 03/26] target/arm/kvm: Return immediately on error in kvm_arch_init(), Jean-Philippe Brucker, 2024/11/25
- [PATCH v3 05/26] target/arm/kvm: Split kvm_arch_get/put_registers, Jean-Philippe Brucker, 2024/11/25
- [PATCH v3 02/26] target/arm: Add confidential guest support, Jean-Philippe Brucker, 2024/11/25
- Re: [PATCH v3 02/26] target/arm: Add confidential guest support,
Daniel P . Berrangé <=
- [PATCH v3 07/26] target/arm/kvm: Create scratch VM as Realm if necessary, Jean-Philippe Brucker, 2024/11/25
- [PATCH v3 06/26] target/arm/kvm-rme: Initialize vCPU, Jean-Philippe Brucker, 2024/11/25
- [PATCH v3 04/26] target/arm/kvm-rme: Initialize realm, Jean-Philippe Brucker, 2024/11/25
- [PATCH v3 10/26] target/arm/kvm-rme: Add Realm Personalization Value parameter, Jean-Philippe Brucker, 2024/11/25
- [PATCH v3 09/26] target/arm/kvm-rme: Initialize Realm memory, Jean-Philippe Brucker, 2024/11/25
- [PATCH v3 11/26] target/arm/kvm-rme: Add measurement algorithm property, Jean-Philippe Brucker, 2024/11/25