mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
misc: Change cpu ID type from u8 to u32
This is the first change to Cloud Hypervisor in a series of changes intended to increase the max number of supported vCPUs in guest VMs, which is currently limited to 255 (254 on x86_64). No user-visible/behavior changes are expected as a result of applying this patch, as the type of boot_cpus and related fields in config structs remains u8 for now, and all configuration validations remain the same. Signed-off-by: Barret Rhoden <brho@google.com> Signed-off-by: Neel Natu <neelnatu@google.com> Signed-off-by: Ofir Weisse <oweisse@google.com> Signed-off-by: Peter Oskolkov <posk@google.com>
This commit is contained in:
@@ -471,7 +471,7 @@ pub trait Vcpu: Send + Sync {
|
||||
&self,
|
||||
vm: &Arc<dyn crate::Vm>,
|
||||
kvi: &mut VcpuInit,
|
||||
id: u8,
|
||||
id: u32,
|
||||
) -> Result<()>;
|
||||
///
|
||||
/// Returns VcpuInit with default value set
|
||||
@@ -498,7 +498,7 @@ pub trait Vcpu: Send + Sync {
|
||||
/// Configure core registers for a given CPU.
|
||||
///
|
||||
#[cfg(any(target_arch = "aarch64", target_arch = "riscv64"))]
|
||||
fn setup_regs(&self, cpu_id: u8, boot_ip: u64, fdt_start: u64) -> Result<()>;
|
||||
fn setup_regs(&self, cpu_id: u32, boot_ip: u64, fdt_start: u64) -> Result<()>;
|
||||
///
|
||||
/// Check if the CPU supports PMU
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user