Hi Paolo, Please help review this patchset, which is still based on Jing's AMX v2. https://lore.kernel.org/all/20211217153003.1719189-1-jing2.liu@xxxxxxxxx/ Since Jing's v3 was justly sent out, I will rebase this patchest on it and send my separate v3. About this selftest requirement, please check below link: https://lore.kernel.org/all/85401305-2c71-e57f-a01e-4850060d300a@xxxxxxxxxx/ By the way, this amx_test.c file referenced some Chang's older test code: https://lore.kernel.org/lkml/20210221185637.19281-21-chang.seok.bae@xxxxxxxxx/ Thanks! Yang Change history ============== v1-->v2 - Added more GUEST_SYNC() from guest code(Paolo). - Added back save/restore code after GUEST_SYNC() handles in the main()(Paolo). Paolo Bonzini (1): selftest: kvm: Reorder vcpu_load_state steps for AMX Yang Zhong (2): selftest: kvm: Move struct kvm_x86_state to header selftest: kvm: Support amx selftest tools/testing/selftests/kvm/Makefile | 1 + .../selftests/kvm/include/x86_64/processor.h | 16 +- .../selftests/kvm/lib/x86_64/processor.c | 44 +- tools/testing/selftests/kvm/x86_64/amx_test.c | 451 ++++++++++++++++++ 4 files changed, 482 insertions(+), 30 deletions(-) create mode 100644 tools/testing/selftests/kvm/x86_64/amx_test.c