mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-05 21:15:45 +00:00
devices: ioapic: Mask entries by default
When created, the IOAPIC entries should be masked, as it is the guest's responsibility (FW and/or OS) to unmask them if/when necessary. This patch saves a full round of port I/O writes from the guest to the IOAPIC, meant for masking the unmasked entries. Because they're now masked, the entries are not enabled, which means they are not connected from a KVM perspective, saving from unneeded registration/unregistration of the irq fds. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
827810dbd5
commit
ec56710c9b
@ -201,15 +201,13 @@ impl Ioapic {
|
|||||||
})
|
})
|
||||||
.map_err(Error::CreateInterruptSourceGroup)?;
|
.map_err(Error::CreateInterruptSourceGroup)?;
|
||||||
|
|
||||||
interrupt_source_group
|
// The IOAPIC is created with entries already masked. The guest will be
|
||||||
.enable()
|
// in charge of unmasking them if/when necessary.
|
||||||
.map_err(Error::EnableInterrupt)?;
|
|
||||||
|
|
||||||
Ok(Ioapic {
|
Ok(Ioapic {
|
||||||
id,
|
id,
|
||||||
id_reg: 0,
|
id_reg: 0,
|
||||||
reg_sel: 0,
|
reg_sel: 0,
|
||||||
reg_entries: [0; NUM_IOAPIC_PINS],
|
reg_entries: [0x10000; NUM_IOAPIC_PINS],
|
||||||
used_entries: [false; NUM_IOAPIC_PINS],
|
used_entries: [false; NUM_IOAPIC_PINS],
|
||||||
apic_address,
|
apic_address,
|
||||||
interrupt_source_group,
|
interrupt_source_group,
|
||||||
|
Loading…
Reference in New Issue
Block a user