From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrey Smetanin Subject: Re: [PATCH v1] kvm/x86: Hyper-V tsc page setup Date: Fri, 22 Jan 2016 14:59:37 +0300 Message-ID: <56A219A9.7000708@virtuozzo.com> References: <1450949580-25759-1-git-send-email-asmetanin@virtuozzo.com> <56A1FF8F.3050701@redhat.com> <56A20131.8090102@virtuozzo.com> <56A20C30.4020608@redhat.com> <56A212F9.4030800@virtuozzo.com> <56A21836.1010204@redhat.com> Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , Roman Kagan , "Denis V. Lunev" , To: Paolo Bonzini , Return-path: Received: from mx2.parallels.com ([199.115.105.18]:34203 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753025AbcAVL7q (ORCPT ); Fri, 22 Jan 2016 06:59:46 -0500 In-Reply-To: <56A21836.1010204@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 01/22/2016 02:53 PM, Paolo Bonzini wrote: > > > On 22/01/2016 12:31, Andrey Smetanin wrote: >>> >>> Sometimes the TSC is detected to be unstable and Linux switches to >>> another clocksource. At least in that case you can get a write to the >>> TSC page while the guest is running. >> Sorry, now I got it, you mean host TSC is unstable and we should mark >> guest tsc page invalid. Now I understand please ignore my prev. message. > > No problem. Anyhow yes, this is what I meant: a host write to the TSC > page, not a guest write to the TSC page MSR. > > Usually it happens only at migration time to update the sequence---which > I believe your patch wasn't doing either. QEMU saves address of page inside ->msr_hv_tsc, so at restore QEMU sets corresponding MSR and KVM setup's tsc page again. So migration should able to work. But if we tie TSC page > updates to kvm_gen_update_masterclock, we get that for free when the > migration destination calls the KVM_SET_CLOCK ioctl. > > Paolo >