[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABgObfYwtMQY-E+ENs3z8Ew-Yc7tiXC7PmdvFjPcUeXqOMY8PQ@mail.gmail.com>
Date: Thu, 1 Feb 2024 16:46:12 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Nikunj A Dadhania <nikunj@....com>
Cc: linux-kernel@...r.kernel.org, thomas.lendacky@....com, x86@...nel.org,
kvm@...r.kernel.org, bp@...en8.de, mingo@...hat.com, tglx@...utronix.de,
dave.hansen@...ux.intel.com, dionnaglaze@...gle.com, pgonda@...gle.com,
seanjc@...gle.com
Subject: Re: [PATCH v7 10/16] x86/sev: Add Secure TSC support for SNP guests
On Wed, Dec 20, 2023 at 4:16 PM Nikunj A Dadhania <nikunj@....com> wrote:
> + /* Setting Secure TSC parameters */
> + if (cpu_feature_enabled(X86_FEATURE_SNP_SECURE_TSC)) {
> + vmsa->tsc_scale = snp_tsc_scale;
> + vmsa->tsc_offset = snp_tsc_offset;
> + }
This needs to use guest_cpu_has, otherwise updating the hypervisor or
processor will change the initial VMSA and any measurement derived
from there.
In fact, the same issue exists for DEBUG_SWAP and I will shortly post
a series to allow enabling/disabling DEBUG_SWAP per-VM, so that
updating the kernel does not break existing measurements.
Paolo
Powered by blists - more mailing lists