mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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 7d65187350 ("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<GuestAddress>
refactoring.
Assisted-by: Claude:Opus-4.6
Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
87ffc620e4
commit
8598b45a95
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user