Some KVM selftests fail when executed on the Hygon platform. For example, the demand_paging_test reports the following error message: Random seed: 0x6b8b4567 Testing guest mode: PA-bits:ANY, VA-bits:48, 4K pages guest physical test memory: [0xffffbffff000, 0xfffffffff000) Finished creating vCPUs and starting uffd threads Started all vCPUs ==== Test Assertion Failure ==== lib/x86/processor.c:615: Unconditional guest failure pid=2144622 tid=2144624 errno=4 - Interrupted system call 1 0x0000000000411871: assert_on_unhandled_exception 于 processor.c:659 2 0x000000000040687d: _vcpu_run 于 kvm_util.c:1718 3 0x0000000000402aa2: vcpu_worker 于 demand_paging_test.c:44 4 0x000000000040951d: vcpu_thread_main 于 memstress.c:281 5 0x00007fd2728875d4: ?? ??:0 6 0x00007fd2729092fb: ?? ??:0 Unhandled exception '0xe' at guest RIP '0x40947c' Add Hygon support in KVM selftests to fix these issues.
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/6284
After adding the Hygon support, the operating results of demand_paging_test on the Hygon platform are as follows: Testing guest mode: PA-bits:ANY, VA-bits:48, 4K pages guest physical test memory: [0x7fcbfffe000, 0x7fcffffe000) Finished creating vCPUs and starting uffd threads Started all vCPUs All vCPU threads joined Total guest execution time: 1.819900671s Overall demand paging rate: 144043.026181 pgs/sec