From patchwork Wed Jan 23 21:32:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 156396 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1201288jaa; Wed, 23 Jan 2019 13:33:21 -0800 (PST) X-Google-Smtp-Source: ALg8bN7aiR0xACBraJH9kqEc9toL7zes70u+3WKLGIMK8JayTjQjLdEMfm65XGcwUXHiHeeyaGlQ X-Received: by 2002:a37:a745:: with SMTP id q66mr3349593qke.272.1548279201505; Wed, 23 Jan 2019 13:33:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548279201; cv=none; d=google.com; s=arc-20160816; b=l6bu5PCGuiKATK/ZhrspBHBanmob5l1lVJ8AajU0ktc9KUMwjpLhl7gJH9UMXuAHw9 b/zy5TvC95mLRqQ0m47DyVtKAEk65trxTaa/a400QfDKqGytg86lqXJnxxQZXOzseBMg ffncMniMv8F0T4jY5sVLX1D/7Ck7+2YIfIbyLBib2ouhdM3KqdhsmpVoTweK6JTDcMAq 1YrJzC0N/mbO61bVnAzGPi12X1NrWT8mwZOsEQ2v/1ctjAVUHvkTpMU42EkGmO79ZBI0 8tGsmTWs3O22j8TVSoawGvmTWOpxovBgqbayyXOo80DfWjr68NOPTzMJ3ImBREKjKGva 0svw== 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:message-id:date:to:from:delivered-to; bh=4qekGPIHaKzgRmUa6baUGe2hlDsU5OzPJcL3+TMpHVc=; b=Q6cdJ3TXrlcmGYzFggMzg/dCQEghALQwfQuM9SUXhjVTeipmvWjeQH22c0Lp4HQgAr krEZ13YYSAd5rH+rP3NrCKqwJExXRFqN3GlnyEbRUbJMM8sqNLWY4DIyNyhTkaBE4yi3 VhERQjDghG1S7rB2xZUGm/wa6TzZe/RqDS6bh/tvUNsw+jCaC2T/58m0KpukuM5g9j9I nsU+MiwjV7VJc2u/6pTukNv7j0UHZID2HyjZJH/LI8oHK/izhxMDPjS+XQii3//20im2 udwOCKWzHk/Xxw4EFUkdqQBZPk3ZvrBX9g2mfOb8rQufYDQbAuYdF4vjH9kLfzQuXm4M JQbA== 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 d17si147590qvl.100.2019.01.23.13.33.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Jan 2019 13:33:21 -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-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 mx1.redhat.com (Postfix) with ESMTPS id 9F8B187642; Wed, 23 Jan 2019 21:33:19 +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 8D94A5D6A6; Wed, 23 Jan 2019 21:33:18 +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 D96A23F7D5; Wed, 23 Jan 2019 21:33:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x0NLXETr032238 for ; Wed, 23 Jan 2019 16:33:14 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8C383BA50; Wed, 23 Jan 2019 21:33:14 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from worklaptop.redhat.com (ovpn-120-34.rdu2.redhat.com [10.10.120.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id BFD50672C5; Wed, 23 Jan 2019 21:33:11 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 23 Jan 2019 16:32:28 -0500 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 00/25] qemu: virtio-{non-}transitional support 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 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 23 Jan 2019 21:33:20 +0000 (UTC) v1 libvirt patches: https://www.redhat.com/archives/libvir-list/2019-January/msg00593.html Previous incomplete RFC here: https://www.redhat.com/archives/libvir-list/2019-January/msg00346.html qemu patches, queued for qemu 4.0.0: https://lists.gnu.org/archive/html/qemu-devel/2018-12/msg00923.html Previous libvirt discussion around this: https://www.redhat.com/archives/libvir-list/2018-August/msg01073.html Long story short we need to expose these options so apps have a usable way to support rhel6 + virtio + q35. This series exposes the new devices as model= values. This required adding new model= attributes for several devices. See v1 posting for a summary of the XML changes introduced, mostly it's adding virtio-transitional and virtio-non-transitional to existing model= enums, and adding model= XML attributes for devices that don't have them (disk, fs, input) Changes from v1: - models are now named virtio-9p, virtio-9p-transitional, virtio-9p-non-transitional. This is to avoid ambiguity as in the near future we will likely add virtio-fs support - Cleanup and prep work is separated into separate patches and front loaded into the series. - qemu caps additions are separated from the qemu_command.c patches, and squashed together upfront. - virDomainDeviceSetData is added to make it easier to compose a virDomainDeviceDef on the fly. This is used for the transitional cli building but can be useful elsewhere too, but that's for another series. - Lots of small improvements and fixes suggested by Andrea. Thanks, Cole Cole Robinson (25): conf: Set net->model earlier conf: Add virDomainNetIsVirtioModel qemu: Move validation out of qemu_command.c qemu: Move validation out of qemu_command.c qemu: command: Make vhost-scsi device string depend on address qemu: command: Convert vhost-{vsock,scsi} to qemuBuildVirtioDevStr conf: Add virDomainDeviceSetData qemu: command: Make BuildVirtioDevStr more generic qemu: command: Add qemuCaps to BuildVirtioStr qemu: capabilities: Add virtio/vhost {non-}transitional conf: Add qemu: Support disk model=virtio-{non-}transitional qemu: Support interface model=virtio-{non-}transitional conf: Add qemu: Support hostdev model=virtio-{non-}transitional qemu: Support rng model=virtio-{non-}transitional conf: Add qemu: Support filesystem model=virtio-9p-{non-}transitional qemu: Support memballoon model=virtio-{non-}transitional qemu: Support vsock model=virtio-{non-}transitional conf: Add qemu: Support input model=virtio-{non-}transitional qemu: Support virtio-serial controller model=virtio-{non-}transitional qemu: Support scsi controller model=virtio-{non-}transitional qemu: domcaps: Report disk docs/formatdomain.html.in | 39 ++- docs/schemas/domaincommon.rng | 61 +++- src/conf/domain_capabilities.c | 1 + src/conf/domain_capabilities.h | 1 + src/conf/domain_conf.c | 328 ++++++++++++++++-- src/conf/domain_conf.h | 67 ++++ src/libvirt_private.syms | 6 + src/libxl/libxl_conf.c | 2 + src/qemu/qemu_capabilities.c | 61 ++++ src/qemu/qemu_capabilities.h | 28 ++ src/qemu/qemu_command.c | 252 +++++++++++--- src/qemu/qemu_domain.c | 79 ++++- src/qemu/qemu_domain_address.c | 97 ++++-- src/qemu/qemu_driver.c | 17 +- src/qemu/qemu_hotplug.c | 2 +- src/qemu/qemu_interface.c | 8 +- src/qemu/qemu_process.c | 3 +- src/security/virt-aa-helper.c | 2 +- src/vbox/vbox_common.c | 2 + src/vmx/vmx.c | 5 +- .../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 | 154 ++++++++ tests/domaincapstest.c | 4 + .../caps_4.0.0.x86_64.xml | 20 ++ .../virtio-non-transitional.x86_64-3.1.0.args | 65 ++++ ...virtio-non-transitional.x86_64-latest.args | 62 ++++ .../virtio-non-transitional.xml | 40 +++ .../virtio-transitional.x86_64-3.1.0.args | 50 +++ .../virtio-transitional.x86_64-latest.args | 52 +++ .../qemuxml2argvdata/virtio-transitional.xml | 40 +++ tests/qemuxml2argvmock.c | 2 +- tests/qemuxml2argvtest.c | 6 + .../virtio-non-transitional.xml | 121 +++++++ .../virtio-transitional.xml | 80 +++++ tests/qemuxml2xmltest.c | 26 +- 57 files changed, 1736 insertions(+), 141 deletions(-) create mode 100644 tests/domaincapsschemadata/qemu_4.0.0.x86_64.xml create mode 100644 tests/qemuxml2argvdata/virtio-non-transitional.x86_64-3.1.0.args create mode 100644 tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/virtio-non-transitional.xml create mode 100644 tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args create mode 100644 tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/virtio-transitional.xml create mode 100644 tests/qemuxml2xmloutdata/virtio-non-transitional.xml create mode 100644 tests/qemuxml2xmloutdata/virtio-transitional.xml -- 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list