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

From: Juergen Gross
Date: Thu Feb 16 2023 - 07:19:28 EST


On 16.02.23 12:25, Borislav Petkov wrote:
On Thu, Feb 16, 2023 at 10:32:28AM +0100, Juergen Gross wrote:
Is that flag _really_ meant to indicate we are running as a SEV-SNP guest?

Yes.

Given that the referenced patch is part of the SEV-SNP host support series,
I'm inclined to suspect it won't be set for sure in HyperV SEV-SNP guests.

It better be. If it is a modified guest - no matter how modified - it
should set that flag. The vTOM thing is still being discussed.

And who is setting it for KVM SEV-SNP guests?

That same patch does.

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?


Juergen

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature