Re: [PATCH v16 09/10] x86/arch_prctl: Selftest for ARCH_[GET|SET]_CPUID
Wanpeng Li <[email protected]> Wed, 11 Oct 2017 14:25:57 +0800
| Newsgroups | gmane.linux.kernel,gmane.linux.uml.devel,gmane.linux.uml.user,gmane.linux.file-systems,gmane.comp.emulators.kvm.devel |
|---|---|
| Message-ID | <CANRm+CyfBNY-BUGgCDkxK0pq-bocw8hib_DJ=FstJ5RqzT2LSA@mail.gmail.com> |
2017-10-11 11:56 GMT+08:00 Kyle Huey <[email protected]>: > On Tue, Oct 10, 2017 at 8:35 PM, Wanpeng Li <[email protected]> wrote: >> Hi Kyle, >> 2017-03-20 16:16 GMT+08:00 Kyle Huey <[email protected]>: >>> Test disabling and reenabling the cpuid instruction via the new arch_prctl >>> ARCH_SET_CPUID, retrieving the current state via ARCH_GET_CPUID, and the >>> expected behaviors across fork() and exec(). >>> >>> Signed-off-by: Kyle Huey <[email protected]> >>> --- >>> tools/testing/selftests/x86/Makefile | 2 +- >>> tools/testing/selftests/x86/cpuid_fault.c | 251 ++++++++++++++++++++++++++++++ >> >> I'm not sure why this commit is not merged to upstream. I test >> 4.14-rc3 w/ this testcase on a haswell client, however I encounter the >> below splat, any idea? > > Thanks for pointing out that this never got merged. That's quite > disappointing, especially after reviewers insisted I write this test. > > The failure you're seeing is because the values of ARCH_GET_CPUID and > ARCH_SET_CPUID changed and the values hardcoded in the test are no > longer accurate. If you set them to the correct values (0x1011 and > 0x1012 respectively) the test should pass. It works, thanks Kyle. Regards, Wanpeng Li