From 8598b45a9519b205970e7430ad3abd5fb7067ae1 Mon Sep 17 00:00:00 2001 From: Muminul Islam Date: Wed, 29 Apr 2026 15:34:18 -0700 Subject: [PATCH] vmm: skip configure_system when rsdp_addr is None For SEV-SNP guests using IGVM, the ACPI tables and system configuration (MP tables, EBDA, SMBIOS, PVH start info, e820) are provided by the IGVM file. The rsdp_addr is set to None for these guests to indicate ACPI table creation was skipped. Commit 7d65187350a1 ("vmm: make RSDP address optional in configure_system") removed the guard that prevented calling configure_system when rsdp_addr is None. This caused MSHV SEV-SNP guests to crash because configure_system writes to guest memory locations that conflict with the IGVM-provided layout. Restore the guard by only calling configure_system when rsdp_addr is Some, which preserves the intended behavior for CVM guests while still allowing the Option refactoring. Assisted-by: Claude:Opus-4.6 Signed-off-by: Muminul Islam --- vmm/src/vm.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/vmm/src/vm.rs b/vmm/src/vm.rs index cd118782e..e4df94b76 100644 --- a/vmm/src/vm.rs +++ b/vmm/src/vm.rs @@ -2840,10 +2840,13 @@ impl Vm { let rsdp_addr = self.create_acpi_tables(); #[cfg(not(target_arch = "riscv64"))] - // Configure shared state based on loaded kernel - entry_point - .map(|entry_point| self.configure_system(rsdp_addr, entry_point)) - .transpose()?; + // Configure shared state based on loaded kernel. + // Skip for SEV-SNP guests where system configuration is provided via IGVM. + if rsdp_addr.is_some() { + entry_point + .map(|entry_point| self.configure_system(rsdp_addr, entry_point)) + .transpose()?; + } #[cfg(target_arch = "riscv64")] self.configure_system().unwrap();