[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [PATCH v2 3/7] s390x/tcg: properly implement the TOD
From: |
Thomas Huth |
Subject: |
Re: [qemu-s390x] [PATCH v2 3/7] s390x/tcg: properly implement the TOD |
Date: |
Thu, 21 Jun 2018 13:44:54 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
On 20.06.2018 12:08, David Hildenbrand wrote:
> Right now, each CPU has its own TOD. Especially, the TOD will differ
> based on creation time of a CPU - e.g. when hotplugging a CPU the times
> will differ quite a lot, resulting in stall warnings in the guest.
>
> Let's use a single TOD by implementing our new TOD device. Prepare it
> for TOD-clock epoch extension.
>
> Most importantly, whenever we set the TOD, we have to update the CKC
> timer.
>
> Introduce "tcg_s390x.h" just like "kvm_s390x.h" for tcg specific
> function declarations that should not go into cpu.h.
[...]
> diff --git a/hw/s390x/tod.c b/hw/s390x/tod.c
> index c1b3438452..7495d8c057 100644
> --- a/hw/s390x/tod.c
> +++ b/hw/s390x/tod.c
> @@ -30,6 +30,17 @@ void s390_init_tod(void)
> qdev_init_nofail(DEVICE(obj));
> }
>
> +S390TODState *s390_get_tod(void)
> +{
> + static S390TODState *ts;
> +
> + if (!ts) {
> + ts = S390_TOD(object_resolve_path_type("", TYPE_S390_TOD, NULL));
> + }
> +
> + return ts;
> +}
Could you please call that function s390_get_todstate or something
similar? Otherwise it sounds like it could be used to retrieve the time,
and not the state object.
Thomas
- Re: [qemu-s390x] [PATCH v2 4/7] s390x/tcg: SET CLOCK COMPARATOR can clear CKC interrupts, (continued)
[qemu-s390x] [PATCH v2 1/7] s390x/tod: factor out TOD into separate device, David Hildenbrand, 2018/06/20
[qemu-s390x] [PATCH v2 3/7] s390x/tcg: properly implement the TOD, David Hildenbrand, 2018/06/20
Re: [qemu-s390x] [PATCH v2 3/7] s390x/tcg: properly implement the TOD,
Thomas Huth <=
[qemu-s390x] [PATCH v2 5/7] s390x/tcg: implement SET CLOCK, David Hildenbrand, 2018/06/20
[qemu-s390x] [PATCH v2 6/7] s390x/tcg: rearm the CKC timer during migration, David Hildenbrand, 2018/06/20
[qemu-s390x] [PATCH v2 7/7] s390x/tcg: fix CPU hotplug with single-threaded TCG, David Hildenbrand, 2018/06/20