From nobody Mon Feb 9 17:23:47 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1647621654; cv=none; d=zohomail.com; s=zohoarc; b=oLTDK3E7AijEsV20rtqUdtmFzh086loP/tLwMGhFzNrDJmNILTyG9lb62ZGtqxdn9Q9Vj2em4XIBedfjBf4xz6EAfpA7uQ3wqJJAdiUFHxAqfgVvAwhdokH5RYChmJ2hvtuI0IW+huMe7JjXjETxGlcDSINnybw5xcBvpl+5ndM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1647621654; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=4pHLqIvi6YISFqIilPGGGaGOWciO7FTRyyiMli8YkTc=; b=dPpF+CkjlLfaR018XYcweNwvO28jn7hxWXlHFAm1AmQB3T8vsWo+A63ceB4XBOjtmofwhsKUxXC0K/7Qmt85GwlG6MHi3YFKHRI6Zjs9lFS6X/PXFXowoPXHQXBTgv5amWCrLs22F/G7lnfG/p6/HnpGqcPQyGQBFrWpEoT2Y+Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1647621654195807.8004708745916; Fri, 18 Mar 2022 09:40:54 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-350-TCq_DEp4MKmp55YY4Q0DEw-1; Fri, 18 Mar 2022 12:40:51 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0DADC38008B2; Fri, 18 Mar 2022 16:40:45 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id EA8204292CA; Fri, 18 Mar 2022 16:40:44 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 8B465193058E; Fri, 18 Mar 2022 16:40:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 95DC3193F6E8 for ; Fri, 18 Mar 2022 16:40:42 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8BA86145B979; Fri, 18 Mar 2022 16:40:42 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.195.98]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1A7F4145B978 for ; Fri, 18 Mar 2022 16:40:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647621653; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=4pHLqIvi6YISFqIilPGGGaGOWciO7FTRyyiMli8YkTc=; b=V5lbiMIcNEn9gpVPMwELSzntVlBqBPSg9uBP+ipZHSmkXgCYFJYGp/Y4WUR6HdFyvk98Kw BCmjoGh6I0wuwXWyednjW1dFGmoYUC3proZkhJh4Fhrr61MrXJ7OHMb+VbtMwMMg76exm5 24qincvBFP1U8ycmlfBJu1256Wzi19g= X-MC-Unique: TCq_DEp4MKmp55YY4Q0DEw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 14/17] tests: Add test for virtio-iommu address Date: Fri, 18 Mar 2022 17:40:25 +0100 Message-Id: <20220318164028.1185357-15-abologna@redhat.com> In-Reply-To: <20220318164028.1185357-1-abologna@redhat.com> References: <20220318164028.1185357-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1647621655459100002 virtio-iommu needs to be an integrated device, and our address assignment code will make sure that is the case. If the user has provided an explicit address, however, we should make sure any addresses pointing to a different bus are rejected. Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- ...io-iommu-invalid-address.x86_64-latest.err | 1 + .../virtio-iommu-invalid-address.xml | 20 +++++++++++++++++++ tests/qemuxml2argvtest.c | 1 + 3 files changed, 22 insertions(+) create mode 100644 tests/qemuxml2argvdata/virtio-iommu-invalid-address.x86= _64-latest.err create mode 100644 tests/qemuxml2argvdata/virtio-iommu-invalid-address.xml diff --git a/tests/qemuxml2argvdata/virtio-iommu-invalid-address.x86_64-lat= est.err b/tests/qemuxml2argvdata/virtio-iommu-invalid-address.x86_64-latest= .err new file mode 100644 index 0000000000..997948e91f --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-iommu-invalid-address.x86_64-latest.err @@ -0,0 +1 @@ +XML error: The device at PCI address 0000:01:00.0 needs to be an integrate= d device (bus=3D0) diff --git a/tests/qemuxml2argvdata/virtio-iommu-invalid-address.xml b/test= s/qemuxml2argvdata/virtio-iommu-invalid-address.xml new file mode 100644 index 0000000000..0daa58e3e7 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-iommu-invalid-address.xml @@ -0,0 +1,20 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 1 + + hvm + + + + + + /usr/bin/qemu-system-x86_64 + + + +
+ + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index f6ce8e0200..44b71b48e4 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -3253,6 +3253,7 @@ mymain(void) DO_TEST_CAPS_LATEST_PARSE_ERROR("virtio-iommu-wrong-machine"); DO_TEST_CAPS_LATEST_PARSE_ERROR("virtio-iommu-no-acpi"); DO_TEST_CAPS_LATEST_PARSE_ERROR("virtio-iommu-invalid-address-type"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("virtio-iommu-invalid-address"); =20 DO_TEST("cpu-hotplug-startup", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS); DO_TEST_PARSE_ERROR("cpu-hotplug-granularity", --=20 2.35.1