qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: patches@linaro.org,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Richard Henderson <rth@twiddle.net>,
	KONRAD Frederic <frederic.konrad@adacore.com>,
	Juan Quintela <quintela@redhat.com>
Subject: [Qemu-devel] [PATCH for-2.10] exec: Disable "execute from MMIO memory region" feature
Date: Fri, 28 Jul 2017 11:12:49 +0100	[thread overview]
Message-ID: <1501236769-1766-1-git-send-email-peter.maydell@linaro.org> (raw)

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

                 reply	other threads:[~2017-07-28 10:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1501236769-1766-1-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=dgilbert@redhat.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=frederic.konrad@adacore.com \
    --cc=patches@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).