From patchwork Thu Jan 17 17:52:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 155860 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2257319jaa; Thu, 17 Jan 2019 09:53:09 -0800 (PST) X-Google-Smtp-Source: ALg8bN47wt1AjWCez7MfKfzrjEEm18f+q2LRzW2ajZjklsOUSSTdS/gP7Jte5UJGUY1l+PSWesYR X-Received: by 2002:aed:3aa7:: with SMTP id o36mr12517725qte.240.1547747589600; Thu, 17 Jan 2019 09:53:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547747589; cv=none; d=google.com; s=arc-20160816; b=wJRDI8kjwnec1+l9fdHwmqAvbWsjYoSowXXAnVbM9rOmNz+6u18Jko5WO+A59T9z1u 48zmkJZlInwd6TjLgaECdh0JE2ZUt3FFGSq65eG3Z1bzw1GgylF9zRCorCQnhsW7wzgS 8qFg4lCtfeoqhZ7oR7o8AJ5sQuQLS2vDMHx+RfJerr6cEMasyQjsDA8kY9XDiVmWFwsQ Ez0te29w6qr7moXH9soSRBL7SbfKz8Cx5rTcev94eftkC/hiG7JumOm332qFm8jpf1gq T5SBu9onTnf1qT6qdUxSVCYHTa21CusW+OjE+sezcvY6waQis1amEn2Q/upIFSKUupE/ wuAQ== 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=6Rp8pu7P4zB3OJsy2JLH/Zp0kPRYkAPyQIo7MYXd5Ms=; b=xd02lrmJRKrQSpWnwMjNYbpwYzHW2MLL3TQLrG2aWmDcCFEA9s555pu+VAlcQ/gH/h v6v5nJ/dvTf5e/84CTPMIq7Lr6P3dPBCkdibN2XGw90NBchpPkbCBh0rGg8GUwDMz+ew YfzhRg1G9MxyDxtXBX2LpBPHoKdYAO1hOaaM7AH00QfWUi691A9CPgop5ca5OnrWpKVA Af6PpNGhtbs9eLBgHQi+tGPQJB6aaXRoQ09vYUFQQ5rznGo+U2VXLJV8pK/gCYRLdU20 rhqY5+xbhpl+KmL3T/dnFhXRQko7HY/1EuhWg2fNWcVnHKWBjVo7Zaensht21QWoMkpj i2FQ== 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 v10si1067258qto.109.2019.01.17.09.53.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 09:53:09 -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-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 39D7612F911; Thu, 17 Jan 2019 17:53:07 +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 20AD2101960A; Thu, 17 Jan 2019 17:53:06 +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 C02583F602; Thu, 17 Jan 2019 17:53:02 +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 x0HHr1vA005458 for ; Thu, 17 Jan 2019 12:53:01 -0500 Received: by smtp.corp.redhat.com (Postfix) id E839C600C9; Thu, 17 Jan 2019 17:53:01 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from worklaptop.redhat.com (ovpn-122-144.rdu2.redhat.com [10.10.122.144]) by smtp.corp.redhat.com (Postfix) with ESMTP id 66663600C6; Thu, 17 Jan 2019 17:52:58 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Thu, 17 Jan 2019 12:52:27 -0500 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 00/18] 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.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 17 Jan 2019 17:53:08 +0000 (UTC) This series adds support for virtio-transitional and virtio-non-transitional qemu devices. 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 Previous incomplete RFC here: https://www.redhat.com/archives/libvir-list/2019-January/msg00346.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. Here's the breakdown. 'standard names' here means the model names virtio, virtio-transitional, and virtio-non-transitional * Simply extended: virtio-rng: extend existing to handle standard names vhost-vsock: extend existing to handle standard names virtio-memballoon: extend existings to handle standard names virtio-net: extend existing qemu handling to support standard names * Extended with caveats: virtio-serial: extend to handle existing model=X attribute, with standard names virtio-scsi: extend to handle the additional names virtio-transitional and virtio-non-transitional. model= already supports virtio-scsi here which is a departure from just model='virtio' which most others use, but I chose to not extend that pattern and stick with the names the other devices are using vhost-scsi: extend handling for the protocol=vhost case, to accept standard names. I stuck with standard names over using vhost-transitional or similar, for consistency with other devices. * New XML elements virtio-blk: add new attribute with standard names virtio-fs: add new attribute with standard names virtio-input-host: add new attribute with standard names At the end is an extension to domaincapabilities to report the disk bus model values. Until domaincapabilities is fully fleshed out with support for all the above devices, apps can use that disk model check to assume transitional devices are available for all of the above. Cole Robinson (18): tests: Add capabilities data for QEMU 4.0.0 x86_64 conf: Add qemu: Support disk model=virtio-{non-}transitional conf: Add virDomainNetHasVirtioModel 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-{non-}transitional qemu: Move memballoon validation out of command.c 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 scsi controller model=virtio-{non-}transitional qemu: Support virtio-serial controller model=virtio-{non-}transitional qemu: domcaps: Report disk docs/formatdomain.html.in | 39 +- docs/schemas/domaincommon.rng | 60 +- src/conf/domain_capabilities.c | 1 + src/conf/domain_capabilities.h | 1 + src/conf/domain_conf.c | 216 +- src/conf/domain_conf.h | 68 +- src/libvirt_private.syms | 5 + src/libxl/libxl_conf.c | 2 + src/qemu/qemu_capabilities.c | 55 + src/qemu/qemu_capabilities.h | 28 + src/qemu/qemu_command.c | 219 +- src/qemu/qemu_domain.c | 47 +- src/qemu/qemu_domain_address.c | 69 +- src/qemu/qemu_driver.c | 9 +- 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 | 4 +- .../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 | 1 + .../qemu_2.12.0-virt.aarch64.xml | 1 + .../qemu_2.12.0.ppc64.xml | 1 + .../qemu_2.12.0.s390x.xml | 1 + .../qemu_2.12.0.x86_64.xml | 1 + .../qemu_2.6.0-virt.aarch64.xml | 1 + .../qemu_2.6.0.aarch64.xml | 1 + .../domaincapsschemadata/qemu_2.6.0.ppc64.xml | 1 + .../qemu_2.6.0.x86_64.xml | 1 + .../domaincapsschemadata/qemu_2.7.0.s390x.xml | 1 + .../qemu_2.8.0-tcg.x86_64.xml | 1 + .../domaincapsschemadata/qemu_2.8.0.s390x.xml | 1 + .../qemu_2.8.0.x86_64.xml | 1 + .../qemu_2.9.0-q35.x86_64.xml | 1 + .../qemu_2.9.0-tcg.x86_64.xml | 1 + .../qemu_2.9.0.x86_64.xml | 1 + .../domaincapsschemadata/qemu_3.0.0.s390x.xml | 1 + .../qemu_4.0.0.x86_64.xml | 153 + tests/domaincapstest.c | 4 + .../caps_4.0.0.x86_64.replies | 23180 ++++++++++++++++ .../caps_4.0.0.x86_64.xml | 1404 + tests/qemucapabilitiestest.c | 1 + .../virtio-non-transitional.x86_64-3.1.0.args | 63 + ...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 | 17 + 59 files changed, 26031 insertions(+), 112 deletions(-) create mode 100644 tests/domaincapsschemadata/qemu_4.0.0.x86_64.xml create mode 100644 tests/qemucapabilitiesdata/caps_4.0.0.x86_64.replies create mode 100644 tests/qemucapabilitiesdata/caps_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 Signed-off-by: Cole Robinson Signed-off-by: Cole Robinson Reviewed-by: Andrea Bolognani