From patchwork Thu Jan 28 21:14:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 60767 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp726318lbb; Thu, 28 Jan 2016 13:17:16 -0800 (PST) X-Received: by 10.140.239.79 with SMTP id k76mr6967140qhc.87.1454015835777; Thu, 28 Jan 2016 13:17:15 -0800 (PST) Return-Path: Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com. [209.132.183.25]) by mx.google.com with ESMTPS id b84si10263143qha.49.2016.01.28.13.17.14 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 28 Jan 2016 13:17:15 -0800 (PST) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.25 as permitted sender) client-ip=209.132.183.25; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.25 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u0SLEVfc005815; Thu, 28 Jan 2016 16:14:31 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u0SLETvP003617 for ; Thu, 28 Jan 2016 16:14:29 -0500 Received: from colepc.redhat.com (ovpn-113-198.phx2.redhat.com [10.3.113.198]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0SLEQma014718; Thu, 28 Jan 2016 16:14:28 -0500 From: Cole Robinson To: libvirt-list@redhat.com Date: Thu, 28 Jan 2016 16:14:20 -0500 Message-Id: <03d4606d7b9e75450457af074f3358a6afb54722.1454013286.git.crobinso@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Andrea Bolognani , Laine Stump Subject: [libvirt] [PATCH 1/2] qemu: aarch64: Don't add PCIe controller by default 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: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com This was discussed here: https://www.redhat.com/archives/libvir-list/2015-December/msg00217.html The summary is that apps/users are in a tough spot WRT aarch64 -M virt and PCIe support: qemu has all the plumbing, but most distros don't support it yet. Presently libvirt adds a PCIe controller to the XML for new enough qemu, but this patch drops that behavior. Upcoming patches will instead require users to manually specify a pcie controller in the XML as a way of telling libvirt 'the OS supports PCI', at which point libvirt can use it as a target for virtio-pci. --- src/qemu/qemu_domain.c | 4 ---- .../qemuxml2argv-aarch64-virtio-pci-default.args | 2 -- tests/qemuxml2argvtest.c | 6 ++---- .../qemuxml2xmlout-aarch64-virtio-pci-default.xml | 10 ---------- tests/qemuxml2xmltest.c | 2 ++ 5 files changed, 4 insertions(+), 20 deletions(-) -- 2.5.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 1df1b74..aea1ea5 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1109,10 +1109,6 @@ qemuDomainDefAddDefaultDevices(virDomainDefPtr def, case VIR_ARCH_AARCH64: addDefaultUSB = false; addDefaultMemballoon = false; - if (STREQ(def->os.machine, "virt") || - STRPREFIX(def->os.machine, "virt-")) { - addPCIeRoot = virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_GPEX); - } break; case VIR_ARCH_PPC64: diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.args index a49bc82..f879560 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.args @@ -21,8 +21,6 @@ QEMU_AUDIO_DRV=none \ -initrd /aarch64.initrd \ -append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \ -dtb /aarch64.dtb \ --device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1 \ --device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x1 \ -device virtio-serial-device,id=virtio-serial0 \ -usb \ -drive file=/aarch64.raw,format=raw,if=none,id=drive-virtio-disk0 \ diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index cfb46ef..b2f636e 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1642,9 +1642,7 @@ mymain(void) QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM); /* Demonstrates the virtio-pci default... namely that there isn't any! - q35 style PCI controllers will be added if the binary supports it, - but virtio-mmio is always used unless PCI addresses are manually - specified. */ + However this might change in the future... */ DO_TEST("aarch64-virtio-pci-default", QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB, QEMU_CAPS_DEVICE_VIRTIO_MMIO, @@ -1653,7 +1651,7 @@ mymain(void) QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE); /* Example of using virtio-pci with no explicit PCI controller but with manual PCI addresses */ - DO_TEST("aarch64-virtio-pci-manual-addresses", + DO_TEST_PARSE_ERROR("aarch64-virtio-pci-manual-addresses", QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB, QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-default.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-default.xml index 6f1c53b..db2119c 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-default.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-default.xml @@ -31,16 +31,6 @@
- - - -
- - - - -
-
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 581129c..cac401c 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -731,12 +731,14 @@ mymain(void) QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_VIRTIO_SCSI); + /* DO_TEST_FULL("aarch64-virtio-pci-manual-addresses", WHEN_ACTIVE, QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB, QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_VIRTIO_SCSI); + */ DO_TEST("aarch64-gic"); DO_TEST("aarch64-gicv3");