From nobody Wed May 8 18:03:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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 (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1593428251; cv=none; d=zohomail.com; s=zohoarc; b=Hk2iZA+hH4UAcZ7ajI8PzGxxRczlNMavonB8usCyR+sTPeRY6sLtUyqB36prJVh5cpKn7sLvnyImR5OLjZnwoWM/uJSS36a4iCnTtjqgGmUsWDnL8O7k6a4cKnQ25A1DZcwhW+RT3q0u1fyQqxMcDiddYfaBBFJQUJknJRUFa3Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593428251; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=b2c+FXCoQZGHmeGJhrvyUYX2qS/lFR0+NYf6HVJP+qY=; b=hF0DCXufE39enXTFWuZdjwnz60aFPO78iP33X6/ZsY/FNx1RgLXqxgsPt4PyA/8cJkx97UiXEJyh2ENRKt33CzefeRILFhtzPqOvQCX1R1ayT+8auLdc9mKsRWY0xRNcd80zH8dH2U87Ge/ZFXNpw0Qbbi9lkzbX4sWo50UJbls= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1593428251575917.3805502061631; Mon, 29 Jun 2020 03:57:31 -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-311-PR019YWxNSm-C4ISEs4oRA-1; Mon, 29 Jun 2020 06:57:15 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 023998031F6; Mon, 29 Jun 2020 10:57:10 +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 948475D9D7; Mon, 29 Jun 2020 10:57:09 +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 C2B8687884; Mon, 29 Jun 2020 10:57:08 +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 05TAv7h8024886 for ; Mon, 29 Jun 2020 06:57:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1C55E7F4F9; Mon, 29 Jun 2020 10:57:07 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.193.241]) by smtp.corp.redhat.com (Postfix) with ESMTP id 912E67168E for ; Mon, 29 Jun 2020 10:57:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593428250; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=b2c+FXCoQZGHmeGJhrvyUYX2qS/lFR0+NYf6HVJP+qY=; b=HB3GNO7Vjm6ADw4518dByP/knnG7hqk+VjcDWc9uPrNk7sHj889AulJlVuz1l4FWxA3r3l fWRbDRaTjHuWfRQ70slCZNd9lM6ZE0D9H5IHJJz83bfAJUeXbDKQmgRq7pd5lhwbRtX4/4 baG9aHbPPnwSltdtejOd5Vb/lihXr6U= X-MC-Unique: PR019YWxNSm-C4ISEs4oRA-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v2 for 6.5.0] domain_conf: Remove zPCI validation from formatter Date: Mon, 29 Jun 2020 12:57:01 +0200 Message-Id: <455ff2c22c6c4d5d5fb33de038822c34e7da2af4.1593428140.git.mprivozn@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com 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.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" In 076591009ad a validation code was added to virDomainDeviceInfoFormat() which reports an error if zPCI address entered in was incomplete. But, there are two problems with this approach. The first problem is the placement of the code - it doesn't belong into XML formatter rather than XML validator. The second one is that at the point of formatting XML the post parse callback has run and thus filled in required info. Therefore this check can never do something useful and instead of moving it into validator, it's removed completely. Signed-off-by: Michal Privoznik --- This is v2 of: https://www.redhat.com/archives/libvir-list/2020-June/msg01279.html diff to v1: - Instead of moving the check to validator remove it completely (per discussion in v1) src/conf/domain_conf.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 33f177b16f..0c883cd834 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -7523,10 +7523,6 @@ virDomainDeviceInfoFormat(virBufferPtr buf, } =20 if (virZPCIDeviceAddressIsPresent(&info->addr.pci.zpci)) { - if (virZPCIDeviceAddressIsIncomplete(&info->addr.pci.zpci)) - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("Missing uid or fid attribute of zPCI add= ress")); - virBufferAsprintf(&childBuf, "\n", info->addr.pci.zpci.uid.value, --=20 2.26.2