All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org, anthony@codemonkey.ws
Subject: [Qemu-devel] [PATCH 1/2] msix: add helper to mark all msix entries
Date: Tue, 24 Nov 2009 23:31:28 +0200	[thread overview]
Message-ID: <20091124213128.GB4703@redhat.com> (raw)
In-Reply-To: <cover.1259093857.git.mst@redhat.com>

will be used by virtio on soft reset

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

---
 hw/msix.c |    7 +++++++
 hw/msix.h |    1 +
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/hw/msix.c b/hw/msix.c
index 548ffd5..d499441 100644
--- a/hw/msix.c
+++ b/hw/msix.c
@@ -378,3 +378,10 @@ void msix_vector_unuse(PCIDevice *dev, unsigned vector)
     if (vector < dev->msix_entries_nr && dev->msix_entry_used[vector])
         --dev->msix_entry_used[vector];
 }
+
+void msix_unuse_all_vectors(PCIDevice *dev)
+{
+    if (!(dev->cap_present & QEMU_PCI_CAP_MSIX))
+        return;
+    msix_free_irq_entries(dev);
+}
diff --git a/hw/msix.h b/hw/msix.h
index 39fa568..a9f7993 100644
--- a/hw/msix.h
+++ b/hw/msix.h
@@ -25,6 +25,7 @@ uint32_t msix_bar_size(PCIDevice *dev);
 
 int msix_vector_use(PCIDevice *dev, unsigned vector);
 void msix_vector_unuse(PCIDevice *dev, unsigned vector);
+void msix_unuse_all_vectors(PCIDevice *dev);
 
 void msix_notify(PCIDevice *dev, unsigned vector);
 
-- 
1.6.5.2.143.g8cc62

       reply	other threads:[~2009-11-24 21:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1259093857.git.mst@redhat.com>
2009-11-24 21:31 ` Michael S. Tsirkin [this message]
2009-11-24 21:31 ` [Qemu-devel] [PATCH 2/2] virtio: do not reset msix state on soft reset Michael S. Tsirkin

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=20091124213128.GB4703@redhat.com \
    --to=mst@redhat.com \
    --cc=anthony@codemonkey.ws \
    --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.