>From c3f1150bb3b0618e08ff21bf302363b36aaea863 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Thu, 7 Nov 2013 21:36:59 +0100 Subject: [PATCH 2/2] pflash_cfi01: flash memory should take priority over "pci-hole" After commit a53ae8e9 ("hw/pci: partially handle pci master abort"), the "pci-hole" alias provides a window into the "pci-master-abort" memory range. This range throws away writes and returns 0xFFFFFFFF for all reads. Unfortunately, "pci-hole" has been in conflict with (and incidentally taking priority over) "system.flash" for some time. This problem is exposed now that commit a53ae8e9 made "pci-master-abort" appear in "pci-hole" -- the flash has become invisible. The problem can be triggered by running OVMF from flash (with the -pflash option instead of -bios) on KVM 3.7+. Fix it by raising the priority of flash, so that its relationship with "pci-hole" is reversed. Its relationship with some other overlapping ranges seems to change as well, but in my testing this had no adverse effects. The neighbor "pflash_cfi02" is not touched (although the fix should apply the same), due to lack of a test case. Signed-off-by: Laszlo Ersek --- hw/block/pflash_cfi01.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 018a967..ab39ac2 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -765,7 +765,7 @@ pflash_t *pflash_cfi01_register(hwaddr base, qdev_prop_set_string(dev, "name", name); qdev_init_nofail(dev); - sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base); + sysbus_mmio_map_overlap(SYS_BUS_DEVICE(dev), 0, base, 2048); return CFI_PFLASH01(dev); } -- 1.8.3.1