All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Avi Kivity <avi@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm@vger.kernel.org, qemu-devel <qemu-devel@nongnu.org>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: [PATCH 12/11] msix: Trigger vector mask update check after vmload
Date: Tue, 15 May 2012 10:31:53 -0300	[thread overview]
Message-ID: <4FB25AC9.4020404@siemens.com> (raw)
In-Reply-To: <18803f5b4a9020ba39234cf0c66476696bd16529.1337029654.git.jan.kiszka@siemens.com>

In case we load a PCI device with active vectors, we have to process
them and invoke potential notifiers.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

This amends the QEMU series but should be equally relevant as bug fix
for qemu-kvm.

 hw/msix.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/hw/msix.c b/hw/msix.c
index 2114b99..59c7a83 100644
--- a/hw/msix.c
+++ b/hw/msix.c
@@ -351,6 +351,7 @@ void msix_save(PCIDevice *dev, QEMUFile *f)
 void msix_load(PCIDevice *dev, QEMUFile *f)
 {
     unsigned n = dev->msix_entries_nr;
+    unsigned int vector;
 
     if (!(dev->cap_present & QEMU_PCI_CAP_MSIX)) {
         return;
@@ -360,6 +361,10 @@ void msix_load(PCIDevice *dev, QEMUFile *f)
     qemu_get_buffer(f, dev->msix_table_page, n * PCI_MSIX_ENTRY_SIZE);
     qemu_get_buffer(f, dev->msix_table_page + MSIX_PAGE_PENDING, (n + 7) / 8);
     msix_update_function_masked(dev);
+
+    for (vector = 0; vector < n; vector++) {
+        msix_handle_mask_update(dev, vector, true);
+    }
 }
 
 /* Does device support MSI-X? */
-- 
1.7.3.4

WARNING: multiple messages have this Message-ID (diff)
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Avi Kivity <avi@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	kvm@vger.kernel.org, "Michael S. Tsirkin" <mst@redhat.com>
Subject: [Qemu-devel] [PATCH 12/11] msix: Trigger vector mask update check after vmload
Date: Tue, 15 May 2012 10:31:53 -0300	[thread overview]
Message-ID: <4FB25AC9.4020404@siemens.com> (raw)
In-Reply-To: <18803f5b4a9020ba39234cf0c66476696bd16529.1337029654.git.jan.kiszka@siemens.com>

In case we load a PCI device with active vectors, we have to process
them and invoke potential notifiers.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

This amends the QEMU series but should be equally relevant as bug fix
for qemu-kvm.

 hw/msix.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/hw/msix.c b/hw/msix.c
index 2114b99..59c7a83 100644
--- a/hw/msix.c
+++ b/hw/msix.c
@@ -351,6 +351,7 @@ void msix_save(PCIDevice *dev, QEMUFile *f)
 void msix_load(PCIDevice *dev, QEMUFile *f)
 {
     unsigned n = dev->msix_entries_nr;
+    unsigned int vector;
 
     if (!(dev->cap_present & QEMU_PCI_CAP_MSIX)) {
         return;
@@ -360,6 +361,10 @@ void msix_load(PCIDevice *dev, QEMUFile *f)
     qemu_get_buffer(f, dev->msix_table_page, n * PCI_MSIX_ENTRY_SIZE);
     qemu_get_buffer(f, dev->msix_table_page + MSIX_PAGE_PENDING, (n + 7) / 8);
     msix_update_function_masked(dev);
+
+    for (vector = 0; vector < n; vector++) {
+        msix_handle_mask_update(dev, vector, true);
+    }
 }
 
 /* Does device support MSI-X? */
-- 
1.7.3.4

  reply	other threads:[~2012-05-15 13:32 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-14 21:07 [RFC][PATCH 00/11] uq/master: irqfd-based interrupt injection for virtio/vhost Jan Kiszka
2012-05-14 21:07 ` [Qemu-devel] " Jan Kiszka
2012-05-14 21:07 ` [RFC][PATCH 01/11] msix: Factor out msix_get_message Jan Kiszka
2012-05-14 21:07   ` [Qemu-devel] " Jan Kiszka
2012-05-14 21:07 ` [RFC][PATCH 02/11] msix: Invoke msix_handle_mask_update on msix_mask_all Jan Kiszka
2012-05-14 21:07   ` [Qemu-devel] " Jan Kiszka
2012-05-14 21:07 ` [RFC][PATCH 03/11] msix: Introduce vector notifiers Jan Kiszka
2012-05-14 21:07   ` [Qemu-devel] " Jan Kiszka
2012-05-15 13:31   ` Jan Kiszka [this message]
2012-05-15 13:31     ` [Qemu-devel] [PATCH 12/11] msix: Trigger vector mask update check after vmload Jan Kiszka
2012-05-14 21:07 ` [RFC][PATCH 04/11] kvm: Rename kvm_irqchip_add_route to kvm_irqchip_add_irq_route Jan Kiszka
2012-05-14 21:07   ` [Qemu-devel] " Jan Kiszka
2012-05-14 21:07 ` [RFC][PATCH 05/11] kvm: Introduce kvm_irqchip_add_msi_route Jan Kiszka
2012-05-14 21:07   ` [Qemu-devel] " Jan Kiszka
2012-06-25 13:38   ` Alex Williamson
2012-06-25 13:50     ` Jan Kiszka
2012-05-14 21:07 ` [RFC][PATCH 06/11] kvm: Publicize kvm_release_gsi as kvm_irqchip_release_virq Jan Kiszka
2012-05-14 21:07   ` [Qemu-devel] " Jan Kiszka
2012-05-14 21:07 ` [RFC][PATCH 07/11] kvm: Make kvm_irqchip_commit_routes an internal service Jan Kiszka
2012-05-14 21:07   ` [Qemu-devel] " Jan Kiszka
2012-05-14 21:07 ` [RFC][PATCH 08/11] kvm: Introduce kvm_irqchip_add/remove_irqfd Jan Kiszka
2012-05-14 21:07   ` [Qemu-devel] " Jan Kiszka
2012-05-14 21:07 ` [RFC][PATCH 09/11] kvm: Enable use of kvm_irqchip_in_kernel in hwlib code Jan Kiszka
2012-05-14 21:07   ` [Qemu-devel] " Jan Kiszka
2012-05-14 21:07 ` [RFC][PATCH 10/11] msix: Add msix_nr_vectors_allocated Jan Kiszka
2012-05-14 21:07   ` [Qemu-devel] " Jan Kiszka
2012-05-14 21:07 ` [RFC][PATCH 11/11] virtio/vhost: Add support for KVM in-kernel MSI injection Jan Kiszka
2012-05-14 21:07   ` [Qemu-devel] " Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FB25AC9.4020404@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.