From: Maxim Levitsky <mlevitsk@redhat.com>
To: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<x86@kernel.org>, Jim Mattson <jmattson@google.com>,
Borislav Petkov <bp@alien8.de>, Joerg Roedel <joro@8bytes.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Vitaly Kuznetsov <vkuznets@redhat.com>
Subject: Re: [PATCH 1/1] KVM: x86: fix MSR_IA32_TSC read for nested migration
Date: Mon, 21 Sep 2020 12:26:52 +0300 [thread overview]
Message-ID: <6310fbe66e89b9f82ac88f7f080ea2eff2dad74e.camel@redhat.com> (raw)
In-Reply-To: <20200917161450.GD13522@sjchrist-ice>
On Thu, 2020-09-17 at 09:14 -0700, Sean Christopherson wrote:
> On Thu, Sep 17, 2020 at 02:07:23PM +0300, Maxim Levitsky wrote:
> > + * Intel PRM states that MSR_IA32_TSC read adds the TSC offset
>
> One more nit, "Intel SDM" would be preferred as that's most commonly used in
> KVM changelogs, and there are multiple PRM acronyms in Intel's dictionary
> these days.
Fixed.
Best regards,
Maxim Levitsky
>
> > + * even when not intercepted. AMD manual doesn't define this
> > + * but appears to behave the same
> > + *
> > + * However when userspace wants to read this MSR, return its
> > + * real L1 value so that its restore will be correct
> > + *
> > + */
> > + if (msr_info->host_initiated)
> > + msr_info->data = kvm_read_l1_tsc(vcpu, rdtsc());
> > + else
> > + msr_info->data = kvm_read_l2_tsc(vcpu, rdtsc());
> > break;
> > case MSR_MTRRcap:
> > case 0x200 ... 0x2ff:
> > --
> > 2.26.2
> >
prev parent reply other threads:[~2020-09-21 9:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-17 11:07 [PATCH 0/1] KVM: correctly restore the TSC value on nested migration Maxim Levitsky
2020-09-17 11:07 ` [PATCH 1/1] KVM: x86: fix MSR_IA32_TSC read for " Maxim Levitsky
2020-09-17 16:11 ` Sean Christopherson
2020-09-21 9:25 ` Maxim Levitsky
2020-09-21 9:39 ` Maxim Levitsky
2020-09-17 16:14 ` Sean Christopherson
2020-09-21 9:26 ` Maxim Levitsky [this message]
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=6310fbe66e89b9f82ac88f7f080ea2eff2dad74e.camel@redhat.com \
--to=mlevitsk@redhat.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=sean.j.christopherson@intel.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=x86@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