aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2012-10-02 16:42:23 +0200
committerAvi Kivity <avi@redhat.com>2012-10-15 11:43:07 +0200
commite71e602cb5ac194ea414816068f398080d913abb (patch)
treefb2d741f9628b23ede45bfe015fe22dc229a48af
parent9a2c913b77b54f650d60680d14b995bacbc63e50 (diff)
downloadqemu-e71e602cb5ac194ea414816068f398080d913abb.zip
qemu-e71e602cb5ac194ea414816068f398080d913abb.tar.gz
qemu-e71e602cb5ac194ea414816068f398080d913abb.tar.bz2
vfio: drop no-op MemoryListener callbacks
Removes quite a bit of useless code. Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r--hw/vfio_pci.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c
index 639371e..49e11e7 100644
--- a/hw/vfio_pci.c
+++ b/hw/vfio_pci.c
@@ -930,25 +930,6 @@ static int vfio_dma_map(VFIOContainer *container, target_phys_addr_t iova,
return -errno;
}
-static void vfio_listener_dummy1(MemoryListener *listener)
-{
- /* We don't do batching (begin/commit) or care about logging */
-}
-
-static void vfio_listener_dummy2(MemoryListener *listener,
- MemoryRegionSection *section)
-{
- /* We don't do logging or care about nops */
-}
-
-static void vfio_listener_dummy3(MemoryListener *listener,
- MemoryRegionSection *section,
- bool match_data, uint64_t data,
- EventNotifier *e)
-{
- /* We don't care about eventfds */
-}
-
static bool vfio_listener_skipped_section(MemoryRegionSection *section)
{
return !memory_region_is_ram(section->mr);
@@ -1040,18 +1021,8 @@ static void vfio_listener_region_del(MemoryListener *listener,
}
static MemoryListener vfio_memory_listener = {
- .begin = vfio_listener_dummy1,
- .commit = vfio_listener_dummy1,
.region_add = vfio_listener_region_add,
.region_del = vfio_listener_region_del,
- .region_nop = vfio_listener_dummy2,
- .log_start = vfio_listener_dummy2,
- .log_stop = vfio_listener_dummy2,
- .log_sync = vfio_listener_dummy2,
- .log_global_start = vfio_listener_dummy1,
- .log_global_stop = vfio_listener_dummy1,
- .eventfd_add = vfio_listener_dummy3,
- .eventfd_del = vfio_listener_dummy3,
};
static void vfio_listener_release(VFIOContainer *container)