mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
vmm: add a proxy struct for SEV-SNP guest
Add a structure to hold the reference of the Vm trait from Hypervisor crate to access of restricted page from SEV-SNP guest. Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
parent
5c4b5c0e40
commit
398e9338a7
@ -781,6 +781,25 @@ pub struct AcpiPlatformAddresses {
|
||||
pub sleep_status_reg_address: Option<GenericAddress>,
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "mshv", feature = "sev_snp"))]
|
||||
struct SevSnpPageAccessProxy {
|
||||
vm: Arc<dyn hypervisor::Vm>,
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "mshv", feature = "sev_snp"))]
|
||||
impl std::fmt::Debug for SevSnpPageAccessProxy {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "SNP Page access proxy")
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "mshv", feature = "sev_snp"))]
|
||||
impl SevSnpPageAccessProxy {
|
||||
fn new(vm: Arc<dyn hypervisor::Vm>) -> SevSnpPageAccessProxy {
|
||||
SevSnpPageAccessProxy { vm }
|
||||
}
|
||||
}
|
||||
|
||||
pub struct DeviceManager {
|
||||
// Manage address space related to devices
|
||||
address_manager: Arc<AddressManager>,
|
||||
|
Loading…
Reference in New Issue
Block a user