From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Alexander Graf <agraf@suse.de>, Jason Herne <jjherne@us.ibm.com>
Cc: aik@ozlabs.ru, cornelia.huck@de.ibm.com, kvm@vger.kernel.org
Subject: Re: [[RFC] KVM-S390: Provide guest TOD Clock Get/Set Controls
Date: Thu, 09 Oct 2014 10:12:16 +0200 [thread overview]
Message-ID: <54364360.40804@de.ibm.com> (raw)
In-Reply-To: <54355065.5040903@suse.de>
Am 08.10.2014 16:55, schrieb Alexander Graf:
>
>
> On 08.10.14 16:09, Jason Herne wrote:
>> Christian Borntraeger <borntraeger@de.ibm.com> wrote on 09/22/2014
>> 05:08:34 AM:
>> ...
>>> Actually, I would expect something different (more or less something
>>> like standby/resume).
>>>
>>> In fact Jasons code that we have internally in testing is doing the
>>> simple approach
>>> 1. source reads guest time at migration end
>>> 2. target sets guest time from source
>>>
>>> So we have the guarantee that the time will never move backwards. It
>>> also works quite well for migration. As a bonus, we could really
>>> reuse the existing ioctl.
>>>
>>> I asked Jason to explore alternatives, though: I think it is somehow
>>> wrong, if you save a guest into an image file, open that one month
>>> later and the guest will always be 1 month behind unless it uses
>>> some kind of ntp. If everybody agrees that this is fine, I will
>>> queue up Jasons intial patch (simple get/set).
>>> The only question is then: shall we use an s390 specific ioctl (e.g.
>>> via VM attribute) or just use the existing KVM_SET_CLOCK.
>>> But maybe lets answer the first question before we decide on this.
>>
>> Ping. Does anyone feel strongly about this issue? I'm interested in
>> opinions so we can get s390 TOD clock migration working :).
>>
>> We need to decide which interface to use, s390 specific ioctl or
>> KVM_SET_CLOCK.
>
> I don't have any particular preference. If anything, I'm leaning towards
> KVM_SET_CLOCK.
>
>> Then we need to decide if we're going to snap a guest clock forward
>> on the resume of a "suspend to disk" type operation. The alternative
>> is to fix up the guest TOD value such that the guest notices no
>> change of time, which as Christian points out, seems wrong. Unless we
>> really want to show no time change and force the guest to use ntp to
>> figure out that he is behind.
>
> Just do it the same as x86 :).
Yes, that is usally always the right thing to do with Linux :-)
Jason, can you post the minimal patch that used SET_CLOCK/GET_CLOCK to set/get the bits 0-63 of the TOD? (also apply it internally so that we can test it for some days. Its too late for this merge window anyway.)
If we want some different scheme, we can certainly discuss extension via the flags (and pad) in the future. So this interface is certainly not a dead end if we need more
I have 2 possible extension in mind:
1. the thing that we discussed, lets see if we need a fix or not
2. making KVM on s390x ready for 2042 and beyond (there is no architecture yet but STCKE stores a byte of zeroes to the left of the TOD clock value. So I guess if this is extended somewhen we might want an additional flag plus a maximum of 1 additional byte. There is plenty of pad space so this is fine
Christian
next prev parent reply other threads:[~2014-10-09 8:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-19 14:19 [[RFC] KVM-S390: Provide guest TOD Clock Get/Set Controls Jason J. Herne
2014-09-19 18:51 ` Christian Borntraeger
2014-09-19 20:38 ` Alexander Graf
2014-09-22 9:08 ` Christian Borntraeger
[not found] ` <OFBB97D6FC.48AF23F2-ON87257D6B.004D1813-85257D6B.004DC089@us.ibm.com>
2014-10-08 14:55 ` Alexander Graf
2014-10-09 8:12 ` Christian Borntraeger [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-10-08 14:22 Jason J. Herne
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=54364360.40804@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=cornelia.huck@de.ibm.com \
--cc=jjherne@us.ibm.com \
--cc=kvm@vger.kernel.org \
/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).