diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2012-06-14 12:16:01 -0600 |
---|---|---|
committer | Michael S. Tsirkin <mst@robin.(none)> | 2012-06-18 10:21:05 +0300 |
commit | 1116b5392129a9961335c2b64e63003736e3c2df (patch) | |
tree | d7f3b96f8dc0956b50a4f47cc5d1d60c4ba3e3b1 /hw/ivshmem.c | |
parent | 53f949254ad2435bfd45cb0dee96f246a0bdd7e3 (diff) |
ivshmem: Convert to msix_init_exclusive_bar() interface
Trivial conversion, failed to have an uninit before and after.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/ivshmem.c')
-rw-r--r-- | hw/ivshmem.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/hw/ivshmem.c b/hw/ivshmem.c index 05559b639..8b49eee8e 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)); |