From: Paolo Bonzini <pbonzini@redhat.com>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org, agraf@suse.de
Subject: Re: [Qemu-devel] [PATCH 4/7] ppc: move sdr1 value change detection logic to helper_store_sdr1()
Date: Tue, 20 Jan 2015 16:58:08 +0100 [thread overview]
Message-ID: <54BE7B10.90902@redhat.com> (raw)
In-Reply-To: <54BE72EC.9090602@ilande.co.uk>
On 20/01/2015 16:23, Mark Cave-Ayland wrote:
> On 20/01/15 14:57, Paolo Bonzini wrote:
>
>> On 23/12/2014 01:36, Mark Cave-Ayland wrote:
>>> Otherwise when cpu_post_load calls ppc_store_sdr1() when restoring a VM
>>> snapshot the value is deemed unchanged and so the internal env->htab*
>>> variables aren't set correctly.
>>>
>>> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>>> CC: Paolo Bonzini <pbonzini@redhat.com>
>>> ---
>>> target-ppc/misc_helper.c | 7 ++++++-
>>> target-ppc/mmu_helper.c | 35 +++++++++++++++--------------------
>>> 2 files changed, 21 insertions(+), 21 deletions(-)
>>>
>>> diff --git a/target-ppc/misc_helper.c b/target-ppc/misc_helper.c
>>> index a577b3a..6b12ca8 100644
>>> --- a/target-ppc/misc_helper.c
>>> +++ b/target-ppc/misc_helper.c
>>> @@ -77,8 +77,13 @@ void helper_msr_facility_check(CPUPPCState *env, uint32_t bit,
>>>
>>> void helper_store_sdr1(CPUPPCState *env, target_ulong val)
>>> {
>>> + PowerPCCPU *cpu = ppc_env_get_cpu(env);
>>> +
>>> if (!env->external_htab) {
>>> - ppc_store_sdr1(env, val);
>>> + if (env->spr[SPR_SDR1] != val) {
>>> + ppc_store_sdr1(env, val);
>>> + tlb_flush(CPU(cpu), 1);
>>
>> Possibly stupid question: should this tlb_flush be in ppc_store_sdr1,
>> maybe guarded by "if (tcg_enabled())"?
>>
>> Apart from this, the patch is okay.
>
> Thanks Paolo. I based this patch upon a comment in a slightly earlier
> thread here:
> http://lists.gnu.org/archive/html/qemu-devel/2014-12/msg03146.html.
>
> Is this still relevant or would you still like me to make the change?
> This is a little beyond my area of knowledge, but at the very least I
> can test any suggested changes under TCG fairly easily.
No big deal, it's really just personal preference and as you saw even
that can change easily...
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
next prev parent reply other threads:[~2015-01-20 15:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-23 0:36 [Qemu-devel] [PATCH 0/7] ppc: loadvm/savevm fixups for -M g3beige and -M mac99 Mark Cave-Ayland
2014-12-23 0:36 ` [Qemu-devel] [PATCH 1/7] macio.c: include parent PCIDevice state in VMStateDescription Mark Cave-Ayland
2014-12-23 0:36 ` [Qemu-devel] [PATCH 2/7] adb.c: include ADBDevice parent state in KBDState and MouseState Mark Cave-Ayland
2014-12-23 0:36 ` [Qemu-devel] [PATCH 3/7] cuda.c: include adb_poll_timer in VMStateDescription Mark Cave-Ayland
2014-12-23 0:36 ` [Qemu-devel] [PATCH 4/7] ppc: move sdr1 value change detection logic to helper_store_sdr1() Mark Cave-Ayland
2015-01-20 14:57 ` Paolo Bonzini
2015-01-20 15:23 ` Mark Cave-Ayland
2015-01-20 15:58 ` Paolo Bonzini [this message]
2014-12-23 0:36 ` [Qemu-devel] [PATCH 5/7] ppc: force update of all msr bits in cpu_post_load Mark Cave-Ayland
2015-01-20 15:01 ` Paolo Bonzini
2015-01-21 15:12 ` Mark Cave-Ayland
2014-12-23 0:36 ` [Qemu-devel] [PATCH 6/7] openpic: fix segfault on -M mac99 savevm Mark Cave-Ayland
2014-12-23 0:36 ` [Qemu-devel] [PATCH 7/7] openpic: fix up loadvm under -M mac99 Mark Cave-Ayland
2015-01-20 14:46 ` [Qemu-devel] [PATCH 0/7] ppc: loadvm/savevm fixups for -M g3beige and " Mark Cave-Ayland
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=54BE7B10.90902@redhat.com \
--to=pbonzini@redhat.com \
--cc=agraf@suse.de \
--cc=mark.cave-ayland@ilande.co.uk \
--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).