From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLokP-0007hn-Sr for qemu-devel@nongnu.org; Mon, 04 Dec 2017 06:17:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eLokM-0007Ek-NT for qemu-devel@nongnu.org; Mon, 04 Dec 2017 06:17:17 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:59462) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eLokM-0007EY-F3 for qemu-devel@nongnu.org; Mon, 04 Dec 2017 06:17:14 -0500 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vB4BDqRh097437 for ; Mon, 4 Dec 2017 06:17:12 -0500 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0a-001b2d01.pphosted.com with ESMTP id 2en3b1nw9h-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 04 Dec 2017 06:17:11 -0500 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 4 Dec 2017 11:17:09 -0000 References: <20171128134648.21530-1-cohuck@redhat.com> <20171128134648.21530-3-cohuck@redhat.com> From: Christian Borntraeger Date: Mon, 4 Dec 2017 12:17:06 +0100 MIME-Version: 1.0 In-Reply-To: <20171128134648.21530-3-cohuck@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Message-Id: <7c5e59c3-fdee-604d-3ade-841fbdb045e3@de.ibm.com> Subject: Re: [Qemu-devel] [qemu-s390x] [PATCH RFC 2/2] s390x: attach autogenerated nics List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck , qemu-devel@nongnu.org, qemu-s390x@nongnu.org Cc: pasic@linux.vnet.ibm.com, pmorel@linux.vnet.ibm.com On 11/28/2017 02:46 PM, Cornelia Huck wrote: > The autogenerated nics should be treated as any other device; use > qdev_set_id() to have them show up under peripheral-anon. > I think this is fine, but then I ask myself how x86 does this. So I tried to find out how the pc-q35 machine does this but I somehow failed to understand how they do it. Do you have any clue? > Signed-off-by: Cornelia Huck > --- > hw/s390x/s390-virtio-ccw.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c > index a23b8aec9f..830bae9d0f 100644 > --- a/hw/s390x/s390-virtio-ccw.c > +++ b/hw/s390x/s390-virtio-ccw.c > @@ -35,6 +35,7 @@ > #include "cpu_models.h" > #include "qapi/qmp/qerror.h" > #include "hw/nmi.h" > +#include "include/monitor/qdev.h" > > S390CPU *s390_cpu_addr2state(uint16_t cpu_addr) > { > @@ -259,6 +260,7 @@ static void s390_create_virtio_net(BusState *bus, const char *name) > > dev = qdev_create(bus, name); > qdev_set_nic_properties(dev, nd); > + qdev_set_id(dev, NULL); > qdev_init_nofail(dev); > } > } >