s390: fix detection of vector enhancements facility 1 vs. vector packed decimal facility
PATCH 1/1 s390: fix detection of vector enhancements facility 1 vs. vector packed decimal facility
The PoP documents:
134: The vector packed decimal facility is installed in the
z/Architecture architectural mode. When bit 134 is one, bit 129 is also one.
135: The vector enhancements facility 1 is installed in
the z/Architecture architectural mode. When bit 135 is one, bit 129 is also one.
Looks like we confuse the vector enhancements facility 1 ("EXT") with the Vector packed decimal facility ("BCD"). Let's fix the facility checks.
Detected while working on QEMU/tcg z14 support and only unlocking the vector enhancements facility 1, but not the vector packed decimal facility.
--- arch/s390/kernel/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/s390/kernel/setup.c +2 -2
@@ -937,9 +937,9 @@ static int __init setup_hwcaps(void)if (MACHINE_HAS_VX ) { elf_hwcap |=HWCAP_S390_VXRS ;if (test_facility (134 )) - elf_hwcap |=HWCAP_S390_VXRS_EXT ; -if (test_facility (135 )) elf_hwcap |=HWCAP_S390_VXRS_BCD ; +if (test_facility (135 )) + elf_hwcap |=HWCAP_S390_VXRS_EXT ;if (test_facility (148 )) elf_hwcap |=HWCAP_S390_VXRS_EXT2 ;if (test_facility (152 ))
Signature · 1 line
2.30.2
Quoted 15 lines · David Hildenbrand
The PoP documents:
134: The vector packed decimal facility is installed in the
z/Architecture architectural mode. When bit 134 is one, bit 129 is also one.
135: The vector enhancements facility 1 is installed in
the z/Architecture architectural mode. When bit 135 is one, bit 129 is also one.Looks like we confuse the vector enhancements facility 1 ("EXT") with the Vector packed decimal facility ("BCD"). Let's fix the facility checks.
Detected while working on QEMU/tcg z14 support and only unlocking the vector enhancements facility 1, but not the vector packed decimal facility.
Quoted 10 lines
Fixes 2583b848cad0 ("s390: report new vector facilities")Cc Heiko Carstens <[email protected]>Cc Vasily Gorbik <[email protected]>Cc Christian Borntraeger <[email protected]>Cc Sven Schnelle <[email protected]>Cc Alexander Egorenkov <[email protected]>Cc Niklas Schnelle <[email protected]>Cc Janosch Frank <[email protected]>Signed-off-by David Hildenbrand <[email protected]>
Yes looks correct. This should not be noticable on real machines as you either have both or none, but of course with virtual machine this could happen.
Quoted 21 lines
--- arch/s390/kernel/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/s390/kernel/setup.c +2
-2@@ -937,9 +937,9 @@ static int __init setup_hwcaps(void)if (MACHINE_HAS_VX ) { elf_hwcap |=HWCAP_S390_VXRS ;if (test_facility (134 )) - elf_hwcap |=HWCAP_S390_VXRS_EXT ; -if (test_facility (135 )) elf_hwcap |=HWCAP_S390_VXRS_BCD ; +if (test_facility (135 )) + elf_hwcap |=HWCAP_S390_VXRS_EXT ;if (test_facility (148 )) elf_hwcap |=HWCAP_S390_VXRS_EXT2 ;if (test_facility (152 ))
Quoted 25 lines · On Mon, 3 May 2021 14:12:44 +0200 David Hildenbrand <[email protected]> wrote:
The PoP documents:
134: The vector packed decimal facility is installed in the
z/Architecture architectural mode. When bit 134 is one, bit 129 is also one.
135: The vector enhancements facility 1 is installed in
the z/Architecture architectural mode. When bit 135 is one, bit 129 is also one.Looks like we confuse the vector enhancements facility 1 ("EXT") with the Vector packed decimal facility ("BCD"). Let's fix the facility checks.
Detected while working on QEMU/tcg z14 support and only unlocking the vector enhancements facility 1, but not the vector packed decimal facility.
Fixes 2583b848cad0 ("s390: report new vector facilities")Cc Heiko Carstens <[email protected]>Cc Vasily Gorbik <[email protected]>Cc Christian Borntraeger <[email protected]>Cc Sven Schnelle <[email protected]>Cc Alexander Egorenkov <[email protected]>Cc Niklas Schnelle <[email protected]>Cc Janosch Frank <[email protected]>Signed-off-by David Hildenbrand <[email protected]>
Quoted 3 lines
--- arch/s390/kernel/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 8 lines · David Hildenbrand
The PoP documents:
134: The vector packed decimal facility is installed in the
z/Architecture architectural mode. When bit 134 is one, bit 129 is also one.
135: The vector enhancements facility 1 is installed in
the z/Architecture architectural mode. When bit 135 is one, bit 129 is also one.
Quoted 6 lines
Looks like we confuse the vector enhancements facility 1 ("EXT") with the Vector packed decimal facility ("BCD"). Let's fix the facility checks.
Detected while working on QEMU/tcg z14 support and only unlocking the vector enhancements facility 1, but not the vector packed decimal facility.
Quoted 32 lines
Fixes 2583b848cad0 ("s390: report new vector facilities")Cc Heiko Carstens <[email protected]>Cc Vasily Gorbik <[email protected]>Cc Christian Borntraeger <[email protected]>Cc Sven Schnelle <[email protected]>Cc Alexander Egorenkov <[email protected]>Cc Niklas Schnelle <[email protected]>Cc Janosch Frank <[email protected]>Signed-off-by David Hildenbrand <[email protected]>--- arch/s390/kernel/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/s390/kernel/setup.c +2
-2@@ -937,9 +937,9 @@ static int __init setup_hwcaps(void)if (MACHINE_HAS_VX ) { elf_hwcap |=HWCAP_S390_VXRS ;if (test_facility (134 )) - elf_hwcap |=HWCAP_S390_VXRS_EXT ; -if (test_facility (135 )) elf_hwcap |=HWCAP_S390_VXRS_BCD ; +if (test_facility (135 )) + elf_hwcap |=HWCAP_S390_VXRS_EXT ;if (test_facility (148 )) elf_hwcap |=HWCAP_S390_VXRS_EXT2 ;if (test_facility (152 ))
Quoted 25 lines · David Hildenbrand
The PoP documents:
134: The vector packed decimal facility is installed in the
z/Architecture architectural mode. When bit 134 is one, bit 129 is also one.
135: The vector enhancements facility 1 is installed in
the z/Architecture architectural mode. When bit 135 is one, bit 129 is also one.Looks like we confuse the vector enhancements facility 1 ("EXT") with the Vector packed decimal facility ("BCD"). Let's fix the facility checks.
Detected while working on QEMU/tcg z14 support and only unlocking the vector enhancements facility 1, but not the vector packed decimal facility.
Fixes 2583b848cad0 ("s390: report new vector facilities")Cc Heiko Carstens <[email protected]>Cc Vasily Gorbik <[email protected]>Cc Christian Borntraeger <[email protected]>Cc Sven Schnelle <[email protected]>Cc Alexander Egorenkov <[email protected]>Cc Niklas Schnelle <[email protected]>Cc Janosch Frank <[email protected]>Signed-off-by David Hildenbrand <[email protected]>
Quoted 3 lines
--- arch/s390/kernel/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks!