[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 6/9] i386/pc: Skip initialization of system FW when using IGVM
From: |
Roy Hopkins |
Subject: |
[PATCH 6/9] i386/pc: Skip initialization of system FW when using IGVM |
Date: |
Tue, 27 Feb 2024 14:50:12 +0000 |
When using an IGVM file the configuration of the system firmware is
defined by IGVM directives contained in the file. Therefore the default
system firmware should not be initialized when an IGVM file has been
provided.
This commit checks to see if an IGVM file has been provided and, if it
has then the standard system firmware initialization is skipped and any
prepared flash devices are cleaned up.
Signed-off-by: Roy Hopkins <roy.hopkins@suse.com>
---
hw/i386/pc.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index f8eb684a49..17bb211708 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -63,6 +63,7 @@
#include "e820_memory_layout.h"
#include "trace.h"
#include CONFIG_DEVICES
+#include "exec/confidential-guest-support.h"
#ifdef CONFIG_XEN_EMU
#include "hw/xen/xen-legacy-backend.h"
@@ -1023,8 +1024,15 @@ void pc_memory_init(PCMachineState *pcms,
}
}
- /* Initialize PC system firmware */
- pc_system_firmware_init(pcms, rom_memory);
+ /*
+ * If this is a confidential guest configured using IGVM then the IGVM
+ * configuration will include the system firmware. In this case do not
+ * initialise PC system firmware.
+ */
+ if (!cgs_is_igvm(machine->cgs)) {
+ /* Initialize PC system firmware */
+ pc_system_firmware_init(pcms, rom_memory);
+ }
option_rom_mr = g_malloc(sizeof(*option_rom_mr));
memory_region_init_ram(option_rom_mr, NULL, "pc.rom", PC_ROM_SIZE,
--
2.43.0
- [PATCH 0/9] Introduce support for IGVM files, Roy Hopkins, 2024/02/27
- [PATCH 1/9] meson: Add optional dependency on IGVM library, Roy Hopkins, 2024/02/27
- [PATCH 3/9] backends/confidential-guest-support: Add functions to support IGVM, Roy Hopkins, 2024/02/27
- [PATCH 6/9] i386/pc: Skip initialization of system FW when using IGVM,
Roy Hopkins <=
- [PATCH 7/9] i386/sev: Refactor setting of reset vector and initial CPU state, Roy Hopkins, 2024/02/27
- [PATCH 4/9] backends/igvm: Implement parsing and processing of IGVM files, Roy Hopkins, 2024/02/27
- [PATCH 2/9] backends/confidential-guest-support: Add IGVM file parameter, Roy Hopkins, 2024/02/27
- [PATCH 8/9] i386/sev: Implement ConfidentialGuestSupport functions for SEV, Roy Hopkins, 2024/02/27
- [PATCH 9/9] docs/system: Add documentation on support for IGVM, Roy Hopkins, 2024/02/27
- [PATCH 5/9] i386/pc: Process IGVM file during PC initialization if present, Roy Hopkins, 2024/02/27