mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
kvm: Decouple 'MSI routing via irqfds' from 'kernel irqchip'
Decouple another x86-specific assumption about what irqchips imply. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
cc7e0ddf5a
commit
614e41bc26
5 changed files with 18 additions and 3 deletions
|
@ -627,7 +627,7 @@ static int virtio_pci_set_guest_notifiers(void *opaque, bool assign)
|
|||
int r, n;
|
||||
|
||||
/* Must unset vector notifier while guest notifier is still assigned */
|
||||
if (kvm_irqchip_in_kernel() && !assign) {
|
||||
if (kvm_msi_via_irqfd_enabled() && !assign) {
|
||||
msix_unset_vector_notifiers(&proxy->pci_dev);
|
||||
g_free(proxy->vector_irqfd);
|
||||
proxy->vector_irqfd = NULL;
|
||||
|
@ -645,7 +645,7 @@ static int virtio_pci_set_guest_notifiers(void *opaque, bool assign)
|
|||
}
|
||||
|
||||
/* Must set vector notifier after guest notifier has been assigned */
|
||||
if (kvm_irqchip_in_kernel() && assign) {
|
||||
if (kvm_msi_via_irqfd_enabled() && assign) {
|
||||
proxy->vector_irqfd =
|
||||
g_malloc0(sizeof(*proxy->vector_irqfd) *
|
||||
msix_nr_vectors_allocated(&proxy->pci_dev));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue