* [Qemu-devel] [PATCH for-2.10] exec: Disable "execute from MMIO memory region" feature
@ 2017-07-28 10:12 Peter Maydell
0 siblings, 0 replies; only message in thread
From: Peter Maydell @ 2017-07-28 10:12 UTC (permalink / raw)
To: qemu-devel
Cc: patches, Dr. David Alan Gilbert, Edgar E. Iglesias, Paolo Bonzini,
Richard Henderson, KONRAD Frederic, Juan Quintela
Unfortunately it turns out that the implementation of the "execute
from MMIO memory region" feature does not interact well with
migration: it creates and destroys RAMBlocks on the fly, but
migration assumes that the set of RAMBlocks is fixed while migration
is in progress. The effect is that migration will either fail (if
the on-the-fly RAMBlock exists already when migration starts) or may
behave strangely (if the RAMBlock is created or destroyed while a
migration is in progress).
This is too complicated to try to fix in 2.10, so for this release,
simply disable the new feature. We can reenable and fix or redesign
it in 2.11.
This commit simply removes the code in get_page_addr_code() which
would trigger the execute-from-MMIO, and leaves the bulk of the code
(and the implementation of the per-device code in the xilinx-spips
device) in place, unused.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
This is a very blunt hammer approach to the problem. There may be
slightly more surgical approaches possible, but we're getting close
to 2.10 release, so this is just the minimal "make sure we don't have
a problem in 2.10" change, so we can do the right thing in 2.11.
If somebody who has a more immediate requirement for the feature
wants to propose something else, that would be OK too, but they
need to write the patch...
accel/tcg/cputlb.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
index 85635ae..64f9600 100644
--- a/accel/tcg/cputlb.c
+++ b/accel/tcg/cputlb.c
@@ -858,16 +858,6 @@ tb_page_addr_t get_page_addr_code(CPUArchState *env, target_ulong addr)
pd = iotlbentry->addr & ~TARGET_PAGE_MASK;
mr = iotlb_to_region(cpu, pd, iotlbentry->attrs);
if (memory_region_is_unassigned(mr)) {
- qemu_mutex_lock_iothread();
- if (memory_region_request_mmio_ptr(mr, addr)) {
- qemu_mutex_unlock_iothread();
- /* A MemoryRegion is potentially added so re-run the
- * get_page_addr_code.
- */
- return get_page_addr_code(env, addr);
- }
- qemu_mutex_unlock_iothread();
-
cpu_unassigned_access(cpu, addr, false, true, 0, 4);
/* The CPU's unassigned access hook might have longjumped out
* with an exception. If it didn't (or there was no hook) then
--
2.7.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-07-28 10:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-28 10:12 [Qemu-devel] [PATCH for-2.10] exec: Disable "execute from MMIO memory region" feature Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).