mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
pci: vfio: Implement INTx support
With all the preliminary work done in the previous commits, we can update the VFIO implementation to support INTx along with MSI and MSI-X. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
committed by
Rob Bradford
parent
2cdc3e3546
commit
19167e7647
@@ -2712,11 +2712,27 @@ impl DeviceManager {
|
||||
}
|
||||
}
|
||||
|
||||
let legacy_interrupt_group = if let (Some(irq), Some(legacy_interrupt_manager)) = (
|
||||
self.pci_device_irqs.get(&pci_device_bdf),
|
||||
&self.legacy_interrupt_manager,
|
||||
) {
|
||||
Some(
|
||||
legacy_interrupt_manager
|
||||
.create_group(LegacyIrqGroupConfig {
|
||||
irq: *irq as InterruptIndex,
|
||||
})
|
||||
.map_err(DeviceManagerError::CreateInterruptGroup)?,
|
||||
)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let memory = self.memory_manager.lock().unwrap().guest_memory();
|
||||
let mut vfio_pci_device = VfioPciDevice::new(
|
||||
&self.address_manager.vm,
|
||||
vfio_device,
|
||||
&self.msi_interrupt_manager,
|
||||
legacy_interrupt_group,
|
||||
memory,
|
||||
)
|
||||
.map_err(DeviceManagerError::VfioPciCreate)?;
|
||||
|
||||
@@ -413,7 +413,9 @@ fn create_vcpu_ioctl_seccomp_rule() -> Result<Vec<SeccompRule>, Error> {
|
||||
fn vcpu_thread_rules() -> Result<Vec<SyscallRuleSet>, Error> {
|
||||
Ok(vec![
|
||||
allow_syscall(libc::SYS_brk),
|
||||
allow_syscall(libc::SYS_clock_gettime),
|
||||
allow_syscall(libc::SYS_close),
|
||||
allow_syscall(libc::SYS_dup),
|
||||
allow_syscall(libc::SYS_exit),
|
||||
allow_syscall(libc::SYS_futex),
|
||||
allow_syscall(libc::SYS_getpid),
|
||||
|
||||
Reference in New Issue
Block a user