From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYDT8-0006lj-53 for qemu-devel@nongnu.org; Tue, 13 Nov 2012 05:11:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYDT5-0001SJ-3U for qemu-devel@nongnu.org; Tue, 13 Nov 2012 05:11:46 -0500 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:51070) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYDT4-0001Rb-Q8 for qemu-devel@nongnu.org; Tue, 13 Nov 2012 05:11:43 -0500 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 13 Nov 2012 10:11:40 -0000 Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps3074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qADABTqn54395122 for ; Tue, 13 Nov 2012 10:11:29 GMT Received: from d06av01.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qADABaeF005376 for ; Tue, 13 Nov 2012 03:11:36 -0700 Date: Tue, 13 Nov 2012 11:11:34 +0100 From: Cornelia Huck Message-ID: <20121113111134.1a8baad1@BR9GNB5Z> In-Reply-To: <20121113011755.GA27831@amt.cnet> References: <1351700688-42353-1-git-send-email-cornelia.huck@de.ibm.com> <1351700688-42353-3-git-send-email-cornelia.huck@de.ibm.com> <20121113011755.GA27831@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/3] s390: Virtual channel subsystem support. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcelo Tosatti Cc: linux-s390 , Anthony Liguori , KVM , Carsten Otte , Sebastian Ott , Heiko Carstens , qemu-devel , Alexander Graf , Christian Borntraeger , Avi Kivity , Martin Schwidefsky On Mon, 12 Nov 2012 23:17:55 -0200 Marcelo Tosatti wrote: > Hi Cornelia, > > On Wed, Oct 31, 2012 at 05:24:47PM +0100, Cornelia Huck wrote: > > Provide a mechanism for qemu to provide fully virtual subchannels to > > the guest. In the KVM case, this relies on the kernel's css support > > for I/O and machine check interrupt handling. The !KVM case handles > > interrupts on its own. > > > > Signed-off-by: Cornelia Huck > > --- > > hw/s390x/Makefile.objs | 1 + > > hw/s390x/css.c | 1209 ++++++++++++++++++++++++++++++++++++++++++++ > > hw/s390x/css.h | 90 ++++ > > target-s390x/Makefile.objs | 2 +- > > target-s390x/cpu.h | 232 +++++++++ > > target-s390x/helper.c | 146 ++++++ > > target-s390x/ioinst.c | 737 +++++++++++++++++++++++++++ > > target-s390x/ioinst.h | 213 ++++++++ > > target-s390x/kvm.c | 251 ++++++++- > > target-s390x/misc_helper.c | 6 +- > > 10 files changed, 2872 insertions(+), 15 deletions(-) > > create mode 100644 hw/s390x/css.c > > create mode 100644 hw/s390x/css.h > > create mode 100644 target-s390x/ioinst.c > > create mode 100644 target-s390x/ioinst.h > > > +void kvm_s390_enable_css_support(CPUS390XState *env) > > +{ > > + struct kvm_enable_cap cap = {}; > > + int r; > > + > > + /* Activate host kernel channel subsystem support. */ > > + if (kvm_enabled()) { > > + /* One CPU has to run */ > > + s390_add_running_cpu(env); > > Care to explain this? Old code leftovers; I've removed it. > > > + > > + cap.cap = KVM_CAP_S390_CSS_SUPPORT; > > + r = kvm_vcpu_ioctl(env, KVM_ENABLE_CAP, &cap); > > + assert(r == 0); > > + } > > +} > >