Skip to content

Commit

Permalink
kernel/cpu: Fix access permissions for SVSM VMSAs
Browse files Browse the repository at this point in the history
Make sure the guest OS can not access the VMSA pages of the SVSM by
only giving permissions up to VMPL1.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
joergroedel committed Dec 17, 2024
1 parent 928e8ff commit 4db3325
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/src/cpu/percpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ impl PerCpu {
return Err(SvsmError::Mem);
}

let mut vmsa = VmsaPage::new(RMPFlags::GUEST_VMPL)?;
let mut vmsa = VmsaPage::new(RMPFlags::VMPL1)?;
let paddr = vmsa.paddr();

// Initialize VMSA
Expand Down

0 comments on commit 4db3325

Please sign in to comment.