From nobody Fri May 16 10:18:31 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 14964197917821022.5593735737275; Fri, 2 Jun 2017 09:09:51 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id AE6D87FD42; Fri, 2 Jun 2017 16:09:49 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7AA8384434; Fri, 2 Jun 2017 16:09:49 +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 4650C6B5D7; Fri, 2 Jun 2017 16:08:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v52G8TuD011683 for ; Fri, 2 Jun 2017 12:08:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id A9AE18442F; Fri, 2 Jun 2017 16:08:29 +0000 (UTC) Received: from inaba.usersys.redhat.com (dhcp129-60.brq.redhat.com [10.34.129.60]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3191B84D89 for ; Fri, 2 Jun 2017 16:08:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com AE6D87FD42 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com AE6D87FD42 From: Andrea Bolognani To: libvir-list@redhat.com Date: Fri, 2 Jun 2017 18:07:50 +0200 Message-Id: <1496419671-7600-26-git-send-email-abologna@redhat.com> In-Reply-To: <1496419671-7600-1-git-send-email-abologna@redhat.com> References: <1496419671-7600-1-git-send-email-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 25/26] conf: Parse and format 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 02 Jun 2017 16:09:50 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" --- src/conf/domain_conf.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 10998ea..989ed88 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -9176,6 +9176,15 @@ virDomainControllerDefParseXML(xmlNodePtr node, goto error; } } + + rc =3D virXPathInt("string(./isolationGroup)", ctxt, + &def->opts.pciopts.isolationGroup); + if (rc =3D=3D -2 || (rc =3D=3D 0 && def->opts.pciopts.isolationGro= up < 0)) { + virReportError(VIR_ERR_XML_ERROR, "%s", + _("invalid isolation group for PCI controller")= ); + goto error; + } + if (numaNode >=3D 0) def->opts.pciopts.numaNode =3D numaNode; break; @@ -21381,6 +21390,7 @@ virDomainControllerDefFormat(virBufferPtr buf, const char *model =3D NULL; const char *modelName =3D NULL; bool pcihole64 =3D false, pciModel =3D false, pciTarget =3D false; + bool pciIsolationGroup =3D false; virBuffer driverBuf =3D VIR_BUFFER_INITIALIZER; =20 if (!type) { @@ -21437,13 +21447,15 @@ virDomainControllerDefFormat(virBufferPtr buf, def->opts.pciopts.idx !=3D -1 || def->opts.pciopts.numaNode !=3D -1) pciTarget =3D true; + if (def->opts.pciopts.isolationGroup) + pciIsolationGroup =3D true; break; =20 default: break; } =20 - if (pciModel || pciTarget || + if (pciModel || pciTarget || pciIsolationGroup || def->queues || def->cmd_per_lun || def->max_sectors || def->ioeven= tfd || def->iothread || virDomainDeviceInfoNeedsFormat(&def->info, flags) || pcihole64) { @@ -21522,6 +21534,11 @@ virDomainControllerDefFormat(virBufferPtr buf, "pcihole64>\n", def->opts.pciopts.pcihole64s= ize); } =20 + if (pciIsolationGroup) { + virBufferAsprintf(buf, "%d\n", + def->opts.pciopts.isolationGroup); + } + virBufferAdjustIndent(buf, -2); virBufferAddLit(buf, "\n"); } else { --=20 2.7.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list