From patchwork Tue Mar 5 16:48:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 225087 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id EC5322C0320 for ; Wed, 6 Mar 2013 04:01:06 +1100 (EST) Received: from localhost ([::1]:52591 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCvEf-0008Vv-7d for incoming@patchwork.ozlabs.org; Tue, 05 Mar 2013 12:01:05 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56916) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCvDo-0008H7-Td for qemu-devel@nongnu.org; Tue, 05 Mar 2013 12:00:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UCvDj-00068r-0S for qemu-devel@nongnu.org; Tue, 05 Mar 2013 12:00:12 -0500 Received: from cantor2.suse.de ([195.135.220.15]:50470 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCv2u-00022q-Jy for qemu-devel@nongnu.org; Tue, 05 Mar 2013 11:48:56 -0500 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 0A2C2A5239; Tue, 5 Mar 2013 17:48:56 +0100 (CET) Message-ID: <513621F7.9030403@suse.de> Date: Tue, 05 Mar 2013 17:48:55 +0100 From: Alexander Graf User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.3) Gecko/20120306 Thunderbird/10.0.3 MIME-Version: 1.0 To: Jesse Larrew References: <1360108037-9211-1-git-send-email-jlarrew@linux.vnet.ibm.com> <1360108037-9211-3-git-send-email-jlarrew@linux.vnet.ibm.com> In-Reply-To: <1360108037-9211-3-git-send-email-jlarrew@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 195.135.220.15 Cc: Christian Borntraeger , aliguori@us.ibm.com, qemu-devel@nongnu.org Subject: Re: [Qemu-devel] [PATCH 2/3] hw/virtio-net.c: set config size using host features X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On 02/06/2013 12:47 AM, Jesse Larrew wrote: > Currently, the config size for virtio devices is hard coded. When a new > feature is added that changes the config size, drivers that assume a static > config size will break. For purposes of backward compatibility, there needs > to be a way to inform drivers of the config size needed to accommodate the > set of features enabled. > > Signed-off-by: Jesse Larrew The following patch gets my s390 virtio guest working again, but I doubt it's the right fix. What is the expected dependency chain of feature calls? Alex diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c index 089ed92..81be971 100644 --- a/hw/s390x/s390-virtio-bus.c +++ b/hw/s390x/s390-virtio-bus.c @@ -154,7 +154,7 @@ static int s390_virtio_net_init(VirtIOS390Device *dev) VirtIODevice *vdev; vdev = virtio_net_init((DeviceState *)dev, &dev->nic, &dev->net, - dev->host_features); + dev->host_features | (1 << VIRTIO_NET_F_MAC)); if (!vdev) { return -1; }