From nobody Fri Apr 26 17:46:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1572250007; cv=none; d=zoho.com; s=zohoarc; b=XSIdCu6xaQ5gC4jgIy6vFdqFHbzYCW2eRVWE76z1srW27lchXcbEGAYwawwV23jqxfICytMFhhczBlmjOcFHvyMe0KmyFQtDBIxDWucE6MQOFp/jrtpcx3LqTe8y+qqGlXP1a6xrdl692TsCStQ484Xj/HRpUD7WUFAuWj80Wws= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572250007; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=Zj5mhAVWKCtNvYgftpB19snp3HaPGCRiNHv4Fc2OpXY=; b=WG/Stbt368dn6BykZyYNSzyMfXwjNpR6eOiAgplpecV6Qza8YZVllyAqbLmvGbPde7knZyEqjPBcrZshTcyTFvtc8QnODlKgXTopM8ejlaUCNvkG6Ff8LJizL8kxn57DSq2eTnILoUph3nRQpzsexPIqc4I56eWHvOE9irjbH9g= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1572250007148358.6405178350117; Mon, 28 Oct 2019 01:06:47 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-429-oNPl0cpxNmOVGPZWlH9hOA-1; Mon, 28 Oct 2019 04:06:43 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 04654107AD28; Mon, 28 Oct 2019 08:06:38 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 09CBB60166; Mon, 28 Oct 2019 08:06:34 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 493E418005A0; Mon, 28 Oct 2019 08:06:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9S86UA9005132 for ; Mon, 28 Oct 2019 04:06:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id 430BF60872; Mon, 28 Oct 2019 08:06:30 +0000 (UTC) Received: from mx1.redhat.com (ext-mx03.extmail.prod.ext.phx2.redhat.com [10.5.110.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3CCC960856 for ; Mon, 28 Oct 2019 08:06:27 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C665583F51 for ; Mon, 28 Oct 2019 08:06:26 +0000 (UTC) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x9S82P8h090338 for ; Mon, 28 Oct 2019 04:06:26 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2vwu1ctde2-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 28 Oct 2019 04:06:25 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 28 Oct 2019 08:06:22 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 28 Oct 2019 08:06:22 -0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x9S86KHS55509074 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 28 Oct 2019 08:06:20 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6D37E42052; Mon, 28 Oct 2019 08:06:20 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4B1E54203F; Mon, 28 Oct 2019 08:06:20 +0000 (GMT) Received: from m46lp64.lnxne.boe (unknown [9.152.108.100]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 28 Oct 2019 08:06:20 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572250005; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Zj5mhAVWKCtNvYgftpB19snp3HaPGCRiNHv4Fc2OpXY=; b=FI48sbK9b3eSIWk8uYGE+qhGE4nxnWXbjLzxoNTO4CfSlxqFqHSHArJZRkv/aB2C0nQqi0 2bCbSZz8y3R4a6TcZlgpFqjkWa/ZFfrIZJ2igjtH0+J2daxDcO8pe6iyEzK8MAwwC9O765 23hfkgtih4tWf5FBmKHIduKP9osb02M= From: Bjoern Walk To: libvir-list@redhat.com Date: Mon, 28 Oct 2019 09:06:13 +0100 MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19102808-0012-0000-0000-0000035E49B6 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19102808-0013-0000-0000-000021998591 Message-Id: <20191028080613.202924-1-bwalk@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-10-28_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=947 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910280081 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 238 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 28 Oct 2019 08:06:26 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 28 Oct 2019 08:06:26 +0000 (UTC) for IP:'148.163.156.1' DOMAIN:'mx0a-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'bwalk@linux.ibm.com' RCPT:'' X-RedHat-Spam-Score: -0.7 (RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS) 148.163.156.1 mx0a-001b2d01.pphosted.com 148.163.156.1 mx0a-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.27 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Bjoern Walk Subject: [libvirt] [PATCH] qemu: hotplug: ensure address generation for vfio-ccw X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: oNPl0cpxNmOVGPZWlH9hOA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" When attaching a mediated host device of model vfio-ccw without specifying a guest-address, none is generated by libvirt. Let's fix this and make sure to generate a device address during live-hotplug. Reviewed-by: Boris Fiuczynski Signed-off-by: Bjoern Walk Reviewed-by: Daniel Henrique Barboza Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_hotplug.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index fd4bafef..7b775159 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2790,6 +2790,8 @@ qemuDomainAttachMediatedDevice(virQEMUDriverPtr drive= r, { int ret =3D -1; g_autofree char *devstr =3D NULL; + char *devName =3D NULL; + bool releaseaddr =3D false; bool added =3D false; bool teardowncgroup =3D false; bool teardownlabel =3D false; @@ -2805,6 +2807,10 @@ qemuDomainAttachMediatedDevice(virQEMUDriverPtr driv= er, return -1; break; case VIR_MDEV_MODEL_TYPE_VFIO_CCW: + devName =3D hostdev->source.subsys.u.mdev.uuidstr; + if (qemuDomainEnsureVirtioAddress(&releaseaddr, vm, &dev, devName)= < 0) + return -1; + break; case VIR_MDEV_MODEL_TYPE_LAST: break; } --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list