[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [PATCH v1] s390x/tcg: fix locking problem with tcg_s390
From: |
Richard Henderson |
Subject: |
Re: [qemu-s390x] [PATCH v1] s390x/tcg: fix locking problem with tcg_s390_tod_updated |
Date: |
Fri, 29 Jun 2018 10:24:45 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
On 06/29/2018 10:05 AM, David Hildenbrand wrote:
> tcg_s390_tod_updated() is always called with the iothread being locked
> (e.g. from S390TODClass->set() e.g. via HELPER(sck) or on incomming
> migration). The helper we call takes the lock itself - bad.
>
> Let's change that by factoring out updating the ckc timer. This now looks
> much nicer than having to call a helper from another function.
>
> While touch it we also make sure that env->ckc is updated even if the new
> value is -1ULL, for now it would not have been modified in that case.
>
> Reported-by: Christian Borntraeger <address@hidden>
> Signed-off-by: David Hildenbrand <address@hidden>
> ---
>
> This survives my tests and the iotests Christian mentioned.
>
> target/s390x/misc_helper.c | 26 ++++++++++++++++----------
> 1 file changed, 16 insertions(+), 10 deletions(-)
Reviewed-by: Richard Henderson <address@hidden>
r~