From f41389ae3c54bd5e2040e3f95a2872981c3ed965 Mon Sep 17 00:00:00 2001 From: Eric Auger Date: Fri, 31 Oct 2014 13:38:18 +0000 Subject: KVM_CAP_IRQFD and KVM_CAP_IRQFD_RESAMPLE checks Compute kvm_irqfds_allowed by checking the KVM_CAP_IRQFD extension. Remove direct settings in architecture specific files. Add a new kvm_resamplefds_allowed variable, initialized by checking the KVM_CAP_IRQFD_RESAMPLE extension. Add a corresponding kvm_resamplefds_enabled() function. A special notice for s390 where KVM_CAP_IRQFD was not immediatly advirtised when irqfd capability was introduced in the kernel. KVM_CAP_IRQ_ROUTING was advertised instead. This was fixed in "KVM: s390: announce irqfd capability", ebc3226202d5956a5963185222982d435378b899 whereas irqfd support was brought in 84223598778ba08041f4297fda485df83414d57e, "KVM: s390: irq routing for adapter interrupts". Both commits first appear in 3.15 so there should not be any kernel version impacted by this QEMU modification. Signed-off-by: Eric Auger Signed-off-by: Paolo Bonzini --- target-s390x/kvm.c | 1 - 1 file changed, 1 deletion(-) (limited to 'target-s390x') diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index 50709ba6b5..1b79c4de75 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -1294,7 +1294,6 @@ void kvm_arch_init_irq_routing(KVMState *s) * have to override the common code kvm_halt_in_kernel_allowed setting. */ if (kvm_check_extension(s, KVM_CAP_IRQ_ROUTING)) { - kvm_irqfds_allowed = true; kvm_gsi_routing_allowed = true; kvm_halt_in_kernel_allowed = false; } -- cgit v1.2.3 From e6eef7c221634c942e9f586df84aae623aa06cd5 Mon Sep 17 00:00:00 2001 From: Christian Borntraeger Date: Thu, 30 Oct 2014 10:05:28 +0100 Subject: valgrind/s390x: avoid false positives on KVM_SET_FPU ioctl struct kvm_fpu contains an alignment padding on s390x. Let's use a designated initializer to avoid false positives from valgrind/memcheck. Signed-off-by: Christian Borntraeger Signed-off-by: Paolo Bonzini --- target-s390x/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target-s390x') diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index 1b79c4de75..1dcdaa6662 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -208,7 +208,7 @@ int kvm_arch_put_registers(CPUState *cs, int level) CPUS390XState *env = &cpu->env; struct kvm_sregs sregs; struct kvm_regs regs; - struct kvm_fpu fpu; + struct kvm_fpu fpu = {}; int r; int i; -- cgit v1.2.3