mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 15:15:46 +00:00
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>
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user