[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c3920b80-d288-6eca-3373-34e272a490de@amd.com>
Date: Wed, 11 Dec 2024 16:43:15 -0600
From: Tom Lendacky <thomas.lendacky@....com>
To: Borislav Petkov <bp@...en8.de>
Cc: "Nikunj A. Dadhania" <nikunj@....com>, linux-kernel@...r.kernel.org,
x86@...nel.org, kvm@...r.kernel.org, mingo@...hat.com, tglx@...utronix.de,
dave.hansen@...ux.intel.com, pgonda@...gle.com, seanjc@...gle.com,
pbonzini@...hat.com
Subject: Re: [PATCH v15 04/13] x86/sev: Change TSC MSR behavior for Secure TSC
enabled guests
On 12/11/24 16:22, Borislav Petkov wrote:
> On Wed, Dec 11, 2024 at 04:01:31PM -0600, Tom Lendacky wrote:
>> It could be any reason... maybe the hypervisor wants to know when this
>> MSR used in order to tell the guest owner to update their code. Writing
>> to or reading from that MSR is not that common, so I would think we want
>> to keep the same behavior that has been in effect.
>
> Ah, I thought you're gonna say something along the lines of, yeah, we must use
> the HV GHCB protocol because of <raisins> and there's no other way this could
> work.
>
>> But if we do want to make this change, maybe do it separate from the
>> Secure TSC series since it alters the behavior of SEV-ES guests and
>> SEV-SNP guests without Secure TSC.
>
> Already suggested so - this should be a separate patch.
>
> It would be interesting to see if it brings any improvement by avoiding the HV
> call... especially since RDTSC is used a *lot* and prominently at that in
> sched_clock, for example.
I doubt you would notice anything since it doesn't look like Linux ever
reads from or writes to MSR_IA32_TSC, preferring to just use RDTSC or
RDTSCP which aren't usually intercepted at all and so never goes out to
the HV.
Thanks,
Tom
>
Powered by blists - more mailing lists