From nobody Thu May 2 01:13:27 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=1634735015; cv=none; d=zohomail.com; s=zohoarc; b=JoDjLWSCkVC1CZrtYRkYBmRKMbJ4cUKBqA+jdl/ZmIb43j0pruRXnbsSy3zT7QPR+0kAfV7Ix3QWY8ugvKvmQP3y9/lU5qBf7OPvdUDUd3XbCYNtafnRhEqYb1Gp+wcJwXy8ptOkrhtaBFQuph5wCphEMw5dP+lNj1yk0VzKmMY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634735015; 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=0N/29cZwPooSunizA/Yi/2yorcKOCgQsPBpX7x6CpBo=; b=lUOhadeqhEennOdlKPJDvUFGjlWSzNUxzfvwNhri+bnzHYfn7PNJ/FXNQp1Nc8rj9sUR4vrtF67OZBrRlNC8aonsve7a5LfUWVHEATkXUBbZNWI2HzsM9U4Y/ZatORYlMH3muBX3UUjYD3TnbJnh1qA2Qf0X7aA+oGomdUiplE8= 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 1634735015609175.76956307393664; Wed, 20 Oct 2021 06:03:35 -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-570-NHW6f-FaOvWRVTWSX7bktw-1; Wed, 20 Oct 2021 09:03: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 6D4DA879500; Wed, 20 Oct 2021 13:03:27 +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 C197C6418A; Wed, 20 Oct 2021 13:03: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 68C11180BAD2; Wed, 20 Oct 2021 13:03:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19KD3N71029654 for ; Wed, 20 Oct 2021 09:03:23 -0400 Received: by smtp.corp.redhat.com (Postfix) id 41B271980E; Wed, 20 Oct 2021 13:03:23 +0000 (UTC) Received: from kinshicho.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.195.155]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 37D3860657 for ; Wed, 20 Oct 2021 13:03:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634735014; 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=0N/29cZwPooSunizA/Yi/2yorcKOCgQsPBpX7x6CpBo=; b=YIETwZqrIbMOVlE8lAkaR3HJyknFIMvecz7eiz9epQZismPzf8s9uEl8zs8QWzfN4Urzzc aAMwBrlvsoCGJiuH5XRg0xNlgijzeBGOHUQ2yVrNz/QceZ4aNB9no3y30OoSw8PbloZMNK muPIYkvNBUZukf/7YcMeP39TOniTGFA= X-MC-Unique: NHW6f-FaOvWRVTWSX7bktw-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 01/22] tests: Add replies for QEMU 6.2.0 on aarch64 Date: Wed, 20 Oct 2021 15:02:36 +0200 Message-Id: <20211020130257.534296-2-abologna@redhat.com> In-Reply-To: <20211020130257.534296-1-abologna@redhat.com> References: <20211020130257.534296-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.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: 1634735032079100001 Content-Type: text/plain; charset="utf-8" These were generated using a QEMU binary built from commit v6.1.0-1552-g362534a643 Notably, this causes the arguments of -device to be generated in JSON format. Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- .../qemu_6.2.0-virt.aarch64.xml | 184 + tests/domaincapsdata/qemu_6.2.0.aarch64.xml | 178 + .../caps_6.2.0.aarch64.replies | 28698 ++++++++++++++++ .../caps_6.2.0.aarch64.xml | 538 + ...fault-cpu-kvm-virt-4.2.aarch64-latest.args | 6 +- ...fault-cpu-tcg-virt-4.2.aarch64-latest.args | 6 +- .../aarch64-tpm.aarch64-latest.args | 2 +- .../aarch64-virt-graphics.aarch64-latest.args | 36 +- .../aarch64-virt-headless.aarch64-latest.args | 28 +- ...ult-video-type-aarch64.aarch64-latest.args | 6 +- .../disk-arm-virtio-sd.aarch64-latest.args | 2 +- ...e-expander-bus-aarch64.aarch64-latest.args | 2 +- 12 files changed, 29642 insertions(+), 44 deletions(-) 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/qemucapabilitiesdata/caps_6.2.0.aarch64.replies b/tests/= qemucapabilitiesdata/caps_6.2.0.aarch64.replies new file mode 100644 index 0000000000..e8ce132f3c --- /dev/null +++ b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.replies @@ -0,0 +1,28698 @@ +{ + "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" +} [...] diff --git a/tests/qemuxml2argvdata/aarch64-default-cpu-kvm-virt-4.2.aarch6= 4-latest.args b/tests/qemuxml2argvdata/aarch64-default-cpu-kvm-virt-4.2.aar= ch64-latest.args index 9a702f6a16..3b38e779f8 100644 --- a/tests/qemuxml2argvdata/aarch64-default-cpu-kvm-virt-4.2.aarch64-lates= t.args +++ b/tests/qemuxml2argvdata/aarch64-default-cpu-kvm-virt-4.2.aarch64-lates= t.args @@ -25,11 +25,11 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-guest/.config \ -no-shutdown \ -no-acpi \ -boot strict=3Don \ --device pcie-root-port,port=3D8,chassis=3D1,id=3Dpci.1,bus=3Dpcie.0,multif= unction=3Don,addr=3D0x1 \ --device pcie-root-port,port=3D9,chassis=3D2,id=3Dpci.2,bus=3Dpcie.0,addr= =3D0x1.0x1 \ +-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus= ":"pcie.0","multifunction":true,"addr":"0x1"}' \ +-device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus= ":"pcie.0","addr":"0x1.0x1"}' \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/guest.qcow= 2","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}= ' \ -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qco= w2","file":"libvirt-1-storage"}' \ --device virtio-blk-pci,bus=3Dpci.1,addr=3D0x0,drive=3Dlibvirt-1-format,id= =3Dvirtio-disk0,bootindex=3D1 \ +-device '{"driver":"virtio-blk-pci","bus":"pci.1","addr":"0x0","drive":"li= bvirt-1-format","id":"virtio-disk0","bootindex":1}' \ -audiodev id=3Daudio1,driver=3Dnone \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/aarch64-default-cpu-tcg-virt-4.2.aarch6= 4-latest.args b/tests/qemuxml2argvdata/aarch64-default-cpu-tcg-virt-4.2.aar= ch64-latest.args index 7647de0342..d4c2cb03f3 100644 --- a/tests/qemuxml2argvdata/aarch64-default-cpu-tcg-virt-4.2.aarch64-lates= t.args +++ b/tests/qemuxml2argvdata/aarch64-default-cpu-tcg-virt-4.2.aarch64-lates= t.args @@ -26,11 +26,11 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-guest/.config \ -no-shutdown \ -no-acpi \ -boot strict=3Don \ --device pcie-root-port,port=3D8,chassis=3D1,id=3Dpci.1,bus=3Dpcie.0,multif= unction=3Don,addr=3D0x1 \ --device pcie-root-port,port=3D9,chassis=3D2,id=3Dpci.2,bus=3Dpcie.0,addr= =3D0x1.0x1 \ +-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus= ":"pcie.0","multifunction":true,"addr":"0x1"}' \ +-device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus= ":"pcie.0","addr":"0x1.0x1"}' \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/guest.qcow= 2","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}= ' \ -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qco= w2","file":"libvirt-1-storage"}' \ --device virtio-blk-pci,bus=3Dpci.1,addr=3D0x0,drive=3Dlibvirt-1-format,id= =3Dvirtio-disk0,bootindex=3D1 \ +-device '{"driver":"virtio-blk-pci","bus":"pci.1","addr":"0x0","drive":"li= bvirt-1-format","id":"virtio-disk0","bootindex":1}' \ -audiodev id=3Daudio1,driver=3Dnone \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/aarch64-tpm.aarch64-latest.args b/tests= /qemuxml2argvdata/aarch64-tpm.aarch64-latest.args index 67401b8cf4..1ea17a32f7 100644 --- a/tests/qemuxml2argvdata/aarch64-tpm.aarch64-latest.args +++ b/tests/qemuxml2argvdata/aarch64-tpm.aarch64-latest.args @@ -28,7 +28,7 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-aarch64test/.config \ -boot strict=3Don \ -tpmdev emulator,id=3Dtpm-tpm0,chardev=3Dchrtpm \ -chardev socket,id=3Dchrtpm,path=3D/dev/test \ --device tpm-tis-device,tpmdev=3Dtpm-tpm0,id=3Dtpm0 \ +-device '{"driver":"tpm-tis-device","tpmdev":"tpm-tpm0","id":"tpm0"}' \ -audiodev id=3Daudio1,driver=3Dnone \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/aarch64-virt-graphics.aarch64-latest.ar= gs b/tests/qemuxml2argvdata/aarch64-virt-graphics.aarch64-latest.args index 878deacf76..3c8ebf3155 100644 --- a/tests/qemuxml2argvdata/aarch64-virt-graphics.aarch64-latest.args +++ b/tests/qemuxml2argvdata/aarch64-virt-graphics.aarch64-latest.args @@ -28,32 +28,32 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-guest/.config \ -rtc base=3Dutc \ -no-shutdown \ -boot strict=3Don \ --device pcie-root-port,port=3D8,chassis=3D1,id=3Dpci.1,bus=3Dpcie.0,multif= unction=3Don,addr=3D0x1 \ --device pcie-root-port,port=3D9,chassis=3D2,id=3Dpci.2,bus=3Dpcie.0,addr= =3D0x1.0x1 \ --device pcie-root-port,port=3D10,chassis=3D3,id=3Dpci.3,bus=3Dpcie.0,addr= =3D0x1.0x2 \ --device pcie-root-port,port=3D11,chassis=3D4,id=3Dpci.4,bus=3Dpcie.0,addr= =3D0x1.0x3 \ --device pcie-root-port,port=3D12,chassis=3D5,id=3Dpci.5,bus=3Dpcie.0,addr= =3D0x1.0x4 \ --device pcie-root-port,port=3D13,chassis=3D6,id=3Dpci.6,bus=3Dpcie.0,addr= =3D0x1.0x5 \ --device pcie-root-port,port=3D14,chassis=3D7,id=3Dpci.7,bus=3Dpcie.0,addr= =3D0x1.0x6 \ --device pcie-root-port,port=3D15,chassis=3D8,id=3Dpci.8,bus=3Dpcie.0,addr= =3D0x1.0x7 \ --device qemu-xhci,p2=3D15,p3=3D15,id=3Dusb,bus=3Dpci.2,addr=3D0x0 \ --device virtio-serial-pci,id=3Dvirtio-serial0,bus=3Dpci.3,addr=3D0x0 \ +-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus= ":"pcie.0","multifunction":true,"addr":"0x1"}' \ +-device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus= ":"pcie.0","addr":"0x1.0x1"}' \ +-device '{"driver":"pcie-root-port","port":10,"chassis":3,"id":"pci.3","bu= s":"pcie.0","addr":"0x1.0x2"}' \ +-device '{"driver":"pcie-root-port","port":11,"chassis":4,"id":"pci.4","bu= s":"pcie.0","addr":"0x1.0x3"}' \ +-device '{"driver":"pcie-root-port","port":12,"chassis":5,"id":"pci.5","bu= s":"pcie.0","addr":"0x1.0x4"}' \ +-device '{"driver":"pcie-root-port","port":13,"chassis":6,"id":"pci.6","bu= s":"pcie.0","addr":"0x1.0x5"}' \ +-device '{"driver":"pcie-root-port","port":14,"chassis":7,"id":"pci.7","bu= s":"pcie.0","addr":"0x1.0x6"}' \ +-device '{"driver":"pcie-root-port","port":15,"chassis":8,"id":"pci.8","bu= s":"pcie.0","addr":"0x1.0x7"}' \ +-device '{"driver":"qemu-xhci","p2":15,"p3":15,"id":"usb","bus":"pci.2","a= ddr":"0x0"}' \ +-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.3"= ,"addr":"0x0"}' \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/guest.qcow= 2","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}= ' \ -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qco= w2","file":"libvirt-1-storage"}' \ --device virtio-blk-pci,bus=3Dpci.4,addr=3D0x0,drive=3Dlibvirt-1-format,id= =3Dvirtio-disk0,bootindex=3D1 \ +-device '{"driver":"virtio-blk-pci","bus":"pci.4","addr":"0x0","drive":"li= bvirt-1-format","id":"virtio-disk0","bootindex":1}' \ -netdev user,id=3Dhostnet0 \ --device virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0,mac=3D52:54:00:53:45:a5= ,bus=3Dpci.1,addr=3D0x0 \ +-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":= "52:54:00:53:45:a5","bus":"pci.1","addr":"0x0"}' \ -chardev pty,id=3Dcharserial0 \ -serial chardev:charserial0 \ -chardev socket,id=3Dcharchannel0,fd=3D1729,server=3Don,wait=3Doff \ --device virtserialport,bus=3Dvirtio-serial0.0,nr=3D1,chardev=3Dcharchannel= 0,id=3Dchannel0,name=3Dorg.qemu.guest_agent.0 \ --device usb-tablet,id=3Dinput0,bus=3Dusb.0,port=3D1 \ --device usb-kbd,id=3Dinput1,bus=3Dusb.0,port=3D2 \ +-device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chard= ev":"charchannel0","id":"channel0","name":"org.qemu.guest_agent.0"}' \ +-device '{"driver":"usb-tablet","id":"input0","bus":"usb.0","port":"1"}' \ +-device '{"driver":"usb-kbd","id":"input1","bus":"usb.0","port":"2"}' \ -audiodev id=3Daudio1,driver=3Dnone \ -vnc 127.0.0.1:0,audiodev=3Daudio1 \ --device virtio-gpu-pci,id=3Dvideo0,max_outputs=3D1,bus=3Dpci.7,addr=3D0x0 \ --device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.5,addr=3D0x0 \ +-device '{"driver":"virtio-gpu-pci","id":"video0","max_outputs":1,"bus":"p= ci.7","addr":"0x0"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.5","add= r":"0x0"}' \ -object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/urandom"= }' \ --device virtio-rng-pci,rng=3Dobjrng0,id=3Drng0,bus=3Dpci.6,addr=3D0x0 \ +-device '{"driver":"virtio-rng-pci","rng":"objrng0","id":"rng0","bus":"pci= .6","addr":"0x0"}' \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/aarch64-virt-headless.aarch64-latest.ar= gs b/tests/qemuxml2argvdata/aarch64-virt-headless.aarch64-latest.args index 71838bc407..b8052fa967 100644 --- a/tests/qemuxml2argvdata/aarch64-virt-headless.aarch64-latest.args +++ b/tests/qemuxml2argvdata/aarch64-virt-headless.aarch64-latest.args @@ -29,27 +29,27 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-guest/.config \ -rtc base=3Dutc \ -no-shutdown \ -boot strict=3Don \ --device pcie-root-port,port=3D8,chassis=3D1,id=3Dpci.1,bus=3Dpcie.0,multif= unction=3Don,addr=3D0x1 \ --device pcie-root-port,port=3D9,chassis=3D2,id=3Dpci.2,bus=3Dpcie.0,addr= =3D0x1.0x1 \ --device pcie-root-port,port=3D10,chassis=3D3,id=3Dpci.3,bus=3Dpcie.0,addr= =3D0x1.0x2 \ --device pcie-root-port,port=3D11,chassis=3D4,id=3Dpci.4,bus=3Dpcie.0,addr= =3D0x1.0x3 \ --device pcie-root-port,port=3D12,chassis=3D5,id=3Dpci.5,bus=3Dpcie.0,addr= =3D0x1.0x4 \ --device pcie-root-port,port=3D13,chassis=3D6,id=3Dpci.6,bus=3Dpcie.0,addr= =3D0x1.0x5 \ --device pcie-root-port,port=3D14,chassis=3D7,id=3Dpci.7,bus=3Dpcie.0,addr= =3D0x1.0x6 \ --device qemu-xhci,p2=3D15,p3=3D15,id=3Dusb,bus=3Dpci.2,addr=3D0x0 \ --device virtio-serial-pci,id=3Dvirtio-serial0,bus=3Dpci.3,addr=3D0x0 \ +-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus= ":"pcie.0","multifunction":true,"addr":"0x1"}' \ +-device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus= ":"pcie.0","addr":"0x1.0x1"}' \ +-device '{"driver":"pcie-root-port","port":10,"chassis":3,"id":"pci.3","bu= s":"pcie.0","addr":"0x1.0x2"}' \ +-device '{"driver":"pcie-root-port","port":11,"chassis":4,"id":"pci.4","bu= s":"pcie.0","addr":"0x1.0x3"}' \ +-device '{"driver":"pcie-root-port","port":12,"chassis":5,"id":"pci.5","bu= s":"pcie.0","addr":"0x1.0x4"}' \ +-device '{"driver":"pcie-root-port","port":13,"chassis":6,"id":"pci.6","bu= s":"pcie.0","addr":"0x1.0x5"}' \ +-device '{"driver":"pcie-root-port","port":14,"chassis":7,"id":"pci.7","bu= s":"pcie.0","addr":"0x1.0x6"}' \ +-device '{"driver":"qemu-xhci","p2":15,"p3":15,"id":"usb","bus":"pci.2","a= ddr":"0x0"}' \ +-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.3"= ,"addr":"0x0"}' \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/guest.qcow= 2","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}= ' \ -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qco= w2","file":"libvirt-1-storage"}' \ --device virtio-blk-pci,bus=3Dpci.4,addr=3D0x0,drive=3Dlibvirt-1-format,id= =3Dvirtio-disk0,bootindex=3D1 \ +-device '{"driver":"virtio-blk-pci","bus":"pci.4","addr":"0x0","drive":"li= bvirt-1-format","id":"virtio-disk0","bootindex":1}' \ -netdev user,id=3Dhostnet0 \ --device virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0,mac=3D52:54:00:09:a4:37= ,bus=3Dpci.1,addr=3D0x0 \ +-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":= "52:54:00:09:a4:37","bus":"pci.1","addr":"0x0"}' \ -chardev pty,id=3Dcharserial0 \ -serial chardev:charserial0 \ -chardev socket,id=3Dcharchannel0,fd=3D1729,server=3Don,wait=3Doff \ --device virtserialport,bus=3Dvirtio-serial0.0,nr=3D1,chardev=3Dcharchannel= 0,id=3Dchannel0,name=3Dorg.qemu.guest_agent.0 \ +-device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chard= ev":"charchannel0","id":"channel0","name":"org.qemu.guest_agent.0"}' \ -audiodev id=3Daudio1,driver=3Dnone \ --device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.5,addr=3D0x0 \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.5","add= r":"0x0"}' \ -object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/urandom"= }' \ --device virtio-rng-pci,rng=3Dobjrng0,id=3Drng0,bus=3Dpci.6,addr=3D0x0 \ +-device '{"driver":"virtio-rng-pci","rng":"objrng0","id":"rng0","bus":"pci= .6","addr":"0x0"}' \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/default-video-type-aarch64.aarch64-late= st.args b/tests/qemuxml2argvdata/default-video-type-aarch64.aarch64-latest.= args index 5b7f77e348..7d5655e966 100644 --- a/tests/qemuxml2argvdata/default-video-type-aarch64.aarch64-latest.args +++ b/tests/qemuxml2argvdata/default-video-type-aarch64.aarch64-latest.args @@ -24,10 +24,10 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-default-video-type= -a/.config \ -no-shutdown \ -no-acpi \ -boot strict=3Don \ --device pcie-root-port,port=3D8,chassis=3D1,id=3Dpci.1,bus=3Dpcie.0,multif= unction=3Don,addr=3D0x1 \ --device pcie-root-port,port=3D9,chassis=3D2,id=3Dpci.2,bus=3Dpcie.0,addr= =3D0x1.0x1 \ +-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus= ":"pcie.0","multifunction":true,"addr":"0x1"}' \ +-device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus= ":"pcie.0","addr":"0x1.0x1"}' \ -audiodev id=3Daudio1,driver=3Dnone \ -vnc 127.0.0.1:0,audiodev=3Daudio1 \ --device virtio-gpu-pci,id=3Dvideo0,max_outputs=3D1,bus=3Dpci.1,addr=3D0x0 \ +-device '{"driver":"virtio-gpu-pci","id":"video0","max_outputs":1,"bus":"p= ci.1","addr":"0x0"}' \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/disk-arm-virtio-sd.aarch64-latest.args = b/tests/qemuxml2argvdata/disk-arm-virtio-sd.aarch64-latest.args index 16d6ba2fc9..3bf3da3c26 100644 --- a/tests/qemuxml2argvdata/disk-arm-virtio-sd.aarch64-latest.args +++ b/tests/qemuxml2argvdata/disk-arm-virtio-sd.aarch64-latest.args @@ -33,7 +33,7 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-armtest/.config \ -drive file=3D/arm-sd.qcow2,format=3Dqcow2,if=3Dsd,index=3D0 \ -blockdev '{"driver":"file","filename":"/arm-virtio.qcow2","node-name":"li= bvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qco= w2","file":"libvirt-1-storage"}' \ --device virtio-blk-device,drive=3Dlibvirt-1-format,id=3Dvirtio-disk0 \ +-device '{"driver":"virtio-blk-device","drive":"libvirt-1-format","id":"vi= rtio-disk0"}' \ -audiodev id=3Daudio1,driver=3Dnone \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/pcie-expander-bus-aarch64.aarch64-lates= t.args b/tests/qemuxml2argvdata/pcie-expander-bus-aarch64.aarch64-latest.ar= gs index d3b7f724aa..fe027f4e63 100644 --- a/tests/qemuxml2argvdata/pcie-expander-bus-aarch64.aarch64-latest.args +++ b/tests/qemuxml2argvdata/pcie-expander-bus-aarch64.aarch64-latest.args @@ -26,7 +26,7 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-pcie-expander-bus-te= /.config \ -no-shutdown \ -no-acpi \ -boot strict=3Don \ --device pxb-pcie,bus_nr=3D254,id=3Dpci.1,bus=3Dpcie.0,addr=3D0x1 \ +-device '{"driver":"pxb-pcie","bus_nr":254,"id":"pci.1","bus":"pcie.0","ad= dr":"0x1"}' \ -audiodev id=3Daudio1,driver=3Dnone \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ -msg timestamp=3Don --=20 2.31.1 From nobody Thu May 2 01:13:27 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=1634735028; cv=none; d=zohomail.com; s=zohoarc; b=AckyjKREMfwua0WUmoIMvWccrvktzSb8O1+hnneGzI+RwKL5m8ldtQMV84oVW1hJWwYyXz+LP3ohg/qpRGVv6/3FDR6MmIQ+23zhw/3FXYZhhHXfLO98MIjzgHRJ/kto0FMl10ese09UFA2mWjbErIEtfJyhFB2Zaxx56U3qzDw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634735028; 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=14ehsDI6L7WK6wgHNr4oGKNvC79p8sjv87/CTMRg8qA=; b=OkvTMOvdq8U/UY/V2xo8Evdm3rT+4NX2vzrytmIjd7ziSU45Z2kIC2VEQgFn8n02vM2JEYYiChrKfw8RGHL/luIEY8WaDEDgkIMkj1CYXRfiu5KYiRCxpvm6VgJmbssB2CzZac/LQp7Bd1tndTGK9oEvQVHbxlO1NBpj6VgBj2w= 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 1634735028836375.53777693922825; Wed, 20 Oct 2021 06:03:48 -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-20-jSGCtKEBNOCYl1vAl4-Cag-1; Wed, 20 Oct 2021 09:03:45 -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 91BAF87950D; Wed, 20 Oct 2021 13:03:39 +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 46AA77944B; Wed, 20 Oct 2021 13:03:39 +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 0EBF51832DD4; Wed, 20 Oct 2021 13:03:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19KD3OOt029670 for ; Wed, 20 Oct 2021 09:03:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8AB1F1980E; Wed, 20 Oct 2021 13:03:24 +0000 (UTC) Received: from kinshicho.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.195.155]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B46B560657 for ; Wed, 20 Oct 2021 13:03:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634735027; 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=14ehsDI6L7WK6wgHNr4oGKNvC79p8sjv87/CTMRg8qA=; b=SwKUhpP31rZjbDrBiKVnIZA5kIebWKUKPI9E7rpcDsmXACL5Ck93xdg2ZoaBCSfJBOIYUL JgBo0HnXycdNZuVqQ/1VO70RQKxxS4vtNmi3tx6HlGeDy1Wfgq/5JY68qiGZm7nCA0SPTY /nDv0meHa0DXjMPFPz8dKOg3OAgkFEc= X-MC-Unique: jSGCtKEBNOCYl1vAl4-Cag-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 02/22] conf: Make virDomainDeviceInfoFormat() const correct Date: Wed, 20 Oct 2021 15:02:37 +0200 Message-Id: <20211020130257.534296-3-abologna@redhat.com> In-Reply-To: <20211020130257.534296-1-abologna@redhat.com> References: <20211020130257.534296-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.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: 1634735044642100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- 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 6fcf86ba58..a3f0a27058 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -6334,7 +6334,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 May 2 01:13:27 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=1634735015; cv=none; d=zohomail.com; s=zohoarc; b=aPhpNfDitLpslT5fww2YwwXxBM8emswU+5OA0Of98CfUONs9AflOqar1bhU/xSs1f3+7b9838TgDDhA2nTE0buCTzo+W5AYfXWeokPNiw2DfF0Ihy1Bb7cD3RwcrPLSIntIqJzAsgpNKIzsao0syb4tKCeHVBfAjENy8PqrjOQM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634735015; 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=LXvQBATm9BDSCgG3AHcAPv8WZf5N7aMO8quLY+7iYh8=; b=PC9Eegg7CLaC+tV84CMv0I+ILXPWsKR02gxXHSCynrMJvBUIK+za35Z+URCBTholuCtSM5QNrmrBQ08QFCajcHtAxR7dWj9PLxQyluxzzohg/rNGlL6VbZ00zA2Svzz6izu2+dLYetEB93kWwCfAMy75nF8zSutxHvrQf/xDs/k= 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 1634735015845280.85040389040864; Wed, 20 Oct 2021 06:03:35 -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-335-yyvuGAt2PCeSv1e3RnLXfQ-1; Wed, 20 Oct 2021 09:03:33 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6BCD1100790C; Wed, 20 Oct 2021 13:03:28 +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 473C360CA0; Wed, 20 Oct 2021 13:03: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 816B14EA2A; Wed, 20 Oct 2021 13:03:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19KD3P9n029680 for ; Wed, 20 Oct 2021 09:03:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id C40C31980E; Wed, 20 Oct 2021 13:03:25 +0000 (UTC) Received: from kinshicho.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.195.155]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 04F2D60657 for ; Wed, 20 Oct 2021 13:03:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634735014; 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=LXvQBATm9BDSCgG3AHcAPv8WZf5N7aMO8quLY+7iYh8=; b=NG3FJw9ZJPrH8+RLX4iUCk9k9wuXSb1pFEz9tcuUFBAO1xXCPXfPNeuxYLRVYEqre73LiO D4rPy1d4YkoSIJoliQFnIRbppeRVfphxQ68kzM07DTV4Feqgc07/rcheAwcuijhqyGnG4k 5BfqMoMa6183wW9eY4vd4N0McTWl5q4= X-MC-Unique: yyvuGAt2PCeSv1e3RnLXfQ-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 03/22] qemu: Make qemuBuildDeviceAddressProps() const correct Date: Wed, 20 Oct 2021 15:02:38 +0200 Message-Id: <20211020130257.534296-4-abologna@redhat.com> In-Reply-To: <20211020130257.534296-1-abologna@redhat.com> References: <20211020130257.534296-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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: 1634735032313100004 Content-Type: text/plain; charset="utf-8" Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 1084f5acc7..035943fa96 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -359,7 +359,7 @@ qemuVirCommandGetDevSet(virCommand *cmd, int fd) =20 static char * qemuBuildDeviceAddressPCIGetBus(const virDomainDef *domainDef, - virDomainDeviceInfo *info) + const virDomainDeviceInfo *info) { g_autofree char *devStr =3D NULL; const char *contAlias =3D NULL; @@ -427,7 +427,7 @@ qemuBuildDeviceAddressPCIGetBus(const virDomainDef *dom= ainDef, static int qemuBuildDeviceAddresDriveProps(virJSONValue *props, const virDomainDef *domainDef, - virDomainDeviceInfo *info) + const virDomainDeviceInfo *info) { g_autofree char *bus =3D NULL; virDomainControllerDef *controller =3D NULL; @@ -563,7 +563,7 @@ qemuBuildDeviceAddresDriveProps(virJSONValue *props, static int qemuBuildDeviceAddressProps(virJSONValue *props, const virDomainDef *domainDef, - virDomainDeviceInfo *info) + const virDomainDeviceInfo *info) { switch ((virDomainDeviceAddressType) info->type) { case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI: { --=20 2.31.1 From nobody Thu May 2 01:13:27 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=1634735033; cv=none; d=zohomail.com; s=zohoarc; b=cVyoBZMQgv8TGBzX9gFwdamwmeAAuL90aBdEUrS7Ii4hKVodgh1P067yGocF99s3vJYO0kxb+tkfCzxjHifrqUNBerKohWMc0cQZp56YOUyFOhKjw/qQ3xEIRj/SPj/DUWBsdyVzmw2yL82yGXtomu49GOR8zFFUwLHiK5yDWNk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634735033; 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=p729i62CGNWw9geeY2RfD/4IKnJOFkp4n3wn1MXbVrQ=; b=g2Qd0ItShWvQCGmyJZi0zsRxDfSUPvgHbZVbDVk90J3D6jNxriwjJwyCeMoh5qwPhitgH1TevtNHdIQvzLhbn/qk+oBDEVXUe3pAZAJLmc6BqjKrChOI3y5lzi2DPZ+uVBq2xPlSCsdmlkwWFNzVhSX1mGTgo+sXQijmP4stqr0= 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 1634735033041558.721696780083; Wed, 20 Oct 2021 06:03: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-389-V_EH2ietO4iJGxRIcYS0Zg-1; Wed, 20 Oct 2021 09:03:48 -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 A9F0718414A3; Wed, 20 Oct 2021 13:03:42 +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 8D25969CBD; Wed, 20 Oct 2021 13:03:42 +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 549181832DD5; Wed, 20 Oct 2021 13:03:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19KD3RuY029689 for ; Wed, 20 Oct 2021 09:03:27 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1F0911980E; Wed, 20 Oct 2021 13:03:27 +0000 (UTC) Received: from kinshicho.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.195.155]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3E88A69FA0 for ; Wed, 20 Oct 2021 13:03:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634735032; 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=p729i62CGNWw9geeY2RfD/4IKnJOFkp4n3wn1MXbVrQ=; b=c9gvwqGJQs/OW0Y3U3/LNdpBiFAeikiVspWVcb6HaTDmjimojY/FNgv1BoF7wpNG/EFv/j vvuXX7mbMRxWfJgc1XWh2eKPFT7GvQrpVfkQqZ5FhzBSBUARX1zDVNyQHPIDrEjbdpxXh9 COoPmkpDNcB+AXkWup4j4FsGzEe1n7k= X-MC-Unique: V_EH2ietO4iJGxRIcYS0Zg-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 04/22] qemu: Make qemuBuildVirtioDevProps() const correct Date: Wed, 20 Oct 2021 15:02:39 +0200 Message-Id: <20211020130257.534296-5-abologna@redhat.com> In-Reply-To: <20211020130257.534296-1-abologna@redhat.com> References: <20211020130257.534296-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.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: 1634735047607100006 Content-Type: text/plain; charset="utf-8" This involves a bit of a hack, but is overall preferable to forcing callers to pass non-const devdata as argument. Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 035943fa96..d6df50ec73 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -812,7 +812,7 @@ qemuDeviceVideoGetModel(virQEMUCaps *qemuCaps, =20 =20 static void -qemuBuildVirtioDevGetConfigDev(virDomainDeviceDef *device, +qemuBuildVirtioDevGetConfigDev(const virDomainDeviceDef *device, virQEMUCaps *qemuCaps, const char **baseName, virDomainVirtioOptions **virtioOptions, @@ -976,7 +976,7 @@ qemuBuildVirtioDevGetConfigDev(virDomainDeviceDef *devi= ce, =20 =20 static int -qemuBuildVirtioDevGetConfig(virDomainDeviceDef *device, +qemuBuildVirtioDevGetConfig(const virDomainDeviceDef *device, virQEMUCaps *qemuCaps, char **devtype, virDomainVirtioOptions **virtioOptions, @@ -1094,17 +1094,21 @@ qemuBuildVirtioDevGetConfig(virDomainDeviceDef *dev= ice, */ static virJSONValue * qemuBuildVirtioDevProps(virDomainDeviceType devtype, - void *devdata, + const void *devdata, virQEMUCaps *qemuCaps) { g_autoptr(virJSONValue) props =3D NULL; - virDomainDeviceDef device =3D { .type =3D devtype }; + const virDomainDeviceDef device =3D { .type =3D devtype }; g_autofree char *model =3D NULL; virTristateSwitch disableLegacy =3D VIR_TRISTATE_SWITCH_ABSENT; virTristateSwitch disableModern =3D VIR_TRISTATE_SWITCH_ABSENT; virDomainVirtioOptions *virtioOptions =3D NULL; =20 - virDomainDeviceSetData(&device, devdata); + /* We temporarily cast the const away here, but that's safe to do + * because the called function simply sets the correct member of + * device to devdata based on devtype. Futher uses of device will + * not touch its contents */ + virDomainDeviceSetData((virDomainDeviceDef *) &device, (void *) devdat= a); =20 if (qemuBuildVirtioDevGetConfig(&device, qemuCaps, &model, &virtioOpti= ons, &disableLegacy, &disableModern) < 0) --=20 2.31.1 From nobody Thu May 2 01:13:27 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=1634735030; cv=none; d=zohomail.com; s=zohoarc; b=S/ETuObrN5is24+Zo60pPoUVdI5AkdeMV499EMc2Q8kZ8veXVr13AP8F/j6Q3Ncr6tcCxqxXwibH98LEPP7OytVkn4NF4dkyOvBYlr2b8ukdyi+3vWLkWWtc7Mr8T2Afq23uZlJa8UBYuHHjgEBr4QlTz5o1XTGXUwcbbYII5AI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634735030; 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=ZSCM7yrZBJM5+Fc5HNKddWTKf1oxyQj6P0fkfoTJd4Y=; b=kW94f2u3UD2vxcUwzMluttu7WDxJiV6HA+8GWWl9D6/dd0FLOtAu7vpq+zY70nDUZyHZ05q+l7j2Un33Lp26Cmw/RM5MuOH1XG1mxGbX3PzAdCPQgOCmz65TCMdA3S6mqyC3Jvc8YRY/iS1jJA/9GKTp1xe9Vrh1f4JdfH8JOyk= 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 1634735030765259.2231967667951; Wed, 20 Oct 2021 06:03:50 -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-153-4XbzauuhOWGRJ52qEh0Vnw-1; Wed, 20 Oct 2021 09:03:45 -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 C9197CC624; Wed, 20 Oct 2021 13:03:39 +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 A1F3219729; Wed, 20 Oct 2021 13:03:39 +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 425AA4EA37; Wed, 20 Oct 2021 13:03:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19KD3SeF029694 for ; Wed, 20 Oct 2021 09:03:28 -0400 Received: by smtp.corp.redhat.com (Postfix) id 57382652AC; Wed, 20 Oct 2021 13:03:28 +0000 (UTC) Received: from kinshicho.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.195.155]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9A1F160657 for ; Wed, 20 Oct 2021 13:03:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634735029; 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=ZSCM7yrZBJM5+Fc5HNKddWTKf1oxyQj6P0fkfoTJd4Y=; b=CS70GrRQ5pcVtz++B5jIwSQvzocC9eEBhNzDXs+KJ1aVddhyKzyrKlCQH6Q+tAvweSoHMe LapiED0ZNuQ8E8SoUd2LM9ZFta8sAsC3CgQg+pltrrKUhfuTCqKKOWAfA/lyyVYq/f2ccx wi4A6WNsOOIivutQZdX+PzqioDbegj4= X-MC-Unique: 4XbzauuhOWGRJ52qEh0Vnw-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 05/22] conf: Add IOMMU support to virDomainDeviceDefCopy() Date: Wed, 20 Oct 2021 15:02:40 +0200 Message-Id: <20211020130257.534296-6-abologna@redhat.com> In-Reply-To: <20211020130257.534296-1-abologna@redhat.com> References: <20211020130257.534296-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.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: 1634735046109100003 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 Reviewed-by: J=C3=A1n Tomko --- 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 a3f0a27058..0618343b79 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -29708,6 +29708,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; @@ -29720,7 +29724,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 May 2 01:13:27 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=1634735036; cv=none; d=zohomail.com; s=zohoarc; b=KdND+jeediP0U4HK1nX53FfUQilqqSoA5NkSkn4VGTdoI23vqznR1zvGfYQt2I6hmKCOjKsrVwOCJNmzhTBO0gUinzUklEdFS3U8ZISuilvToMLY5gjgWxC/E70beOawRrTqH0csTONhM7wMnOfmH19bgQeN030X+hwH3JFkqvs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634735036; 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=0e76FcP+RSnyt+0EgTuJL2o0t4fLwzmyO27wM5rzNpk=; b=VzcvqHTDUiG20gIhsO3FsgHGYIPe2Wr2pTYFrsrQK8+UGjESYe3EwTFYar2GAxpXBiTlCheF3iJ465zJOeQ/8ixMLJwroaCrO5RrBETpkDFPgEcMWWiYhlSrFkTMhYoac7fkPAYbX1scHD/seEqTkK2gmEw2XOXbVi7VnwbDHNs= 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 1634735035786630.9011933882521; Wed, 20 Oct 2021 06:03:55 -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-304-oxj1CMBJNfeCKhJtmB0Jhg-1; Wed, 20 Oct 2021 09:03:51 -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 BE5D1879515; Wed, 20 Oct 2021 13:03:45 +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 9D6425FC13; Wed, 20 Oct 2021 13:03:45 +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 66FDB4EA3D; Wed, 20 Oct 2021 13:03:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19KD3TrV029710 for ; Wed, 20 Oct 2021 09:03:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id A79DD652AC; Wed, 20 Oct 2021 13:03:29 +0000 (UTC) Received: from kinshicho.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.195.155]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D22BE60657 for ; Wed, 20 Oct 2021 13:03:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634735034; 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=0e76FcP+RSnyt+0EgTuJL2o0t4fLwzmyO27wM5rzNpk=; b=Z2UOpF0Ppmq4wjSLIbN8kK037clAfjBK2FDx0VmFQHt8ubqMbX/wi70ADpvWgNFM7q6G9x xoGnxZYYBD1O0lQAPqz+PPMi7NZxtuPXbJ8FC9GS6eV8JaxfAfBqwe4O5iMNjWRe4n3NJm OngfLbjhhgmUK28b4G2mpL5KiCBsBCo= X-MC-Unique: oxj1CMBJNfeCKhJtmB0Jhg-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 06/22] conf: Add new/free functions for virDomainIOMMUDef Date: Wed, 20 Oct 2021 15:02:41 +0200 Message-Id: <20211020130257.534296-7-abologna@redhat.com> In-Reply-To: <20211020130257.534296-1-abologna@redhat.com> References: <20211020130257.534296-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.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: 1634735050569100011 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 Reviewed-by: J=C3=A1n Tomko --- 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 0618343b79..15228d1e38 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2534,6 +2534,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) { @@ -3336,7 +3357,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); @@ -3674,7 +3695,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); @@ -14923,11 +14944,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 1ac802feca..4624bad1f7 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -3300,6 +3300,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 May 2 01:13:27 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=1634735164; cv=none; d=zohomail.com; s=zohoarc; b=Y3dlItZGHdyc2WieYVG3fvyUrXQm60Gq6Buf2X8KJX0zaSk7zeRGvH2VtUuxR9Noa3m9mAZcrQ+a/k/4D1dfWWJfqnLB39YLke9KmAVmftTRbprv2yZApH5qs5cF5wIGbuy41X/mc5UKfEPyAdlgO02guUO3Vv8gaKuLrcEZ0/4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634735164; 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=DahsCUSAgChlhhY0irLm9S8Ggp34UMm8/Kc2Lt2chp3qf51YSonr2oTirQU0KTSYAlQiIIYXPOpAsV6kW2o7L2uScRbKDtHrRYZq0rYcPaIdESt8BR/CgWI2ppqrPrwDlDfyGneEiJ+hTTp3vP+T0ooUx7+RKxjNr0lV4hWkkIs= 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 1634735164627219.15402788616245; Wed, 20 Oct 2021 06:06: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-549-j20bC4etOj-bJJMwl82FOg-1; Wed, 20 Oct 2021 09:03:55 -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 E6B9E8C56CF; Wed, 20 Oct 2021 13:03:48 +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 BF97E62A44; Wed, 20 Oct 2021 13:03:48 +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 86D481832DF2; Wed, 20 Oct 2021 13:03:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19KD3UGN029722 for ; Wed, 20 Oct 2021 09:03:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id E0FBA652AC; Wed, 20 Oct 2021 13:03:30 +0000 (UTC) Received: from kinshicho.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.195.155]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 233BC60657 for ; Wed, 20 Oct 2021 13:03:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634735163; 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=gGuvynXHlak1fP0ZUrqT8dmAvfJeNTXFb8iVEL21juxzMkZhGE9BcYpjb+Dr69zDN66f4A WBdXDbSFrNs6rTXhoIp2gI0O6sTmdqvdv1BUPjMRae9EmuyuR3diKNAalagOPNuKRMkjZA o1lpe/x+RPZCccc0TizHH7Ns16/+++g= X-MC-Unique: j20bC4etOj-bJJMwl82FOg-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 07/22] conf: Introduce VIR_PCI_CONNECT_INTEGRATED Date: Wed, 20 Oct 2021 15:02:42 +0200 Message-Id: <20211020130257.534296-8-abologna@redhat.com> In-Reply-To: <20211020130257.534296-1-abologna@redhat.com> References: <20211020130257.534296-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.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: 1634735165643100001 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 Reviewed-by: J=C3=A1n Tomko --- 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 May 2 01:13:27 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=1634735109; cv=none; d=zohomail.com; s=zohoarc; b=eh6JX52eQWG1Y+EjxQX4jefkdYsyaG/pZQHD+8zYi9V9LzZqcZalGnt0+wi5X4C8b8g/IEeCUSG3025PkOedeU/V9DOZhBVfa4b/LZbJ02wByAaNOhM43p51IJAxdhpamN7TXJYjex001meOSqvrc/iUQLmTQfuY0He+I/XLDA8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634735109; 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=NSahQ7pYTR5VZTWHRyTZaLqvZBiTnJPNW7TnO9CqqOk=; b=YfcPjfF0bEVmdvjC5tRU2dqiteDfUDsuuEertnZKtNRT9mXGzvgFGhE+DXsUa6KSMDKo6/v4691qHcKL6CaUvtr65x+Jbe7I2KJsglQXlz4B4Gf2h7XPOw8n89k7FrmdNeVxhlzXD1e6iAyHy6vsZl94qKbTqQYG8devMHSzWYE= 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 1634735109871117.19409076942316; Wed, 20 Oct 2021 06:05: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-577-LG6NtqqCPGGdpciAfjzPCA-1; Wed, 20 Oct 2021 09:03:58 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 77FC2100790C; Wed, 20 Oct 2021 13:03:52 +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 5943760CA1; Wed, 20 Oct 2021 13:03:52 +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 1A90C4EA46; Wed, 20 Oct 2021 13:03:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19KD3WlV029730 for ; Wed, 20 Oct 2021 09:03:32 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3CDA469119; Wed, 20 Oct 2021 13:03:32 +0000 (UTC) Received: from kinshicho.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.195.155]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7E3F060657 for ; Wed, 20 Oct 2021 13:03:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634735108; 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=NSahQ7pYTR5VZTWHRyTZaLqvZBiTnJPNW7TnO9CqqOk=; b=Eisiwx7D9G0Nxohh1O0CZJ19pumgPZJG1O2BpO6rE0IH8Vg0d8CR+xF1TxX+D8mfhlGu7q gtnDYW02HuQsPYFN8Tah+an6Wgkq26NqZYGXvslydUWXh4xzbZeRpUplH6s9V4uOJDU2t3 jY1t/IeYfQ3EUR3W7Ww8sbHrYD6tqYc= X-MC-Unique: LG6NtqqCPGGdpciAfjzPCA-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 08/22] qemu: Tweak some code Date: Wed, 20 Oct 2021 15:02:43 +0200 Message-Id: <20211020130257.534296-9-abologna@redhat.com> In-Reply-To: <20211020130257.534296-1-abologna@redhat.com> References: <20211020130257.534296-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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: 1634735113831100001 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 Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 18 +++++++++--------- src/qemu/qemu_domain_address.c | 23 ++++++++++++++++++++++- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index d6df50ec73..74e5bac7a2 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -952,6 +952,9 @@ qemuBuildVirtioDevGetConfigDev(const virDomainDeviceDef= *device, } break; =20 + case VIR_DOMAIN_DEVICE_IOMMU: + break; + case VIR_DOMAIN_DEVICE_LEASE: case VIR_DOMAIN_DEVICE_SOUND: case VIR_DOMAIN_DEVICE_WATCHDOG: @@ -966,7 +969,6 @@ qemuBuildVirtioDevGetConfigDev(const virDomainDeviceDef= *device, case VIR_DOMAIN_DEVICE_TPM: case VIR_DOMAIN_DEVICE_PANIC: case VIR_DOMAIN_DEVICE_MEMORY: - case VIR_DOMAIN_DEVICE_IOMMU: case VIR_DOMAIN_DEVICE_AUDIO: case VIR_DOMAIN_DEVICE_LAST: default: @@ -6540,14 +6542,13 @@ qemuBuildIOMMUCommandLine(virCommand *cmd, virQEMUCaps *qemuCaps) { const virDomainIOMMUDef *iommu =3D def->iommu; + g_autoptr(virJSONValue) props =3D NULL; =20 if (!iommu) return 0; =20 switch (iommu->model) { - case VIR_DOMAIN_IOMMU_MODEL_INTEL: { - g_autoptr(virJSONValue) props =3D NULL; - + case VIR_DOMAIN_IOMMU_MODEL_INTEL: if (virJSONValueObjectCreate(&props, "s:driver", "intel-iommu", "S:intremap", qemuOnOffAuto(iommu->in= tremap), @@ -6562,7 +6563,6 @@ qemuBuildIOMMUCommandLine(virCommand *cmd, return -1; =20 return 0; - } =20 case VIR_DOMAIN_IOMMU_MODEL_SMMUV3: /* There is no -device for SMMUv3, so nothing to be done here */ @@ -7154,14 +7154,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 May 2 01:13:27 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=1634735032; cv=none; d=zohomail.com; s=zohoarc; b=huaLbqckTjcNzWNSRh1ix1E7oVafX8+4JRYjGx8Q0a++YxiRIR3CnLlcD3u7sOzEARlLeQ12Apr2Sj89q+TY0OANkMe1uqezGVlB/gBjC2B9W8qpOp4f4HF2HfrHbWc+Oq4hWTDee0USECYAsgHZyGutRhSyVdcR/Z4gyHLeHpY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634735032; 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=cZHV5amv4fDL8f+vHXPJAVjx2ck2pqdvXtuqBmHvqt0=; b=nQrNQqTjFcRyMX3WQCvSEVwtFrgKttgHm53I6RsPdePdDjzoG89Uxy4W27NS6VtPEGgNlzrHvpfQ56SnoEfjmT3wViBIsbaMh6xERj5dAATQGQyNCE9PNtYXxu/LIkkNwGSOwh/v0qEOsTcT9z6FknlLNF4zWdpgwZHqTgmKc7Y= 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 1634735032748395.5880284377175; Wed, 20 Oct 2021 06:03:52 -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-52-1reIadlsPeOQ3h98NMzUaA-1; Wed, 20 Oct 2021 09:03:49 -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 127311007912; Wed, 20 Oct 2021 13:03:43 +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 E5AB318351; Wed, 20 Oct 2021 13:03:42 +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 AE2021832DD6; Wed, 20 Oct 2021 13:03:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19KD3XTf029745 for ; Wed, 20 Oct 2021 09:03:33 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5F1AF69C83; Wed, 20 Oct 2021 13:03:33 +0000 (UTC) Received: from kinshicho.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.195.155]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A0EAB60657 for ; Wed, 20 Oct 2021 13:03:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634735031; 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=cZHV5amv4fDL8f+vHXPJAVjx2ck2pqdvXtuqBmHvqt0=; b=VyASFa0VV2VI+oJbAwT9KqMWPBaATRHgkskTx5Dyvuuexlx6o8nuShBvnbpEnP1NbgObq5 K+BTHSmgvOMuyOV0PFPIpnDpE+5LdDpTUYXZzhnezrBJtmBEn3CPwBw/RjB2y/v91dTWoh kPQJfS/LA5aX7TPN2RZHKnqBhr82HhI= X-MC-Unique: 1reIadlsPeOQ3h98NMzUaA-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 09/22] qemu: Introduce QEMU_CAPS_DEVICE_VIRTIO_IOMMU_PCI Date: Wed, 20 Oct 2021 15:02:44 +0200 Message-Id: <20211020130257.534296-10-abologna@redhat.com> In-Reply-To: <20211020130257.534296-1-abologna@redhat.com> References: <20211020130257.534296-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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: 1634735047417100005 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 Reviewed-by: J=C3=A1n Tomko --- 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 cddd39924d..30eed6b1b9 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -651,6 +651,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "chardev.json", /* QEMU_CAPS_CHARDEV_JSON */ "device.json", /* QEMU_CAPS_DEVICE_JSON */ "query-dirty-rate", /* QEMU_CAPS_QUERY_DIRTY_RATE */ + "virtio-iommu-pci", /* QEMU_CAPS_DEVICE_VIRTIO_IOMMU_PCI */ ); =20 =20 @@ -1367,6 +1368,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 bb53d9ae46..d8417c1955 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -631,6 +631,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_CHARDEV_JSON, /* -chardev accepts JSON */ QEMU_CAPS_DEVICE_JSON, /* -device accepts JSON */ QEMU_CAPS_QUERY_DIRTY_RATE, /* accepts query-dirty-rate */ + 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 bb6a7d5ee7..bb985a3432 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml @@ -179,6 +179,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 f8317c1117..2398b2d50a 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml @@ -187,6 +187,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 d8f9af8af2..1feb49ef9f 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml @@ -172,6 +172,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 3e99e52962..225afd7771 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml @@ -222,6 +222,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 18b7897bfa..4b2b7f5ca9 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml @@ -225,6 +225,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 b943eaedaf..ab40e2bdf8 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml @@ -184,6 +184,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 ec64e1cacf..ec8d29fe04 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml @@ -190,6 +190,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 29ea8b1b8c..004e90ca5b 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml @@ -175,6 +175,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 552e1d43c9..54132c807b 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml @@ -141,6 +141,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 923aa240ad..d92fc21fa0 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml @@ -228,6 +228,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 0fefe64537..e298363b94 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml @@ -192,6 +192,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 61685066b8..fc210bdd0c 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml @@ -149,6 +149,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 78ede15fb3..1f72d2ab25 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -236,6 +236,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 98c2fcedce..ddf71447d4 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml @@ -240,6 +240,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 ae55a52767..78efae4fdb 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml @@ -204,6 +204,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 5a46da0a6a..526c14208d 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml @@ -241,6 +241,7 @@ + 6001050 0 43100244 --=20 2.31.1 From nobody Thu May 2 01:13:27 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=1634735142; cv=none; d=zohomail.com; s=zohoarc; b=NZoj49z0N7+4YL95EIFMoH0zR/qKlGyCr4IpnJgI/2E7y6DbaquuYb4zmUTsZ1H8NGDMnp1B0R/eqsIeZYYs+IjX1qnfai/QsVgsfVXrNxq08v+yh5i3A3ntIzLaYIUnad5G+Afeq6FEWxSVzR9a1a8u7nNiogs/3GzuMTcji14= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634735142; 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=dtM6LrqPu74AxLddy4x77skHFhQouALRGgwxRIe6w8w=; b=keoM3rKU7ehZbtS10kUhqWLvDsFZwhVyiS1bZNh0A2LFjbWaaswFKjZKK7AqUUjvrfA+I8z1a/S19aVDYRcKdEm1R9u7I4FrvXqFCH14KF5NVzPAkfNzkUu5Sa1Xob6lOBZBAXTbKUTlTGVlW3UdoD4+jJ8JLYclaKuddRInogc= 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 1634735142326634.004993064555; Wed, 20 Oct 2021 06:05:42 -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-169-yqaMWkxQOAyAP98zGDRmhQ-1; Wed, 20 Oct 2021 09:03:56 -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 2B3B58C56CC; Wed, 20 Oct 2021 13:03:46 +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 08DE35BAF0; Wed, 20 Oct 2021 13:03:46 +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 C35261832DDE; Wed, 20 Oct 2021 13:03:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19KD3ZPx029757 for ; Wed, 20 Oct 2021 09:03:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id 03B491980E; Wed, 20 Oct 2021 13:03:35 +0000 (UTC) Received: from kinshicho.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.195.155]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EFE4569119 for ; Wed, 20 Oct 2021 13:03:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634735141; 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=dtM6LrqPu74AxLddy4x77skHFhQouALRGgwxRIe6w8w=; b=G+G1WCvYoFbUQHM3RUav1mBLD96O/C3pZsg3Jb4j6DZSTLxzvHXIWFuRPnrU/y1hNVcN8E /1NgKohJVGQuin6oC9IuZygYxBms1RtEKKnVHQSAEq20ZobG2q+RAnXPwdLetni31GEoXR 2R6CrJxtPaq63VxyPleXa/b7vArnu2Y= X-MC-Unique: yqaMWkxQOAyAP98zGDRmhQ-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 10/22] DONOTMERGEYET: qemu: Introduce QEMU_CAPS_VIRTIO_IOMMU_BOOT_BYPASS Date: Wed, 20 Oct 2021 15:02:45 +0200 Message-Id: <20211020130257.534296-11-abologna@redhat.com> In-Reply-To: <20211020130257.534296-1-abologna@redhat.com> References: <20211020130257.534296-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.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: 1634735143592100001 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. NOTE: the QEMU 6.2 binaries were built from source trees where https://lists.gnu.org/archive/html/qemu-devel/2021-10/msg00161.html https://lists.gnu.org/archive/html/qemu-devel/2021-09/msg07819.html had been applied. Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- 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 30eed6b1b9..4443fb6b19 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -652,6 +652,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "device.json", /* QEMU_CAPS_DEVICE_JSON */ "query-dirty-rate", /* QEMU_CAPS_QUERY_DIRTY_RATE */ "virtio-iommu-pci", /* QEMU_CAPS_DEVICE_VIRTIO_IOMMU_PCI */ + "virtio-iommu.boot-bypass", /* QEMU_CAPS_VIRTIO_IOMMU_BOOT_B= YPASS */ ); =20 =20 @@ -1552,6 +1553,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 }, @@ -1711,6 +1716,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 d8417c1955..8b40344985 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -632,6 +632,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_DEVICE_JSON, /* -device accepts JSON */ QEMU_CAPS_QUERY_DIRTY_RATE, /* accepts query-dirty-rate */ 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 e8ce132f3c..80bf3a4eb5 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.replies +++ b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.replies @@ -24217,12 +24217,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 78efae4fdb..cc0349e1d2 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml @@ -205,6 +205,7 @@ + 6001050 0 61700244 diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.replies b/tests/q= emucapabilitiesdata/caps_6.2.0.x86_64.replies index aa7a779a68..a1ee80c6a1 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.replies @@ -23425,12 +23425,235 @@ "id": "libvirt-37" } =20 +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-iommu-pci" + }, + "id": "libvirt-38" +} + +{ + "return": [ + { + "name": "failover_pair_id", + "type": "str" + }, + { + "name": "romfile", + "type": "str" + }, + { + "default-value": -1, + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or = 06", + "type": "int32" + }, + { + "default-value": 4294967295, + "name": "romsize", + "type": "uint32" + }, + { + "default-value": true, + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 1, + "name": "rombar", + "type": "uint32" + }, + { + "default-value": true, + "name": "x-pcie-extcap-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 0, + "name": "acpi-index", + "type": "uint32" + }, + { + "default-value": false, + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "migrate-extra", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "ats", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "x-ignore-backend-features", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-pm-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "aer", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-flr-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-lnkctl-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-ats-page-aligned", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "page-per-vq", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-deverr-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "virtio-pci-bus-master-bug-migration", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "modern-pio-notify", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "x-disable-pcie", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 0, + "name": "len-reserved-regions", + "type": "uint32" + }, + { + "default-value": 0, + "name": "class", + "type": "uint32" + }, + { + "default-value": "auto", + "name": "disable-legacy", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "default-value": false, + "name": "disable-modern", + "type": "bool" + }, + { + "default-value": true, + "name": "use-disabled-flag", + "type": "bool" + }, + { + "name": "virtio-backend", + "type": "child" + }, + { + "default-value": false, + "name": "packed", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "iommu_platform", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "boot-bypass", + "type": "bool" + }, + { + "default-value": false, + "name": "x-disable-legacy-check", + "type": "bool" + }, + { + "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": "use-started", + "type": "bool" + }, + { + "default-value": true, + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "name": "primary-bus", + "type": "link" + } + ], + "id": "libvirt-38" +} [...] diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.2.0.x86_64.xml index 526c14208d..04432cde3b 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml @@ -242,6 +242,7 @@ + 6001050 0 43100244 --=20 2.31.1 From nobody Thu May 2 01:13:27 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=1634735034; cv=none; d=zohomail.com; s=zohoarc; b=GaLibiSN40bliC3x8fCdGOaoXumP9T84zLCGqgwaHP+Fn9UImvhgV69cL+df+QP8lj0uY7tbp1GHhFaX7C5kh/fZlg3fIKy0fh/nS9cIYogUxZeT7LcG0Gkke/Wu1KArzCmfBjbWRqH79BV5uH7G0r6w9nZGxl2AyQjL5PERJcg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634735034; 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=K34sOdPMWNf9ZOK4L9Xw+EP2744ThSB7a25dAW/2HfM=; b=De63gj2Sgw2nk0Dmv06MqMBUFWJAZC5ruhx7KmcMymUw6MmMSo8eD2awzaGQ2/ZjgvZMtZub0dfxYeh9sZxactSalBYTScpdhH0RwnHI2CFbQ3gzDhpF1Yiq0JaIuKpOdlm/3treQxYrwxu0lcmaHh2yEGdDc1TCyyUfm7TjiCE= 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 1634735034566392.7600896480193; Wed, 20 Oct 2021 06:03:54 -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-250-7q6NkyIxNt2uXCnAJ2kf8A-1; Wed, 20 Oct 2021 09:03:50 -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 57158879513; Wed, 20 Oct 2021 13:03:44 +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 35E70641A7; Wed, 20 Oct 2021 13:03:44 +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 F3AF84EA3A; Wed, 20 Oct 2021 13:03:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19KD3gFP029786 for ; Wed, 20 Oct 2021 09:03:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id DC2F61980E; Wed, 20 Oct 2021 13:03:42 +0000 (UTC) Received: from kinshicho.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.195.155]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F3C9469C83 for ; Wed, 20 Oct 2021 13:03:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634735033; 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=K34sOdPMWNf9ZOK4L9Xw+EP2744ThSB7a25dAW/2HfM=; b=LElfhpOXKUGG9iNBDmU7XRXt4HriiCnxIrZGmQhGHTfUTQRx1uhCoH2ZWDR2rWBpzNiKhF BG3y3yuZwJ/UpsLR6bCopLWTUReDxzX7iSolz57BsLfxvyiMGoV1NBgbKwIbg7IhRCE6Nf pVPkBpVI2+8BHdxIogPCSEHGxOS6yVo= X-MC-Unique: 7q6NkyIxNt2uXCnAJ2kf8A-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 11/22] conf: Introduce virtio model for Date: Wed, 20 Oct 2021 15:02:46 +0200 Message-Id: <20211020130257.534296-12-abologna@redhat.com> In-Reply-To: <20211020130257.534296-1-abologna@redhat.com> References: <20211020130257.534296-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.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: 1634735048764100009 Content-Type: text/plain; charset="utf-8" Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- 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 26990c4d6d..4d6bf906fb 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 15228d1e38..5102857d5e 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1267,6 +1267,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 4624bad1f7..486f2f7a2e 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2703,6 +2703,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 74e5bac7a2..41e487d056 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6564,6 +6564,9 @@ qemuBuildIOMMUCommandLine(virCommand *cmd, =20 return 0; =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; @@ -7159,6 +7162,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 3045e4b64b..bd4c7b2cd7 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -4869,6 +4869,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 May 2 01:13:27 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=1634735052; cv=none; d=zohomail.com; s=zohoarc; b=bT8MrzXgnrdHnpeghN+lZF43nr+CT0RigEnxkYWAuJRSZgyNwxaCT2pImEdnKo0uqrDXVSMRCDCHvWpzDmsbYJYmldEdeK9nzz8FQ3gAOaKa2wWy6JVO0rZee5B2Te86XJWupzs++bEq7dOTtW9csyeRkgcnHcW8eAstqwPynL0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634735052; 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=mDQd0kNLI9Xkq+IQLaTHmDRH8kw8Nr81Ga3vxtS44IM=; b=fR39BIeOsakCVmJOoSnMyY9goRCAi3/kUtvtmUsmck4ssOokRRo3fhAVgAUt9ZPr0w3bnAY83ChPIuidylUSMbc9ZCAhmeW3OOq638C/bpZrXPJXSFDwF+5L253TJZOHcxFuE2f3bxn1gAH5geHPXTS5f7u24MCOvbDyCJ1RuZg= 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 1634735052734505.6869270400839; Wed, 20 Oct 2021 06:04:12 -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-68-XW94bo9QMAmFENDRAaoOwA-1; Wed, 20 Oct 2021 09:04:01 -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 8D5111007923; Wed, 20 Oct 2021 13:03:55 +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 6632B1972E; Wed, 20 Oct 2021 13:03:55 +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 04FC31832DFA; Wed, 20 Oct 2021 13:03:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19KD3i6w029810 for ; Wed, 20 Oct 2021 09:03:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6C0A01980E; Wed, 20 Oct 2021 13:03:44 +0000 (UTC) Received: from kinshicho.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.195.155]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7B0B269C83 for ; Wed, 20 Oct 2021 13:03:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634735051; 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=mDQd0kNLI9Xkq+IQLaTHmDRH8kw8Nr81Ga3vxtS44IM=; b=hxNKtHu3vFlmU8HaQo7Of2FCNEKnWsyFs2sgO8K+8Gn1qFOPq9v+pvsDyu9y8BHfABL2el o+2wTsY4nJZjW9WXCbausUrlAIQ5vsfmc/V9ArqjfRR/NdbyWSniOJzNOXDP1Xnkwc82Ii w+M16bJu3p4OsRSSm3N6I0VK9j8IN78= X-MC-Unique: XW94bo9QMAmFENDRAaoOwA-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 12/22] tests: Add test cases for virtio-iommu Date: Wed, 20 Oct 2021 15:02:47 +0200 Message-Id: <20211020130257.534296-13-abologna@redhat.com> In-Reply-To: <20211020130257.534296-1-abologna@redhat.com> References: <20211020130257.534296-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.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: 1634735065917100001 Content-Type: text/plain; charset="utf-8" These represent valid uses of the device. Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- .../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 e209b48fce..60d44eea01 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -3252,6 +3252,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 + + +
+ + + + +