qemu-s390x
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]