diff options
| author | Sean Christopherson <[email protected]> | 2024-10-01 05:00:45 +0000 |
|---|---|---|
| committer | Sean Christopherson <[email protected]> | 2025-02-25 17:35:40 +0000 |
| commit | 3ef0df3f760f438d275334bbe193f95886890fc4 (patch) | |
| tree | c558a3ef151cb5813cecfe7647c8da744834df84 /tools/testing/selftests/net/lib/py/utils.py | |
| parent | Linux 6.14-rc2 (diff) | |
| download | kernel-3ef0df3f760f438d275334bbe193f95886890fc4.tar.gz kernel-3ef0df3f760f438d275334bbe193f95886890fc4.zip | |
KVM: VMX: Don't modify guest XFD_ERR if CR0.TS=1
Don't update the guest's XFD_ERR MSR if CR0.TS is set; per the SDM,
XFD_ERR is not modified if CR0.TS=1. Although it's not explicitly stated
in the SDM, conceptually it makes sense the CR0.TS check would be done
prior to the XFD_ERR check, e.g. CR0.TS=1 blocks all SIMD state, whereas
XFD blocks only XTILE state.
Device-not-available exceptions that are not due to XFD - those
resulting from setting CR0.TS to 1 - do not modify the IA32_XFD_ERR MSR.
Opportunistically update the comment to call out that XFD_ERR is updated
before the VM-Exit check occurs. Nothing in the SDM explicitly calls out
this behavior, but logically it must be the behavior, otherwise reading
XFD_ERR in handle_nm_fault_irqoff() would return stale data, i.e. the
to-be-delivered XFD_ERR value would need to be saved in EXIT_QUALIFICATION,
a la DR6 for #DB and CR2 for #PF, so that software could capture the guest
value.
Fixes: ec5be88ab29f ("kvm: x86: Intercept #NM for saving IA32_XFD_ERR")
Signed-off-by: Xin Li (Intel) <[email protected]>
Tested-by: Shan Kang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'tools/testing/selftests/net/lib/py/utils.py')
0 files changed, 0 insertions, 0 deletions
