vmm: cpu: Expose the common/shared CPUID data for all vCPUs

This allows the CPUID data to be passed into the VM level ioctl used for
initalizing TDX.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2021-03-03 12:08:42 +00:00
parent b02aff5761
commit c8cad394b5

View File

@ -1091,6 +1091,11 @@ impl CpuManager {
self.config.max_vcpus
}
#[cfg(target_arch = "x86_64")]
pub fn common_cpuid(&self) -> CpuId {
self.cpuid.clone()
}
fn present_vcpus(&self) -> u8 {
self.vcpu_states
.iter()