mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-01 02:55:45 +00:00
vmm: Add default VCPU topology in PPTT on AArch64
When VCPU topology is not specified, fill the PPTT with default setting. Signed-off-by: Michael Zhao <michael.zhao@arm.com>
This commit is contained in:
parent
297459087a
commit
0fa31539eb
@ -1286,9 +1286,11 @@ impl CpuManager {
|
|||||||
let pptt_start = 0;
|
let pptt_start = 0;
|
||||||
let mut cpus = 0;
|
let mut cpus = 0;
|
||||||
let mut uid = 0;
|
let mut uid = 0;
|
||||||
let threads_per_core = self.get_vcpu_topology().unwrap_or_default().0 as u8;
|
// If topology is not specified, the default setting is:
|
||||||
let cores_per_package = self.get_vcpu_topology().unwrap_or_default().1 as u8;
|
// 1 package, multiple cores, 1 thread per core
|
||||||
let packages = self.get_vcpu_topology().unwrap_or_default().2 as u8;
|
// This is also the behavior when PPTT is missing.
|
||||||
|
let (threads_per_core, cores_per_package, packages) =
|
||||||
|
self.get_vcpu_topology().unwrap_or((1, self.max_vcpus(), 1));
|
||||||
|
|
||||||
let mut pptt = Sdt::new(*b"PPTT", 36, 2, *b"CLOUDH", *b"CHPPTT ", 1);
|
let mut pptt = Sdt::new(*b"PPTT", 36, 2, *b"CLOUDH", *b"CHPPTT ", 1);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user