From patchwork Fri Feb 8 22:12:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 157889 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1778jaa; Fri, 8 Feb 2019 14:13:19 -0800 (PST) X-Google-Smtp-Source: AHgI3Ib7fHBeVnws8GiHKRgVZBtfHGHw3CqEMuOTz5UKLXNe4nXru/ygqUTgyhct0jVvQYaoHh2Z X-Received: by 2002:a37:94c6:: with SMTP id w189mr17747443qkd.300.1549663999283; Fri, 08 Feb 2019 14:13:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549663999; cv=none; d=google.com; s=arc-20160816; b=gNkqB7yXYVF2Tcs1OYYBqZlh9QU4LBFZybj+ZGHvf9zS5MNfiZc+DEZVVvZ8nJAi8k ifpsrRSn/F3vKguF/u79jNqO62Tl+KwXcJfF2t9QppTCi6kmpsnVr9Wp1YFy6K3tgj9Z Hor0zEP+Ww+r4T1OgItsVDZim/YWN6zS3HF48XkSnImBzFj/ze+jBNCkd5PDxAMiEObb 7M0HMRu3NLu0aaBbU/5U0Zq8K1aZ0U+O5sZ8dQzStb9QqwWegh1S3dcMG3tpVIZshkRH m17/PGH0iGTIGOXJRNTegTirjYcOTUHodIWsXjF5QGctiyiLgBE/gGyOpoz484SSuuGU BF+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :delivered-to; bh=lbU1+DBeAwpmDQzWVo+KRiMSg9oko3WubGZg/vzvLP0=; b=lIioI8CW7jmeNo7Iqf9XY5GqMlgkZrDEjpyufaRyslR1jk8mBOI/GnLw1TSvh07oer +5sGLJr3aB1OEELmzDpv8GZPB/FosbyBmUTLHIKEHUx63MK/E4cOrNcLqn35k4nIUwWH lZyMDxIgk4oFPa214xX9ct20KS3Md7DR+CA6qpX27L0DcQuTSDgFpKn3ThN72SKjdvFk 2npWAOlogsoqU891KYjkzLK9i7107JoyijE/Wx+jBripEInGuGdJr3sglE0fq32qCNL8 iq7yDaqEs/cSBzQyHNi5v1wAnpuSHnYLojw/yHWKpWUDRC4+hWkcN5Kiw2cq+vMaLHh1 kKkw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id w40si803699qvf.116.2019.02.08.14.13.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Feb 2019 14:13:19 -0800 (PST) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 mx1.redhat.com (Postfix) with ESMTPS id C3DBB10FA8; Fri, 8 Feb 2019 22:13:17 +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 898EF17DE1; Fri, 8 Feb 2019 22:13:17 +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 3B39018033AE; Fri, 8 Feb 2019 22:13:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x18MCUof008528 for ; Fri, 8 Feb 2019 17:12:30 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6E4DB5C6A5; Fri, 8 Feb 2019 22:12:30 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from worklaptop.redhat.com (ovpn-123-115.rdu2.redhat.com [10.10.123.115]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0E0895C557; Fri, 8 Feb 2019 22:12:29 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Fri, 8 Feb 2019 17:12:08 -0500 Message-Id: <43aadab6ff1bab8c5fd35d98a74fb4c1cc7065ec.1549663397.git.crobinso@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v3 17/17] qemu: domcaps: Report disk 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 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 08 Feb 2019 22:13:18 +0000 (UTC) This generates new XML like: virtio virtio-transitional virtio-non-transitional Signed-off-by: Cole Robinson --- src/conf/domain_capabilities.c | 1 + src/conf/domain_capabilities.h | 1 + src/qemu/qemu_capabilities.c | 10 ++ .../bhyve_basic.x86_64.xml | 1 + .../bhyve_fbuf.x86_64.xml | 1 + .../bhyve_uefi.x86_64.xml | 1 + tests/domaincapsschemadata/full.xml | 6 + .../domaincapsschemadata/libxl-xenfv-usb.xml | 1 + .../domaincapsschemadata/libxl-xenpv-usb.xml | 1 + .../qemu_1.7.0.x86_64.xml | 3 + .../qemu_2.12.0-virt.aarch64.xml | 5 + .../qemu_2.12.0.ppc64.xml | 5 + .../qemu_2.12.0.s390x.xml | 5 + .../qemu_2.12.0.x86_64.xml | 5 + .../qemu_2.6.0-virt.aarch64.xml | 5 + .../qemu_2.6.0.aarch64.xml | 5 + .../domaincapsschemadata/qemu_2.6.0.ppc64.xml | 5 + .../qemu_2.6.0.x86_64.xml | 5 + .../domaincapsschemadata/qemu_2.7.0.s390x.xml | 5 + .../qemu_2.8.0-tcg.x86_64.xml | 5 + .../domaincapsschemadata/qemu_2.8.0.s390x.xml | 5 + .../qemu_2.8.0.x86_64.xml | 5 + .../qemu_2.9.0-q35.x86_64.xml | 5 + .../qemu_2.9.0-tcg.x86_64.xml | 5 + .../qemu_2.9.0.x86_64.xml | 5 + .../domaincapsschemadata/qemu_3.0.0.s390x.xml | 5 + .../qemu_4.0.0.x86_64.xml | 153 ++++++++++++++++++ tests/domaincapstest.c | 4 + 28 files changed, 263 insertions(+) create mode 100644 tests/domaincapsschemadata/qemu_4.0.0.x86_64.xml -- 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index 6352eda343..a6104920ab 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -482,6 +482,7 @@ virDomainCapsDeviceDiskFormat(virBufferPtr buf, ENUM_PROCESS(disk, diskDevice, virDomainDiskDeviceTypeToString); ENUM_PROCESS(disk, bus, virDomainDiskBusTypeToString); + ENUM_PROCESS(disk, model, virDomainDiskModelTypeToString); FORMAT_EPILOGUE(disk); } diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h index 15e065359b..4a9a717539 100644 --- a/src/conf/domain_capabilities.h +++ b/src/conf/domain_capabilities.h @@ -65,6 +65,7 @@ struct _virDomainCapsDeviceDisk { bool supported; virDomainCapsEnum diskDevice; /* Info about virDomainDiskDevice enum values */ virDomainCapsEnum bus; /* Info about virDomainDiskBus enum values */ + virDomainCapsEnum model; /* Info about virDomainDiskModel enum values */ /* add new fields here */ }; diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 8e42c1c51c..f69de29b81 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -5278,6 +5278,16 @@ virQEMUCapsFillDomainDeviceDiskCaps(virQEMUCapsPtr qemuCaps, if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_ICH9_AHCI)) VIR_DOMAIN_CAPS_ENUM_SET(disk->bus, VIR_DOMAIN_DISK_BUS_SATA); + /* disk->model values */ + VIR_DOMAIN_CAPS_ENUM_SET(disk->model, VIR_DOMAIN_DISK_MODEL_VIRTIO); + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY) || + virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL)) { + VIR_DOMAIN_CAPS_ENUM_SET(disk->model, + VIR_DOMAIN_DISK_MODEL_VIRTIO_TRANSITIONAL); + VIR_DOMAIN_CAPS_ENUM_SET(disk->model, + VIR_DOMAIN_DISK_MODEL_VIRTIO_NON_TRANSITIONAL); + } + return 0; } diff --git a/tests/domaincapsschemadata/bhyve_basic.x86_64.xml b/tests/domaincapsschemadata/bhyve_basic.x86_64.xml index d6ecf061d0..bdf2c4eee8 100644 --- a/tests/domaincapsschemadata/bhyve_basic.x86_64.xml +++ b/tests/domaincapsschemadata/bhyve_basic.x86_64.xml @@ -21,6 +21,7 @@ virtio sata + + diff --git a/tests/domaincapsschemadata/bhyve_uefi.x86_64.xml b/tests/domaincapsschemadata/bhyve_uefi.x86_64.xml index b624fd0799..18f90023d5 100644 --- a/tests/domaincapsschemadata/bhyve_uefi.x86_64.xml +++ b/tests/domaincapsschemadata/bhyve_uefi.x86_64.xml @@ -30,6 +30,7 @@ virtio sata + + + default + virtio + virtio-transitional + virtio-non-transitional + diff --git a/tests/domaincapsschemadata/libxl-xenfv-usb.xml b/tests/domaincapsschemadata/libxl-xenfv-usb.xml index 29fe1f9aa3..4efc137c97 100644 --- a/tests/domaincapsschemadata/libxl-xenfv-usb.xml +++ b/tests/domaincapsschemadata/libxl-xenfv-usb.xml @@ -34,6 +34,7 @@ scsi xen + diff --git a/tests/domaincapsschemadata/libxl-xenpv-usb.xml b/tests/domaincapsschemadata/libxl-xenpv-usb.xml index b9f3ca736b..70e598fe9e 100644 --- a/tests/domaincapsschemadata/libxl-xenpv-usb.xml +++ b/tests/domaincapsschemadata/libxl-xenpv-usb.xml @@ -24,6 +24,7 @@ scsi xen + diff --git a/tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml b/tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml index 3d73133919..497363bbe9 100644 --- a/tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml @@ -68,6 +68,9 @@ usb sata + + virtio + diff --git a/tests/domaincapsschemadata/qemu_2.12.0-virt.aarch64.xml b/tests/domaincapsschemadata/qemu_2.12.0-virt.aarch64.xml index 56e403c4c7..7639df44c6 100644 --- a/tests/domaincapsschemadata/qemu_2.12.0-virt.aarch64.xml +++ b/tests/domaincapsschemadata/qemu_2.12.0-virt.aarch64.xml @@ -74,6 +74,11 @@ usb sata + + virtio + virtio-transitional + virtio-non-transitional + diff --git a/tests/domaincapsschemadata/qemu_2.12.0.ppc64.xml b/tests/domaincapsschemadata/qemu_2.12.0.ppc64.xml index d0b9c3fdef..f10d361359 100644 --- a/tests/domaincapsschemadata/qemu_2.12.0.ppc64.xml +++ b/tests/domaincapsschemadata/qemu_2.12.0.ppc64.xml @@ -40,6 +40,11 @@ usb sata + + virtio + virtio-transitional + virtio-non-transitional + diff --git a/tests/domaincapsschemadata/qemu_2.12.0.s390x.xml b/tests/domaincapsschemadata/qemu_2.12.0.s390x.xml index 8742dce530..41a81ff02f 100644 --- a/tests/domaincapsschemadata/qemu_2.12.0.s390x.xml +++ b/tests/domaincapsschemadata/qemu_2.12.0.s390x.xml @@ -133,6 +133,11 @@ scsi virtio + + virtio + virtio-transitional + virtio-non-transitional + diff --git a/tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml b/tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml index a8d6a4d629..5913e7fc63 100644 --- a/tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml @@ -98,6 +98,11 @@ usb sata + + virtio + virtio-transitional + virtio-non-transitional + diff --git a/tests/domaincapsschemadata/qemu_2.6.0-virt.aarch64.xml b/tests/domaincapsschemadata/qemu_2.6.0-virt.aarch64.xml index b3e85de1d3..9ee801092e 100644 --- a/tests/domaincapsschemadata/qemu_2.6.0-virt.aarch64.xml +++ b/tests/domaincapsschemadata/qemu_2.6.0-virt.aarch64.xml @@ -71,6 +71,11 @@ usb sata + + virtio + virtio-transitional + virtio-non-transitional + diff --git a/tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml b/tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml index 0fcc715940..4dd0b52ed3 100644 --- a/tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml +++ b/tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml @@ -71,6 +71,11 @@ usb sata + + virtio + virtio-transitional + virtio-non-transitional + diff --git a/tests/domaincapsschemadata/qemu_2.6.0.ppc64.xml b/tests/domaincapsschemadata/qemu_2.6.0.ppc64.xml index f2dff05ff8..aa982d237e 100644 --- a/tests/domaincapsschemadata/qemu_2.6.0.ppc64.xml +++ b/tests/domaincapsschemadata/qemu_2.6.0.ppc64.xml @@ -44,6 +44,11 @@ usb sata + + virtio + virtio-transitional + virtio-non-transitional + diff --git a/tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml b/tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml index c6d9fd8b37..6aa3f52ee4 100644 --- a/tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml @@ -72,6 +72,11 @@ usb sata + + virtio + virtio-transitional + virtio-non-transitional + diff --git a/tests/domaincapsschemadata/qemu_2.7.0.s390x.xml b/tests/domaincapsschemadata/qemu_2.7.0.s390x.xml index 0c48bd6c75..8daa15ab9d 100644 --- a/tests/domaincapsschemadata/qemu_2.7.0.s390x.xml +++ b/tests/domaincapsschemadata/qemu_2.7.0.s390x.xml @@ -38,6 +38,11 @@ scsi virtio + + virtio + virtio-transitional + virtio-non-transitional + diff --git a/tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml b/tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml index 1cb843d5d1..081805aa4a 100644 --- a/tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml @@ -73,6 +73,11 @@ usb sata + + virtio + virtio-transitional + virtio-non-transitional + diff --git a/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml b/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml index 7293d89ae7..62c51e4087 100644 --- a/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml +++ b/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml @@ -119,6 +119,11 @@ scsi virtio + + virtio + virtio-transitional + virtio-non-transitional + diff --git a/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml b/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml index 8391603a3b..1bb034aa4f 100644 --- a/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml @@ -73,6 +73,11 @@ usb sata + + virtio + virtio-transitional + virtio-non-transitional + diff --git a/tests/domaincapsschemadata/qemu_2.9.0-q35.x86_64.xml b/tests/domaincapsschemadata/qemu_2.9.0-q35.x86_64.xml index c341de3ce2..67c6d5e77e 100644 --- a/tests/domaincapsschemadata/qemu_2.9.0-q35.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.9.0-q35.x86_64.xml @@ -81,6 +81,11 @@ usb sata + + virtio + virtio-transitional + virtio-non-transitional + diff --git a/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml b/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml index 4336e65dc8..588ef08199 100644 --- a/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml @@ -105,6 +105,11 @@ usb sata + + virtio + virtio-transitional + virtio-non-transitional + diff --git a/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml b/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml index 8e842b89fd..598937a971 100644 --- a/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml @@ -82,6 +82,11 @@ usb sata + + virtio + virtio-transitional + virtio-non-transitional + diff --git a/tests/domaincapsschemadata/qemu_3.0.0.s390x.xml b/tests/domaincapsschemadata/qemu_3.0.0.s390x.xml index 97231e044f..1d97f1f344 100644 --- a/tests/domaincapsschemadata/qemu_3.0.0.s390x.xml +++ b/tests/domaincapsschemadata/qemu_3.0.0.s390x.xml @@ -139,6 +139,11 @@ scsi virtio + + virtio + virtio-transitional + virtio-non-transitional + diff --git a/tests/domaincapsschemadata/qemu_4.0.0.x86_64.xml b/tests/domaincapsschemadata/qemu_4.0.0.x86_64.xml new file mode 100644 index 0000000000..df66be9e29 --- /dev/null +++ b/tests/domaincapsschemadata/qemu_4.0.0.x86_64.xml @@ -0,0 +1,153 @@ + + /usr/bin/qemu-system-x86_64 + kvm + pc-i440fx-4.0 + x86_64 + + + + + /usr/share/AAVMF/AAVMF_CODE.fd + /usr/share/AAVMF/AAVMF32_CODE.fd + /usr/share/OVMF/OVMF_CODE.fd + + rom + pflash + + + yes + no + + + + + + + Skylake-Client-IBRS + Intel + + + + + + + + + + + + + qemu64 + qemu32 + phenom + pentium3 + pentium2 + pentium + n270 + kvm64 + kvm32 + coreduo + core2duo + athlon + Westmere-IBRS + Westmere + Skylake-Server-IBRS + Skylake-Server + Skylake-Client-IBRS + Skylake-Client + SandyBridge-IBRS + SandyBridge + Penryn + Opteron_G5 + Opteron_G4 + Opteron_G3 + Opteron_G2 + Opteron_G1 + Nehalem-IBRS + Nehalem + IvyBridge-IBRS + IvyBridge + Icelake-Server + Icelake-Client + Haswell-noTSX-IBRS + Haswell-noTSX + Haswell-IBRS + Haswell + EPYC-IBPB + EPYC + Conroe + Broadwell-noTSX-IBRS + Broadwell-noTSX + Broadwell-IBRS + Broadwell + 486 + + + + + + disk + cdrom + floppy + lun + + + ide + fdc + scsi + virtio + usb + sata + + + virtio + virtio-transitional + virtio-non-transitional + + + + + sdl + vnc + spice + + + + + + subsystem + + + default + mandatory + requisite + optional + + + usb + pci + scsi + + + + default + kvm + vfio + + + + + + + + + + diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c index 7f52058bad..4ec2dc72b6 100644 --- a/tests/domaincapstest.c +++ b/tests/domaincapstest.c @@ -94,6 +94,7 @@ fillAllCaps(virDomainCapsPtr domCaps) disk->supported = true; SET_ALL_BITS(disk->diskDevice); SET_ALL_BITS(disk->bus); + SET_ALL_BITS(disk->model); graphics->supported = true; SET_ALL_BITS(graphics->type); @@ -502,6 +503,9 @@ mymain(void) "/usr/bin/qemu-system-s390x", NULL, "s390x", VIR_DOMAIN_VIRT_KVM); + DO_TEST_QEMU("4.0.0", "caps_4.0.0", + "/usr/bin/qemu-system-x86_64", NULL, + "x86_64", VIR_DOMAIN_VIRT_KVM); virObjectUnref(cfg); #endif /* WITH_QEMU */