aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2023-10-17 14:13:04 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2023-10-25 17:35:15 +0200
commit126e7f780367b0263d9a112729736d6a0bd6d441 (patch)
tree0aef67081b061d11b1c2351aff7978abcdd0fdb4 /system
parent5d9ec1f4c78ed25720b4fd01ddcddb00db50fa6c (diff)
downloadqemu-126e7f780367b0263d9a112729736d6a0bd6d441.zip
qemu-126e7f780367b0263d9a112729736d6a0bd6d441.tar.gz
qemu-126e7f780367b0263d9a112729736d6a0bd6d441.tar.bz2
kvm: require KVM_CAP_IOEVENTFD and KVM_CAP_IOEVENTFD_ANY_LENGTH
KVM_CAP_IOEVENTFD_ANY_LENGTH was added in Linux 4.4, released in 2016. Assume that it is present. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'system')
-rw-r--r--system/memory.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/system/memory.c b/system/memory.c
index a800fbc..4928f25 100644
--- a/system/memory.c
+++ b/system/memory.c
@@ -1535,7 +1535,12 @@ MemTxResult memory_region_dispatch_write(MemoryRegion *mr,
adjust_endianness(mr, &data, op);
- if ((!kvm_eventfds_enabled()) &&
+ /*
+ * FIXME: it's not clear why under KVM the write would be processed
+ * directly, instead of going through eventfd. This probably should
+ * test "tcg_enabled() || qtest_enabled()", or should just go away.
+ */
+ if (!kvm_enabled() &&
memory_region_dispatch_write_eventfds(mr, addr, data, size, attrs)) {
return MEMTX_OK;
}
@@ -2550,8 +2555,6 @@ void memory_region_clear_flush_coalesced(MemoryRegion *mr)
}
}
-static bool userspace_eventfd_warning;
-
void memory_region_add_eventfd(MemoryRegion *mr,
hwaddr addr,
unsigned size,
@@ -2568,13 +2571,6 @@ void memory_region_add_eventfd(MemoryRegion *mr,
};
unsigned i;
- if (kvm_enabled() && (!(kvm_eventfds_enabled() ||
- userspace_eventfd_warning))) {
- userspace_eventfd_warning = true;
- error_report("Using eventfd without MMIO binding in KVM. "
- "Suboptimal performance expected");
- }
-
if (size) {
adjust_endianness(mr, &mrfd.data, size_memop(size) | MO_TE);
}