]> git.baikalelectronics.ru Git - kernel.git/commit
selftest: kvm: Reorder vcpu_load_state steps for AMX
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 23 Dec 2021 14:53:20 +0000 (09:53 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 14 Jan 2022 18:44:43 +0000 (13:44 -0500)
commite030f7eae797d2bcbfecc8268774d979af5b3901
tree1850b8abf2b05a2531ca76edc034048db808c1fc
parent5b4b1dd173ead3d2730569d632616bdc2755a8ed
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: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20211223145322.2914028-2-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/lib/x86_64/processor.c