* [PATCH stable-1.1] qemu-kvm: virtio: Do not register mask notifiers without in-kernel irqchip support
@ 2012-07-02 8:05 Jan Kiszka
2012-07-02 9:12 ` Michael S. Tsirkin
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2012-07-02 8:05 UTC (permalink / raw)
To: Avi Kivity, Marcelo Tosatti; +Cc: kvm, Michael S. Tsirkin, Michael Tokarev
We crash if we registers mask notifiers without backing in-kernel
irqchip. This corresponds to the check in QEMU upstream after 1.1 now.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
Not needed for master as we have upstream logic there already.
hw/virtio-pci.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index a0c2ca7..5b64356 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -629,7 +629,7 @@ static int virtio_pci_set_guest_notifiers(void *opaque, bool assign)
/* Must unset mask notifier while guest notifier
* is still assigned */
- if (!assign) {
+ if (kvm_irqchip_in_kernel() && !assign) {
r = msix_unset_mask_notifier(&proxy->pci_dev);
assert(r >= 0);
}
@@ -647,7 +647,7 @@ static int virtio_pci_set_guest_notifiers(void *opaque, bool assign)
/* Must set mask notifier after guest notifier
* has been assigned */
- if (assign) {
+ if (kvm_irqchip_in_kernel() && assign) {
r = msix_set_mask_notifier(&proxy->pci_dev,
virtio_pci_mask_notifier);
if (r < 0) {
--
1.7.3.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH stable-1.1] qemu-kvm: virtio: Do not register mask notifiers without in-kernel irqchip support
2012-07-02 8:05 [PATCH stable-1.1] qemu-kvm: virtio: Do not register mask notifiers without in-kernel irqchip support Jan Kiszka
@ 2012-07-02 9:12 ` Michael S. Tsirkin
0 siblings, 0 replies; 2+ messages in thread
From: Michael S. Tsirkin @ 2012-07-02 9:12 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Avi Kivity, Marcelo Tosatti, kvm, Michael Tokarev
On Mon, Jul 02, 2012 at 10:05:39AM +0200, Jan Kiszka wrote:
> We crash if we registers mask notifiers without backing in-kernel
> irqchip. This corresponds to the check in QEMU upstream after 1.1 now.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>
> Not needed for master as we have upstream logic there already.
>
> hw/virtio-pci.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
> index a0c2ca7..5b64356 100644
> --- a/hw/virtio-pci.c
> +++ b/hw/virtio-pci.c
> @@ -629,7 +629,7 @@ static int virtio_pci_set_guest_notifiers(void *opaque, bool assign)
>
> /* Must unset mask notifier while guest notifier
> * is still assigned */
> - if (!assign) {
> + if (kvm_irqchip_in_kernel() && !assign) {
> r = msix_unset_mask_notifier(&proxy->pci_dev);
> assert(r >= 0);
> }
> @@ -647,7 +647,7 @@ static int virtio_pci_set_guest_notifiers(void *opaque, bool assign)
>
> /* Must set mask notifier after guest notifier
> * has been assigned */
> - if (assign) {
> + if (kvm_irqchip_in_kernel() && assign) {
> r = msix_set_mask_notifier(&proxy->pci_dev,
> virtio_pci_mask_notifier);
> if (r < 0) {
> --
> 1.7.3.4
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-02 9:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-02 8:05 [PATCH stable-1.1] qemu-kvm: virtio: Do not register mask notifiers without in-kernel irqchip support Jan Kiszka
2012-07-02 9:12 ` Michael S. Tsirkin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.