From: Anthony Liguori <anthony@codemonkey.ws>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: patches@linaro.org, qemu-devel@nongnu.org,
陳韋任 <chenwj@iis.sinica.edu.tw>, "Alexander Graf" <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH] exec.c: Clarify comment about tlb_flush() flush_global parameter
Date: Wed, 01 Feb 2012 16:11:26 -0600 [thread overview]
Message-ID: <4F29B88E.4000508@codemonkey.ws> (raw)
In-Reply-To: <1326806593-21785-1-git-send-email-peter.maydell@linaro.org>
On 01/17/2012 07:23 AM, Peter Maydell wrote:
> Clarify the comment about tlb_flush()'s flush_global parameter,
> so it is clearer what it does and why it is OK that the implementation
> currently ignores it.
>
> Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
Applied. Thanks.
Regards,
Anthony Liguori
> ---
> Minor clarification following a conversation on IRC...
>
> exec.c | 14 ++++++++++++--
> 1 files changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/exec.c b/exec.c
> index 7f9f730..f667cf0 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -1876,8 +1876,18 @@ static CPUTLBEntry s_cputlb_empty_entry = {
> .addend = -1,
> };
>
> -/* NOTE: if flush_global is true, also flush global entries (not
> - implemented yet) */
> +/* NOTE:
> + * If flush_global is true (the usual case), flush all tlb entries.
> + * If flush_global is false, flush (at least) all tlb entries not
> + * marked global.
> + *
> + * Since QEMU doesn't currently implement a global/not-global flag
> + * for tlb entries, at the moment tlb_flush() will also flush all
> + * tlb entries in the flush_global == false case. This is OK because
> + * CPU architectures generally permit an implementation to drop
> + * entries from the TLB at any time, so flushing more entries than
> + * required is only an efficiency issue, not a correctness issue.
> + */
> void tlb_flush(CPUState *env, int flush_global)
> {
> int i;
prev parent reply other threads:[~2012-02-01 22:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-17 13:23 [Qemu-devel] [PATCH] exec.c: Clarify comment about tlb_flush() flush_global parameter Peter Maydell
2012-01-30 12:04 ` Peter Maydell
2012-01-30 13:10 ` [Qemu-trivial] " Andreas Färber
2012-01-30 13:10 ` Andreas Färber
2012-02-01 22:11 ` Anthony Liguori [this message]
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=4F29B88E.4000508@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=agraf@suse.de \
--cc=chenwj@iis.sinica.edu.tw \
--cc=patches@linaro.org \
--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.