Commit fda30b1c authored by Paolo Bonzini's avatar Paolo Bonzini Committed by Lin Wang
Browse files

selftest: kvm: Reorder vcpu_load_state steps for AMX

mainline inclusion
from mainline-v5.17-rc1
commit 551447cf
category: feature
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I5RQLJ


CVE: NA

Intel-SIG: commit 551447cf selftest: kvm: Reorder vcpu_load_state steps for AMX.

--------------------------------

For AMX support it is recommended to load XCR0 after XFD, so
that KVM does not see XFD=0, XCR=1 for a save state that will
eventually be disabled (which would lead to premature allocation
of the space required for that save state).

It is also required to load XSAVE data after XCR0 and XFD, so
that KVM can trigger allocation of the extra space required to
store AMX state.

Adjust vcpu_load_state to obey these new requirements.

Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarYang Zhong <yang.zhong@intel.com>
Message-Id: <20211223145322.2914028-2-yang.zhong@intel.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarLin Wang <lin.x.wang@intel.com>
parent 0df0ed6d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment