qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Nicholas Piggin <npiggin@gmail.com>,
	qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [RFC PATCH] accel/tcg: clear all TBs from a page when it is written to
Date: Wed, 21 Aug 2024 09:16:10 +1000	[thread overview]
Message-ID: <0edf7ee6-9dfe-41a3-a7ae-2f781e855b12@linaro.org> (raw)
In-Reply-To: <D3FESSMCNW22.3S68NMF7NI5KR@gmail.com>

On 8/14/24 16:09, Nicholas Piggin wrote:
>>> @@ -1107,6 +1107,9 @@ tb_invalidate_phys_page_range__locked(struct page_collection *pages,
>>>        TranslationBlock *current_tb = retaddr ? tcg_tb_lookup(retaddr) : NULL;
>>>    #endif /* TARGET_HAS_PRECISE_SMC */
>>>    
>>> +    start &= TARGET_PAGE_MASK;
>>> +    last |= ~TARGET_PAGE_MASK;
>>> +
>>>        /* Range may not cross a page. */
>>>        tcg_debug_assert(((start ^ last) & TARGET_PAGE_MASK) == 0);
>>
>> This would definitely break SMC.
> 
> They can't invalidate the instruction currently being executed?

They can.  But that's where adjusting start/last would break things, because we've lost 
track of exactly what's being modified, which changes the result of "did we modify the 
current instruction".


r~


      reply	other threads:[~2024-08-20 23:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-09  7:47 [RFC PATCH] accel/tcg: clear all TBs from a page when it is written to Nicholas Piggin
2024-08-09  8:26 ` Philippe Mathieu-Daudé
2024-08-12  1:25 ` Richard Henderson
2024-08-14  6:09   ` Nicholas Piggin
2024-08-20 23:16     ` Richard Henderson [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=0edf7ee6-9dfe-41a3-a7ae-2f781e855b12@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=npiggin@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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 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).