mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-10 22:57:43 +00:00
vmm: vm: Avoid ioapic variable creation
For a more readable VM creation routine. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
164e810069
commit
622f3f8fb6
@ -317,11 +317,6 @@ impl Vm {
|
||||
.transpose()
|
||||
.map_err(Error::InitramfsFile)?;
|
||||
|
||||
let ioapic = GsiApic::new(
|
||||
X86_64_IRQ_BASE,
|
||||
ioapic::NUM_IOAPIC_PINS as u32 - X86_64_IRQ_BASE,
|
||||
);
|
||||
|
||||
// Let's allocate 64 GiB of addressable MMIO space, starting at 0.
|
||||
let allocator = Arc::new(Mutex::new(
|
||||
SystemAllocator::new(
|
||||
@ -331,7 +326,10 @@ impl Vm {
|
||||
1 << get_host_cpu_phys_bits(),
|
||||
layout::MEM_32BIT_RESERVED_START,
|
||||
layout::MEM_32BIT_DEVICES_SIZE,
|
||||
vec![ioapic],
|
||||
vec![GsiApic::new(
|
||||
X86_64_IRQ_BASE,
|
||||
ioapic::NUM_IOAPIC_PINS as u32 - X86_64_IRQ_BASE,
|
||||
)],
|
||||
)
|
||||
.ok_or(Error::CreateSystemAllocator)?,
|
||||
));
|
||||
|
Loading…
Reference in New Issue
Block a user