MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / populate_cpuid

Method populate_cpuid

vmm/src/cpu.rs:940–961  ·  view source on GitHub ↗
(
        &mut self,
        hypervisor: &dyn hypervisor::Hypervisor,
        #[cfg(feature = "tdx")] tdx: bool,
    )

Source from the content-addressed store, hash-verified

938
939 #[cfg(target_arch = "x86_64")]
940 pub fn populate_cpuid(
941 &mut self,
942 hypervisor: &dyn hypervisor::Hypervisor,
943 #[cfg(feature = "tdx")] tdx: bool,
944 ) -> Result<()> {
945 self.cpuid = {
946 let phys_bits = physical_bits(hypervisor, self.config.max_phys_bits);
947 arch::generate_common_cpuid(
948 hypervisor,
949 &arch::CpuidConfig {
950 phys_bits,
951 kvm_hyperv: self.config.kvm_hyperv,
952 #[cfg(feature = "tdx")]
953 tdx,
954 amx: self.config.features.amx,
955 },
956 )
957 .map_err(Error::CommonCpuId)?
958 };
959
960 Ok(())
961 }
962
963 fn create_vcpu(
964 &mut self,

Callers 1

create_cpu_managerMethod · 0.80

Calls 2

physical_bitsFunction · 0.85
generate_common_cpuidFunction · 0.85

Tested by

no test coverage detected