From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzNah-0002pC-Je for qemu-devel@nongnu.org; Thu, 19 Nov 2015 06:41:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzNad-0004Ia-FA for qemu-devel@nongnu.org; Thu, 19 Nov 2015 06:41:27 -0500 Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:51660) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzNad-0004GX-4G for qemu-devel@nongnu.org; Thu, 19 Nov 2015 06:41:23 -0500 Received: from localhost by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 19 Nov 2015 11:41:20 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 7B58A219005C for ; Thu, 19 Nov 2015 11:41:11 +0000 (GMT) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tAJBfGXk30802044 for ; Thu, 19 Nov 2015 11:41:17 GMT Received: from d06av01.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tAJBfGpA030518 for ; Thu, 19 Nov 2015 04:41:16 -0700 Date: Thu, 19 Nov 2015 12:41:14 +0100 From: Cornelia Huck Message-ID: <20151119124114.1c818abe.cornelia.huck@de.ibm.com> In-Reply-To: <012d01d122b3$99fadce0$cdf096a0$@samsung.com> References: <011b01d122af$c60f7ce0$522e76a0$@samsung.com> <564D9CD2.3080504@de.ibm.com> <012d01d122b3$99fadce0$cdf096a0$@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] virtio: Implement userspace forwarding for host notifiers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Fedin Cc: 'Christian Borntraeger' , qemu-devel@nongnu.org, "'Michael S. Tsirkin'" On Thu, 19 Nov 2015 13:18:13 +0300 Pavel Fedin wrote: > Hello! > > > Looks like this would be ok for virtio-ccw (as it does not call > > virtio_queue_set_host_notifier_forwarding) > > Yes, this is the reason why i intentionally did not insert extra logic into virtio_queue_set_host_notifier_fd_handler(), but made > it into separate function. I don't know whether KVM on S390 reports KVM_CAP_IOEVENTFD. Yes, it does. > > > Question is might something like this for virtio-ccw useful as well? > > Yes, provided you have something to bind userspace actions to. Looks like S390 doesn't use MMIO here at all, but some obscure (for > me) thing, called "subchannel". :) Think of a "subchannel" as a communication channel between the operating system and the device. It is used to transmit commands that can do various things like read, write, or configure stuff. Basically, stuff that is handled via mmio on other platforms. > Another question is whether you can have kernel without KVM_CAP_IOEVENTFD on S390. Was it introduced since the beginning, or some > time later? There are old kernels around that have the needed basic support for the channel subsystem (needed for virtio-ccw), but not the ioeventfd support. > > > We cannot use memory_region, though, we would need to handle that in our > > diagnose code. > > Sorry, this phrase is a complete mystery to me, i have no idea what is diagnose code, as well as have never seen S390 in real life. "diagnose" is a hypercall on the s390. For virtio-ccw, guest->host notification happens via a special hypercall (diagnose 0x500). Therefore, we need to hook into our implementation of that diagnose for our handling. > I think if you have motivation, you could implement userspace forwarding for ccw yourself, since you know the thing and know how to > do it. For MMIO it was indeed very simple. I'll take a peek at your patch.