]> git.proxmox.com Git - mirror_qemu.git/commit - memory.c
Revert "memory: Drop FlatRange.romd_mode"
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 24 May 2016 19:26:28 +0000 (21:26 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Sun, 29 May 2016 07:11:10 +0000 (09:11 +0200)
commitb138e654a0525f009e7e7c96fc67d74baf3e011b
tree44c8c9942c095e5b5e0e16d6f3197e608ecbe730
parentd6550e9ed2e1a60d889dfb721de00d9a4e3bafbe
Revert "memory: Drop FlatRange.romd_mode"

This reverts commit 5b5660adf1fdb61db14ec681b10463b8cba633f1,
as it breaks the UEFI guest firmware (known as ArmVirtPkg or AAVMF)
running in the "virt" machine type of "qemu-system-aarch64":

Contrary to the commit message, (a->mr == b->mr) does *not* imply
that (a->romd_mode == b->romd_mode): the pflash device model calls
memory_region_rom_device_set_romd() -- for switching between the above
modes --, and that function changes mr->romd_mode but the current
AddressSpaceDispatch's FlatRange keeps the old value.  Therefore
region_del/region_add are not called on the KVM MemoryListener.

Reported-by: Drew Jones <drjones@redhat.com>
Tested-by: Drew Jones <drjones@redhat.com>
Analyzed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
memory.c