diff options
| author | Nikunj A Dadhania <[email protected]> | 2025-07-22 07:48:53 +0000 |
|---|---|---|
| committer | Borislav Petkov (AMD) <[email protected]> | 2025-08-12 10:33:58 +0000 |
| commit | 5eb1bcdb6a8c088514019c3a9bda5d565beed1af (patch) | |
| tree | d096ca60e379de53ea7e0d95a82d62fbc5e628fc /net/core/dev.c | |
| parent | x86/fpu: Fix NULL dereference in avx512_status() (diff) | |
| download | kernel-5eb1bcdb6a8c088514019c3a9bda5d565beed1af.tar.gz kernel-5eb1bcdb6a8c088514019c3a9bda5d565beed1af.zip | |
x86/sev: Improve handling of writes to intercepted TSC MSRs
Currently, when a Secure TSC enabled SNP guest attempts to write to the
intercepted GUEST_TSC_FREQ MSR (a read-only MSR), the guest kernel response
incorrectly implies a VMM configuration error, when in fact it is the usual
VMM configuration to intercept writes to read-only MSRs, unless explicitly
documented.
Modify the intercepted TSC MSR #VC handling:
* Write to GUEST_TSC_FREQ will generate a #GP instead of terminating the
guest
* Write to MSR_IA32_TSC will generate a #GP instead of silently ignoring it
However, continue to terminate the guest when reading from intercepted
GUEST_TSC_FREQ MSR with Secure TSC enabled, as intercepted reads indicate an
improper VMM configuration for Secure TSC enabled SNP guests.
[ bp: simplify comment. ]
Fixes: 38cc6495cdec ("x86/sev: Prevent GUEST_TSC_FREQ MSR interception for Secure TSC enabled guests")
Suggested-by: Sean Christopherson <[email protected]>
Signed-off-by: Nikunj A Dadhania <[email protected]>
Signed-off-by: Borislav Petkov (AMD) <[email protected]>
Reviewed-by: Tom Lendacky <[email protected]>
Link: https://lore.kernel.org/[email protected]
Diffstat (limited to 'net/core/dev.c')
0 files changed, 0 insertions, 0 deletions
