From nobody Thu Mar 28 15:33:45 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1633711943; cv=none; d=zohomail.com; s=zohoarc; b=JEirC3cNl7VGyPFEmgEf+jH3BdXWsbzFnGx4nnuzjHxraBXZRJ/YQbNK0slLN/PPZcFdra+XqIGZhH0OCbGbNx7kA9Dm+IBdgyX/opL4SGeAtjrjQgfgpE5R39tXTp8UfEj0kMjVyDE3XWKa1QtaTUvl3bMu7jsrru0E/RfXSCI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633711943; 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=WpwNE8MimypwyclNpAda0jn1sYmlZjnR2bmViO5jmDk=; b=W+4CNZpw8AJvbA2vdcuu5hgxYlSchPyQEu6xjeL3RKNu99TXCPMW11L47yv7Ezgsxq7b9irM9NhHSx2UCBr5sfvuNTzgFNTrfMYKSslO075lPYL7o+6TKJwncXLBX1ZapUfck61mFz7CzzWJPmHjt89p2Ab8bxTcu2Nt4bRCfjA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1633711943337181.34792289857478; Fri, 8 Oct 2021 09:52:23 -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-181-JdVcyMn3N5yHyy4tQiwR9A-1; Fri, 08 Oct 2021 12:52:20 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 04F5710168C6; Fri, 8 Oct 2021 16:52:16 +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 D54B15F724; Fri, 8 Oct 2021 16:52:14 +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 506A44EA30; Fri, 8 Oct 2021 16:52:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 198GqDCw013266 for ; Fri, 8 Oct 2021 12:52:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0D8275D740; Fri, 8 Oct 2021 16:52:13 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.195.77]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5F2815F4E3 for ; Fri, 8 Oct 2021 16:52:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633711942; 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=WpwNE8MimypwyclNpAda0jn1sYmlZjnR2bmViO5jmDk=; b=OMkaFjD7rpHahlR8CLstdqRrDd8t46nRVxLQ6hJfwueqvYq6PAW3Y2smWhFlF75N3g4qVv LS31/5xrW2pABlkYPZ+u3uQ9o1pAZm4X7YJEDSyD+Vqa0l3l7onftvGgTK7l9/yLOANoKQ rL141ITd/lhpkRIc6kdsorrzGGhEQW4= X-MC-Unique: JdVcyMn3N5yHyy4tQiwR9A-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 01/21] DONOTMERGEYET: Add replies for QEMU 6.2.0 on x86_64 Date: Fri, 8 Oct 2021 18:51:36 +0200 Message-Id: <20211008165156.405216-2-abologna@redhat.com> In-Reply-To: <20211008165156.405216-1-abologna@redhat.com> References: <20211008165156.405216-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.16 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1633711944940100001 Content-Type: text/plain; charset="utf-8" These were generated using a QEMU binary built from commit v6.1.0-1220-g5564f06816 with https://lists.gnu.org/archive/html/qemu-devel/2021-10/msg00161.html https://lists.gnu.org/archive/html/qemu-devel/2021-09/msg07819.html applied on top. Signed-off-by: Andrea Bolognani --- .../domaincapsdata/qemu_6.2.0-q35.x86_64.xml | 220 + .../domaincapsdata/qemu_6.2.0-tcg.x86_64.xml | 226 + tests/domaincapsdata/qemu_6.2.0.x86_64.xml | 220 + .../caps_6.2.0.x86_64.replies | 34273 ++++++++++++++++ .../caps_6.2.0.x86_64.xml | 3722 ++ 5 files changed, 38661 insertions(+) create mode 100644 tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml create mode 100644 tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml create mode 100644 tests/domaincapsdata/qemu_6.2.0.x86_64.xml create mode 100644 tests/qemucapabilitiesdata/caps_6.2.0.x86_64.replies create mode 100644 tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml diff --git a/tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml b/tests/domainc= apsdata/qemu_6.2.0-q35.x86_64.xml new file mode 100644 index 0000000000..df8bdae102 --- /dev/null +++ b/tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml @@ -0,0 +1,220 @@ + + /usr/bin/qemu-system-x86_64 + kvm + pc-q35-6.2 + x86_64 [...] diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.replies b/tests/q= emucapabilitiesdata/caps_6.2.0.x86_64.replies new file mode 100644 index 0000000000..53af711c9b --- /dev/null +++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.replies @@ -0,0 +1,34273 @@ +{ + "execute": "qmp_capabilities", + "id": "libvirt-1" +} + +{ + "return": { + }, + "id": "libvirt-1" +} + +{ + "execute": "query-version", + "id": "libvirt-2" +} + +{ + "return": { + "qemu": { + "micro": 50, + "minor": 1, + "major": 6 + }, + "package": "v6.1.0-1234-gd27a3d1b9e-dirty" + }, + "id": "libvirt-2" +} [...] --=20 2.31.1 From nobody Thu Mar 28 15:33:45 2024 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=1633711960; cv=none; d=zohomail.com; s=zohoarc; b=WumDpr8O/7oifSYDk67tY9CNsGzkViNdXEt1IpPk637tf2T4hT/vehpruKNs8q0yYZ0PweZ226a5d/7KQ39+kFwA/PIurmRpu1Ra0SgrV0aUPfb9qEyMWKvBewmjR7z3ADXnRIkIUDWyvbPAavlnNyNWRmewj2ejmNV0epcK8WQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633711960; 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=qiXLRQ4XhLx0clCQHlSXibtxlKLy79sn0PDk2ubvq78=; b=miFxiCsK3JekCIy/8vQEJI5HyA/Yd1NWx5iqc0ze7xgjvEBrMHjHFFSZ+Eb8BfKFMRotzCDYFVG/waEPnIPafYAKMPJZ/zrGR3kIyLOmXNnJiYy/hok9b38MOuINYa/6zI60UngZjQ+NoGRnrh2XacTQNH12gK7WK1qGUjTTTK0= 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 1633711960350742.2725186566213; Fri, 8 Oct 2021 09:52:40 -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-436-D55-CM9_MaaDhj0cepiaow-1; Fri, 08 Oct 2021 12:52:29 -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 80A0DBAF9A; Fri, 8 Oct 2021 16:52:23 +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 5F0FD5D9DE; Fri, 8 Oct 2021 16:52:23 +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 2920D4EA3D; Fri, 8 Oct 2021 16:52:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 198GqGSu013282 for ; Fri, 8 Oct 2021 12:52:16 -0400 Received: by smtp.corp.redhat.com (Postfix) id DEE755F4E3; Fri, 8 Oct 2021 16:52:16 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.195.77]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 36B6A5F4F1 for ; Fri, 8 Oct 2021 16:52:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633711959; 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=qiXLRQ4XhLx0clCQHlSXibtxlKLy79sn0PDk2ubvq78=; b=BroKlc/NNQ/v4CTriE3muoVByUYuuvnaJDXM/DmUCvf8BGvDmntp2gA1CTmYyaObQaaTIK u9TGO4G/r8/VahazPocA2LCWEGIJk6QOSDLtZFeGlpHYH1RE+EuMFLex41ejk1dXM67m7X +vJK5VHhbQ1DBWP+vNmYymHtLjNzGZs= X-MC-Unique: D55-CM9_MaaDhj0cepiaow-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 02/21] DONOTMERGEYET: Add replies for QEMU 6.2.0 on aarch64 Date: Fri, 8 Oct 2021 18:51:37 +0200 Message-Id: <20211008165156.405216-3-abologna@redhat.com> In-Reply-To: <20211008165156.405216-1-abologna@redhat.com> References: <20211008165156.405216-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1633711962503100001 Content-Type: text/plain; charset="utf-8" These were generated using a QEMU binary built from commit v6.1.0-1220-g5564f06816 with https://lists.gnu.org/archive/html/qemu-devel/2021-10/msg00161.html https://lists.gnu.org/archive/html/qemu-devel/2021-09/msg07819.html applied on top. Signed-off-by: Andrea Bolognani --- .../qemu_6.2.0-virt.aarch64.xml | 184 + tests/domaincapsdata/qemu_6.2.0.aarch64.xml | 178 + .../caps_6.2.0.aarch64.replies | 28671 ++++++++++++++++ .../caps_6.2.0.aarch64.xml | 541 + 4 files changed, 29574 insertions(+) create mode 100644 tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml create mode 100644 tests/domaincapsdata/qemu_6.2.0.aarch64.xml create mode 100644 tests/qemucapabilitiesdata/caps_6.2.0.aarch64.replies create mode 100644 tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml diff --git a/tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml b/tests/domai= ncapsdata/qemu_6.2.0-virt.aarch64.xml new file mode 100644 index 0000000000..4eb8209b07 --- /dev/null +++ b/tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml @@ -0,0 +1,184 @@ + + /usr/bin/qemu-system-aarch64 + kvm + virt-6.2 + aarch64 [...] diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.replies b/tests/= qemucapabilitiesdata/caps_6.2.0.aarch64.replies new file mode 100644 index 0000000000..59a0c4ff55 --- /dev/null +++ b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.replies @@ -0,0 +1,28671 @@ +{ + "execute": "qmp_capabilities", + "id": "libvirt-1" +} + +{ + "return": { + }, + "id": "libvirt-1" +} + +{ + "execute": "query-version", + "id": "libvirt-2" +} + +{ + "return": { + "qemu": { + "micro": 50, + "minor": 1, + "major": 6 + }, + "package": "" + }, + "id": "libvirt-2" +} [...] --=20 2.31.1 From nobody Thu Mar 28 15:33:45 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1633711990; cv=none; d=zohomail.com; s=zohoarc; b=QeMeFuF8RyhPSWwOk+ZVDRBZVXXpP84u7hS2ZT9NdKsChpDvr+SCIhl0W3WodfnxGYd5IXakbgpoytXv30OcOrbsX/TrPtXkhMbOl7BfAs7r0pdIt4ELNHx+W7MD/njQo5Ab/y8PJ2MNgFlGWiGNXTeLtGosfv87c2dxXCd8xII= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633711990; 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=J4IHDINwhPgh3lwffrZyIgTXQgqoKbK49vcYSCgq8VI=; b=GrX11GMgM7EMyWCzA9xObgEroRGnuLaoxhMLS4O29HpS2aT7qlSpravBA0tel8EXa19UDXgq3KnzXQK+qaCbbFzIVgPd+QWGdfDqlK84wGSN2O8KaNVt5eTt0W1bluajHf5rkaKUL+jeJplDXKsTdvKc7J40odAwiaaFRtNQL7E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 163371199009272.28413915340855; Fri, 8 Oct 2021 09:53:10 -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-285-inKH4FNROMCVfhKyQIxdVg-1; Fri, 08 Oct 2021 12:52:28 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 719C41006AB8; Fri, 8 Oct 2021 16:52:22 +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 4DEF419729; Fri, 8 Oct 2021 16:52:22 +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 1C5231801241; Fri, 8 Oct 2021 16:52:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 198GqH07013288 for ; Fri, 8 Oct 2021 12:52:18 -0400 Received: by smtp.corp.redhat.com (Postfix) id F09E65F4F1; Fri, 8 Oct 2021 16:52:17 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.195.77]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 55D8E5F4E3 for ; Fri, 8 Oct 2021 16:52:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633711989; 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=J4IHDINwhPgh3lwffrZyIgTXQgqoKbK49vcYSCgq8VI=; b=D1uRItrYggqgQQfM+qn8xJnKw3ojLpp2k8ERk+dls+nMx2o+FO/SK3z5Dn1WB4JLw3L/wu XIEtOFCqbRUbVqwQJYbAX/PqAefJa1gxZQpVNUOmHgMewPdmQaVokj4GCoShTzDqv4IRc+ evQspwhVKmAZsSlHI5mkbI+tjQrHaR8= X-MC-Unique: inKH4FNROMCVfhKyQIxdVg-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 03/21] conf: Make virDomainDeviceInfoFormat() const correct Date: Fri, 8 Oct 2021 18:51:38 +0200 Message-Id: <20211008165156.405216-4-abologna@redhat.com> In-Reply-To: <20211008165156.405216-1-abologna@redhat.com> References: <20211008165156.405216-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.84 on 10.5.11.23 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1633711990592100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Andrea Bolognani --- src/conf/domain_addr.c | 4 ++-- src/conf/domain_addr.h | 4 ++-- src/conf/domain_conf.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index 53b39923e8..fe6520cf3a 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -1829,7 +1829,7 @@ virDomainVirtioSerialAddrIsComplete(virDomainDeviceIn= fo *info) =20 =20 bool -virDomainUSBAddressPortIsValid(unsigned int *port) +virDomainUSBAddressPortIsValid(const unsigned int *port) { return port[0] !=3D 0; } @@ -1837,7 +1837,7 @@ virDomainUSBAddressPortIsValid(unsigned int *port) =20 void virDomainUSBAddressPortFormatBuf(virBuffer *buf, - unsigned int *port) + const unsigned int *port) { size_t i; =20 diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h index 3f8fcf8acb..814b556024 100644 --- a/src/conf/domain_addr.h +++ b/src/conf/domain_addr.h @@ -246,12 +246,12 @@ virDomainVirtioSerialAddrAutoAssign(virDomainDef *def, ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); =20 bool -virDomainUSBAddressPortIsValid(unsigned int *port) +virDomainUSBAddressPortIsValid(const unsigned int *port) ATTRIBUTE_NONNULL(1); =20 void virDomainUSBAddressPortFormatBuf(virBuffer *buf, - unsigned int *port) + const unsigned int *port) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); =20 #define VIR_DOMAIN_USB_HUB_PORTS 8 diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b8370f6950..df51d59e0d 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -6319,7 +6319,7 @@ virDomainVirtioOptionsFormat(virBuffer *buf, =20 static void ATTRIBUTE_NONNULL(2) virDomainDeviceInfoFormat(virBuffer *buf, - virDomainDeviceInfo *info, + const virDomainDeviceInfo *info, unsigned int flags) { g_auto(virBuffer) attrBuf =3D VIR_BUFFER_INITIALIZER; --=20 2.31.1 From nobody Thu Mar 28 15:33:45 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1633711952; cv=none; d=zohomail.com; s=zohoarc; b=iLZWbvg2CjVhBe2w0yvf5IwelYIyIq5g0V5Y7Pj1GJXR49foZzBASeF/zwifCLaGrq23sKl5c3C8kOegfotP3gQV6sWDZRpPmQWWQkQ0283H/2k05DSVsHIbDgjq3TlNnEifSOzqbYBNySUfTqGg8Mep0rJ+WPNXg16gGpypDbk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633711952; 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=VyGt5eLluQXmqc5XPLu1V6OC1+w/GHrOrFG4rO1H5u8=; b=gpZ9RblDqoqSvDCaNTfh6yF0/QXoropPI+2AYwnonbLAVpdd7/GplLciycYdRtZnh7yBwldz5F00txFSAxzB5gr73qDI/DUE9sszUO1cOH6LfBCP7H4zy0WS7jbSZZOCzx6tWzXjyJc21zeM+ZjIqreI3Y9WSk+VCINoMag9IbI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1633711952675393.0561094064418; Fri, 8 Oct 2021 09:52:32 -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-15-npTuV_zjN0eYyso8Tt6pbQ-1; Fri, 08 Oct 2021 12:52:28 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 822571966337; Fri, 8 Oct 2021 16:52:22 +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 62F9B100238C; Fri, 8 Oct 2021 16:52:22 +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 31E484EA3B; Fri, 8 Oct 2021 16:52:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 198GqJTp013299 for ; Fri, 8 Oct 2021 12:52:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id 16D695F4EE; Fri, 8 Oct 2021 16:52:19 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.195.77]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5F9DD5F4E3 for ; Fri, 8 Oct 2021 16:52:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633711951; 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=VyGt5eLluQXmqc5XPLu1V6OC1+w/GHrOrFG4rO1H5u8=; b=hQgps4XMsO5EuqvezO5C6dXPhktgWGyq/Xsv4K7YzadeAKiLJNO0w53eV96JFHvHY3WsTI CXKoMbpsfNCnZBGsYMKbkmWgW6x/Cgj/dkXijFDcJKdaN0Ef8rcbPpmRLYBGszMmLGpSBz /cSn29bLHzZq10xe8X7L5REOb7sNwFk= X-MC-Unique: npTuV_zjN0eYyso8Tt6pbQ-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 04/21] conf: Introduce VIR_PCI_CONNECT_INTEGRATED Date: Fri, 8 Oct 2021 18:51:39 +0200 Message-Id: <20211008165156.405216-5-abologna@redhat.com> In-Reply-To: <20211008165156.405216-1-abologna@redhat.com> References: <20211008165156.405216-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.84 on 10.5.11.22 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1633711953753100001 Content-Type: text/plain; charset="utf-8" This new flag can be used to convince the PCI address assignment algorithm to place a device directly on the root bus. It will be used to implement support for virtio-iommu, which needs to be an integrated device in order to work correctly. Signed-off-by: Andrea Bolognani --- src/conf/domain_addr.c | 17 +++++++++++++++++ src/conf/domain_addr.h | 26 +++++++++++++++----------- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index fe6520cf3a..035d60460f 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -303,6 +303,23 @@ virDomainPCIAddressFlagsCompatible(virPCIDeviceAddress= *addr, virErrorNumber errType =3D (fromConfig ? VIR_ERR_XML_ERROR : VIR_ERR_INTERNAL_ERROR= ); =20 + if (devFlags & VIR_PCI_CONNECT_INTEGRATED) { + if (addr->bus =3D=3D 0) { + /* pcie-root doesn't usually allow endpoint devices to be + * plugged directly into it, but for integrated devices + * that's exactly what we want */ + busFlags |=3D VIR_PCI_CONNECT_AUTOASSIGN; + } else { + if (reportError) { + virReportError(errType, + _("The device at PCI address %s needs to be= " + "an integrated device (bus=3D0)"), + addrStr); + } + return false; + } + } + if (fromConfig) { /* If the requested connection was manually specified in * config, allow a PCI device to connect to a PCIe slot, or diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h index 814b556024..1772ea7088 100644 --- a/src/conf/domain_addr.h +++ b/src/conf/domain_addr.h @@ -35,24 +35,28 @@ typedef enum { VIR_PCI_CONNECT_AUTOASSIGN =3D 1 << 0, /* okay to autoassign a device = to this controller */ VIR_PCI_CONNECT_HOTPLUGGABLE =3D 1 << 1, /* is hotplug needed/supporte= d */ =20 + /* Set for devices that can only work as integrated devices (directly + * connected to pci.0 or pcie.0, with no additional buses in between) = */ + VIR_PCI_CONNECT_INTEGRATED =3D 1 << 2, + /* set for devices that can share a single slot in auto-assignment * (by assigning one device to each of the 8 functions on the slot) */ - VIR_PCI_CONNECT_AGGREGATE_SLOT =3D 1 << 2, + VIR_PCI_CONNECT_AGGREGATE_SLOT =3D 1 << 3, =20 /* kinds of devices as a bitmap so they can be combined (some PCI * controllers permit connecting multiple types of devices) */ - VIR_PCI_CONNECT_TYPE_PCI_DEVICE =3D 1 << 3, - VIR_PCI_CONNECT_TYPE_PCIE_DEVICE =3D 1 << 4, - VIR_PCI_CONNECT_TYPE_PCIE_ROOT_PORT =3D 1 << 5, - VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_UPSTREAM_PORT =3D 1 << 6, - VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_DOWNSTREAM_PORT =3D 1 << 7, - VIR_PCI_CONNECT_TYPE_DMI_TO_PCI_BRIDGE =3D 1 << 8, - VIR_PCI_CONNECT_TYPE_PCI_EXPANDER_BUS =3D 1 << 9, - VIR_PCI_CONNECT_TYPE_PCIE_EXPANDER_BUS =3D 1 << 10, - VIR_PCI_CONNECT_TYPE_PCI_BRIDGE =3D 1 << 11, - VIR_PCI_CONNECT_TYPE_PCIE_TO_PCI_BRIDGE =3D 1 << 12, + VIR_PCI_CONNECT_TYPE_PCI_DEVICE =3D 1 << 4, + VIR_PCI_CONNECT_TYPE_PCIE_DEVICE =3D 1 << 5, + VIR_PCI_CONNECT_TYPE_PCIE_ROOT_PORT =3D 1 << 6, + VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_UPSTREAM_PORT =3D 1 << 7, + VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_DOWNSTREAM_PORT =3D 1 << 8, + VIR_PCI_CONNECT_TYPE_DMI_TO_PCI_BRIDGE =3D 1 << 9, + VIR_PCI_CONNECT_TYPE_PCI_EXPANDER_BUS =3D 1 << 10, + VIR_PCI_CONNECT_TYPE_PCIE_EXPANDER_BUS =3D 1 << 11, + VIR_PCI_CONNECT_TYPE_PCI_BRIDGE =3D 1 << 12, + VIR_PCI_CONNECT_TYPE_PCIE_TO_PCI_BRIDGE =3D 1 << 13, } virDomainPCIConnectFlags; =20 /* a combination of all bits that describe the type of connections --=20 2.31.1 From nobody Thu Mar 28 15:33:45 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1633712256; cv=none; d=zohomail.com; s=zohoarc; b=brHD87dMHa03sm1wtg/PFG9ZQCAyaAqYUCu2vWm6RU6VmT5uO06nNfQNg8WbyEQCfnHBNVupwCjqWHlXO+m7CnuU1m8uN6OM0vLtjCRleJvv88oXlzx/XrAadChoW33GBG6thLAsE4ularxWGf1wsEt3EuG0zAMn3glFFLFRY9I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633712256; 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=OHS7Rd+T90PxA2ARo16jHP/mS98j4Jf3Q8ql3Fmsb0A=; b=KL8x9U6+Dut+m9wOTuZwzvtszNf7Suyoh+F+KGFqMIotuw9DA4d9GMsMSRS6HzboPtoi79MUwDdYz3rkJzP3FBunJt4JUBR50DOlRUN/MzvHMoDV8Ai87zt1CLluYor9wlVTgegCtDS4M/kEtGlwh18Ey4SIDtYJ2eUJ2aV/WXY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1633712256809773.8914282749128; Fri, 8 Oct 2021 09:57:36 -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-157-z01qSqcjNsWDdDCT5rnwVA-1; Fri, 08 Oct 2021 12:52:32 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AE0161966320; Fri, 8 Oct 2021 16:52:26 +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 8FF305F4E3; Fri, 8 Oct 2021 16:52:26 +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 5E00F4EA40; Fri, 8 Oct 2021 16:52:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 198GqKPS013309 for ; Fri, 8 Oct 2021 12:52:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id 359B75F4EE; Fri, 8 Oct 2021 16:52:20 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.195.77]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 851025F4E3 for ; Fri, 8 Oct 2021 16:52:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633712255; 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=OHS7Rd+T90PxA2ARo16jHP/mS98j4Jf3Q8ql3Fmsb0A=; b=DSRYI+0ZodxS2zWyOHuHJ5+h/Wq8iEE4jOjzBel3e+8D+zitUlSJ1cv//oPTHbgHDMc55t 5NJ+rRMHRSeX/z0ott9/TEE5gVN6pJoYKBYS/JFlQETr5BW7AI5nhwk6nD4/pWaKYA7ivh x41gcrVujowIsZuvCMpj7OFlFh1WoHA= X-MC-Unique: z01qSqcjNsWDdDCT5rnwVA-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 05/21] conf: Add IOMMU support to virDomainDeviceDefCopy() Date: Fri, 8 Oct 2021 18:51:40 +0200 Message-Id: <20211008165156.405216-6-abologna@redhat.com> In-Reply-To: <20211008165156.405216-1-abologna@redhat.com> References: <20211008165156.405216-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.15 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1633712258312100001 Content-Type: text/plain; charset="utf-8" There doesn't seem to be a reason for IOMMUs not to be handled by this function. Signed-off-by: Andrea Bolognani --- src/conf/domain_conf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index df51d59e0d..60f2b1129f 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -29588,6 +29588,10 @@ virDomainDeviceDefCopy(virDomainDeviceDef *src, virDomainShmemDefFormat(&buf, src->data.shmem, flags); rc =3D 0; break; + case VIR_DOMAIN_DEVICE_IOMMU: + virDomainIOMMUDefFormat(&buf, src->data.iommu); + rc =3D 0; + break; case VIR_DOMAIN_DEVICE_VSOCK: virDomainVsockDefFormat(&buf, src->data.vsock); rc =3D 0; @@ -29600,7 +29604,6 @@ virDomainDeviceDefCopy(virDomainDeviceDef *src, case VIR_DOMAIN_DEVICE_SMARTCARD: case VIR_DOMAIN_DEVICE_MEMBALLOON: case VIR_DOMAIN_DEVICE_NVRAM: - case VIR_DOMAIN_DEVICE_IOMMU: case VIR_DOMAIN_DEVICE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, _("Copying definition of '%d' type " --=20 2.31.1 From nobody Thu Mar 28 15:33:45 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1633711954; cv=none; d=zohomail.com; s=zohoarc; b=a5Y6m6bKDTaNM3qXpUqqoNSBR4EQJLOpC2m2KJQQbWQqwAwVJjfvwVufKXwqUQhN3lsmDPjX8tOpgxJdAtkKHEGX8rvZdMwRYBKPEDAvPxtcLqYdqlTMNtDdv292SGYPWuZzh4W0wnseMz8uIz37YlmZABLzOCXNRBfM950aMYg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633711954; 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=u5RCOtOoRZ/jL1Mq9m4efkmffMDrQyf0noOSh0Dq4hE=; b=ZzUzINy+Ju5mXU96ua1TrqkLwaGGISATrRRbG776qf7xJE6cS1NgGbu+AgvOAcecfbE+7+aiWT6/f+ViqoxuP0v8AX5tRIU7wggeHGdmbDFbaEbhmnsRNoBAGnBf/PAXWpk10ccNOQ59lr4GaYgYP0vc7qV4u+UJyA4nC5jDL40= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1633711954006494.48990705333597; Fri, 8 Oct 2021 09:52:34 -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-399-Dy9-PGB9M3u7xLCV_qi1fg-1; Fri, 08 Oct 2021 12:52:30 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AB8D1835DF6; Fri, 8 Oct 2021 16:52:25 +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 7FA751972D; Fri, 8 Oct 2021 16:52:25 +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 20F801806D02; Fri, 8 Oct 2021 16:52:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 198GqLhR013314 for ; Fri, 8 Oct 2021 12:52:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5A9D65F4EE; Fri, 8 Oct 2021 16:52:21 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.195.77]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A52F65F4E3 for ; Fri, 8 Oct 2021 16:52:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633711953; 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=u5RCOtOoRZ/jL1Mq9m4efkmffMDrQyf0noOSh0Dq4hE=; b=h5TH8bYNZ7nGBOaXOeoqiGB0AQw1FB8SrpYvu64Ulf+zrAIORwZITO/J8RjRSfSWFaAKdi snjaUewbPdhDOq+YwnCe0iWc42Hyzj0M3YjIprsFZiHQUKBW26YFYsGrSb5kCLqN9DXhOb C52+C6W2t6xlaFzAil+8Qc1YpqNeaB4= X-MC-Unique: Dy9-PGB9M3u7xLCV_qi1fg-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 06/21] conf: Add new/free functions for virDomainIOMMUDef Date: Fri, 8 Oct 2021 18:51:41 +0200 Message-Id: <20211008165156.405216-7-abologna@redhat.com> In-Reply-To: <20211008165156.405216-1-abologna@redhat.com> References: <20211008165156.405216-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.84 on 10.5.11.23 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1633711955863100001 Content-Type: text/plain; charset="utf-8" This will make it possible to limit changes to a single spot later on, and is also just an overall nicer way to create and destroy objects. Signed-off-by: Andrea Bolognani --- src/conf/domain_conf.c | 29 +++++++++++++++++++++++++---- src/conf/domain_conf.h | 3 +++ 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 60f2b1129f..6df981ad47 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2524,6 +2524,27 @@ virDomainVsockDefFree(virDomainVsockDef *vsock) } =20 =20 +virDomainIOMMUDef * +virDomainIOMMUDefNew(void) +{ + g_autoptr(virDomainIOMMUDef) iommu =3D NULL; + + iommu =3D g_new0(virDomainIOMMUDef, 1); + + return g_steal_pointer(&iommu); +} + + +void +virDomainIOMMUDefFree(virDomainIOMMUDef *iommu) +{ + if (!iommu) + return; + + g_free(iommu); +} + + void virDomainNetTeamingInfoFree(virDomainNetTeamingInfo *teaming) { @@ -3325,7 +3346,7 @@ void virDomainDeviceDefFree(virDomainDeviceDef *def) virDomainMemoryDefFree(def->data.memory); break; case VIR_DOMAIN_DEVICE_IOMMU: - g_free(def->data.iommu); + virDomainIOMMUDefFree(def->data.iommu); break; case VIR_DOMAIN_DEVICE_VSOCK: virDomainVsockDefFree(def->data.vsock); @@ -3663,7 +3684,7 @@ void virDomainDefFree(virDomainDef *def) virDomainPanicDefFree(def->panics[i]); g_free(def->panics); =20 - g_free(def->iommu); + virDomainIOMMUDefFree(def->iommu); =20 g_free(def->idmap.uidmap); g_free(def->idmap.gidmap); @@ -14916,11 +14937,11 @@ virDomainIOMMUDefParseXML(xmlNodePtr node, { VIR_XPATH_NODE_AUTORESTORE(ctxt) xmlNodePtr driver; - g_autofree virDomainIOMMUDef *iommu =3D NULL; + g_autoptr(virDomainIOMMUDef) iommu =3D NULL; =20 ctxt->node =3D node; =20 - iommu =3D g_new0(virDomainIOMMUDef, 1); + iommu =3D virDomainIOMMUDefNew(); =20 if (virXMLPropEnum(node, "model", virDomainIOMMUModelTypeFromString, VIR_XML_PROP_REQUIRED, &iommu->model) < 0) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index c23c233184..72db861105 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -3291,6 +3291,9 @@ bool virDomainControllerIsPSeriesPHB(const virDomainC= ontrollerDef *cont); virDomainFSDef *virDomainFSDefNew(virDomainXMLOption *xmlopt); void virDomainFSDefFree(virDomainFSDef *def); void virDomainActualNetDefFree(virDomainActualNetDef *def); +virDomainIOMMUDef *virDomainIOMMUDefNew(void); +void virDomainIOMMUDefFree(virDomainIOMMUDef *iommu); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainIOMMUDef, virDomainIOMMUDefFree); virDomainVsockDef *virDomainVsockDefNew(virDomainXMLOption *xmlopt); void virDomainVsockDefFree(virDomainVsockDef *vsock); G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainVsockDef, virDomainVsockDefFree); --=20 2.31.1 From nobody Thu Mar 28 15:33:45 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1633711965; cv=none; d=zohomail.com; s=zohoarc; b=m6dDB6WSoq58xk4fNye3AZptdR0xF90Ifxe5ydDcIpfpKZLYPmU4buw2tvpHdg+bD7XbIAxuTb67ES7q9dibYCLRxmbvvdklTpGAIeLE4g/IYQjeXdH+ZeFUC3bUlXRF4Wr6oiVu7A1MsbDPQd4Gt+MewGya5wlsrZD5BcsvBbY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633711965; 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=si6lwvNQzbtzFElBSQ9GCl8oIH0FinLO9m2wkO38+o4=; b=dWW7M2ULO4r2ZkBAEV5Dk1rO5hm5+y8ELx4HNnZ61Z8BP0tsej2qDDghD4b/PIBx9lmbLgZfwgekmF/QyeCnAoBw8Wl9Jq84r3AxFih6nczx1jHP5kLoqsUn2LzlaGudH0q0gnYueeRp/oixoEPsD7iE4fXjYwhjXXoe8MJzbF8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 163371196507453.682977084110576; Fri, 8 Oct 2021 09:52:45 -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-183-IoJbBiORNXyVPkS-SD4OLg-1; Fri, 08 Oct 2021 12:52:40 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 434F81006AA7; Fri, 8 Oct 2021 16:52:28 +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 228421B467; Fri, 8 Oct 2021 16:52:28 +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 E54DB180BAD2; Fri, 8 Oct 2021 16:52:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 198GqMbx013322 for ; Fri, 8 Oct 2021 12:52:22 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6E3015F4F1; Fri, 8 Oct 2021 16:52:22 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.195.77]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CA2475F4E3 for ; Fri, 8 Oct 2021 16:52:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633711964; 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=si6lwvNQzbtzFElBSQ9GCl8oIH0FinLO9m2wkO38+o4=; b=bCvlkAiRL7+IK8qVTmN5gt4F5+xcDM9aq7RcK0/QZ5wwLkJ++freFc2nCMQWmmXep77Yga +Wmyt2RB2g++xJ/Atp9NZ1SMzX01kR5ah+hWwRo35vct4hcRzwK/KuKNxCGqiLFIaXGIhv W0DQkWBvYIna7rilaXVhb/wJqoagSfU= X-MC-Unique: IoJbBiORNXyVPkS-SD4OLg-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 07/21] qemu: Tweak some code Date: Fri, 8 Oct 2021 18:51:42 +0200 Message-Id: <20211008165156.405216-8-abologna@redhat.com> In-Reply-To: <20211008165156.405216-1-abologna@redhat.com> References: <20211008165156.405216-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.16 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1633711966623100001 Content-Type: text/plain; charset="utf-8" The altered code is functionally equivalent to the previous one, but it's already laid down in a way that will make further changes easier and less messy. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_command.c | 14 ++++++-------- src/qemu/qemu_domain_address.c | 23 ++++++++++++++++++++++- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 28bca1519c..bb743e3d84 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6206,15 +6206,14 @@ static int qemuBuildIOMMUCommandLine(virCommand *cmd, const virDomainDef *def) { + g_auto(virBuffer) opts =3D VIR_BUFFER_INITIALIZER; const virDomainIOMMUDef *iommu =3D def->iommu; =20 if (!iommu) return 0; =20 switch (iommu->model) { - case VIR_DOMAIN_IOMMU_MODEL_INTEL: { - g_auto(virBuffer) opts =3D VIR_BUFFER_INITIALIZER; - + case VIR_DOMAIN_IOMMU_MODEL_INTEL: virBufferAddLit(&opts, "intel-iommu"); if (iommu->intremap !=3D VIR_TRISTATE_SWITCH_ABSENT) { virBufferAsprintf(&opts, ",intremap=3D%s", @@ -6238,7 +6237,6 @@ qemuBuildIOMMUCommandLine(virCommand *cmd, virCommandAddArg(cmd, "-device"); virCommandAddArgBuffer(cmd, &opts); break; - } =20 case VIR_DOMAIN_IOMMU_MODEL_SMMUV3: /* There is no -device for SMMUv3, so nothing to be done here */ @@ -6848,14 +6846,14 @@ qemuBuildMachineCommandLine(virCommand *cmd, =20 if (def->iommu) { switch (def->iommu->model) { - case VIR_DOMAIN_IOMMU_MODEL_INTEL: - /* The 'intel' IOMMu is formatted in qemuBuildIOMMUCommandLine= */ - break; - case VIR_DOMAIN_IOMMU_MODEL_SMMUV3: virBufferAddLit(&buf, ",iommu=3Dsmmuv3"); break; =20 + case VIR_DOMAIN_IOMMU_MODEL_INTEL: + /* These IOMMUs are formatted in qemuBuildIOMMUCommandLine */ + break; + case VIR_DOMAIN_IOMMU_MODEL_LAST: default: virReportEnumRangeError(virDomainIOMMUModel, def->iommu->model= ); diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index c43ad23cf5..733fa35444 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -1001,6 +1001,16 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDe= viceDef *dev, } break; =20 + case VIR_DOMAIN_DEVICE_IOMMU: + switch ((virDomainIOMMUModel) dev->data.iommu->model) { + case VIR_DOMAIN_IOMMU_MODEL_INTEL: + case VIR_DOMAIN_IOMMU_MODEL_SMMUV3: + case VIR_DOMAIN_IOMMU_MODEL_LAST: + /* These are not PCI devices */ + return 0; + } + break; + case VIR_DOMAIN_DEVICE_VSOCK: switch ((virDomainVsockModel) dev->data.vsock->model) { case VIR_DOMAIN_VSOCK_MODEL_VIRTIO_TRANSITIONAL: @@ -1040,7 +1050,6 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDev= iceDef *dev, /* These devices don't even have a DeviceInfo */ case VIR_DOMAIN_DEVICE_LEASE: case VIR_DOMAIN_DEVICE_GRAPHICS: - case VIR_DOMAIN_DEVICE_IOMMU: case VIR_DOMAIN_DEVICE_AUDIO: case VIR_DOMAIN_DEVICE_LAST: case VIR_DOMAIN_DEVICE_NONE: @@ -2369,6 +2378,18 @@ qemuDomainAssignDevicePCISlots(virDomainDef *def, /* Nada - none are PCI based (yet) */ } =20 + if (def->iommu) { + virDomainIOMMUDef *iommu =3D def->iommu; + + switch ((virDomainIOMMUModel) iommu->model) { + case VIR_DOMAIN_IOMMU_MODEL_INTEL: + case VIR_DOMAIN_IOMMU_MODEL_SMMUV3: + case VIR_DOMAIN_IOMMU_MODEL_LAST: + /* These are not PCI devices */ + break; + } + } + if (def->vsock && virDeviceInfoPCIAddressIsWanted(&def->vsock->info)) { =20 --=20 2.31.1 From nobody Thu Mar 28 15:33:45 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1633712393; cv=none; d=zohomail.com; s=zohoarc; b=iMJr2TrUVYHcUlqr/h8C+14rVhlSuVXk6sQFWCLAC93WQ5xTPyAuicpxbMEvfKfHnJEv9WWVwGkSV6Wf2EmqT9X+teTTISoF+qcrhyWl/M4BCmtI5vAljumBtXyVqQjTVOTt4k/CpQlM5CrksTUwdfmurw1HQ+NVChU/zTDgVMQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633712393; 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=xYF41ADqe1EgEFL4jFGVeXlKLiBq06XdH3VeMIzcbRk=; b=T33VRtsCc8ElGMBCLxg47eistwUF52DRaTSj3TDcfp9e5Mg5svHm/Yy2Oi64kqkkwRsk9iCHOb9L6Ar25XvvCH81IRWADIaTGrs/YDQHx9Midjd5B9/H8vm2jeJrynBfkazOru4ySh01I2yXebUsDF/EFWQT6umz0wHIHTLLg04= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1633712393872163.41249493185728; Fri, 8 Oct 2021 09:59:53 -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-190-X5m8V7LENv2rkArBBF_0cw-1; Fri, 08 Oct 2021 12:52:36 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 91FC5835DF1; Fri, 8 Oct 2021 16:52:29 +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 71C845F724; Fri, 8 Oct 2021 16:52:29 +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 190AA181A1D0; Fri, 8 Oct 2021 16:52:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 198GqO6c013357 for ; Fri, 8 Oct 2021 12:52:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id DBC5C5F4F5; Fri, 8 Oct 2021 16:52:24 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.195.77]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0282D5F4E3 for ; Fri, 8 Oct 2021 16:52:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633712392; 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=xYF41ADqe1EgEFL4jFGVeXlKLiBq06XdH3VeMIzcbRk=; b=JOFahJIzvh8TcaqLA7tgHoa24fph/wwwVmUWGPHxqF9Zb/O7E4IO/IyrQXShVxCxw6AF4O 4Nxd93FJVYcgLrIgGcxW9rQ2IvJruE5qYbbL8LazropCtey4vv1O8a7oL3dhWqofVYBgQQ 3YbiWIwLRSApS9Hl+CM29tiDxi/1qJk= X-MC-Unique: X5m8V7LENv2rkArBBF_0cw-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 08/21] qemu: Introduce QEMU_CAPS_DEVICE_VIRTIO_IOMMU_PCI Date: Fri, 8 Oct 2021 18:51:43 +0200 Message-Id: <20211008165156.405216-9-abologna@redhat.com> In-Reply-To: <20211008165156.405216-1-abologna@redhat.com> References: <20211008165156.405216-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.16 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1633712396000100001 Content-Type: text/plain; charset="utf-8" This capability detects the availability of the virtio-iommu-pci device. Note that, while this device is present even in somewhat old versions of QEMU, it's only some recent changes that made it actually usable for our purposes. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 + tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml | 1 + 18 files changed, 19 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 82687dbf39..bfd02e866f 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -644,6 +644,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "virtio-mem-pci", /* QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI */ "memory-backend-file.reserve", /* QEMU_CAPS_MEMORY_BACKEND_R= ESERVE */ "piix4.acpi-root-pci-hotplug", /* QEMU_CAPS_PIIX4_ACPI_ROOT_= PCI_HOTPLUG */ + "virtio-iommu-pci", /* QEMU_CAPS_DEVICE_VIRTIO_IOMMU_PCI */ ); =20 =20 @@ -1359,6 +1360,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[= ] =3D { { "virtio-vga-gl", QEMU_CAPS_VIRTIO_VGA_GL }, { "s390-pv-guest", QEMU_CAPS_S390_PV_GUEST }, { "virtio-mem-pci", QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI }, + { "virtio-iommu-pci", QEMU_CAPS_DEVICE_VIRTIO_IOMMU_PCI }, }; =20 =20 diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 2bbfc15dc4..e2611a6193 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -624,6 +624,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI, /* -device virtio-mem-pci */ QEMU_CAPS_MEMORY_BACKEND_RESERVE, /* -object memory-backend-*.reserve= =3D */ QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HOTPLUG, /* -M pc PIIX4_PM.acpi-root-pci= -hotplug */ + QEMU_CAPS_DEVICE_VIRTIO_IOMMU_PCI, /* -device virtio-iommu-pci */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_5.0.0.aarch64.xml index 2c125044de..083ed23eb2 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml @@ -184,6 +184,7 @@ + 5000000 0 61700241 diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_5.0.0.ppc64.xml index ce0f63c2b8..d0a1320400 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml @@ -192,6 +192,7 @@ + 5000000 0 42900241 diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml b/tests/qemu= capabilitiesdata/caps_5.0.0.riscv64.xml index 05c8e0e467..2ec45d95aa 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml @@ -177,6 +177,7 @@ + 5000000 0 0 diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.0.0.x86_64.xml index aae5fe018f..2c5f438d48 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml @@ -227,6 +227,7 @@ + 5000000 0 43100241 diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.1.0.x86_64.xml index e9ae3c5abb..4480b80c54 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml @@ -230,6 +230,7 @@ + 5001000 0 43100242 diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_5.2.0.aarch64.xml index 59e1f746ca..6a341dc6d5 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml @@ -188,6 +188,7 @@ + 5002000 0 61700243 diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_5.2.0.ppc64.xml index 0ce8a5ba2f..b5af8cff63 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml @@ -194,6 +194,7 @@ + 5002000 0 42900243 diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml b/tests/qemu= capabilitiesdata/caps_5.2.0.riscv64.xml index 1219ba2666..eeefa7c0da 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml @@ -179,6 +179,7 @@ + 5002000 0 0 diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_5.2.0.s390x.xml index db92662f4c..54cf95ab9a 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml @@ -145,6 +145,7 @@ + 5002000 0 39100243 diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.2.0.x86_64.xml index 98b5f34f2b..45eaf5b702 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml @@ -232,6 +232,7 @@ + 5002000 0 43100243 diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_6.0.0.aarch64.xml index 6a9833a176..e20e56eea5 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml @@ -196,6 +196,7 @@ + 6000000 0 61700242 diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_6.0.0.s390x.xml index a96c756ef8..c2c5a2747d 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml @@ -153,6 +153,7 @@ + 6000000 0 39100242 diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.0.0.x86_64.xml index f13a909314..fdb7957fb3 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -240,6 +240,7 @@ + 6000000 0 43100242 diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.1.0.x86_64.xml index 87b37a2b7c..bdbced6860 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml @@ -243,6 +243,7 @@ + 6001000 0 43100243 diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_6.2.0.aarch64.xml index 1e74d24f42..f2a083375e 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml @@ -207,6 +207,7 @@ + 6001050 0 61700244 diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.2.0.x86_64.xml index d1a55ac10c..60a1f34795 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml @@ -243,6 +243,7 @@ + 6001050 0 43100244 --=20 2.31.1 From nobody Thu Mar 28 15:33:45 2024 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=1633711971; cv=none; d=zohomail.com; s=zohoarc; b=DlIzqKQMaNsP7iY6S6zi0NHNS+a9vofrULVwuLks5VJexP4+X2l00iV0c5njyqPaR9866jO4oZh0i1bXwH9D1d1fvi/g4QOkckLOOxbPDGNEwUF+OdbMXJEazlaQtcakNF733kAUn8rEHHPEXXc59yv7ohfpDoDVGkYS0pMHYTI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633711971; 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=KYAjiNQV6ujWIlodapNeXIRO4MRTBCGgDqDCeE4lmf0=; b=M2N8Xh9Y6CWepg5jHZTG3kU6VUJrZgk85a3olRg9h+cVl7HJBvuctyYLobHWX2QBPoNKUx77IMjbAvAIhlAkttSLqOHlgHUwK+F2JT8IyTDSDE9CSw5njTZpZ7WSeOwnesmNewPMYFH5GKdZ5Sh5COwpFmsl2cOuBqSyZVHstJQ= 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 163371197102152.60374760262334; Fri, 8 Oct 2021 09:52:51 -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-170-BDDpsuEgM6yYndxwt_233w-1; Fri, 08 Oct 2021 12:52:38 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 79D99196632C; Fri, 8 Oct 2021 16:52:33 +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 5E12C60622; Fri, 8 Oct 2021 16:52:33 +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 2DC2E4EA42; Fri, 8 Oct 2021 16:52:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 198GqWMO013381 for ; Fri, 8 Oct 2021 12:52:32 -0400 Received: by smtp.corp.redhat.com (Postfix) id 547675F4F1; Fri, 8 Oct 2021 16:52:32 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.195.77]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A1BAE5F4E3 for ; Fri, 8 Oct 2021 16:52:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633711969; 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=KYAjiNQV6ujWIlodapNeXIRO4MRTBCGgDqDCeE4lmf0=; b=f8sfLkk3Hcvvtbdvv/P9kHAz+sMP4qJ8e9CBadk9HVy63U5Y/kPoK0AhUD1qjgDCLjiQ9a 9dLQh4W4n63DOlrn6ayoe1GP1oGtaQX8qcXgGbqQ9KEGsQ4o/qodYnjZbjMAMRV1A32/gY 7KTSjDOJYPCsrojRacJQjRfDptZ8UVI= X-MC-Unique: BDDpsuEgM6yYndxwt_233w-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 09/21] qemu: Introduce QEMU_CAPS_VIRTIO_IOMMU_BOOT_BYPASS Date: Fri, 8 Oct 2021 18:51:44 +0200 Message-Id: <20211008165156.405216-10-abologna@redhat.com> In-Reply-To: <20211008165156.405216-1-abologna@redhat.com> References: <20211008165156.405216-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.13 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1633711972989100001 Content-Type: text/plain; charset="utf-8" This capability detects the availability of the boot-bypass property of the virtio-iommu-pci device. This property was only introduced in QEMU 6.2 but, since the device has been around for much longer, we end up querying its properties for several more releases. As I don't have convenient access to the 10+ binaries necessary to regenerate the replies, I just put some fake data in there. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 8 + src/qemu/qemu_capabilities.h | 1 + .../caps_5.0.0.aarch64.replies | 71 +++-- .../caps_5.0.0.ppc64.replies | 59 ++-- .../caps_5.0.0.riscv64.replies | 55 ++-- .../caps_5.0.0.x86_64.replies | 71 +++-- .../caps_5.1.0.x86_64.replies | 71 +++-- .../caps_5.2.0.aarch64.replies | 71 +++-- .../caps_5.2.0.ppc64.replies | 59 ++-- .../caps_5.2.0.riscv64.replies | 55 ++-- .../caps_5.2.0.s390x.replies | 59 ++-- .../caps_5.2.0.x86_64.replies | 71 +++-- .../caps_6.0.0.aarch64.replies | 71 +++-- .../caps_6.0.0.s390x.replies | 59 ++-- .../caps_6.0.0.x86_64.replies | 71 +++-- .../caps_6.1.0.x86_64.replies | 71 +++-- .../caps_6.2.0.aarch64.replies | 275 ++++++++++++++++-- .../caps_6.2.0.aarch64.xml | 1 + .../caps_6.2.0.x86_64.replies | 275 ++++++++++++++++-- .../caps_6.2.0.x86_64.xml | 1 + 20 files changed, 1099 insertions(+), 376 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index bfd02e866f..4b46707fc0 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -645,6 +645,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "memory-backend-file.reserve", /* QEMU_CAPS_MEMORY_BACKEND_R= ESERVE */ "piix4.acpi-root-pci-hotplug", /* QEMU_CAPS_PIIX4_ACPI_ROOT_= PCI_HOTPLUG */ "virtio-iommu-pci", /* QEMU_CAPS_DEVICE_VIRTIO_IOMMU_PCI */ + "virtio-iommu.boot-bypass", /* QEMU_CAPS_VIRTIO_IOMMU_BOOT_B= YPASS */ ); =20 =20 @@ -1556,6 +1557,10 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCap= sDevicePropsVhostUserFS[] =3D { "bootindex", QEMU_CAPS_VHOST_USER_FS_BOOTINDEX, NULL }, }; =20 +static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioIOMM= U[] =3D { + { "boot-bypass", QEMU_CAPS_VIRTIO_IOMMU_BOOT_BYPASS, NULL }, +}; + /* see documentation for virQEMUQAPISchemaPathGet for the query format */ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] =3D { { "block-commit/arg-type/*top", QEMU_CAPS_ACTIVE_COMMIT }, @@ -1714,6 +1719,9 @@ static virQEMUCapsDeviceTypeProps virQEMUCapsDevicePr= ops[] =3D { { "vhost-user-fs-device", virQEMUCapsDevicePropsVhostUserFS, G_N_ELEMENTS(virQEMUCapsDevicePropsVhostUserFS), QEMU_CAPS_DEVICE_VHOST_USER_FS }, + { "virtio-iommu-pci", virQEMUCapsDevicePropsVirtioIOMMU, + G_N_ELEMENTS(virQEMUCapsDevicePropsVirtioIOMMU), + QEMU_CAPS_DEVICE_VIRTIO_IOMMU_PCI }, }; =20 static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMemoryBackendFi= le[] =3D { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index e2611a6193..fc2e819688 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -625,6 +625,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_MEMORY_BACKEND_RESERVE, /* -object memory-backend-*.reserve= =3D */ QEMU_CAPS_PIIX4_ACPI_ROOT_PCI_HOTPLUG, /* -M pc PIIX4_PM.acpi-root-pci= -hotplug */ QEMU_CAPS_DEVICE_VIRTIO_IOMMU_PCI, /* -device virtio-iommu-pci */ + QEMU_CAPS_VIRTIO_IOMMU_BOOT_BYPASS, /* virtio-iommu.boot-bypass */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.replies b/tests/= qemucapabilitiesdata/caps_5.0.0.aarch64.replies index 574c14d4ce..29bde0357f 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.replies +++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.replies @@ -20244,12 +20244,31 @@ "id": "libvirt-32" } =20 +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-iommu-pci" + }, + "id": "libvirt-33" +} + +{ + "return": [ + { + "name": "fake-data", + "description": "pretend there's real data here", + "type": "str" + } + ], + "id": "libvirt-33" +} [...] diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.replies b/tests/= qemucapabilitiesdata/caps_6.2.0.aarch64.replies index 59a0c4ff55..a46b27e11c 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.replies +++ b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.replies @@ -24190,12 +24190,235 @@ "id": "libvirt-34" } =20 +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-iommu-pci" + }, + "id": "libvirt-35" +} + +{ + "return": [ + { + "default-value": 1, + "name": "rombar", + "type": "uint32" + }, + { + "default-value": true, + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 4294967295, + "name": "romsize", + "type": "uint32" + }, + { + "default-value": false, + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 0, + "name": "acpi-index", + "type": "uint32" + }, + { + "name": "romfile", + "type": "str" + }, + { + "default-value": true, + "name": "x-pcie-extcap-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": -1, + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or = 06", + "type": "int32" + }, + { + "name": "failover_pair_id", + "type": "str" + }, + { + "default-value": false, + "name": "virtio-pci-bus-master-bug-migration", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-lnkctl-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-flr-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "x-ignore-backend-features", + "type": "bool" + }, + { + "default-value": false, + "name": "page-per-vq", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "migrate-extra", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-pm-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "modern-pio-notify", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-deverr-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "aer", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "ats", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "x-disable-pcie", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-ats-page-aligned", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 0, + "name": "len-reserved-regions", + "type": "uint32" + }, + { + "default-value": 0, + "name": "class", + "type": "uint32" + }, + { + "default-value": false, + "name": "disable-modern", + "type": "bool" + }, + { + "default-value": "auto", + "name": "disable-legacy", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "default-value": true, + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "use-started", + "type": "bool" + }, + { + "default-value": true, + "name": "boot-bypass", + "type": "bool" + }, + { + "default-value": true, + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "name": "primary-bus", + "type": "link" + }, + { + "default-value": false, + "name": "x-disable-legacy-check", + "type": "bool" + }, + { + "name": "virtio-backend", + "type": "child" + }, + { + "default-value": false, + "name": "iommu_platform", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "use-disabled-flag", + "type": "bool" + }, + { + "default-value": false, + "name": "packed", + "description": "on/off", + "type": "bool" + } + ], + "id": "libvirt-35" +} [...] diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_6.2.0.aarch64.xml index f2a083375e..cc2286bf78 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml @@ -208,6 +208,7 @@ + 6001050 0 61700244 diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.2.0.x86_64.xml index 60a1f34795..e31089338e 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml @@ -244,6 +244,7 @@ + 6001050 0 43100244 --=20 2.31.1 From nobody Thu Mar 28 15:33:45 2024 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=1633711984; cv=none; d=zohomail.com; s=zohoarc; b=i8qNFMV5PXwjhZj0ip3TRWu97dsvm4DlojVyHVEGdej/S1/i/5fUhLGgD3rOXNANZvtuq47kJUDRuE2tauhcV87HW6ZMSmvxpO0R9gvOmbBcDqcJ0pK/LVEB82oPmXWtJtKO7T7sVE4PMxtQU2zvlDd3dEpPCbbpAOlsLy0Y47k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633711984; 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=tez4poZBcggQYMOzBbZaCtHY6bsX256IKhIm4Ptj+0I=; b=Y+PyUexsQ9GYvgythtmlz7ElfCNDTHmC+fJWjBb3/JBUpOYmAy0h1sejdSzI1tutqKltfYEe+GYBmX5xmRnI5NB7zKBd9rCoUTQ5to6EmyCPV4Dn4Zw8zahjj43UX0J7Sv/n8fCGIGQSfXJ82eDOG+XsKiJ7gaoA+j0HIYQTIQ0= 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 163371198486798.45458108198955; Fri, 8 Oct 2021 09:53:04 -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-56-93xR_pRtPRavHodZ-81OgA-1; Fri, 08 Oct 2021 12:53:02 -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 1DC041006AA2; Fri, 8 Oct 2021 16:52:57 +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 F30BA57CA4; Fri, 8 Oct 2021 16:52:56 +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 B6A161806D02; Fri, 8 Oct 2021 16:52:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 198Gqtpq013494 for ; Fri, 8 Oct 2021 12:52:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1EEAF5F4E3; Fri, 8 Oct 2021 16:52:55 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.195.77]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 395665F4F6 for ; Fri, 8 Oct 2021 16:52:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633711983; 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=tez4poZBcggQYMOzBbZaCtHY6bsX256IKhIm4Ptj+0I=; b=TdPLLe9jrJplwEmO9HvdacaxtGKd199J2ZuWKLk9AJmEC7BPIuXXXYat8qvawGReU4XdDh UcLxW/sCTxp5fKJDCIX0FLFPtlRF78+n2bcgLMR7UWghpE2hNo+86+Pa6W+Aqxy69DHVS0 +q070ghBOpcDEmAS0ns1CgA/t65maN8= X-MC-Unique: 93xR_pRtPRavHodZ-81OgA-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 10/21] conf: Introduce virtio model for Date: Fri, 8 Oct 2021 18:51:45 +0200 Message-Id: <20211008165156.405216-11-abologna@redhat.com> In-Reply-To: <20211008165156.405216-1-abologna@redhat.com> References: <20211008165156.405216-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.11 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1633711986157100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Andrea Bolognani --- docs/schemas/domaincommon.rng | 1 + src/conf/domain_conf.c | 1 + src/conf/domain_conf.h | 1 + src/qemu/qemu_command.c | 4 ++++ src/qemu/qemu_domain_address.c | 6 ++++++ src/qemu/qemu_validate.c | 3 +++ 6 files changed, 16 insertions(+) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index ec5bd91740..2f30b15c48 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -5415,6 +5415,7 @@ intel smmuv3 + virtio diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 6df981ad47..a2d155069f 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1261,6 +1261,7 @@ VIR_ENUM_IMPL(virDomainIOMMUModel, VIR_DOMAIN_IOMMU_MODEL_LAST, "intel", "smmuv3", + "virtio", ); =20 VIR_ENUM_IMPL(virDomainVsockModel, diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 72db861105..21e069f42e 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2696,6 +2696,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainSecDef, virDom= ainSecDefFree); typedef enum { VIR_DOMAIN_IOMMU_MODEL_INTEL, VIR_DOMAIN_IOMMU_MODEL_SMMUV3, + VIR_DOMAIN_IOMMU_MODEL_VIRTIO, =20 VIR_DOMAIN_IOMMU_MODEL_LAST } virDomainIOMMUModel; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index bb743e3d84..ef5ebe6413 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6238,6 +6238,9 @@ qemuBuildIOMMUCommandLine(virCommand *cmd, virCommandAddArgBuffer(cmd, &opts); break; =20 + case VIR_DOMAIN_IOMMU_MODEL_VIRTIO: + break; + case VIR_DOMAIN_IOMMU_MODEL_SMMUV3: /* There is no -device for SMMUv3, so nothing to be done here */ return 0; @@ -6851,6 +6854,7 @@ qemuBuildMachineCommandLine(virCommand *cmd, break; =20 case VIR_DOMAIN_IOMMU_MODEL_INTEL: + case VIR_DOMAIN_IOMMU_MODEL_VIRTIO: /* These IOMMUs are formatted in qemuBuildIOMMUCommandLine */ break; =20 diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 733fa35444..e23de3bb83 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -1003,6 +1003,9 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDev= iceDef *dev, =20 case VIR_DOMAIN_DEVICE_IOMMU: switch ((virDomainIOMMUModel) dev->data.iommu->model) { + case VIR_DOMAIN_IOMMU_MODEL_VIRTIO: + return 0; + case VIR_DOMAIN_IOMMU_MODEL_INTEL: case VIR_DOMAIN_IOMMU_MODEL_SMMUV3: case VIR_DOMAIN_IOMMU_MODEL_LAST: @@ -2382,6 +2385,9 @@ qemuDomainAssignDevicePCISlots(virDomainDef *def, virDomainIOMMUDef *iommu =3D def->iommu; =20 switch ((virDomainIOMMUModel) iommu->model) { + case VIR_DOMAIN_IOMMU_MODEL_VIRTIO: + break; + case VIR_DOMAIN_IOMMU_MODEL_INTEL: case VIR_DOMAIN_IOMMU_MODEL_SMMUV3: case VIR_DOMAIN_IOMMU_MODEL_LAST: diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index c84508cb64..4646cd2af3 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -4797,6 +4797,9 @@ qemuValidateDomainDeviceDefIOMMU(const virDomainIOMMU= Def *iommu, } break; =20 + case VIR_DOMAIN_IOMMU_MODEL_VIRTIO: + break; + case VIR_DOMAIN_IOMMU_MODEL_LAST: default: virReportEnumRangeError(virDomainIOMMUModel, iommu->model); --=20 2.31.1 From nobody Thu Mar 28 15:33:45 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1633712169; cv=none; d=zohomail.com; s=zohoarc; b=FWQFdxyKx+vXzEdimYMsy75wCgP+/WwETzRRWxZ4vqHLk7r2MCFKDmQQhilASuq9JkXxYDEs5JaXJsKNJnx4VRce3hHG4S41Wk/RODyeCdDUfrAaEu12lws+cCjMSKpALV6SYHdf6d3SY7WqhBTVpH0i0TwnaPUnJ7YgokeWYZ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633712169; 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=LDyOgs6yUnDQiGQd4Y/zC+yRFaQ2JkbjOdDf7wyX3gE=; b=DwpHhxg3LEHhDT1Ru+f2wn9xoidgtVjIBZarchvAN19t8E3cgBIOLeFOgKfRcMSideg6wnGW9xN8qlYnRBXe0vxGuSSSLtgH3zZoX9ccitAG4ikCP+b2ugR1hHhyKXbA5V1+qQk0Bm/Ph4Ipk8rCRpExNbSYV2P3pYyD7U+ShHo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1633712169461251.12992960868883; Fri, 8 Oct 2021 09:56:09 -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-248-IdlaFVQnOeKE03x5yz2rTg-1; Fri, 08 Oct 2021 12:53:10 -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 DD0051966333; Fri, 8 Oct 2021 16:53:05 +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 BD4D25D9DE; Fri, 8 Oct 2021 16:53:05 +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 8BEFA1832DD5; Fri, 8 Oct 2021 16:53:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 198Gr4Aq013526 for ; Fri, 8 Oct 2021 12:53:04 -0400 Received: by smtp.corp.redhat.com (Postfix) id DB06D5F4F1; Fri, 8 Oct 2021 16:53:04 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.195.77]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 33CB15F4E3 for ; Fri, 8 Oct 2021 16:52:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633712168; 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=LDyOgs6yUnDQiGQd4Y/zC+yRFaQ2JkbjOdDf7wyX3gE=; b=R7C78nJlJC7MIHJIBg5w0wVz+rn2WZg9tgd6SinXrKJohJjRhDZeuEUCxkw5/7Z6OLNohT fLjMWWjDlG/2VT3wVsA38ZdO0yjm8b7mDPdmUo1NEq3gCaChfMGskCzfpb3jMeEGNWvcH3 ccy5P7C3UJB0lcudg6V89zALffVJRKs= X-MC-Unique: IdlaFVQnOeKE03x5yz2rTg-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 11/21] tests: Add test cases for virtio-iommu Date: Fri, 8 Oct 2021 18:51:46 +0200 Message-Id: <20211008165156.405216-12-abologna@redhat.com> In-Reply-To: <20211008165156.405216-1-abologna@redhat.com> References: <20211008165156.405216-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1633712170116100001 Content-Type: text/plain; charset="utf-8" These represent valid uses of the device. Signed-off-by: Andrea Bolognani --- .../virtio-iommu-aarch64.aarch64-latest.args | 34 +++++++++++++++++++ .../qemuxml2argvdata/virtio-iommu-aarch64.xml | 20 +++++++++++ .../virtio-iommu-x86_64.x86_64-latest.args | 30 ++++++++++++++++ .../qemuxml2argvdata/virtio-iommu-x86_64.xml | 18 ++++++++++ tests/qemuxml2argvtest.c | 2 ++ .../virtio-iommu-aarch64.aarch64-latest.xml | 32 +++++++++++++++++ .../virtio-iommu-x86_64.x86_64-latest.xml | 34 +++++++++++++++++++ tests/qemuxml2xmltest.c | 2 ++ 8 files changed, 172 insertions(+) create mode 100644 tests/qemuxml2argvdata/virtio-iommu-aarch64.aarch64-lat= est.args create mode 100644 tests/qemuxml2argvdata/virtio-iommu-aarch64.xml create mode 100644 tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-lates= t.args create mode 100644 tests/qemuxml2argvdata/virtio-iommu-x86_64.xml create mode 100644 tests/qemuxml2xmloutdata/virtio-iommu-aarch64.aarch64-l= atest.xml create mode 100644 tests/qemuxml2xmloutdata/virtio-iommu-x86_64.x86_64-lat= est.xml diff --git a/tests/qemuxml2argvdata/virtio-iommu-aarch64.aarch64-latest.arg= s b/tests/qemuxml2argvdata/virtio-iommu-aarch64.aarch64-latest.args new file mode 100644 index 0000000000..0363b0370d --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-iommu-aarch64.aarch64-latest.args @@ -0,0 +1,34 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-guest \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-guest/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-guest/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-guest/.config \ +/usr/bin/qemu-system-aarch64 \ +-name guest=3Dguest,debug-threads=3Don \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tm= p/lib/domain--1-guest/master-key.aes"}' \ +-blockdev '{"driver":"file","filename":"/usr/share/AAVMF/AAVMF_CODE.fd","n= ode-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"= }' \ +-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver"= :"raw","file":"libvirt-pflash0-storage"}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_= VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"disca= rd":"unmap"}' \ +-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver= ":"raw","file":"libvirt-pflash1-storage"}' \ +-machine virt,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff,gic-version=3D2,= pflash0=3Dlibvirt-pflash0-format,pflash1=3Dlibvirt-pflash1-format,memory-ba= ckend=3Dmach-virt.ram \ +-cpu cortex-a15 \ +-m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073= 741824}' \ +-overcommit mem-lock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server=3Don,wait=3Doff \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot strict=3Don \ +-audiodev id=3Daudio1,driver=3Dnone \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/virtio-iommu-aarch64.xml b/tests/qemuxm= l2argvdata/virtio-iommu-aarch64.xml new file mode 100644 index 0000000000..3e89cb2dac --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-iommu-aarch64.xml @@ -0,0 +1,20 @@ + + guest + 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 + 1048576 + 1 + + hvm + /usr/share/AAVMF/AAVMF_CODE.f= d + /var/lib/libvirt/qemu/nvram/guest_VARS.fd + + + + + + /usr/bin/qemu-system-aarch64 + + + + + diff --git a/tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-latest.args = b/tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-latest.args new file mode 100644 index 0000000000..8a1413d33d --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-latest.args @@ -0,0 +1,30 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-QEMUGuest1 \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tm= p/lib/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine q35,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff,memory-backend=3D= pc.ram \ +-cpu qemu64 \ +-m 214 \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}'= \ +-overcommit mem-lock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server=3Don,wait=3Doff \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot strict=3Don \ +-audiodev id=3Daudio1,driver=3Dnone \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/virtio-iommu-x86_64.xml b/tests/qemuxml= 2argvdata/virtio-iommu-x86_64.xml new file mode 100644 index 0000000000..51c13d2ef6 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-iommu-x86_64.xml @@ -0,0 +1,18 @@ + + 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 7df3946751..5f07c09d57 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -3238,6 +3238,8 @@ mymain(void) DO_TEST_CAPS_LATEST("intel-iommu-aw-bits"); DO_TEST_CAPS_LATEST_PARSE_ERROR("intel-iommu-wrong-machine"); DO_TEST_CAPS_ARCH_LATEST("iommu-smmuv3", "aarch64"); + DO_TEST_CAPS_LATEST("virtio-iommu-x86_64"); + DO_TEST_CAPS_ARCH_LATEST("virtio-iommu-aarch64", "aarch64"); =20 DO_TEST("cpu-hotplug-startup", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS); DO_TEST_PARSE_ERROR("cpu-hotplug-granularity", diff --git a/tests/qemuxml2xmloutdata/virtio-iommu-aarch64.aarch64-latest.x= ml b/tests/qemuxml2xmloutdata/virtio-iommu-aarch64.aarch64-latest.xml new file mode 100644 index 0000000000..336f99d539 --- /dev/null +++ b/tests/qemuxml2xmloutdata/virtio-iommu-aarch64.aarch64-latest.xml @@ -0,0 +1,32 @@ + + guest + 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 + 1048576 + 1048576 + 1 + + hvm + /usr/share/AAVMF/AAVMF_CODE.f= d + /var/lib/libvirt/qemu/nvram/guest_VARS.fd + + + + + + + + cortex-a15 + + + destroy + restart + destroy + + /usr/bin/qemu-system-aarch64 + + + + diff --git a/tests/qemuxml2xmloutdata/virtio-iommu-x86_64.x86_64-latest.xml= b/tests/qemuxml2xmloutdata/virtio-iommu-x86_64.x86_64-latest.xml new file mode 100644 index 0000000000..0b6c2d0eaf --- /dev/null +++ b/tests/qemuxml2xmloutdata/virtio-iommu-x86_64.x86_64-latest.xml @@ -0,0 +1,34 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + + + + qemu64 + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + +
+ + + + +