Received: from eggs.gnu.org ([2001:4830:134:3::10]:35394) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wwp2H-0001dU-Ge for qemu-devel@nongnu.org; Tue, 17 Jun 2014 04:46:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wwp29-0002xJ-BV for qemu-devel@nongnu.org; Tue, 17 Jun 2014 04:46:33 -0400 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:59707) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wwp28-0002x7-V4 for qemu-devel@nongnu.org; Tue, 17 Jun 2014 04:46:25 -0400 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 17 Jun 2014 09:46:23 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id AEE441B0805F for ; Tue, 17 Jun 2014 09:46:48 +0100 (BST) Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps4074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s5H8kJ5E22675588 for ; Tue, 17 Jun 2014 08:46:19 GMT Received: from d06av02.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s5H8kIOm000895 for ; Tue, 17 Jun 2014 02:46:19 -0600 Date: Tue, 17 Jun 2014 10:46:15 +0200 From: Cornelia Huck Message-ID: <20140617104615.10fc3946.cornelia.huck@de.ibm.com> In-Reply-To: References: <1402933252-1079-1-git-send-email-ming.lei@canonical.com> <1402933252-1079-3-git-send-email-ming.lei@canonical.com> <20140616180447.3346dbb2.cornelia.huck@de.ibm.com> <20140617090741.0c5a4b4b.cornelia.huck@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/4] s390-virtio-bus: move common virtio properties to virtio s390 device class List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ming Lei Cc: Peter Maydell , qemu-devel@nongnu.org, Paolo Bonzini On Tue, 17 Jun 2014 15:44:28 +0800 Ming Lei wrote: > On Tue, Jun 17, 2014 at 3:07 PM, Cornelia Huck wrote: > > On Tue, 17 Jun 2014 10:44:11 +0800 > > Ming Lei wrote: > > > >> On Tue, Jun 17, 2014 at 12:04 AM, Cornelia Huck > >> wrote: > >> > On Mon, 16 Jun 2014 23:40:50 +0800 > >> > Ming Lei wrote: > >> > > >> >> The two common virtio features can be defined per bus, so move all > >> >> into virtio-s390 class device to make code more clean. > >> >> > >> >> Suggested-by: Paolo Bonzini > >> >> Signed-off-by: Ming Lei > >> >> --- > >> >> hw/s390x/s390-virtio-bus.c | 15 ++++++--------- > >> >> 1 file changed, 6 insertions(+), 9 deletions(-) > >> > > >> > This one breaks for me: > >> > > >> > qemu-system-s390x: -device virtio-blk-s390,scsi=off,config-wce=off,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1: Property '.scsi' not found > >> > > >> >> > >> >> diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c > >> >> index 9c71afa..ab9758e 100644 > >> >> --- a/hw/s390x/s390-virtio-bus.c > >> >> +++ b/hw/s390x/s390-virtio-bus.c > >> >> @@ -526,18 +526,11 @@ static const TypeInfo s390_virtio_net = { > >> >> .class_init = s390_virtio_net_class_init, > >> >> }; > >> >> > >> >> -static Property s390_virtio_blk_properties[] = { > >> >> - DEFINE_VIRTIO_BLK_PROPERTIES(VirtIOBlkS390, blk), > >> >> - DEFINE_PROP_END_OF_LIST(), > >> >> -}; > >> >> - > >> >> static void s390_virtio_blk_class_init(ObjectClass *klass, void *data) > >> >> { > >> >> - DeviceClass *dc = DEVICE_CLASS(klass); > >> >> VirtIOS390DeviceClass *k = VIRTIO_S390_DEVICE_CLASS(klass); > >> >> > >> >> k->init = s390_virtio_blk_init; > >> >> - dc->props = s390_virtio_blk_properties; > >> > > >> > ...which is probably because you removed the block properties here. > >> > >> You are right, DEFINE_VIRTIO_BLK_PROPERTIES() should have been > >> kept. > >> > >> Could you test attached patch? > >> > > Hm, with the attached patch qemu starts, but the guest will not come up > > (same commandline + kernel comes up fine on master). Let me dig around > > a bit. > > Looks like s390 virtio-blk never enables the two common features, is > there any reason the two features can't be supported by s390? Indirect descriptors are fine. event_idx will not work IIUC because we always need to do a sync before we see changes, and this needs an interrupt to trigger. The correct way, of course, is to unset VIRTIO_RING_F_EVENT_IDX in the guest driver, and I verified that this works - this does not help with old guests, however. Note that this applies only to the old s390-virtio transport - virtio-ccw is fine.