aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio/virtio-pci.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-09-29 11:10:29 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-09-29 11:10:29 +0100
commit213057383c9f73a17cfe635b204d88e11f918df1 (patch)
treef3a1da40a8e48e3b8aaff8d355610e219c0de1cf /hw/virtio/virtio-pci.c
parent23290e8070fa18dd8ff930515326e76eeee5810a (diff)
parent8138405528c29af2a850cd672a8f8a0b33b7ab40 (diff)
downloadqemu-213057383c9f73a17cfe635b204d88e11f918df1.zip
qemu-213057383c9f73a17cfe635b204d88e11f918df1.tar.gz
qemu-213057383c9f73a17cfe635b204d88e11f918df1.tar.bz2
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
virtio,pc,acpi: fixes, tests Fixes and tests all over the place. Batch iommu updates for vdpa. Removal of deprecated cpu hotplug commands. SMBIOS OEM string support. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Tue 29 Sep 2020 08:09:21 BST # gpg: using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469 # gpg: issuer "mst@redhat.com" # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full] # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" [full] # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469 * remotes/mst/tags/for_upstream: (48 commits) libvhost-user: return on error in vu_log_queue_fill() libvhost-user: return early on virtqueue errors hw: virtio-pmem: detach the element fromt the virtqueue when error occurs tests/acpi: update golden master DSDT binary table blobs for q35 piix4: don't reserve hw resources when hotplug is off globally Add ACPI DSDT tables for q35 that are being updated by the next patch tests/acpi: add newly added acpi DSDT table blob for pci bridge hotplug flag tests/acpi: unit test for 'acpi-pci-hotplug-with-bridge-support' bridge flag tests/acpi: list added acpi table binary file for pci bridge hotplug test i440fx/acpi: do not add hotplug related amls for cold plugged bridges Fix a gap where acpi_pcihp_find_hotplug_bus() returns a non-hotpluggable bus tests/acpi: add a new ACPI table in order to test root pci hotplug on/off tests/acpi: add new unit test to test hotplug off/on feature on the root pci bus tests/acpi: mark addition of table DSDT.roothp for unit testing root pci hotplug vhost-user: save features of multiqueues if chardev is closed qemu-options: document SMBIOS type 11 settings hw/smbios: report error if table size is too large hw/smbios: support loading OEM strings values from a file tests: acpi: update acpi blobs with new AML x68: acpi: trigger SMI before sending hotplug Notify event to OSPM ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/virtio/virtio-pci.c')
-rw-r--r--hw/virtio/virtio-pci.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 02790e3..36524a5 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1597,8 +1597,18 @@ static void virtio_pci_device_plugged(DeviceState *d, Error **errp)
if (legacy) {
if (!virtio_legacy_allowed(vdev)) {
- error_setg(errp, "device is modern-only, use disable-legacy=on");
- return;
+ /*
+ * To avoid migration issues, we allow legacy mode when legacy
+ * check is disabled in the old machine types (< 5.1).
+ */
+ if (virtio_legacy_check_disabled(vdev)) {
+ warn_report("device is modern-only, but for backward "
+ "compatibility legacy is allowed");
+ } else {
+ error_setg(errp,
+ "device is modern-only, use disable-legacy=on");
+ return;
+ }
}
if (virtio_host_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM)) {
error_setg(errp, "VIRTIO_F_IOMMU_PLATFORM was supported by"