From: David Gibson <david@gibson.dropbear.id.au>
To: Laurent Vivier <lvivier@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>,
qemu-ppc@nongnu.org,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
Greg Kurz <groug@kaod.org>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] ppc: fix VTB migration
Date: Wed, 22 Nov 2017 10:07:14 +1100 [thread overview]
Message-ID: <20171121230714.GB2380@umbus.fritz.box> (raw)
In-Reply-To: <20171121201643.29638-1-lvivier@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2361 bytes --]
On Tue, Nov 21, 2017 at 09:16:43PM +0100, Laurent Vivier wrote:
> Migration of a system under stress (for example, with
> "stress-ng --numa 2") triggers on the destination
> some kernel watchdog messages like:
>
> NMI watchdog: BUG: soft lockup - CPU#0 stuck for 3489660870s!
> NMI watchdog: BUG: soft lockup - CPU#1 stuck for 3489660884s!
>
> This problem appears with the changes introduced by
> 42043e4 spapr: clock should count only if vm is running
>
> I think this commit only triggers the problem.
>
> Kernel computes the soft lockup duration using the
> Virtual Timebase register (VTB), not using the Timebase
> Register (TBR, the one 42043e4 stops).
>
> It appears VTB is not migrated, so this patch adds it in
> the list of the SPRs to migrate, and fixes the problem.
>
> For the migration, I've tested a migration from qemu-2.8.0 and
> pseries-2.8.0 to a patched master (qemu-2.11.0-rc1). The received
> VTB is 0 (as is it not initialized by qemu-2.8.0), but the value
> seems to be ignored by KVM and a non zero VTB is used by the kernel.
> I have no explanation for that, but as the original problem appears
> only with SMP system under stress I suspect some problems in KVM
> (I think because VTB is shared by all threads of a core).
>
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Applied to ppc-for-2.11, thanks.
> ---
> target/ppc/translate_init.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c
> index b9c49c22f2..4e11e6f489 100644
> --- a/target/ppc/translate_init.c
> +++ b/target/ppc/translate_init.c
> @@ -8081,10 +8081,10 @@ static void gen_spr_power8_ebb(CPUPPCState *env)
> /* Virtual Time Base */
> static void gen_spr_vtb(CPUPPCState *env)
> {
> - spr_register(env, SPR_VTB, "VTB",
> + spr_register_kvm(env, SPR_VTB, "VTB",
> SPR_NOACCESS, SPR_NOACCESS,
> &spr_read_tbl, SPR_NOACCESS,
> - 0x00000000);
> + KVM_REG_PPC_VTB, 0x00000000);
> }
>
> static void gen_spr_power8_fscr(CPUPPCState *env)
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2017-11-22 0:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-21 20:16 [Qemu-devel] [PATCH] ppc: fix VTB migration Laurent Vivier
2017-11-21 20:47 ` no-reply
2017-11-21 23:07 ` David Gibson [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=20171121230714.GB2380@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=dgilbert@redhat.com \
--cc=groug@kaod.org \
--cc=lvivier@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=thuth@redhat.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 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).