aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/core/machine.c2
-rw-r--r--include/exec/confidential-guest-support.h5
-rw-r--r--include/hw/boards.h1
3 files changed, 6 insertions, 2 deletions
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 17292b1..77a356f 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -1216,7 +1216,7 @@ bool machine_mem_merge(MachineState *machine)
bool machine_require_guest_memfd(MachineState *machine)
{
- return machine->require_guest_memfd;
+ return machine->cgs && machine->cgs->require_guest_memfd;
}
static char *cpu_slot_to_string(const CPUArchId *cpu)
diff --git a/include/exec/confidential-guest-support.h b/include/exec/confidential-guest-support.h
index e5b188c..02dc4e5 100644
--- a/include/exec/confidential-guest-support.h
+++ b/include/exec/confidential-guest-support.h
@@ -32,6 +32,11 @@ struct ConfidentialGuestSupport {
Object parent;
/*
+ * True if the machine should use guest_memfd for RAM.
+ */
+ bool require_guest_memfd;
+
+ /*
* ready: flag set by CGS initialization code once it's ready to
* start executing instructions in a potentially-secure
* guest
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 2fa800f..73ad319 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -375,7 +375,6 @@ struct MachineState {
char *dt_compatible;
bool dump_guest_core;
bool mem_merge;
- bool require_guest_memfd;
bool usb;
bool usb_disabled;
char *firmware;