[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 2/8] ivshmem: Convert to msix_init_exclusive_bar(
From: |
Alex Williamson |
Subject: |
[Qemu-devel] [PATCH v3 2/8] ivshmem: Convert to msix_init_exclusive_bar() interface |
Date: |
Thu, 14 Jun 2012 12:16:01 -0600 |
User-agent: |
StGIT/0.14.3 |
Trivial conversion, failed to have an uninit before and after.
Signed-off-by: Alex Williamson <address@hidden>
---
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));
- [Qemu-devel] [PATCH v3 0/8] msix: Support specifying offsets, BARs, and capability location, Alex Williamson, 2012/06/14
- [Qemu-devel] [PATCH v3 1/8] msix: Add simple BAR allocation MSIX setup functions, Alex Williamson, 2012/06/14
- [Qemu-devel] [PATCH v3 2/8] ivshmem: Convert to msix_init_exclusive_bar() interface,
Alex Williamson <=
- [Qemu-devel] [PATCH v3 3/8] virtio: Convert to msix_init_exclusive_bar() interface, Alex Williamson, 2012/06/14
- [Qemu-devel] [PATCH v3 4/8] msix: Move msix_mmio_read, Alex Williamson, 2012/06/14
- [Qemu-devel] [PATCH v3 5/8] msix: Note endian TODO item, Alex Williamson, 2012/06/14
- [Qemu-devel] [PATCH v3 6/8] msix: Split PBA into it's own MemoryRegion, Alex Williamson, 2012/06/14
- [Qemu-devel] [PATCH v3 7/8] msix: Allow full specification of MSIX layout, Alex Williamson, 2012/06/14
- [Qemu-devel] [PATCH v3 8/8] msix: Switch msix_uninit to return void, Alex Williamson, 2012/06/14
- Re: [Qemu-devel] [PATCH v3 0/8] msix: Support specifying offsets, BARs, and capability location, Michael S. Tsirkin, 2012/06/14