From: Laurent Vivier <lvivier@redhat.com>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
David Gibson <david@gibson.dropbear.id.au>,
peter.maydell@linaro.org
Cc: agraf@suse.de, thuth@redhat.com, aik@ozlabs.ru,
qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com,
qemu-ppc@nongnu.org
Subject: Re: [Qemu-devel] [PULL 095/107] spapr: clock should count only if vm is running
Date: Tue, 7 Feb 2017 16:46:06 +0100 [thread overview]
Message-ID: <ff33796b-742b-f54c-a3c7-ee19b9d23759@redhat.com> (raw)
In-Reply-To: <824f7332-4893-fa64-d61d-7cb9497e5371@ilande.co.uk>
On 02/02/2017 16:50, Mark Cave-Ayland wrote:
> On 02/02/17 14:20, Laurent Vivier wrote:
>
>> I think adding the the PPCTimebase field and the VMSTATE_PPC_TIMEBASE_V
>> macro to the PMac machines should fix your issue.
>>
>> Do you have a test case I can try?
>>
>> Laurent
>
> Hi Laurent,
>
> Yes I'd say that is required, although I still think you need to migrate
> the decrementer value as per the comments on
> https://lists.gnu.org/archive/html/qemu-devel/2016-01/msg00546.html.
>
> Here's the reproducer from an off-list email I sent last year:
>
> 1) Download https://www.ilande.co.uk/tmp/darwin_empty.qcow2.xz and
> decompress the image (it's a pre-partitioned empty Apple Partition Map disk)
>
> 2) Download https://opensource.apple.com/static/iso/darwinppc-602.cdr.gz
> image, gunzip it and rename with .iso extension
>
> 3) Start QEMU using the attached "empty" disk like this:
>
> ./qemu-system-ppc -hda darwin_empty.qcow2 -cdrom darwinppc-602.iso -boot d
>
> 4) Start the installer in the guest and you'll see lots of files with
> ASCII progress bars as the various files are copied to disk
>
> Then to see the problem with the progress bar, repeat the following:
>
> 5) Pause the VM
>
> 6) Issue "savevm foo" in the monitor
>
> 7) Exit QEMU
>
> 8) Start QEMU again as below:
>
> ./qemu-system-ppc -hda darwin_empty.qcow2 -cdrom darwinppc-602.iso -boot
> d -loadvm foo
>
> If you do this enough times (maybe 10 or so?) you'll see the progress
> bars stop working correctly and get out of sync, i.e. it will freeze for
> long periods of time and then "jump" to catch-up but not all the way.
>
> With my above patch applied to include the decrementer in the migration,
> the bug was no longer visible in my tests.
Thank you for all these details.
I've been able to reproduce the problem, and I think the proposition you
did in:
https://lists.gnu.org/archive/html/qemu-devel/2016-01/msg01114.html
is the good one:
diff --git a/target/ppc/machine.c b/target/ppc/machine.c
index df9f7a4..1dc95b8 100644
--- a/target/ppc/machine.c
+++ b/target/ppc/machine.c
@@ -172,6 +172,7 @@ static void cpu_pre_save(void *opaque)
env->spr[SPR_CFAR] = env->cfar;
#endif
env->spr[SPR_BOOKE_SPEFSCR] = env->spe_fscr;
+ env->spr[SPR_DECR] = cpu_ppc_load_decr(env);
for (i = 0; (i < 4) && (i < env->nb_BATs); i++) {
env->spr[SPR_DBAT0U + 2*i] = env->DBAT[0][i];
@@ -214,6 +215,7 @@ static int cpu_post_load(void *opaque, int version_id)
env->cfar = env->spr[SPR_CFAR];
#endif
env->spe_fscr = env->spr[SPR_BOOKE_SPEFSCR];
+ cpu_ppc_store_decr(env, env->spr[SPR_DECR]);
for (i = 0; (i < 4) && (i < env->nb_BATs); i++) {
env->DBAT[0][i] = env->spr[SPR_DBAT0U + 2*i];
It's interesting because it doesn't break migration between different
qemu releases as the register is already part of the migration stream.
It was just not updated in the case of TCG (KVM is keeping it alive).
And in case of KVM, calling cpu_ppc_load_decr()/cpu_ppc_store_decr()
will not break anything as:
- cpu_ppc_load_decr() returns "env->spr[SPR_DECR]",
- cpu_ppc_store_decr() does nothing.
Could you re-send this patch with your S-o-b, please?
Thanks,
Laurent
next prev parent reply other threads:[~2017-02-07 15:46 UTC|newest]
Thread overview: 130+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-02 5:12 [Qemu-devel] [PULL 000/107] ppc-for-2.9 queue 20170202 David Gibson
2017-02-02 5:12 ` [Qemu-devel] [PULL 001/107] disas/ppc: Fix indefinite articles in comments David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 002/107] target-ppc: Consolidate instruction decode helpers David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 003/107] target-ppc: rename CRF_* defines as CRF_*_BIT David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 004/107] target-ppc: Fix xscmpodp and xscmpudp instructions David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 005/107] target-ppc: Add xscmpexp[dp, qp] instructions David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 006/107] target-ppc: Add xscmpoqp and xscmpuqp instructions David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 007/107] target-ppc: implement lxsd and lxssp instructions David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 008/107] target-ppc: implement stxsd and stxssp David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 009/107] target-ppc: implement lxv/lxvx and stxv/stxvx David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 010/107] target-ppc: Implement bcdcfsq. instruction David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 011/107] target-ppc: Implement bcdctsq. instruction David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 012/107] target-ppc: Implement bcdcpsgn. instruction David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 013/107] target-ppc: Implement bcdsetsgn. instruction David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 014/107] target-ppc: add vextu[bhw][lr]x instructions David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 015/107] pseries: Always use core objects for CPU construction David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 016/107] pseries: Make cpu_update during CAS unconditional David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 017/107] ppc: Clean up and QOMify hypercall emulation David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 018/107] ppc: Rename cpu_version to compat_pvr David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 019/107] ppc/spapr: implement H_SIGNAL_SYS_RESET David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 020/107] target-ppc: move ppc_vsr_t to common header David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 021/107] target-ppc: implement stop instruction David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 022/107] target-ppc: implement xsabsqp/xsnabsqp instruction David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 023/107] target-ppc: Implement bcd_is_valid function David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 024/107] target-ppc: implement xsnegqp instruction David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 025/107] target-ppc: implement xscpsgnqp instruction David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 026/107] target-ppc: Add xxperm and xxpermr instructions David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 027/107] target-ppc: implement lxvl instruction David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 028/107] target-ppc: implement lxvll instruction David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 029/107] target-ppc: implement stxvl instruction David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 030/107] target-ppc: implement stxvll instructions David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 031/107] hw/ppc/spapr: Fix boot path of usb-host storage devices David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 032/107] prep: do not use global variable to access nvram David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 033/107] pseries: Add pseries-2.9 machine type David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 034/107] ppc: Rewrite ppc_set_compat() David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 035/107] ppc: Rewrite ppc_get_compat_smt_threads() David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 036/107] ppc: Validate compatibility modes when setting David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 037/107] qtest: add netfilter tests for ppc64 David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 038/107] qtest: add display-vga-test to ppc64 David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 039/107] libqos: fix spapr qpci_map() David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 040/107] qtest: convert ivshmem-test to use libqos David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 041/107] qtest: add ivshmem-test for ppc64 David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 042/107] hw/gpio: QOM'ify mpc8xxx.c David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 043/107] hw/ppc: QOM'ify e500.c David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 044/107] hw/ppc: QOM'ify ppce500_spin.c David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 045/107] hw/ppc: QOM'ify spapr_vio.c David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 046/107] target-ppc: Add xxextractuw instruction David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 047/107] target-ppc: Add xxinsertw instruction David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 048/107] prep: add PReP System I/O David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 049/107] prep: add IBM RS/6000 7020 (40p) memory controller David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 050/107] prep: add IBM RS/6000 7020 (40p) machine emulation David Gibson
2017-02-12 21:15 ` Artyom Tarasenko
2017-02-18 22:31 ` Hervé Poussineau
2017-02-02 5:13 ` [Qemu-devel] [PULL 051/107] target-ppc: Use float64 arg in helper_compute_fprf() David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 052/107] target-ppc: Replace isden by float64_is_zero_or_denormal David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 053/107] target-ppc: Rename helper_compute_fprf to helper_compute_fprf_float64 David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 054/107] target-ppc: Add xscvdphp, xscvhpdp David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 055/107] target-ppc: Use correct precision for FPRF setting David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 056/107] target-ppc: Add xsxexpdp instruction David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 057/107] target-ppc: Add xsxexpqp instruction David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 058/107] target-ppc: Add xsxsigdp instruction David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 059/107] target-ppc: Add xsxsigqp instructions David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 060/107] pxb: Restrict to x86 David Gibson
2017-02-02 5:13 ` [Qemu-devel] [PULL 061/107] pseries: Rewrite CAS PVR compatibility logic David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 062/107] ppc: Add ppc_set_compat_all() David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 063/107] target-ppc: Add xsaddqp instructions David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 064/107] target-ppc: Add xscvdpqp instruction David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 065/107] target-ppc: Add xscvqpdp instruction David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 066/107] ppc: Prevent inifnite loop in decrementer auto-reload David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 067/107] ppc: Fix a warning in bcdcfz code and improve BCD_DIG_BYTE macro David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 068/107] target-ppc: xscvqpdp zero VSR David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 069/107] softfloat: Fix the default qNAN for target-ppc David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 070/107] host-utils: Move 128-bit guard macro to .c file David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 071/107] host-utils: Implement unsigned quadword left/right shift and unit tests David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 072/107] ppc: Implement bcds. instruction David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 073/107] ppc: Implement bcdus. instruction David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 074/107] ppc: Implement bcdsr. instruction David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 075/107] target-ppc: Add xsiexpdp instruction David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 076/107] target-ppc: Add xsiexpqp instruction David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 077/107] target-ppc: Add xviexpsp instruction David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 078/107] target-ppc: Add xviexpdp instruction David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 079/107] target-ppc: Add xvxexpsp instruction David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 080/107] target-ppc: Add xvxexpdp instruction David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 081/107] target-ppc: Add xvxsigsp instruction David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 082/107] target-ppc: Add xvxsigdp instruction David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 083/107] target-ppc: Add xscvqps[d, w]z instructions David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 084/107] ppc/prep: update MAINTAINERS file David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 085/107] ppc: Implement bcdtrunc. instruction David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 086/107] ppc: Implement bcdutrunc. instruction David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 087/107] target-ppc: Use ppc_vsr_t.f128 in xscmp[o, u, exp]qp David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 088/107] target-ppc: Add xscvsdqp and xscvudqp instructions David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 089/107] target-ppc: Add xsdivqp instruction David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 090/107] target-ppc: Add xsmulqp instruction David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 091/107] target-ppc: Add xvcv[hpsp, sphp] instructions David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 092/107] powerpc/cpu-models: rename ISAv3.00 logical PVR definition David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 093/107] target/ppc: Add pcr_supported to POWER9 cpu class definition David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 094/107] ppc: Remove unused function cpu_ppc601_rtc_init() David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 095/107] spapr: clock should count only if vm is running David Gibson
2017-02-02 8:37 ` Mark Cave-Ayland
2017-02-02 9:13 ` Laurent Vivier
2017-02-02 10:40 ` Mark Cave-Ayland
2017-02-02 14:20 ` Laurent Vivier
2017-02-02 15:50 ` Mark Cave-Ayland
2017-02-07 15:46 ` Laurent Vivier [this message]
2017-02-09 13:11 ` Mark Cave-Ayland
2017-02-09 14:36 ` Laurent Vivier
2017-12-13 19:19 ` Alexander Graf
2017-12-13 19:29 ` Laurent Vivier
2017-12-13 19:33 ` Alexander Graf
2017-12-13 19:59 ` Alexander Graf
2017-12-14 7:33 ` Laurent Vivier
2017-12-18 10:17 ` Laurent Vivier
2017-02-02 5:14 ` [Qemu-devel] [PULL 096/107] target/ppc: Remove unused POWERPC_FAMILY(POWER) David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 097/107] target/ppc/cpu-models: Fix/remove bad CPU aliases David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 098/107] ppc: switch to constants within BUILD_BUG_ON David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 099/107] target-ppc: Add MMU model check for booke machines David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 100/107] target-ppc: Add xvtstdc[sp, dp] instructions David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 101/107] target-ppc: Add xststdc[sp, dp, qp] instructions David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 102/107] target/ppc/debug: Print LPCR register value if register exists David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 103/107] tcg/POWER9: NOOP the cp_abort instruction David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 104/107] target/ppc/mmu_hash64: Fix printing unsigned as signed int David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 105/107] target/ppc/mmu_hash64: Fix incorrect shift value in amr calculation David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 106/107] ppc/kvm: Handle the "family" CPU via alias instead of registering new types David Gibson
2017-02-02 5:14 ` [Qemu-devel] [PULL 107/107] hw/ppc/pnv: Use error_report instead of hw_error if a ROM file can't be found David Gibson
2017-02-02 7:41 ` [Qemu-devel] [PULL 000/107] ppc-for-2.9 queue 20170202 no-reply
2017-02-02 22:44 ` David Gibson
2017-02-03 8:36 ` [Qemu-devel] [Qemu-ppc] " Thomas Huth
2017-02-03 9:46 ` Peter Maydell
2017-02-03 10:09 ` Thomas Huth
2017-02-03 9:43 ` [Qemu-devel] " Peter Maydell
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=ff33796b-742b-f54c-a3c7-ee19b9d23759@redhat.com \
--to=lvivier@redhat.com \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=david@gibson.dropbear.id.au \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=mdroth@linux.vnet.ibm.com \
--cc=peter.maydell@linaro.org \
--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).