From nobody Tue May 14 05:42:53 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=1657720283; cv=none; d=zohomail.com; s=zohoarc; b=kIrgTT8Cbe9277ZxC6dr8E5on/iLQxYvsao5IkNDyiY95hXD02LJgwFKGQckBW+H4/t4OA7Q/T3W+jBvRleNFtkU/FKO/kRTXtmlQrguv247w0IS+eNmlawChdmZnHjVGZbymAEBdDx9QKgmVkZZuJttkPyp9rcBtYBAEHOaAGw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1657720283; 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=jM68RthQhCZWZHFPfSLyNaT5YFD0pqiTs3dtCuZ+XrE=; b=jWRDj0NV9/Lc8DMOAb9AS8W2gc7AX/NW0N6k8mVGbXcwkw2qa7MzjErSYwRXBdIdwqwYlbD7Te5nXgZiXZwPmv/D6ayABEN+QWZD4Qe8nOPZ2kklZHG8RpldYOjwTygpZOry6SDavqzg2dmx9PwtYvyz+UK91GeelYw0iXTuA3E= 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 1657720283786475.7774379034744; Wed, 13 Jul 2022 06:51:23 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-354-8NPBICImNrCNMx9JrjHlrw-1; Wed, 13 Jul 2022 09:51:17 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D4D361C01B2D; Wed, 13 Jul 2022 13:51:13 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 69F641121315; Wed, 13 Jul 2022 13:51:13 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 3085D1947064; Wed, 13 Jul 2022 13:51:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 24AC3194705F for ; Wed, 13 Jul 2022 13:51:12 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E962B492CA2; Wed, 13 Jul 2022 13:51:11 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 79BCE492C3B for ; Wed, 13 Jul 2022 13:51:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657720282; 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=jM68RthQhCZWZHFPfSLyNaT5YFD0pqiTs3dtCuZ+XrE=; b=NVzT5DL8Ed/BpzLFENwEZC3ZFNWKQlNdg5LexnmVWZga5/gJSNxoeBVjo6jvpAHJVdG91U oQODY6uP5W6AqOxvJssMNGH733RRRiAINHkQjN3C0T4VNT2hRhKVHR9QhtMs6Jv97CrjYI LRtZL8xLtJUb2uvpEBajbJK1JHNZo9c= X-MC-Unique: 8NPBICImNrCNMx9JrjHlrw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v2 1/6] tests: Update hostdev-usb-* hostdev-pci-* xml2xml and xml2argv tests Date: Wed, 13 Jul 2022 15:51:03 +0200 Message-Id: <94ae42fd25aa3b97559ef1980bf76ca92088a0d4.1657720089.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1657720284782100003 Currently, we have bunch of PCI/USB tests cases for qemuxml2argvtest and qemuxml2xmltest but all of them run without any capabilities. This makes is needlessly complicated when trying to extend them. Switch to DO_TEST_CAPS_LATEST(). Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- .../hostdev-pci-address-device.args | 34 ----------------- ...tdev-pci-address-device.x86_64-latest.args | 38 +++++++++++++++++++ .../hostdev-pci-address-device.xml | 2 +- .../qemuxml2argvdata/hostdev-pci-address.args | 33 ---------------- .../hostdev-pci-address.x86_64-latest.args | 37 ++++++++++++++++++ .../qemuxml2argvdata/hostdev-pci-address.xml | 2 +- .../hostdev-usb-address-device-boot.args | 34 ----------------- ...usb-address-device-boot.x86_64-latest.args | 38 +++++++++++++++++++ .../hostdev-usb-address-device-boot.xml | 2 +- .../hostdev-usb-address-device.args | 34 ----------------- ...tdev-usb-address-device.x86_64-latest.args | 38 +++++++++++++++++++ .../hostdev-usb-address-device.xml | 2 +- .../qemuxml2argvdata/hostdev-usb-address.args | 33 ---------------- .../hostdev-usb-address.x86_64-latest.args | 37 ++++++++++++++++++ .../qemuxml2argvdata/hostdev-usb-address.xml | 2 +- tests/qemuxml2argvtest.c | 10 ++--- ... =3D> hostdev-pci-address.x86_64-latest.xml} | 7 +++- ... =3D> hostdev-usb-address.x86_64-latest.xml} | 7 +++- tests/qemuxml2xmltest.c | 4 +- 19 files changed, 210 insertions(+), 184 deletions(-) delete mode 100644 tests/qemuxml2argvdata/hostdev-pci-address-device.args create mode 100644 tests/qemuxml2argvdata/hostdev-pci-address-device.x86_6= 4-latest.args delete mode 100644 tests/qemuxml2argvdata/hostdev-pci-address.args create mode 100644 tests/qemuxml2argvdata/hostdev-pci-address.x86_64-lates= t.args delete mode 100644 tests/qemuxml2argvdata/hostdev-usb-address-device-boot.= args create mode 100644 tests/qemuxml2argvdata/hostdev-usb-address-device-boot.= x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/hostdev-usb-address-device.args create mode 100644 tests/qemuxml2argvdata/hostdev-usb-address-device.x86_6= 4-latest.args delete mode 100644 tests/qemuxml2argvdata/hostdev-usb-address.args create mode 100644 tests/qemuxml2argvdata/hostdev-usb-address.x86_64-lates= t.args rename tests/qemuxml2xmloutdata/{hostdev-pci-address.xml =3D> hostdev-pci-= address.x86_64-latest.xml} (86%) rename tests/qemuxml2xmloutdata/{hostdev-usb-address.xml =3D> hostdev-usb-= address.x86_64-latest.xml} (85%) diff --git a/tests/qemuxml2argvdata/hostdev-pci-address-device.args b/tests= /qemuxml2argvdata/hostdev-pci-address-device.args deleted file mode 100644 index 4c39457ae5..0000000000 --- a/tests/qemuxml2argvdata/hostdev-pci-address-device.args +++ /dev/null @@ -1,34 +0,0 @@ -LC_ALL=3DC \ -PATH=3D/bin \ -HOME=3D/tmp/lib/domain--1-QEMUGuest2 \ -USER=3Dtest \ -LOGNAME=3Dtest \ -XDG_DATA_HOME=3D/tmp/lib/domain--1-QEMUGuest2/.local/share \ -XDG_CACHE_HOME=3D/tmp/lib/domain--1-QEMUGuest2/.cache \ -XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest2/.config \ -QEMU_AUDIO_DRV=3Dnone \ -/usr/bin/qemu-system-i386 \ --name guest=3DQEMUGuest2,debug-threads=3Don \ --S \ --object secret,id=3DmasterKey0,format=3Draw,file=3D/tmp/lib/domain--1-QEMU= Guest2/master-key.aes \ --machine pc,usb=3Doff,dump-guest-core=3Doff \ --accel tcg \ --m 214 \ --overcommit mem-lock=3Doff \ --smp 1,sockets=3D1,cores=3D1,threads=3D1 \ --uuid c7a5fdbd-edaf-9466-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 \ --no-acpi \ --boot strict=3Don \ --usb \ --drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ --device ide-hd,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-0,b= ootindex=3D1 \ --device vfio-pci,host=3D0000:06:12.5,id=3Dhostdev0,bus=3Dpci.0,addr=3D0x2 \ --device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 \ --msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/hostdev-pci-address-device.x86_64-lates= t.args b/tests/qemuxml2argvdata/hostdev-pci-address-device.x86_64-latest.ar= gs new file mode 100644 index 0000000000..a0b6777ce2 --- /dev/null +++ b/tests/qemuxml2argvdata/hostdev-pci-address-device.x86_64-latest.args @@ -0,0 +1,38 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-QEMUGuest2 \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-QEMUGuest2/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-QEMUGuest2/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest2/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=3DQEMUGuest2,debug-threads=3Don \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tm= p/lib/domain--1-QEMUGuest2/master-key.aes"}' \ +-machine pc,usb=3Doff,dump-guest-core=3Doff,memory-backend=3Dpc.ram \ +-accel tcg \ +-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-9466-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 \ +-no-acpi \ +-boot strict=3Don \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0= x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest2","no= de-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw= ","file":"libvirt-1-storage"}' \ +-device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-form= at","id":"ide0-0-0","bootindex":1}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"vfio-pci","host":"0000:06:12.5","id":"hostdev0","bus":= "pci.0","addr":"0x2"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","add= r":"0x3"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/hostdev-pci-address-device.xml b/tests/= qemuxml2argvdata/hostdev-pci-address-device.xml index 7a99fc8444..3fc4d12f7e 100644 --- a/tests/qemuxml2argvdata/hostdev-pci-address-device.xml +++ b/tests/qemuxml2argvdata/hostdev-pci-address-device.xml @@ -13,7 +13,7 @@ restart destroy - /usr/bin/qemu-system-i386 + /usr/bin/qemu-system-x86_64 diff --git a/tests/qemuxml2argvdata/hostdev-pci-address.args b/tests/qemuxm= l2argvdata/hostdev-pci-address.args deleted file mode 100644 index a985ff9dc1..0000000000 --- a/tests/qemuxml2argvdata/hostdev-pci-address.args +++ /dev/null @@ -1,33 +0,0 @@ -LC_ALL=3DC \ -PATH=3D/bin \ -HOME=3D/tmp/lib/domain--1-QEMUGuest2 \ -USER=3Dtest \ -LOGNAME=3Dtest \ -XDG_DATA_HOME=3D/tmp/lib/domain--1-QEMUGuest2/.local/share \ -XDG_CACHE_HOME=3D/tmp/lib/domain--1-QEMUGuest2/.cache \ -XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest2/.config \ -QEMU_AUDIO_DRV=3Dnone \ -/usr/bin/qemu-system-i386 \ --name guest=3DQEMUGuest2,debug-threads=3Don \ --S \ --object secret,id=3DmasterKey0,format=3Draw,file=3D/tmp/lib/domain--1-QEMU= Guest2/master-key.aes \ --machine pc,usb=3Doff,dump-guest-core=3Doff \ --accel tcg \ --m 214 \ --overcommit mem-lock=3Doff \ --smp 1,sockets=3D1,cores=3D1,threads=3D1 \ --uuid c7a5fdbd-edaf-9466-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 \ --no-acpi \ --boot strict=3Don \ --usb \ --drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ --device ide-hd,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-0,b= ootindex=3D1 \ --device vfio-pci,host=3D0000:06:12.5,id=3Dhostdev0,bus=3Dpci.0,addr=3D0x2 \ --msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/hostdev-pci-address.x86_64-latest.args = b/tests/qemuxml2argvdata/hostdev-pci-address.x86_64-latest.args new file mode 100644 index 0000000000..fe011d5f8a --- /dev/null +++ b/tests/qemuxml2argvdata/hostdev-pci-address.x86_64-latest.args @@ -0,0 +1,37 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-QEMUGuest2 \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-QEMUGuest2/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-QEMUGuest2/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest2/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=3DQEMUGuest2,debug-threads=3Don \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tm= p/lib/domain--1-QEMUGuest2/master-key.aes"}' \ +-machine pc,usb=3Doff,dump-guest-core=3Doff,memory-backend=3Dpc.ram \ +-accel tcg \ +-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-9466-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 \ +-no-acpi \ +-boot strict=3Don \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0= x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest2","no= de-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw= ","file":"libvirt-1-storage"}' \ +-device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-form= at","id":"ide0-0-0","bootindex":1}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"vfio-pci","host":"0000:06:12.5","id":"hostdev0","bus":= "pci.0","addr":"0x2"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/hostdev-pci-address.xml b/tests/qemuxml= 2argvdata/hostdev-pci-address.xml index 5f8090336f..f35b8394f7 100644 --- a/tests/qemuxml2argvdata/hostdev-pci-address.xml +++ b/tests/qemuxml2argvdata/hostdev-pci-address.xml @@ -13,7 +13,7 @@ restart destroy - /usr/bin/qemu-system-i386 + /usr/bin/qemu-system-x86_64 diff --git a/tests/qemuxml2argvdata/hostdev-usb-address-device-boot.args b/= tests/qemuxml2argvdata/hostdev-usb-address-device-boot.args deleted file mode 100644 index 7e72951fd1..0000000000 --- a/tests/qemuxml2argvdata/hostdev-usb-address-device-boot.args +++ /dev/null @@ -1,34 +0,0 @@ -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 \ -QEMU_AUDIO_DRV=3Dnone \ -/usr/bin/qemu-system-i386 \ --name guest=3DQEMUGuest1,debug-threads=3Don \ --S \ --object secret,id=3DmasterKey0,format=3Draw,file=3D/tmp/lib/domain--1-QEMU= Guest1/master-key.aes \ --machine pc,usb=3Doff,dump-guest-core=3Doff \ --accel tcg \ --m 214 \ --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 \ --no-acpi \ --boot strict=3Don \ --usb \ --drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ --device ide-hd,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-0 \ --device usb-host,hostbus=3D14,hostaddr=3D6,id=3Dhostdev0,bootindex=3D1,bus= =3Dusb.0,port=3D1 \ --device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x2 \ --msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/hostdev-usb-address-device-boot.x86_64-= latest.args b/tests/qemuxml2argvdata/hostdev-usb-address-device-boot.x86_64= -latest.args new file mode 100644 index 0000000000..2a5a085231 --- /dev/null +++ b/tests/qemuxml2argvdata/hostdev-usb-address-device-boot.x86_64-latest.= args @@ -0,0 +1,38 @@ +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 pc,usb=3Doff,dump-guest-core=3Doff,memory-backend=3Dpc.ram \ +-accel tcg \ +-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 \ +-no-acpi \ +-boot strict=3Don \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0= x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","no= de-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw= ","file":"libvirt-1-storage"}' \ +-device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-form= at","id":"ide0-0-0"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"usb-host","hostdevice":"/dev/bus/usb/014/006","id":"ho= stdev0","bootindex":1,"bus":"usb.0","port":"1"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","add= r":"0x2"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/hostdev-usb-address-device-boot.xml b/t= ests/qemuxml2argvdata/hostdev-usb-address-device-boot.xml index ac1360f87f..a3c0618e37 100644 --- a/tests/qemuxml2argvdata/hostdev-usb-address-device-boot.xml +++ b/tests/qemuxml2argvdata/hostdev-usb-address-device-boot.xml @@ -12,7 +12,7 @@ restart destroy - /usr/bin/qemu-system-i386 + /usr/bin/qemu-system-x86_64 diff --git a/tests/qemuxml2argvdata/hostdev-usb-address-device.args b/tests= /qemuxml2argvdata/hostdev-usb-address-device.args deleted file mode 100644 index c4003864c4..0000000000 --- a/tests/qemuxml2argvdata/hostdev-usb-address-device.args +++ /dev/null @@ -1,34 +0,0 @@ -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 \ -QEMU_AUDIO_DRV=3Dnone \ -/usr/bin/qemu-system-i386 \ --name guest=3DQEMUGuest1,debug-threads=3Don \ --S \ --object secret,id=3DmasterKey0,format=3Draw,file=3D/tmp/lib/domain--1-QEMU= Guest1/master-key.aes \ --machine pc,usb=3Doff,dump-guest-core=3Doff \ --accel tcg \ --m 214 \ --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 \ --no-acpi \ --boot strict=3Don \ --usb \ --drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ --device ide-hd,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-0,b= ootindex=3D1 \ --device usb-host,hostbus=3D14,hostaddr=3D6,id=3Dhostdev0,bus=3Dusb.0,port= =3D1 \ --device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x2 \ --msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/hostdev-usb-address-device.x86_64-lates= t.args b/tests/qemuxml2argvdata/hostdev-usb-address-device.x86_64-latest.ar= gs new file mode 100644 index 0000000000..30809a076c --- /dev/null +++ b/tests/qemuxml2argvdata/hostdev-usb-address-device.x86_64-latest.args @@ -0,0 +1,38 @@ +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 pc,usb=3Doff,dump-guest-core=3Doff,memory-backend=3Dpc.ram \ +-accel tcg \ +-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 \ +-no-acpi \ +-boot strict=3Don \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0= x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","no= de-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw= ","file":"libvirt-1-storage"}' \ +-device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-form= at","id":"ide0-0-0","bootindex":1}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"usb-host","hostdevice":"/dev/bus/usb/014/006","id":"ho= stdev0","bus":"usb.0","port":"1"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","add= r":"0x2"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/hostdev-usb-address-device.xml b/tests/= qemuxml2argvdata/hostdev-usb-address-device.xml index 9027564584..f63ad30950 100644 --- a/tests/qemuxml2argvdata/hostdev-usb-address-device.xml +++ b/tests/qemuxml2argvdata/hostdev-usb-address-device.xml @@ -13,7 +13,7 @@ restart destroy - /usr/bin/qemu-system-i386 + /usr/bin/qemu-system-x86_64 diff --git a/tests/qemuxml2argvdata/hostdev-usb-address.args b/tests/qemuxm= l2argvdata/hostdev-usb-address.args deleted file mode 100644 index a5bf6263d4..0000000000 --- a/tests/qemuxml2argvdata/hostdev-usb-address.args +++ /dev/null @@ -1,33 +0,0 @@ -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 \ -QEMU_AUDIO_DRV=3Dnone \ -/usr/bin/qemu-system-i386 \ --name guest=3DQEMUGuest1,debug-threads=3Don \ --S \ --object secret,id=3DmasterKey0,format=3Draw,file=3D/tmp/lib/domain--1-QEMU= Guest1/master-key.aes \ --machine pc,usb=3Doff,dump-guest-core=3Doff \ --accel tcg \ --m 214 \ --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 \ --no-acpi \ --boot strict=3Don \ --usb \ --drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ --device ide-hd,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-0,b= ootindex=3D1 \ --device usb-host,hostbus=3D14,hostaddr=3D6,id=3Dhostdev0,bus=3Dusb.0,port= =3D1 \ --msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/hostdev-usb-address.x86_64-latest.args = b/tests/qemuxml2argvdata/hostdev-usb-address.x86_64-latest.args new file mode 100644 index 0000000000..f59c463f5e --- /dev/null +++ b/tests/qemuxml2argvdata/hostdev-usb-address.x86_64-latest.args @@ -0,0 +1,37 @@ +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 pc,usb=3Doff,dump-guest-core=3Doff,memory-backend=3Dpc.ram \ +-accel tcg \ +-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 \ +-no-acpi \ +-boot strict=3Don \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0= x2"}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","no= de-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw= ","file":"libvirt-1-storage"}' \ +-device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-form= at","id":"ide0-0-0","bootindex":1}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"usb-host","hostdevice":"/dev/bus/usb/014/006","id":"ho= stdev0","bus":"usb.0","port":"1"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/hostdev-usb-address.xml b/tests/qemuxml= 2argvdata/hostdev-usb-address.xml index 7d0c338311..03c802a532 100644 --- a/tests/qemuxml2argvdata/hostdev-usb-address.xml +++ b/tests/qemuxml2argvdata/hostdev-usb-address.xml @@ -13,7 +13,7 @@ restart destroy - /usr/bin/qemu-system-i386 + /usr/bin/qemu-system-x86_64 diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index a99b44bf2d..5b40a0d7f5 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1914,12 +1914,12 @@ mymain(void) DO_TEST_CAPS_LATEST("fs9p"); DO_TEST_CAPS_ARCH_LATEST("fs9p-ccw", "s390x"); =20 - DO_TEST_NOCAPS("hostdev-usb-address"); - DO_TEST_NOCAPS("hostdev-usb-address-device"); - DO_TEST_NOCAPS("hostdev-usb-address-device-boot"); + DO_TEST_CAPS_LATEST("hostdev-usb-address"); + DO_TEST_CAPS_LATEST("hostdev-usb-address-device"); + DO_TEST_CAPS_LATEST("hostdev-usb-address-device-boot"); DO_TEST_PARSE_ERROR_NOCAPS("hostdev-usb-duplicate"); - DO_TEST("hostdev-pci-address", QEMU_CAPS_DEVICE_VFIO_PCI); - DO_TEST("hostdev-pci-address-device", QEMU_CAPS_DEVICE_VFIO_PCI); + DO_TEST_CAPS_LATEST("hostdev-pci-address"); + DO_TEST_CAPS_LATEST("hostdev-pci-address-device"); DO_TEST_PARSE_ERROR("hostdev-pci-duplicate", QEMU_CAPS_DEVICE_VFIO_PCI); DO_TEST("hostdev-vfio", diff --git a/tests/qemuxml2xmloutdata/hostdev-pci-address.xml b/tests/qemux= ml2xmloutdata/hostdev-pci-address.x86_64-latest.xml similarity index 86% rename from tests/qemuxml2xmloutdata/hostdev-pci-address.xml rename to tests/qemuxml2xmloutdata/hostdev-pci-address.x86_64-latest.xml index 9ba3dfac45..84d9660316 100644 --- a/tests/qemuxml2xmloutdata/hostdev-pci-address.xml +++ b/tests/qemuxml2xmloutdata/hostdev-pci-address.x86_64-latest.xml @@ -8,19 +8,22 @@ hvm + + qemu64 + destroy restart destroy - /usr/bin/qemu-system-i386 + /usr/bin/qemu-system-x86_64
- +
diff --git a/tests/qemuxml2xmloutdata/hostdev-usb-address.xml b/tests/qemux= ml2xmloutdata/hostdev-usb-address.x86_64-latest.xml similarity index 85% rename from tests/qemuxml2xmloutdata/hostdev-usb-address.xml rename to tests/qemuxml2xmloutdata/hostdev-usb-address.x86_64-latest.xml index e4a1f798b2..e5e3620971 100644 --- a/tests/qemuxml2xmloutdata/hostdev-usb-address.xml +++ b/tests/qemuxml2xmloutdata/hostdev-usb-address.x86_64-latest.xml @@ -8,19 +8,22 @@ hvm + + qemu64 + destroy restart destroy - /usr/bin/qemu-system-i386 + /usr/bin/qemu-system-x86_64
- +
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 71bce98c17..58929b68c1 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -526,8 +526,8 @@ mymain(void) =20 DO_TEST_NOCAPS("channel-unix-source-path"); =20 - DO_TEST_NOCAPS("hostdev-usb-address"); - DO_TEST_NOCAPS("hostdev-pci-address"); + DO_TEST_CAPS_LATEST("hostdev-usb-address"); + DO_TEST_CAPS_LATEST("hostdev-pci-address"); DO_TEST("hostdev-pci-address-unassigned", QEMU_CAPS_DEVICE_VFIO_PCI); DO_TEST("hostdev-pci-multifunction", QEMU_CAPS_DEVICE_VFIO_PCI); DO_TEST("hostdev-vfio", QEMU_CAPS_DEVICE_VFIO_PCI); --=20 2.35.1 From nobody Tue May 14 05:42:53 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=1657720286; cv=none; d=zohomail.com; s=zohoarc; b=OY09sH1Hb7p4npPk9XUdkHbWXj0Nh1k8oKA7HH0oe1ZOO5qohm6jLYSnfNqADYEE3bHxLxGZ8okgigAzoBPTYQLGUvXS53QWJoN2ajSq9ruKBoSd8NFGH16QCd+SVJGsvoK/PhisMyo2Y6Lsxf5KryeVqSibbItbZxAiMpfos5o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1657720286; 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=fH9rk4ikVUbU67q4hIXbRl0jWQgxDt8YsN7AasHmfmc=; b=D5HMu3JgdRfvvuUTEsNZtQvrNQ4e0ByR9IS6wFjyLim++9jmDDhZvRq2+qS5vxPa8c58dfi6asf/idTchjArWdPwnCD7j2YM8K1yzAnrkMrITQOdCmO7gVQd5Iu+u6U8cjzu/RU1Wfx/5F8ZByeMY/ayZfIOAwJm+34XSyB7DIw= 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 165772028663119.527754785154457; Wed, 13 Jul 2022 06:51:26 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-169-1jFsvn9nNM2o5zAK9SQK-w-1; Wed, 13 Jul 2022 09:51:19 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 03A563802BB9; Wed, 13 Jul 2022 13:51:15 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id E021840E8B04; Wed, 13 Jul 2022 13:51:14 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id BACD41947B8B; Wed, 13 Jul 2022 13:51:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9D204194705F for ; Wed, 13 Jul 2022 13:51:12 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 80E45492C3B; Wed, 13 Jul 2022 13:51:12 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2BAFD492CA2 for ; Wed, 13 Jul 2022 13:51:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657720284; 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=fH9rk4ikVUbU67q4hIXbRl0jWQgxDt8YsN7AasHmfmc=; b=UGAV5G05z7+280NPWvYb17RV5aPGkIWKTnt8SIAnYwNlVJa20XJURFHppPZmjX8dMZqpGp 0Y7juOwUF7Qnm7McGASxlWGPLWN5DuLG5Zlq9uBRzv7iaFAnEEpDooL2EcC146JDhBtLCT ukUOMI+pRKqqy3cVKqk+CjLeCAdqRjQ= X-MC-Unique: 1jFsvn9nNM2o5zAK9SQK-w-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v2 2/6] tests: Fix qemu replies wrt usb-host properties Date: Wed, 13 Jul 2022 15:51:04 +0200 Message-Id: <08b5d4f9be8447ea38197e850fb6833b3b17df6d.1657720089.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 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: 1657720288790100007 Content-Type: text/plain; charset="utf-8"; x-default="true" My commit of v6.9.0-rc1~457 was a bit too harsh. While it served its purpose (adding usb-host.hostdevice capability) it has a side effect: because I copied reply from qemu-5.1.0 to older .replies files one might now think that say qemu-3.1.0 supports both .guest-reset and .guest-resets-all properties. But in fact it doesn't. There are three problematic properties: 1) guest-reset, introduced in v4.0.0-rc0~56^2 2) guest-resets-all introduced in v4.2.0-rc1~9^2 3) suppress-remote-wake introduced in v5.0.0-rc0~148^2~4 Remove these properties from versions that could not have had them. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- .../qemucapabilitiesdata/caps_3.1.0.ppc64.replies | 15 --------------- .../caps_3.1.0.x86_64.replies | 15 --------------- .../caps_4.0.0.aarch64.replies | 10 ---------- .../qemucapabilitiesdata/caps_4.0.0.ppc64.replies | 10 ---------- .../caps_4.0.0.riscv32.replies | 10 ---------- .../caps_4.0.0.riscv64.replies | 10 ---------- .../qemucapabilitiesdata/caps_4.0.0.s390x.replies | 10 ---------- .../caps_4.0.0.x86_64.replies | 10 ---------- .../caps_4.1.0.x86_64.replies | 10 ---------- .../caps_4.2.0.aarch64.replies | 5 ----- .../qemucapabilitiesdata/caps_4.2.0.ppc64.replies | 5 ----- .../qemucapabilitiesdata/caps_4.2.0.s390x.replies | 5 ----- .../caps_4.2.0.x86_64.replies | 5 ----- 13 files changed, 120 deletions(-) diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.replies b/tests/qe= mucapabilitiesdata/caps_3.1.0.ppc64.replies index 5663253798..95dd682e95 100644 --- a/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.replies +++ b/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.replies @@ -17325,11 +17325,6 @@ "name": "hostaddr", "type": "uint32" }, - { - "default-value": true, - "name": "suppress-remote-wake", - "type": "bool" - }, { "default-value": 2, "name": "loglevel", @@ -17340,16 +17335,6 @@ "name": "isobsize", "type": "uint32" }, - { - "default-value": false, - "name": "guest-resets-all", - "type": "bool" - }, - { - "default-value": true, - "name": "guest-reset", - "type": "bool" - }, { "name": "bootindex", "type": "int32" diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.replies b/tests/q= emucapabilitiesdata/caps_3.1.0.x86_64.replies index 144448783a..6bb6a399f6 100644 --- a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.replies @@ -17167,11 +17167,6 @@ "name": "hostaddr", "type": "uint32" }, - { - "default-value": true, - "name": "suppress-remote-wake", - "type": "bool" - }, { "default-value": 2, "name": "loglevel", @@ -17182,16 +17177,6 @@ "name": "isobsize", "type": "uint32" }, - { - "default-value": false, - "name": "guest-resets-all", - "type": "bool" - }, - { - "default-value": true, - "name": "guest-reset", - "type": "bool" - }, { "name": "bootindex", "type": "int32" diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.replies b/tests/= qemucapabilitiesdata/caps_4.0.0.aarch64.replies index aa45d033b6..3107b86a0d 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.replies +++ b/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.replies @@ -17969,11 +17969,6 @@ "name": "hostaddr", "type": "uint32" }, - { - "default-value": true, - "name": "suppress-remote-wake", - "type": "bool" - }, { "default-value": 2, "name": "loglevel", @@ -17984,11 +17979,6 @@ "name": "isobsize", "type": "uint32" }, - { - "default-value": false, - "name": "guest-resets-all", - "type": "bool" - }, { "default-value": true, "name": "guest-reset", diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.replies b/tests/qe= mucapabilitiesdata/caps_4.0.0.ppc64.replies index acba6b8363..e5c08f757f 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.replies +++ b/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.replies @@ -17995,11 +17995,6 @@ "name": "hostaddr", "type": "uint32" }, - { - "default-value": true, - "name": "suppress-remote-wake", - "type": "bool" - }, { "default-value": 2, "name": "loglevel", @@ -18010,11 +18005,6 @@ "name": "isobsize", "type": "uint32" }, - { - "default-value": false, - "name": "guest-resets-all", - "type": "bool" - }, { "default-value": true, "name": "guest-reset", diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.replies b/tests/= qemucapabilitiesdata/caps_4.0.0.riscv32.replies index 2f2db7a105..98b2a87645 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.replies +++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.replies @@ -16335,11 +16335,6 @@ "name": "hostaddr", "type": "uint32" }, - { - "default-value": true, - "name": "suppress-remote-wake", - "type": "bool" - }, { "default-value": 2, "name": "loglevel", @@ -16350,11 +16345,6 @@ "name": "isobsize", "type": "uint32" }, - { - "default-value": false, - "name": "guest-resets-all", - "type": "bool" - }, { "default-value": true, "name": "guest-reset", diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.replies b/tests/= qemucapabilitiesdata/caps_4.0.0.riscv64.replies index fca6bd93c0..f938d5b2e3 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.replies +++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.replies @@ -16335,11 +16335,6 @@ "name": "hostaddr", "type": "uint32" }, - { - "default-value": true, - "name": "suppress-remote-wake", - "type": "bool" - }, { "default-value": 2, "name": "loglevel", @@ -16350,11 +16345,6 @@ "name": "isobsize", "type": "uint32" }, - { - "default-value": false, - "name": "guest-resets-all", - "type": "bool" - }, { "default-value": true, "name": "guest-reset", diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.s390x.replies b/tests/qe= mucapabilitiesdata/caps_4.0.0.s390x.replies index 2e69a447b3..7909309522 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.s390x.replies +++ b/tests/qemucapabilitiesdata/caps_4.0.0.s390x.replies @@ -16279,11 +16279,6 @@ "name": "hostaddr", "type": "uint32" }, - { - "default-value": true, - "name": "suppress-remote-wake", - "type": "bool" - }, { "default-value": 2, "name": "loglevel", @@ -16294,11 +16289,6 @@ "name": "isobsize", "type": "uint32" }, - { - "default-value": false, - "name": "guest-resets-all", - "type": "bool" - }, { "default-value": true, "name": "guest-reset", diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.replies b/tests/q= emucapabilitiesdata/caps_4.0.0.x86_64.replies index 5de9457eed..e355c6ef1c 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.replies @@ -17672,11 +17672,6 @@ "name": "hostaddr", "type": "uint32" }, - { - "default-value": true, - "name": "suppress-remote-wake", - "type": "bool" - }, { "default-value": 2, "name": "loglevel", @@ -17687,11 +17682,6 @@ "name": "isobsize", "type": "uint32" }, - { - "default-value": false, - "name": "guest-resets-all", - "type": "bool" - }, { "default-value": true, "name": "guest-reset", diff --git a/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.replies b/tests/q= emucapabilitiesdata/caps_4.1.0.x86_64.replies index 0dadabf948..480f22fd99 100644 --- a/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.replies @@ -18085,11 +18085,6 @@ "name": "hostaddr", "type": "uint32" }, - { - "default-value": true, - "name": "suppress-remote-wake", - "type": "bool" - }, { "default-value": 2, "name": "loglevel", @@ -18100,11 +18095,6 @@ "name": "isobsize", "type": "uint32" }, - { - "default-value": false, - "name": "guest-resets-all", - "type": "bool" - }, { "default-value": true, "name": "guest-reset", diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.replies b/tests/= qemucapabilitiesdata/caps_4.2.0.aarch64.replies index 5321348322..06e00fe169 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.replies +++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.replies @@ -18825,11 +18825,6 @@ "name": "hostaddr", "type": "uint32" }, - { - "default-value": true, - "name": "suppress-remote-wake", - "type": "bool" - }, { "default-value": 2, "name": "loglevel", diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.replies b/tests/qe= mucapabilitiesdata/caps_4.2.0.ppc64.replies index 4ed901c3de..a0d3f217c8 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.replies +++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.replies @@ -18288,11 +18288,6 @@ "name": "hostaddr", "type": "uint32" }, - { - "default-value": true, - "name": "suppress-remote-wake", - "type": "bool" - }, { "default-value": 2, "name": "loglevel", diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.replies b/tests/qe= mucapabilitiesdata/caps_4.2.0.s390x.replies index 334a10b3c5..e0994fec0f 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.replies +++ b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.replies @@ -16995,11 +16995,6 @@ "name": "hostaddr", "type": "uint32" }, - { - "default-value": true, - "name": "suppress-remote-wake", - "type": "bool" - }, { "default-value": 2, "name": "loglevel", diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.replies b/tests/q= emucapabilitiesdata/caps_4.2.0.x86_64.replies index cd7a5c345c..a201fc2882 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.replies @@ -18659,11 +18659,6 @@ "name": "hostaddr", "type": "uint32" }, - { - "default-value": true, - "name": "suppress-remote-wake", - "type": "bool" - }, { "default-value": 2, "name": "loglevel", --=20 2.35.1 From nobody Tue May 14 05:42:53 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=1657720286; cv=none; d=zohomail.com; s=zohoarc; b=N1/RIB6BUxFcWJyh5o1nkT8UfK+3HsWagt8Q3ke5JtyOzoD4yM+D5YmwSI1e9pc0HUAz8KxiBkq+0H2yaNLx5C4lC43tD+SL8O1ycdhEvcfMi7FsB9wJZeB9oQYeo/5oOS36FgE9z3ztMPG3JBvturDtd/cHMhF3JNHV1Xu2e+0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1657720286; 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=OGM4p6Hct70DBX2OGeT1AKEKWOfTUzl/fdy5NfWjMpU=; b=aix0DLRX/n7g44jH4z6hM033mAPsoMuul2EYAgq3WJu1M5MUChDoe2jcUbM1cCUPjO83iRsnVKlMlg+jQfjtkx1HhoVtIeW5RCEVxFro+zJOK1TeYVkPYN5wyEA9E698nNPqGeKjBsQQjxwd9MC9lE9H8umCk0JBx/8tRIpil7M= 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 1657720286566611.2716974084732; Wed, 13 Jul 2022 06:51:26 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-643--2536ToZNGOk-j-AR9czhQ-1; Wed, 13 Jul 2022 09:51:20 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 82E75821907; Wed, 13 Jul 2022 13:51:15 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6B2852166B2C; Wed, 13 Jul 2022 13:51:15 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 278471947B93; Wed, 13 Jul 2022 13:51:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 39EA61947067 for ; Wed, 13 Jul 2022 13:51:13 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 17648492CA2; Wed, 13 Jul 2022 13:51:13 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id B71B9492C3B for ; Wed, 13 Jul 2022 13:51:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657720283; 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=OGM4p6Hct70DBX2OGeT1AKEKWOfTUzl/fdy5NfWjMpU=; b=RuzlHxSKM1J7hO9TCgevdNZ7nD28f3TCnU3aGkm/Djj+muB/CU71NVr6NgahJQVzCKR/jh pX5RZeGQkyGoIoFfYUHmAsy/AFCHvZcgA3SfWnMdWAgZ7lvZm7hpVpax6r2Cl2S+jSpLNW q1hDPnRirhkXhaV8M6KST/dHJzNyM6E= X-MC-Unique: -2536ToZNGOk-j-AR9czhQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v2 3/6] conf: Introduce @guestReset to hostdev's Date: Wed, 13 Jul 2022 15:51:05 +0200 Message-Id: <68023138b90b062242f0ffe028813f0f28999586.1657720089.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1657720286929100005 Some USB devices have a buggy firmware that either crashes on device reset, or make the device unusable in some other way. Fortunately, QEMU offers a way to skip device reset either completely, or if device is not initialized yet. Expose this ability to users under: Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- docs/formatdomain.rst | 15 ++++++++++++++- src/conf/domain_conf.c | 18 ++++++++++++++++++ src/conf/domain_conf.h | 13 +++++++++++++ src/conf/schemas/domaincommon.rng | 9 +++++++++ tests/qemuxml2argvdata/hostdev-usb-address.xml | 2 +- .../hostdev-usb-address.x86_64-latest.xml | 2 +- 6 files changed, 56 insertions(+), 3 deletions(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 89b627f4bd..3ea094e64c 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -4051,7 +4051,7 @@ for PCI (KVM only) and 1.0.6 for SCSI (KVM only)` : ... - + @@ -4231,6 +4231,19 @@ or: optional drop if missing at any start attempt =3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D =20 + :since:`Since 8.6.0`, the ``source`` element can contain ``guestRese= t`` + attribute with the following value: + + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + off all guest initiated device reset requests are ignored + uninitialized device request is ignored if device is initialized, + otherwise reset is performed + on device is reset on every guest initiated request + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + + This attribute can be helpful when assigning an USB device with a + firmware that crashes on reset. + ``pci`` PCI devices can only be described by their ``address``. :since:`Since 6.8.0 (Xen only)` , the ``source`` element of a PCI de= vice diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index e80616fe7b..4c7a5a044c 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1042,6 +1042,14 @@ VIR_ENUM_IMPL(virDomainHostdevSubsysSCSIProtocol, "iscsi", ); =20 +VIR_ENUM_IMPL(virDomainHostdevSubsysUSBGuestReset, + VIR_DOMAIN_HOSTDEV_USB_GUEST_RESET_LAST, + "default", + "off", + "uninitialized", + "on", +); + VIR_ENUM_IMPL(virDomainHostdevSubsysSCSIHostProtocol, VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_HOST_PROTOCOL_TYPE_LAST, "none", @@ -5489,6 +5497,11 @@ virDomainHostdevSubsysUSBDefParseXML(xmlNodePtr node, return -1; virTristateBoolToBool(autoAddress, &usbsrc->autoAddress); =20 + if (virXMLPropEnum(node, "guestReset", + virDomainHostdevSubsysUSBGuestResetTypeFromString, + VIR_XML_PROP_NONZERO, &usbsrc->guestReset) < 0) + return -1; + /* Product can validly be 0, so we need some extra help to determine * if it is uninitialized */ vendorNode =3D virXPathNode("./vendor", ctxt); @@ -22989,6 +23002,11 @@ virDomainHostdevDefFormatSubsysUSB(virBuffer *buf, if (def->missing && !(flags & VIR_DOMAIN_DEF_FORMAT_INACTIVE)) virBufferAddLit(&sourceAttrBuf, " missing=3D'yes'"); =20 + if (usbsrc->guestReset) { + virBufferAsprintf(&sourceAttrBuf, " guestReset=3D'%s'", + virDomainHostdevSubsysUSBGuestResetTypeToString(= usbsrc->guestReset)); + } + if (usbsrc->vendor) { virBufferAsprintf(&sourceChildBuf, "\n", us= bsrc->vendor); virBufferAsprintf(&sourceChildBuf, "\n", u= sbsrc->product); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index c56b84683c..90de50c12f 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -233,6 +233,17 @@ typedef enum { =20 VIR_ENUM_DECL(virDomainHostdevSubsysSCSIProtocol); =20 +typedef enum { + VIR_DOMAIN_HOSTDEV_USB_GUEST_RESET_DEFAULT =3D 0, + VIR_DOMAIN_HOSTDEV_USB_GUEST_RESET_OFF, /* reset forbidden */ + VIR_DOMAIN_HOSTDEV_USB_GUEST_RESET_UNINITIALIZED, /* reset iff uniniti= alized */ + VIR_DOMAIN_HOSTDEV_USB_GUEST_RESET_ON, /* reset allowed */ + + VIR_DOMAIN_HOSTDEV_USB_GUEST_RESET_LAST +} virDomainHostdevSubsysUSBGuestReset; + +VIR_ENUM_DECL(virDomainHostdevSubsysUSBGuestReset); + struct _virDomainHostdevSubsysUSB { bool autoAddress; /* bus/device were filled automatically based on vendor/product */ @@ -241,6 +252,8 @@ struct _virDomainHostdevSubsysUSB { =20 unsigned vendor; unsigned product; + + virDomainHostdevSubsysUSBGuestReset guestReset; }; =20 struct _virDomainHostdevSubsysPCI { diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincom= mon.rng index da2fb0d5cb..faa2561665 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -5936,6 +5936,15 @@ + + + + off + uninitialized + on + + + diff --git a/tests/qemuxml2argvdata/hostdev-usb-address.xml b/tests/qemuxml= 2argvdata/hostdev-usb-address.xml index 03c802a532..50c02f9b0e 100644 --- a/tests/qemuxml2argvdata/hostdev-usb-address.xml +++ b/tests/qemuxml2argvdata/hostdev-usb-address.xml @@ -26,7 +26,7 @@ - +
diff --git a/tests/qemuxml2xmloutdata/hostdev-usb-address.x86_64-latest.xml= b/tests/qemuxml2xmloutdata/hostdev-usb-address.x86_64-latest.xml index e5e3620971..2e927252a8 100644 --- a/tests/qemuxml2xmloutdata/hostdev-usb-address.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/hostdev-usb-address.x86_64-latest.xml @@ -34,7 +34,7 @@