[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v3 48/51] ivshmem: rename MSI eventfd_table
From: |
marcandre . lureau |
Subject: |
[Qemu-devel] [PULL v3 48/51] ivshmem: rename MSI eventfd_table |
Date: |
Tue, 13 Oct 2015 16:26:15 +0200 |
From: Marc-André Lureau <address@hidden>
The array is used to have vector specific data, so use a more
descriptive name.
Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>
---
hw/misc/ivshmem.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 3283874..8581d43 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -66,9 +66,9 @@ typedef struct Peer {
EventNotifier *eventfds;
} Peer;
-typedef struct EventfdEntry {
+typedef struct MSIVector {
PCIDevice *pdev;
-} EventfdEntry;
+} MSIVector;
typedef struct IVShmemState {
/*< private >*/
@@ -99,7 +99,7 @@ typedef struct IVShmemState {
int vm_id;
uint32_t vectors;
uint32_t features;
- EventfdEntry *eventfd_table;
+ MSIVector *msi_vectors;
Error *migration_blocker;
@@ -284,10 +284,10 @@ static void ivshmem_event(void *opaque, int event)
static void fake_irqfd(void *opaque, const uint8_t *buf, int size) {
- EventfdEntry *entry = opaque;
+ MSIVector *entry = opaque;
PCIDevice *pdev = entry->pdev;
IVShmemState *s = IVSHMEM(pdev);
- int vector = entry - s->eventfd_table;
+ int vector = entry - s->msi_vectors;
IVSHMEM_DPRINTF("interrupt on vector %p %d\n", pdev, vector);
msix_notify(pdev, vector);
@@ -311,10 +311,10 @@ static CharDriverState* create_eventfd_chr_device(void *
opaque, EventNotifier *
/* if MSI is supported we need multiple interrupts */
if (ivshmem_has_feature(s, IVSHMEM_MSI)) {
- s->eventfd_table[vector].pdev = PCI_DEVICE(s);
+ s->msi_vectors[vector].pdev = PCI_DEVICE(s);
qemu_chr_add_handlers(chr, ivshmem_can_receive, fake_irqfd,
- ivshmem_event, &s->eventfd_table[vector]);
+ ivshmem_event, &s->msi_vectors[vector]);
} else {
qemu_chr_add_handlers(chr, ivshmem_can_receive, ivshmem_receive,
ivshmem_event, s);
@@ -660,7 +660,7 @@ static int ivshmem_setup_msi(IVShmemState * s)
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));
+ s->msi_vectors = g_malloc0(s->vectors * sizeof(MSIVector));
ivshmem_use_msix(s);
return 0;
@@ -865,7 +865,7 @@ static void pci_ivshmem_exit(PCIDevice *dev)
msix_uninit_exclusive_bar(dev);
}
- g_free(s->eventfd_table);
+ g_free(s->msi_vectors);
}
static bool test_msix(void *opaque, int version_id)
--
2.4.3
- [Qemu-devel] [PULL v3 35/51] ivshmem-server: use a uint16 for client ID, (continued)
- [Qemu-devel] [PULL v3 35/51] ivshmem-server: use a uint16 for client ID, marcandre . lureau, 2015/10/13
- [Qemu-devel] [PULL v3 29/51] ivshmem: replace 'guest' for 'peer' appropriately, marcandre . lureau, 2015/10/13
- [Qemu-devel] [PULL v3 34/51] ivshmem-client: check the number of vectors, marcandre . lureau, 2015/10/13
- [Qemu-devel] [PULL v3 30/51] ivshmem: error on too many eventfd received, marcandre . lureau, 2015/10/13
- [Qemu-devel] [PULL v3 33/51] contrib: add ivshmem client and server, marcandre . lureau, 2015/10/13
- [Qemu-devel] [PULL v3 43/51] tests: add ivshmem qtest, marcandre . lureau, 2015/10/13
- [Qemu-devel] [PULL v3 44/51] ivshmem: do not keep shm_fd open, marcandre . lureau, 2015/10/13
- [Qemu-devel] [PULL v3 36/51] ivshmem-server: fix hugetlbfs support, marcandre . lureau, 2015/10/13
- [Qemu-devel] [PULL v3 37/51] docs: update ivshmem device spec, marcandre . lureau, 2015/10/13
- [Qemu-devel] [PULL v3 42/51] glib-compat: add 2.38/2.40/2.46 asserts, marcandre . lureau, 2015/10/13
- [Qemu-devel] [PULL v3 48/51] ivshmem: rename MSI eventfd_table,
marcandre . lureau <=
- [Qemu-devel] [PULL v3 50/51] ivshmem: use little-endian int64_t for the protocol, marcandre . lureau, 2015/10/13
- [Qemu-devel] [PULL v3 47/51] ivshmem: remove EventfdEntry.vector, marcandre . lureau, 2015/10/13
- [Qemu-devel] [PULL v3 51/51] doc: document ivshmem & hugepages, marcandre . lureau, 2015/10/13
- [Qemu-devel] [PULL v3 12/51] ivshmem: limit maximum number of peers to G_MAXUINT16, marcandre . lureau, 2015/10/15
- [Qemu-devel] [PULL v3 14/51] ivshmem: allocate eventfds in resize_peers(), marcandre . lureau, 2015/10/15
- [Qemu-devel] [PULL v3 27/51] ivshmem: add device description, marcandre . lureau, 2015/10/15
- [Qemu-devel] [PULL v3 13/51] ivshmem: simplify around increase_dynamic_storage(), marcandre . lureau, 2015/10/15
- [Qemu-devel] [PULL v3 16/51] ivshmem: initialize max_peer to -1, marcandre . lureau, 2015/10/15
- [Qemu-devel] [PULL v3 32/51] util: const event_notifier_get_fd() argument, marcandre . lureau, 2015/10/15
- [Qemu-devel] [PULL v3 40/51] msix: implement pba write (but read-only), marcandre . lureau, 2015/10/15