diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2012-07-29 17:03:19 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2012-07-29 17:05:35 +0300 |
commit | 5e59b024351f827f903f98ae522687ea53dc4f23 (patch) | |
tree | 4996f31e1d7d9e08c04d8bbf018752a71c6cd4c3 /hw/ivshmem.c | |
parent | 7162ab21fe8e82f924002951cd8e87f69358f8b5 (diff) | |
parent | 932d4a42afa28829fadf3cbfbb0507cc09aafd8b (diff) |
Merge branch pci into master
Merge master and pci branch, resolve build breakage in hw/esp.c
introduced by f90c2bcd.
Conflicts:
hw/esp.c
Diffstat (limited to 'hw/ivshmem.c')
-rw-r--r-- | hw/ivshmem.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/hw/ivshmem.c b/hw/ivshmem.c index bba21c55e2..0c58161565 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 */ @@ -574,16 +573,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)); @@ -775,7 +771,7 @@ static int pci_ivshmem_init(PCIDevice *dev) return 0; } -static int pci_ivshmem_uninit(PCIDevice *dev) +static void pci_ivshmem_uninit(PCIDevice *dev) { IVShmemState *s = DO_UPCAST(IVShmemState, dev, dev); @@ -790,8 +786,6 @@ static int pci_ivshmem_uninit(PCIDevice *dev) memory_region_destroy(&s->ivshmem); memory_region_destroy(&s->bar); unregister_savevm(&dev->qdev, "ivshmem", s); - - return 0; } static Property ivshmem_properties[] = { |