LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, vkuznets@redhat.com
Subject: Re: [PATCH 1/2] KVM: KVM-on-hyperv: shorten no-entry section on reenlightenment
Date: Thu, 12 Aug 2021 17:53:17 +0200 [thread overview]
Message-ID: <5e3ddaea-c0f4-f207-de54-5702c970079b@redhat.com> (raw)
In-Reply-To: <20210811180322.GA178399@fuller.cnet>
On 11/08/21 20:03, Marcelo Tosatti wrote:
> hyperv_stop_tsc_emulation();
>
> /* TSC frequency always matches when on Hyper-V */
> for_each_present_cpu(cpu)
> per_cpu(cpu_tsc_khz, cpu) = tsc_khz;
> kvm_max_guest_tsc_khz = tsc_khz;
Yeah, it's more complicated than this. The right sequence is:
- update the master clock
- update the TSC page parameters
- stop TSC emulation
There is no need to invalidate the TSC page.
Related to this, after kvm_hv_invalidate_tsc_page the sequence value in
the Hyper-V TSC page will always be 1, which is wrong. I'll take a look
at that too.
Paolo
next prev parent reply other threads:[~2021-08-12 15:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-11 10:23 [PATCH 0/2] KVM: x86: abstract locking around pvclock_update_vm_gtod_copy Paolo Bonzini
2021-08-11 10:23 ` [PATCH 1/2] KVM: KVM-on-hyperv: shorten no-entry section on reenlightenment Paolo Bonzini
2021-08-11 18:03 ` Marcelo Tosatti
2021-08-12 15:53 ` Paolo Bonzini [this message]
2021-08-11 10:23 ` [PATCH 2/2] kvm: x86: abstract locking around pvclock_update_vm_gtod_copy Paolo Bonzini
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=5e3ddaea-c0f4-f207-de54-5702c970079b@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=vkuznets@redhat.com \
--subject='Re: [PATCH 1/2] KVM: KVM-on-hyperv: shorten no-entry section on reenlightenment' \
/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
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).