From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Nicholas Piggin" <npiggin@gmail.com>
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
<qemu-devel@nongnu.org>,
"Daniel Henrique Barboza" <danielhb413@gmail.com>,
"Igor Mammedov" <imammedo@redhat.com>,
"Helge Deller" <deller@gmx.de>,
"Paolo Bonzini" <pbonzini@redhat.com>, <qemu-ppc@nongnu.org>,
"Zhao Liu" <zhao1.liu@intel.com>
Subject: Re: [PATCH 2/4] target/hppa: defer hppa_ptlbe until CPU starts running
Date: Thu, 27 Feb 2025 10:10:18 +0000 [thread overview]
Message-ID: <87senzwved.fsf@draig.linaro.org> (raw)
In-Reply-To: <D833X0DADOYN.29O3TB1R6KTUI@gmail.com> (Nicholas Piggin's message of "Thu, 27 Feb 2025 19:05:47 +1000")
"Nicholas Piggin" <npiggin@gmail.com> writes:
> On Wed Feb 26, 2025 at 5:38 AM AEST, Richard Henderson wrote:
>> On 2/25/25 11:33, Richard Henderson wrote:
>>> On 2/25/25 10:46, Alex Bennée wrote:
>>>> @@ -191,7 +199,7 @@ static void hppa_cpu_realizefn(DeviceState *dev, Error **errp)
>>>> cpu->alarm_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL,
>>>> hppa_cpu_alarm_timer, cpu);
>>>> - hppa_ptlbe(&cpu->env);
>>>> + async_run_on_cpu(cs, hppa_clear_ptlbe, RUN_ON_CPU_HOST_PTR(&cpu->env));
>>>
>>> Nack, this is emulation of hardware, not softmmu.
>>
>> Hmm. I see what you're thinking about though: this function, after resetting the data
>> structures associated with the hardware emulation, also calls the softmmu flush.
>>
>> If we absolutely need to do so, I suppose delaying the hardware emulation flush to the
>> work queue isn't the worst solution. This is where the hppa patch is more correct than
>> the ppc patch which completely eliminated the hardware emulation flush.
>
> Could we expose a function that performs the hardware state reset,
> and leave the TCG flushing to the TCG CPU reset?
I did consider that - but the function is also called from helpers at
which point you also do need to flush the softmmu TLB. However someone
with better knowledge of the architecture might be able to do a slightly
more refined flush (individual pages or mmuidxs) in those cases.
>
> Thanks,
> Nick
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2025-02-27 10:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-25 18:46 [PATCH 0/4] cputlb: add tlb_flush_other_cpu Alex Bennée
2025-02-25 18:46 ` [PATCH 1/4] target/ppc: drop ppc_tlb_invalidate_all from cpu_reset Alex Bennée
2025-02-25 19:32 ` Richard Henderson
2025-02-27 0:40 ` Nicholas Piggin
2025-02-25 18:46 ` [PATCH 2/4] target/hppa: defer hppa_ptlbe until CPU starts running Alex Bennée
2025-02-25 19:33 ` Richard Henderson
2025-02-25 19:38 ` Richard Henderson
2025-02-27 9:05 ` Nicholas Piggin
2025-02-27 10:10 ` Alex Bennée [this message]
2025-02-25 18:46 ` [PATCH 3/4] cputlb: introduce tlb_flush_other_cpu for reset use Alex Bennée
2025-02-25 19:49 ` Richard Henderson
2025-02-26 14:29 ` Alex Bennée
2025-02-26 17:59 ` Richard Henderson
2025-02-25 18:46 ` [PATCH 4/4] tcg:tlb: use tcg_debug_assert() in assert_cpu_is_self() Alex Bennée
2025-02-25 20:02 ` Richard Henderson
2025-02-25 20:04 ` Richard Henderson
2025-02-26 13:42 ` Igor Mammedov
2025-02-26 13:31 ` Igor Mammedov
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=87senzwved.fsf@draig.linaro.org \
--to=alex.bennee@linaro.org \
--cc=danielhb413@gmail.com \
--cc=deller@gmx.de \
--cc=imammedo@redhat.com \
--cc=npiggin@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=zhao1.liu@intel.com \
/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.