]> git.ipfire.org Git - thirdparty/qemu.git/commit
confidential guest support: Introduce cgs "ready" flag
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 20 Oct 2020 06:01:19 +0000 (17:01 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 8 Feb 2021 05:57:38 +0000 (16:57 +1100)
commitabc27d4241f99bfaebb0b843b9a967d557ac10e8
treeda384090a8bcbcd5476b1f2bc58f11dc0033f0f9
parentc9f5aaa6bce819c1863c2a56b187cb9eb521fc92
confidential guest support: Introduce cgs "ready" flag

The platform specific details of mechanisms for implementing
confidential guest support may require setup at various points during
initialization.  Thus, it's not really feasible to have a single cgs
initialization hook, but instead each mechanism needs its own
initialization calls in arch or machine specific code.

However, to make it harder to have a bug where a mechanism isn't
properly initialized under some circumstances, we want to have a
common place, late in boot, where we verify that cgs has been
initialized if it was requested.

This patch introduces a ready flag to the ConfidentialGuestSupport
base type to accomplish this, which we verify in
qemu_machine_creation_done().

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
include/exec/confidential-guest-support.h
softmmu/vl.c
target/i386/sev.c