RE: [PATCH v2 2/8] x86/mtrr: support setting MTRR state for software defined MTRRs

From: Michael Kelley (LINUX)
Date: Thu Feb 16 2023 - 11:04:58 EST


From: Borislav Petkov <bp@xxxxxxxxx> Sent: Thursday, February 16, 2023 4:29 AM
>
> On Thu, Feb 16, 2023 at 01:19:22PM +0100, Juergen Gross wrote:
> > Hmm, I must be blind. I can't spot it.
> >
> > I'm seeing only the feature bit #define and a call of
> > setup_clear_cpu_cap(X86_FEATURE_SEV_SNP) in this patch.
> >
> > Or is it done by hardware or the hypervisor?
>
> Correction - I meant CC_ATTR_GUEST_SEV_SNP not the CPUID feature flag.
>

In current upstream code, Hyper-V vTOM VMs aren't participating in
the CC_ATTR_* scheme at all, so CC_ATTR_GUEST_SEV_SNP won't be
set. Getting Hyper-V vTOM VMs integrated into that scheme is a key
part of my big patch set[1] that we're separately trying to resolve the
last issues with.

Michael

[1] https://lore.kernel.org/linux-hyperv/1673559753-94403-1-git-send-email-mikelley@xxxxxxxxxxxxx/