Received: from eggs.gnu.org ([2001:4830:134:3::10]:37988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjqDQ-0002un-Ht for qemu-devel@nongnu.org; Mon, 12 May 2014 09:24:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WjqDH-0003lv-Gt for qemu-devel@nongnu.org; Mon, 12 May 2014 09:24:24 -0400 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:34449) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjqDH-0003lC-8o for qemu-devel@nongnu.org; Mon, 12 May 2014 09:24:15 -0400 Received: from /spool/local by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 12 May 2014 14:24:14 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 109D12190042 for ; Mon, 12 May 2014 14:24:03 +0100 (BST) Received: from d06av10.portsmouth.uk.ibm.com (d06av10.portsmouth.uk.ibm.com [9.149.37.251]) by b06cxnps3074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s4CDOBuk393522 for ; Mon, 12 May 2014 13:24:11 GMT Received: from d06av10.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s4CDOBHh001229 for ; Mon, 12 May 2014 07:24:11 -0600 Date: Mon, 12 May 2014 15:24:09 +0200 From: Cornelia Huck Message-ID: <20140512152409.1e1d57fc.cornelia.huck@de.ibm.com> In-Reply-To: <53708D46.8060507@de.ibm.com> References: <1399554218-8262-1-git-send-email-cornelia.huck@de.ibm.com> <1399554218-8262-5-git-send-email-cornelia.huck@de.ibm.com> <53708D46.8060507@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 4/4] s390x/virtio-ccw: Wire up irq routing and irqfds. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christian Borntraeger Cc: Paolo Bonzini , qemu-devel@nongnu.org, agraf@suse.de On Mon, 12 May 2014 10:58:46 +0200 Christian Borntraeger wrote: > On 08/05/14 15:03, Cornelia Huck wrote: > > 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 > > Signed-off-by: Cornelia Huck > > Small things, otherwise > > Reviewed-by: Christian Borntraeger > > > [...] > > --- /dev/null > > +++ b/include/hw/s390x/adapter.h > > @@ -0,0 +1,23 @@ > > +/* > > + * s390 adapter definitions > > + * > > + * Copyright 2013 IBM Corp. > > 2014 as well ok > > [...] > > diff --git a/kvm-all.c b/kvm-all.c > > index 5cb7f26..51983bf 100644 > > --- a/kvm-all.c > > +++ b/kvm-all.c > > @@ -1267,6 +1297,11 @@ int kvm_irqchip_add_msi_route(KVMState *s, MSIMessage msg) > > return -ENOSYS; > > } > > > > +int kvm_irqchip_add_adapter_route(KVMState *s, AdapterInfo *adapter) > > +{ > > + return -ENOSYS; > > +} > > + > > static int kvm_irqchip_assign_irqfd(KVMState *s, int fd, int virq, bool assign) > > { > > abort(); > > @@ -1296,7 +1331,8 @@ static int kvm_irqchip_create(KVMState *s) > > int ret; > > > > if (!qemu_opt_get_bool(qemu_get_machine_opts(), "kernel_irqchip", true) || > > - !kvm_check_extension(s, KVM_CAP_IRQCHIP)) { > > + (!kvm_check_extension(s, KVM_CAP_IRQCHIP) && > > + (kvm_vm_enable_cap(s, KVM_CAP_S390_IRQCHIP, 0) < 0))) { > > return 0; > > } > > Do we need a comment here and/or in target-s390x/kvm.c why kvm_halt_in_kernel_allowed does not work without breaking backward compatibility on s390? Probably not here but... > > > > > > diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c > > index b7b0edc..43859e9 100644 > > --- a/target-s390x/kvm.c > > +++ b/target-s390x/kvm.c > > @@ -938,6 +938,11 @@ void kvm_s390_enable_css_support(S390CPU *cpu) > > > > void kvm_arch_init_irq_routing(KVMState *s) > > { > > + if (kvm_check_extension(s, KVM_CAP_IRQ_ROUTING)) { > > + kvm_irqfds_allowed = true; > > + kvm_gsi_routing_allowed = true; > > + kvm_halt_in_kernel_allowed = false; > > + } > > Do we need a comment here and/or in kvm-all why kvm_halt_in_kernel_allowed does not work without breaking backward compatibility on s390? ...I'll add the following here: /* * 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. */ > > [...] > > > Should Paolo ack the common kvm changes? (CCed) > > Christian