qemu-kvm: ioeventfd fixup
PATCH 1/1 qemu-kvm: ioeventfd fixup
Make ioeventfd patchset apply to qemu-kvm.
Signed-off-by Michael S. Tsirkin <[email protected]>
---
This patch will need to be applied when ioeventfd is merged in qemu.git.
kvm-all.c | 2 +- kvm.h | 1 + qemu-kvm.c | 2 ++ qemu-kvm.h | 1 + 4 files changed, 5 insertions(+), 1 deletions(-)
kvm-all.c +1 -1
@@ -455,7 +455,7 @@ int kvm_check_extension(KVMState *s, unsigned int extension)return ret; } -static int kvm_check_many_ioeventfds (void ) +int kvm_check_many_ioeventfds (void ) {/* Older kernels have a 6 device limit on the KVM io bus. Find out so we * can avoid creating too many ioeventfds.
kvm.h +1 -0
@@ -204,6 +204,7 @@ int kvm_set_irqfd(int gsi, int fd, bool assigned) }#endif +int kvm_check_many_ioeventfds (void );int kvm_set_ioeventfd_pio_word (int fd,uint16_t adr,uint16_t val,bool assign);int kvm_has_gsi_routing (void );
qemu-kvm.c +2 -0
@@ -1686,6 +1686,8 @@ static int kvm_create_context(void) kvm_state->xcrs =kvm_check_extension (kvm_state,KVM_CAP_XCRS );#endif + kvm_state->many_ioeventfds =kvm_check_many_ioeventfds (); +kvm_init_ap ();if (kvm_irqchip) {if (!qemu_kvm_has_gsi_routing ()) {
qemu-kvm.h +1 -0
@@ -754,6 +754,7 @@ struct KVMState {int irqchip_in_kernel;int pit_in_kernel;int xsave, xcrs; +int many_ioeventfds;struct kvm_context kvm_context; };
Signature · 1 line
1.7.3.2.91.g446ac