[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200917161450.GD13522@sjchrist-ice>
Date: Thu, 17 Sep 2020 09:14:50 -0700
From: Sean Christopherson <sean.j.christopherson@...el.com>
To: Maxim Levitsky <mlevitsk@...hat.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
Jim Mattson <jmattson@...gle.com>,
Borislav Petkov <bp@...en8.de>, Joerg Roedel <joro@...tes.org>,
"H. Peter Anvin" <hpa@...or.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Vitaly Kuznetsov <vkuznets@...hat.com>
Subject: Re: [PATCH 1/1] KVM: x86: fix MSR_IA32_TSC read for nested migration
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.
> + * 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
>
Powered by blists - more mailing lists