diff options
author | Mark Hatle <mark.hatle@amd.com> | 2024-03-22 15:53:37 -0600 |
---|---|---|
committer | Mark Hatle <mark.hatle@amd.com> | 2024-03-26 19:02:44 -0600 |
commit | d3bb371f8a8063f59dc9b3a654530063da967627 (patch) | |
tree | 395cfa9a3bb1b1030548be573c6fc9734288055a /meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0001-xen-when-unplugging-emulated-devices-skip-virtio-dev.patch | |
parent | 13e2e08f028da93469d6a0ee18a153e9b5ae303d (diff) | |
parent | 8b38759ff39db98c29651a2d80eedb2fb1a105aa (diff) | |
download | meta-xilinx-d3bb371f8a8063f59dc9b3a654530063da967627.tar.gz |
Merge remote-tracking branch 'xilinx/rel-v2024.1' into master-next
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0001-xen-when-unplugging-emulated-devices-skip-virtio-dev.patch')
-rw-r--r-- | meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0001-xen-when-unplugging-emulated-devices-skip-virtio-dev.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0001-xen-when-unplugging-emulated-devices-skip-virtio-dev.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0001-xen-when-unplugging-emulated-devices-skip-virtio-dev.patch new file mode 100644 index 00000000..71dfb3be --- /dev/null +++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0001-xen-when-unplugging-emulated-devices-skip-virtio-dev.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From e2b85efc82bc26a838f666c8282528ee38cf6377 Mon Sep 17 00:00:00 2001 | ||
2 | From: Juergen Gross <jgross@suse.com> | ||
3 | Date: Tue, 16 Mar 2021 14:00:33 +0100 | ||
4 | Subject: [PATCH 1/8] xen: when unplugging emulated devices skip virtio devices | ||
5 | |||
6 | Virtio devices should never be unplugged at boot time, as they are | ||
7 | similar to pci passthrough devices. | ||
8 | |||
9 | Signed-off-by: Juergen Gross <jgross@suse.com> | ||
10 | Acked-by: Stefano Stabellini <stefano.stabellini@amd.com> | ||
11 | --- | ||
12 | hw/i386/xen/xen_platform.c | 9 ++++++++- | ||
13 | 1 file changed, 8 insertions(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c | ||
16 | index a64265cca0..39bbb12675 100644 | ||
17 | --- a/hw/i386/xen/xen_platform.c | ||
18 | +++ b/hw/i386/xen/xen_platform.c | ||
19 | @@ -30,6 +30,7 @@ | ||
20 | #include "hw/pci/pci.h" | ||
21 | #include "hw/xen/xen_common.h" | ||
22 | #include "migration/vmstate.h" | ||
23 | +#include "hw/virtio/virtio-bus.h" | ||
24 | #include "hw/xen/xen-legacy-backend.h" | ||
25 | #include "trace.h" | ||
26 | #include "sysemu/xen.h" | ||
27 | @@ -114,7 +115,8 @@ static void unplug_nic(PCIBus *b, PCIDevice *d, void *o) | ||
28 | /* We have to ignore passthrough devices */ | ||
29 | if (pci_get_word(d->config + PCI_CLASS_DEVICE) == | ||
30 | PCI_CLASS_NETWORK_ETHERNET | ||
31 | - && strcmp(d->name, "xen-pci-passthrough") != 0) { | ||
32 | + && strcmp(d->name, "xen-pci-passthrough") != 0 | ||
33 | + && !qdev_get_child_bus(&d->qdev, TYPE_VIRTIO_BUS)) { | ||
34 | object_unparent(OBJECT(d)); | ||
35 | } | ||
36 | } | ||
37 | @@ -191,6 +193,11 @@ static void unplug_disks(PCIBus *b, PCIDevice *d, void *opaque) | ||
38 | return; | ||
39 | } | ||
40 | |||
41 | + /* Ignore virtio devices */ | ||
42 | + if (qdev_get_child_bus(&d->qdev, TYPE_VIRTIO_BUS)) { | ||
43 | + return; | ||
44 | + } | ||
45 | + | ||
46 | switch (pci_get_word(d->config + PCI_CLASS_DEVICE)) { | ||
47 | case PCI_CLASS_STORAGE_IDE: | ||
48 | pci_xen_ide_unplug(DEVICE(d), aux); | ||
49 | -- | ||
50 | 2.25.1 | ||
51 | |||