|
From: Andreas A. <ar...@li...> - 2019-08-09 18:17:16
|
On Thu, Aug 08 2019, Mark Wielaard wrote: > Hi Andreas, > > On Wed, 2019-08-07 at 12:52 +0200, Andreas Arnez wrote: >> On Tue, Aug 06 2019, Mark Wielaard wrote: >> > The issue doesn't seem to be with this patch. But with the specific >> > setup of the machine, it is a RHEL7 based setup, where it seems the >> > kernel doesn't setup the vector capability, but the machine does >> > have the vx facility. >> > >> > That seems to cause our tests prereq to think it can run the vector >> > instructions, but when the actual vector* tests run the >> > instructions fail because the kernel hasn't enabled them. >> >> Right. That kind of discrepancy is specific to certain hardware >> features that need support by the hypervisor and OS. VX is one of >> those, because it requires additional registers to be maintained. >> >> > So it seems we need to make tests/s390x_features s390x-vx smarter. >> >> Yes, we should. I suggest the patch below. Instead of relying on >> the CPU facility list, the patch checks the HWCAP, where the kernel >> officially indicates full VX support. Any thoughts? > > Checking AT_HWCAP seems like a good idea. But is glibc 2.16 universal > enough? Since this is just for adding a vgtest prereq you could also do > what tests/check_ppc64_auxv_cap with a shell script. There are only 4 > vgtests that use the s390x-vx prereq, which would then have to be > changed to use the new script. Well, I thought about that and decided against it for a few reasons. One is that the s390x feature test logic is contained in one file so far, and I prefer to keep it that way. Also, I'm hesitant to rely on LD_SHOW_AUXV, since it seems more like a debug feature and has been broken at times. And yes, glibc 2.16 should be sufficient, because systems with an older glibc almost certainly have a kernel that doesn't support VX. Considering the low impact of not detecting VX, I think that's a fair tradeoff. > It might be that glibc 2.16/getauxval is just fine to use though. > Systems that have an older glibc might just not have the vx capability > in the first place. If so then just use what you have. But do please > add a comment on this line: > >> match = GET_HWCAP() & 0x800; OK. With this and another small adjustment I pushed this as: 161d22f0a -- s390x: Fix vector facility (vx) check in test suite Thanks, Andreas |