|
Hans de Goede |
329b58 |
From 6f82a5ea52302bab33287b0191538be6f9138637 Mon Sep 17 00:00:00 2001
|
|
Hans de Goede |
329b58 |
From: Jan Kiszka <jan.kiszka@siemens.com>
|
|
Hans de Goede |
329b58 |
Date: Mon, 2 Jul 2012 10:05:39 +0200
|
|
Hans de Goede |
329b58 |
Subject: [PATCH 02/17] qemu-kvm: virtio: Do not register mask notifiers
|
|
Hans de Goede |
329b58 |
without in-kernel irqchip support
|
|
Hans de Goede |
329b58 |
|
|
Hans de Goede |
329b58 |
We crash if we registers mask notifiers without backing in-kernel
|
|
Hans de Goede |
329b58 |
irqchip. This corresponds to the check in QEMU upstream after 1.1 now.
|
|
Hans de Goede |
329b58 |
|
|
Hans de Goede |
329b58 |
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
|
|
Hans de Goede |
329b58 |
Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Hans de Goede |
329b58 |
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
Hans de Goede |
329b58 |
---
|
|
Hans de Goede |
329b58 |
hw/virtio-pci.c | 4 ++--
|
|
Hans de Goede |
329b58 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
Hans de Goede |
329b58 |
|
|
Hans de Goede |
329b58 |
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
|
|
Hans de Goede |
329b58 |
index a0c2ca7..5b64356 100644
|
|
Hans de Goede |
329b58 |
--- a/hw/virtio-pci.c
|
|
Hans de Goede |
329b58 |
+++ b/hw/virtio-pci.c
|
|
Hans de Goede |
329b58 |
@@ -629,7 +629,7 @@ static int virtio_pci_set_guest_notifiers(void *opaque, bool assign)
|
|
Hans de Goede |
329b58 |
|
|
Hans de Goede |
329b58 |
/* Must unset mask notifier while guest notifier
|
|
Hans de Goede |
329b58 |
* is still assigned */
|
|
Hans de Goede |
329b58 |
- if (!assign) {
|
|
Hans de Goede |
329b58 |
+ if (kvm_irqchip_in_kernel() && !assign) {
|
|
Hans de Goede |
329b58 |
r = msix_unset_mask_notifier(&proxy->pci_dev);
|
|
Hans de Goede |
329b58 |
assert(r >= 0);
|
|
Hans de Goede |
329b58 |
}
|
|
Hans de Goede |
329b58 |
@@ -647,7 +647,7 @@ static int virtio_pci_set_guest_notifiers(void *opaque, bool assign)
|
|
Hans de Goede |
329b58 |
|
|
Hans de Goede |
329b58 |
/* Must set mask notifier after guest notifier
|
|
Hans de Goede |
329b58 |
* has been assigned */
|
|
Hans de Goede |
329b58 |
- if (assign) {
|
|
Hans de Goede |
329b58 |
+ if (kvm_irqchip_in_kernel() && assign) {
|
|
Hans de Goede |
329b58 |
r = msix_set_mask_notifier(&proxy->pci_dev,
|
|
Hans de Goede |
329b58 |
virtio_pci_mask_notifier);
|
|
Hans de Goede |
329b58 |
if (r < 0) {
|
|
Hans de Goede |
329b58 |
--
|
|
Hans de Goede |
329b58 |
1.7.10.4
|
|
Hans de Goede |
329b58 |
|