On 04.06.2018 13:57, Cornelia Huck wrote:
> On Fri, 25 May 2018 13:37:04 +0200
> David Hildenbrand <da...@redhat.com> 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.
>>
>> Signed-off-by: David Hildenbrand <da...@redhat.com>
>> ---
>>  hw/s390x/tod-qemu.c        | 45 ++++++++++++++++++++++++++++++++++----
>>  hw/s390x/tod.c             | 11 ++++++++++
>>  include/hw/s390x/tod.h     | 19 ++++++++++++++++
>>  target/s390x/cpu.c         |  8 +------
>>  target/s390x/cpu.h         |  6 ++++-
>>  target/s390x/internal.h    | 15 -------------
>>  target/s390x/misc_helper.c | 32 ++++++++++++++++++++++-----
>>  7 files changed, 103 insertions(+), 33 deletions(-)
> 
>> diff --git a/include/hw/s390x/tod.h b/include/hw/s390x/tod.h
>> index 43ed71600f..5491245b86 100644
>> --- a/include/hw/s390x/tod.h
>> +++ b/include/hw/s390x/tod.h
>> @@ -30,6 +30,9 @@ typedef struct S390TOD {
>>  typedef struct S390TODState {
>>      /* private */
>>      DeviceState parent_obj;
>> +
>> +    /* unused by KVM implementation */
>> +    S390TOD base;
> 
> Does this need some kind of migration handling?

This will be automatically migrated by migrating the TOD value itself now :)

> 
>>  } S390TODState;
>>  
>>  typedef struct S390TODClass {


-- 

Thanks,

David / dhildenb

Reply via email to