From d426d9fba8ea5d728038a9bea6a7c51f11941157 Mon Sep 17 00:00:00 2001 From: Cornelia Huck Date: Mon, 15 Jul 2013 17:45:03 +0200 Subject: s390x/virtio-ccw: wire up irq routing and irqfds Make use of the new s390 adapter irq routing support to enable real in-kernel irqfds for virtio-ccw with adapter interrupts. Note that s390 doesn't provide the common KVM_CAP_IRQCHIP capability, but rather needs KVM_CAP_S390_IRQCHIP to be enabled. This is to ensure backward compatibility. Reviewed-by: Thomas Huth Reviewed-by: Christian Borntraeger Acked-by: Paolo Bonzini Signed-off-by: Cornelia Huck --- target-s390x/kvm.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'target-s390x') diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index 56179afece..bb731a0dcd 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -911,6 +911,16 @@ void kvm_s390_enable_css_support(S390CPU *cpu) void kvm_arch_init_irq_routing(KVMState *s) { + /* + * Note that while irqchip capabilities generally imply that cpustates + * are handled in-kernel, it is not true for s390 (yet); therefore, we + * 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; + } } int kvm_s390_assign_subch_ioeventfd(EventNotifier *notifier, uint32_t sch, -- cgit v1.2.1