All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Konrad <fred.konrad@greensocs.com>
To: qemu-devel <qemu-devel@nongnu.org>, mttcg@listserver.greensocs.com
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Jan Kiszka <jan.kiszka@siemens.com>,
	Alexander Graf <agraf@suse.de>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: [Qemu-devel] CPU TLB flush with multithread TCG.
Date: Mon, 09 Feb 2015 11:02:08 +0100	[thread overview]
Message-ID: <54D885A0.3080609@greensocs.com> (raw)

Hi everybody,

In multithread tlb_flush is broken as CPUA can flush an other CPUB and 
CPUB can be
executing code, and fixing this can be quite hard:
   * We need to exit the CPU which is flushed.
   * Makes sure the CPU is stopped.
   * Then we can flush tlb.
The big issues are:
   * Two threads can be doing a flush at the same time.
   * Something can restart the CPU during the flush.

A better idea I think is that instead of flushing tlb we can put a flag 
in CPUState such
as flush_request and ask the cpu to exit.
Then later once the CPU is exited we can flush tlbs if flush_request is set.
It will ensure that the CPU won't execute code as it's associated thread 
will be
flushing.

Can this work?

Thanks,
Fred

             reply	other threads:[~2015-02-09 10:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-09 10:02 Frederic Konrad [this message]
2015-02-11  3:33 ` [Qemu-devel] CPU TLB flush with multithread TCG Alex Bennée
2015-02-11  8:35   ` Mark Burton
2015-02-11  8:42   ` Frederic Konrad
2015-02-11 17:17     ` Frederic Konrad

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=54D885A0.3080609@greensocs.com \
    --to=fred.konrad@greensocs.com \
    --cc=agraf@suse.de \
    --cc=jan.kiszka@siemens.com \
    --cc=mttcg@listserver.greensocs.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.