From patchwork Fri Feb 8 22:11:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 157875 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1248jaa; Fri, 8 Feb 2019 14:12:46 -0800 (PST) X-Google-Smtp-Source: AHgI3Iaxl3Tv4o9OocjqHn/jgodUiYFWBKN5/+zj4qo5uZFtHKnjLS0w6Y2mQlo/4ZCvK308i4jf X-Received: by 2002:a0c:8aa1:: with SMTP id 30mr2308114qvv.1.1549663966836; Fri, 08 Feb 2019 14:12:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549663966; cv=none; d=google.com; s=arc-20160816; b=A2M576Up8CP8tYn51OQAqFO/NnZJ4q9saPV/2K806Si8jt443G9RBNmhb0Y8QQxwhp pDtFN7JVMXmi2AXBGrEiOV1qGg4tBC0B1khLqZiv6xuCVQCPu7K1XKhUUeEmao8XNOIr ESCqdYxh9z/612fS8OqgytSc2D+xNMPOubs5fmCzCu+kFc7TAHxzS+iSUvvO9qY9TeK6 YVZXlrOX7Cbz3Dtin4w4nxnsZ7Bzo+UwA6ZdexbFJS45VcekDOb8fLfa8zT50iNMGQvH RrVl5ZGJMkunUxoP7UCTE/kWU2NTe1paieQchNz4Jr8gXVz+dNiC+MkdnhNDXl9pkQ1a A0Tg== 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=sCXpi/3ZdSra2wuCPSYtAfdsuafXTlRfCLmTw6eyYj0=; b=gaRarhRlNuVJAPD1aK8uIHH5uq8Io8b542871fOL5aNwPJb0+3qnbyi3+KuP4ut8Gc hgKEF87vvh2ykvKguGE+GFfHA9jl8IOtiSG3Vj5jMRysfoOvk0QjNEoZo2QUqNYamu1P 1s1gijxPLPuudX040cqg4YGKXJVVvuKFOqFnNVip+CqOoiFxrk9EKsYzbDXEQzUh9WqP yB7V2Swzwu89JC3TUk62eAqS8sWOXqreUwgjNBui5ysFk71EFTZkJ9cjx69nn/YnsUTw 8GZgDo3X6Y2O9Kev2cAFqI5lfmyYGecdJqHFKAZnkomHTAkdqOoutz0eamrf2ZBRjj0S oncw== 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 u2si2358409qka.125.2019.02.08.14.12.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Feb 2019 14:12:46 -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-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6F493C051671; Fri, 8 Feb 2019 22:12:45 +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 367836116C; Fri, 8 Feb 2019 22:12:45 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D80FB1803390; Fri, 8 Feb 2019 22:12:44 +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 x18MCKVC008388 for ; Fri, 8 Feb 2019 17:12:20 -0500 Received: by smtp.corp.redhat.com (Postfix) id 321975C557; Fri, 8 Feb 2019 22:12:20 +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 BF2675C6A5; Fri, 8 Feb 2019 22:12:19 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Fri, 8 Feb 2019 17:11:53 -0500 Message-Id: <4647912f8705da4ba81e011e0dd652e1bfdf1ee2.1549663396.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 02/17] qemu: capabilities: Add virtio/vhost {non-}transitional X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 08 Feb 2019 22:12:46 +0000 (UTC) Add a single QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL that will be set if any of the following qemu devices are found: virtio-blk-pci-transitional virtio-blk-pci-non-transitional virtio-net-pci-transitional virtio-net-pci-non-transitional vhost-scsi-pci-transitional vhost-scsi-pci-non-transitional virtio-rng-pci-transitional virtio-rng-pci-non-transitional virtio-9p-pci-transitional virtio-9p-pci-non-transitional virtio-balloon-pci-transitional virtio-balloon-pci-non-transitional vhost-vsock-pci-transitional vhost-vsock-pci-non-transitional virtio-input-host-pci-transitional virtio-input-host-pci-non-transitional virtio-scsi-pci-transitional virtio-scsi-pci-non-transitional virtio-serial-pci-transitional virtio-serial-pci-non-transitional Signed-off-by: Cole Robinson --- src/qemu/qemu_capabilities.c | 21 +++++++++++++++++++ src/qemu/qemu_capabilities.h | 1 + .../caps_4.0.0.riscv32.xml | 1 + .../caps_4.0.0.riscv64.xml | 1 + .../caps_4.0.0.x86_64.xml | 1 + 5 files changed, 25 insertions(+) -- 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index f035e68251..8e42c1c51c 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -525,6 +525,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, "memory-backend-file.pmem", "nvdimm.unarmed", "scsi-disk.device_id", + "virtio-pci-non-transitional", ); @@ -1102,6 +1103,26 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = { { "vfio-ap", QEMU_CAPS_DEVICE_VFIO_AP }, { "zpci", QEMU_CAPS_DEVICE_ZPCI }, { "memory-backend-memfd", QEMU_CAPS_OBJECT_MEMORY_MEMFD }, + { "virtio-blk-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-blk-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-net-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-net-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "vhost-scsi-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "vhost-scsi-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-rng-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-rng-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-9p-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-9p-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-balloon-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-balloon-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "vhost-vsock-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "vhost-vsock-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-input-host-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-input-host-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-scsi-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-scsi-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-serial-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, + { "virtio-serial-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL }, }; static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioBalloon[] = { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index ba84052bca..c5e985d6b5 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -505,6 +505,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ QEMU_CAPS_OBJECT_MEMORY_FILE_PMEM, /* -object memory-backend-file,pmem= */ QEMU_CAPS_DEVICE_NVDIMM_UNARMED, /* -device nvdimm,unarmed= */ QEMU_CAPS_SCSI_DISK_DEVICE_ID, /* 'device_id' property of scsi disk */ + QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL, /* virtio *-pci-{non-}transitional devices */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml b/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml index 3d958db461..20b91663bc 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml @@ -161,6 +161,7 @@ + 3001050 0 0 diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml index 40083843f2..7f37a3709c 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml @@ -161,6 +161,7 @@ + 3001050 0 0 diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml index 109b1ff753..08f604385f 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml @@ -206,6 +206,7 @@ + 3001050 0 43100758