From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMaNa-0006Dg-QV for qemu-devel@nongnu.org; Fri, 22 Jan 2016 06:59:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMaNX-0004Vm-M0 for qemu-devel@nongnu.org; Fri, 22 Jan 2016 06:59:50 -0500 Received: from mx2.parallels.com ([199.115.105.18]:48593) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMaNX-0004Vh-GU for qemu-devel@nongnu.org; Fri, 22 Jan 2016 06:59:47 -0500 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> From: Andrey Smetanin Message-ID: <56A219A9.7000708@virtuozzo.com> Date: Fri, 22 Jan 2016 14:59:37 +0300 MIME-Version: 1.0 In-Reply-To: <56A21836.1010204@redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v1] kvm/x86: Hyper-V tsc page setup Reply-To: asmetanin@virtuozzo.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , kvm@vger.kernel.org Cc: Gleb Natapov , "Denis V. Lunev" , Roman Kagan , qemu-devel@nongnu.org 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 >