aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mod/file2alias.c
diff options
context:
space:
mode:
authorSean Christopherson <[email protected]>2024-12-11 17:29:52 +0000
committerSean Christopherson <[email protected]>2024-12-20 01:47:52 +0000
commit4d5163cba43fe96902165606fa54e1aecbbb32de (patch)
treebabf5556b552ca0635ef27a61127c4e1a830d127 /scripts/mod/file2alias.c
parentKVM: x86: Play nice with protected guests in complete_hypercall_exit() (diff)
downloadkernel-4d5163cba43fe96902165606fa54e1aecbbb32de.tar.gz
kernel-4d5163cba43fe96902165606fa54e1aecbbb32de.zip
KVM: SVM: Allow guest writes to set MSR_AMD64_DE_CFG bits
Drop KVM's arbitrary behavior of making DE_CFG.LFENCE_SERIALIZE read-only for the guest, as rejecting writes can lead to guest crashes, e.g. Windows in particular doesn't gracefully handle unexpected #GPs on the WRMSR, and nothing in the AMD manuals suggests that LFENCE_SERIALIZE is read-only _if it exists_. KVM only allows LFENCE_SERIALIZE to be set, by the guest or host, if the underlying CPU has X86_FEATURE_LFENCE_RDTSC, i.e. if LFENCE is guaranteed to be serializing. So if the guest sets LFENCE_SERIALIZE, KVM will provide the desired/correct behavior without any additional action (the guest's value is never stuffed into hardware). And having LFENCE be serializing even when it's not _required_ to be is a-ok from a functional perspective. Fixes: 74a0e79df68a ("KVM: SVM: Disallow guest from changing userspace's MSR_AMD64_DE_CFG value") Fixes: d1d93fa90f1a ("KVM: SVM: Add MSR-based feature support for serializing LFENCE") Reported-by: Simon Pilkington <[email protected]> Closes: https://lore.kernel.org/all/[email protected] Cc: Tom Lendacky <[email protected]> Cc: [email protected] Reviewed-by: Tom Lendacky <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'scripts/mod/file2alias.c')
0 files changed, 0 insertions, 0 deletions