From da7e13c00b5962016b9c72079bef5e0a5398db0d Mon Sep 17 00:00:00 2001 From: Cornelia Huck Date: Wed, 31 Mar 2021 13:19:00 +0200 Subject: hw: add compat machines for 6.1 Add 6.1 machine types for arm/i440fx/q35/s390x/spapr. Signed-off-by: Cornelia Huck Acked-by: Greg Kurz Message-id: 20210331111900.118274-1-cohuck@redhat.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/core/machine.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'hw/core') diff --git a/hw/core/machine.c b/hw/core/machine.c index 40def78..cebcdcc 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -36,6 +36,9 @@ #include "hw/virtio/virtio.h" #include "hw/virtio/virtio-pci.h" +GlobalProperty hw_compat_6_0[] = {}; +const size_t hw_compat_6_0_len = G_N_ELEMENTS(hw_compat_6_0); + GlobalProperty hw_compat_5_2[] = { { "ICH9-LPC", "smm-compat", "on"}, { "PIIX4_PM", "smm-compat", "on"}, -- cgit v1.1 From a6091108aa44e9017af4ca13c43f55a629e3744c Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Thu, 25 Mar 2021 16:33:15 +0000 Subject: hw/pci-host/gpex: Don't fault for unmapped parts of MMIO and PIO windows Currently the gpex PCI controller implements no special behaviour for guest accesses to areas of the PIO and MMIO where it has not mapped any PCI devices, which means that for Arm you end up with a CPU exception due to a data abort. Most host OSes expect "like an x86 PC" behaviour, where bad accesses like this return -1 for reads and ignore writes. In the interests of not being surprising, make host CPU accesses to these windows behave as -1/discard where there's no mapped PCI device. The old behaviour generally didn't cause any problems, because almost always the guest OS will map the PCI devices and then only access where it has mapped them. One corner case where you will see this kind of access is if Linux attempts to probe legacy ISA devices via a PIO window access. So far the only case where we've seen this has been via the syzkaller fuzzer. Reported-by: Dmitry Vyukov Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Acked-by: Michael S. Tsirkin Message-id: 20210325163315.27724-1-peter.maydell@linaro.org Fixes: https://bugs.launchpad.net/qemu/+bug/1918917 Signed-off-by: Peter Maydell --- hw/core/machine.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hw/core') diff --git a/hw/core/machine.c b/hw/core/machine.c index cebcdcc..0f5ce43 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -36,7 +36,9 @@ #include "hw/virtio/virtio.h" #include "hw/virtio/virtio-pci.h" -GlobalProperty hw_compat_6_0[] = {}; +GlobalProperty hw_compat_6_0[] = { + { "gpex-pcihost", "allow-unmapped-accesses", "false" }, +}; const size_t hw_compat_6_0_len = G_N_ELEMENTS(hw_compat_6_0); GlobalProperty hw_compat_5_2[] = { -- cgit v1.1