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

Method generate_mat

vmm/src/cpu.rs:2272–2285  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

2270impl Cpu {
2271 #[cfg(target_arch = "x86_64")]
2272 fn generate_mat(&self) -> Vec<u8> {
2273 let x2apic_id = arch::x86_64::get_x2apic_id(self.cpu_id, self.topology);
2274
2275 LocalX2Apic {
2276 r#type: crate::acpi::ACPI_X2APIC_PROCESSOR,
2277 length: 16,
2278 processor_id: self.cpu_id,
2279 apic_id: x2apic_id,
2280 flags: 1 << MADT_CPU_ENABLE_FLAG,
2281 _reserved: 0,
2282 }
2283 .as_bytes()
2284 .to_vec()
2285 }
2286}
2287
2288impl Aml for Cpu {

Callers 1

to_aml_bytesMethod · 0.80

Calls 2

get_x2apic_idFunction · 0.85
as_bytesMethod · 0.80

Tested by

no test coverage detected