qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <lvivier@redhat.com>
To: Alexander Graf <agraf@suse.de>,
	David Gibson <david@gibson.dropbear.id.au>,
	peter.maydell@linaro.org
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, thuth@redhat.com,
	mdroth@linux.vnet.ibm.com, aik@ozlabs.ru
Subject: Re: [Qemu-devel] [PULL 095/107] spapr: clock should count only if vm is running
Date: Mon, 18 Dec 2017 11:17:27 +0100	[thread overview]
Message-ID: <4a422e67-838d-6938-cf51-680fec8befa3@redhat.com> (raw)
In-Reply-To: <e98bc5f2-3bbf-1915-feac-3e88182e28c7@suse.de>

On 13/12/2017 20:59, Alexander Graf wrote:
> 
> 
> On 13.12.17 20:29, Laurent Vivier wrote:
>> On 13/12/2017 20:19, Alexander Graf wrote:
>>>
>>>
>>> On 02.02.17 06:14, David Gibson wrote:
>>>> From: Laurent Vivier <lvivier@redhat.com>
>>>>
>>>> This is a port to ppc of the i386 commit:
>>>>     00f4d64 kvmclock: clock should count only if vm is running
>>>>
>>>> We remove timebase_post_load function, and use the VM state
>>>> change handler to save and restore the guest_timebase (on stop
>>>> and continue).
>>>>
>>>> We keep timebase_pre_save to reduce the clock difference on
>>>> migration like in:
>>>>     6053a86 kvmclock: reduce kvmclock difference on migration
>>>>
>>>> Time base offset has originally been introduced by commit
>>>>     98a8b52 spapr: Add support for time base offset migration
>>>>
>>>> So while VM is paused, the time is stopped. This allows to have
>>>> the same result with date (based on Time Base Register) and
>>>> hwclock (based on "get-time-of-day" RTAS call).
>>>>
>>>> Moreover in TCG mode, the Time Base is always paused, so this
>>>> patch also adjust the behavior between TCG and KVM.
>>>>
>>>> VM state field "time_of_the_day_ns" is now useless but we keep
>>>> it to be able to migrate to older version of the machine.
>>>>
>>>> As vmstate_ppc_timebase structure (with timebase_pre_save() and
>>>> timebase_post_load() functions) was only used by vmstate_spapr,
>>>> we register the VM state change handler only in ppc_spapr_init().
>>>>
>>>> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
>>>> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
>>>
>>> Just a small heads-up: I've been debugging an OpenQA regression lately
>>> where our automated testing regressed with QEMU 2.9. With stock 2.9.1, I
>>> get a failure rate of "weird" effects (probably TB divergence between
>>> vcpus) of ~30%. With this patch reverted it's back to 0%.
>>>
>>> I *think* something here causes the TB offset of multiple threads (I'm
>>> running -smp 2,threads=2) to diverge.
>>>
>>> I'll keep debugging things tomorrow, but I'll be happy to see anyone
>>> else beat me to analyze what is going wrong ;).
>>
>> Don't know if it can be related, but for migration we need:
> 
> 
> As expected, this did not fix it. I'll keep digging.
> 
> My hunch is that we now set VTB on different cores at different times,
> introducing tiny VTB offsets which can lead to negative TB differences
> inside the guest.

Did you find where is the problem?

Can I help?

Thanks,
Laurent

  parent reply	other threads:[~2017-12-18 10:17 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
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 [this message]
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=4a422e67-838d-6938-cf51-680fec8befa3@redhat.com \
    --to=lvivier@redhat.com \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=david@gibson.dropbear.id.au \
    --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).