On 1/15/20 7:17 AM, Thomas Huth wrote: > On 14/01/2020 19.42, Christian Borntraeger wrote: >> >> >> On 14.01.20 16:30, Janosch Frank wrote: >>> All CRs are set to 0 and CRs 0 and 14 are set to pre-defined values, >>> so we also need to test 1-13 and 15 for 0. >>> >>> And while we're at it, let's also set some values to cr 1, 7 and 13, so >>> we can actually be sure that they will be zeroed. >> >> While it does not hurt to have it here, I think the register check for the reset >> would be better in a kselftest. This allows to check userspace AND guest at the >> same time. > > Agreed. Especially it also allows to test the kernel ioctl on its own, > without QEMU in between (which might also clear some registers), so for > getting the new reset ioctls right, the selftests are certainly the > better place. Selftests are in development and will be up for discussion this week if all goes well... While the selftest leaves QEMU out of the picture, we're still using kernel APIs to fetch and reset data, so actually getting guests' register values requires some fiddling in the guest code. So I rather have a test that tells me if KVM + QEMU are correct at the beginning of testing, since that's what most people are using anyways.