qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: mst@redhat.com
Cc: jan.kiszka@siemens.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH v2 2/6] ivshmem: Convert to msix_init_exclusive_bar() interface
Date: Wed, 13 Jun 2012 22:51:28 -0600	[thread overview]
Message-ID: <20120614045127.11034.9983.stgit@bling.home> (raw)
In-Reply-To: <20120614044751.11034.87619.stgit@bling.home>

Trivial conversion, failed to have an uninit before and after.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---

 hw/ivshmem.c |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/hw/ivshmem.c b/hw/ivshmem.c
index 05559b6..8b49eee 100644
--- a/hw/ivshmem.c
+++ b/hw/ivshmem.c
@@ -70,7 +70,6 @@ typedef struct IVShmemState {
      */
     MemoryRegion bar;
     MemoryRegion ivshmem;
-    MemoryRegion msix_bar;
     uint64_t ivshmem_size; /* size of shared memory region */
     int shm_fd; /* shared memory file descriptor */
 
@@ -563,16 +562,13 @@ static uint64_t ivshmem_get_size(IVShmemState * s) {
 
 static void ivshmem_setup_msi(IVShmemState * s)
 {
-    memory_region_init(&s->msix_bar, "ivshmem-msix", 4096);
-    if (!msix_init(&s->dev, s->vectors, &s->msix_bar, 1, 0)) {
-        pci_register_bar(&s->dev, 1, PCI_BASE_ADDRESS_SPACE_MEMORY,
-                         &s->msix_bar);
-        IVSHMEM_DPRINTF("msix initialized (%d vectors)\n", s->vectors);
-    } else {
+    if (msix_init_exclusive_bar(&s->dev, s->vectors, 1)) {
         IVSHMEM_DPRINTF("msix initialization failed\n");
         exit(1);
     }
 
+    IVSHMEM_DPRINTF("msix initialized (%d vectors)\n", s->vectors);
+
     /* allocate QEMU char devices for receiving interrupts */
     s->eventfd_table = g_malloc0(s->vectors * sizeof(EventfdEntry));
 

  parent reply	other threads:[~2012-06-14  4:51 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-14  4:51 [Qemu-devel] [PATCH v2 0/6] msix: Support specifying offsets, BARs, and capability location Alex Williamson
2012-06-14  4:51 ` [Qemu-devel] [PATCH v2 1/6] msix: Add simple BAR allocation MSIX setup functions Alex Williamson
2012-06-14 10:29   ` Michael S. Tsirkin
2012-06-14 14:24     ` Alex Williamson
2012-06-14 15:49   ` Michael S. Tsirkin
2012-06-14 15:55     ` Jan Kiszka
2012-06-14 16:05       ` Michael S. Tsirkin
2012-06-14 16:10         ` Alex Williamson
2012-06-14 16:31           ` Michael S. Tsirkin
2012-06-14 16:11         ` Jan Kiszka
2012-06-14 16:35           ` Michael S. Tsirkin
2012-06-14  4:51 ` Alex Williamson [this message]
2012-06-14  6:01   ` [Qemu-devel] [PATCH v2 2/6] ivshmem: Convert to msix_init_exclusive_bar() interface Jan Kiszka
2012-06-14 13:54     ` Alex Williamson
2012-06-14  4:51 ` [Qemu-devel] [PATCH v2 3/6] virtio: " Alex Williamson
2012-06-14  4:51 ` [Qemu-devel] [PATCH v2 4/6] msix: Split PBA into it's own MemoryRegion Alex Williamson
2012-06-14  6:13   ` Jan Kiszka
2012-06-14 13:56     ` Alex Williamson
2012-06-14 10:24   ` Michael S. Tsirkin
2012-06-14 14:21     ` Alex Williamson
2012-06-14 14:50       ` Michael S. Tsirkin
2012-06-14 15:09         ` Alex Williamson
2012-06-14 15:45           ` Michael S. Tsirkin
2012-06-14 16:02             ` Alex Williamson
2012-06-14 16:26               ` Michael S. Tsirkin
2012-06-14  4:51 ` [Qemu-devel] [PATCH v2 5/6] msix: Allow full specification of MSIX layout Alex Williamson
2012-06-14  6:17   ` Jan Kiszka
2012-06-14  8:12     ` Michael S. Tsirkin
2012-06-14 14:12     ` Alex Williamson
2012-06-14  8:10   ` Michael S. Tsirkin
2012-06-14 14:15     ` Alex Williamson
2012-06-14  4:52 ` [Qemu-devel] [PATCH v2 6/6] msix: Fix last PCIDevice naming inconsitency Alex Williamson
2012-06-14  8:13   ` Michael S. Tsirkin
2012-06-14 14:18     ` Alex Williamson
2012-06-14 14:21       ` Michael S. Tsirkin
2012-06-14 15:06       ` Michael S. Tsirkin
2012-06-14 15:08   ` 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=20120614045127.11034.9983.stgit@bling.home \
    --to=alex.williamson@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=mst@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).