* [PATCH] s390: fix detection of vector enhancements facility 1 vs. vector packed decimal facility
@ 2021-05-03 12:12 David Hildenbrand
2021-05-03 12:17 ` Christian Borntraeger
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: David Hildenbrand @ 2021-05-03 12:12 UTC (permalink / raw)
To: linux-kernel
Cc: David Hildenbrand, Heiko Carstens, Vasily Gorbik,
Christian Borntraeger, Sven Schnelle, Alexander Egorenkov,
Niklas Schnelle, Janosch Frank, linux-s390
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 <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Alexander Egorenkov <egorenar@linux.ibm.com>
Cc: Niklas Schnelle <schnelle@linux.ibm.com>
Cc: Janosch Frank <frankja@linux.ibm.com>
Cc: linux-s390@vger.kernel.org
Signed-off-by: David Hildenbrand <david@redhat.com>
---
arch/s390/kernel/setup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 72134f9f6ff5..5aab59ad5688 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -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))
--
2.30.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] s390: fix detection of vector enhancements facility 1 vs. vector packed decimal facility
2021-05-03 12:12 [PATCH] s390: fix detection of vector enhancements facility 1 vs. vector packed decimal facility David Hildenbrand
@ 2021-05-03 12:17 ` Christian Borntraeger
2021-05-03 12:52 ` Cornelia Huck
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Christian Borntraeger @ 2021-05-03 12:17 UTC (permalink / raw)
To: David Hildenbrand, linux-kernel
Cc: Heiko Carstens, Vasily Gorbik, Sven Schnelle,
Alexander Egorenkov, Niklas Schnelle, Janosch Frank, linux-s390
On 03.05.21 14:12, David Hildenbrand 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 <hca@linux.ibm.com>
> Cc: Vasily Gorbik <gor@linux.ibm.com>
> Cc: Christian Borntraeger <borntraeger@de.ibm.com>
> Cc: Sven Schnelle <svens@linux.ibm.com>
> Cc: Alexander Egorenkov <egorenar@linux.ibm.com>
> Cc: Niklas Schnelle <schnelle@linux.ibm.com>
> Cc: Janosch Frank <frankja@linux.ibm.com>
> Cc: linux-s390@vger.kernel.org
> Signed-off-by: David Hildenbrand <david@redhat.com>
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.
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
> arch/s390/kernel/setup.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
> index 72134f9f6ff5..5aab59ad5688 100644
> --- a/arch/s390/kernel/setup.c
> +++ b/arch/s390/kernel/setup.c
> @@ -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))
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] s390: fix detection of vector enhancements facility 1 vs. vector packed decimal facility
2021-05-03 12:12 [PATCH] s390: fix detection of vector enhancements facility 1 vs. vector packed decimal facility David Hildenbrand
2021-05-03 12:17 ` Christian Borntraeger
@ 2021-05-03 12:52 ` Cornelia Huck
2021-05-03 14:11 ` Janosch Frank
2021-05-03 20:38 ` Heiko Carstens
3 siblings, 0 replies; 5+ messages in thread
From: Cornelia Huck @ 2021-05-03 12:52 UTC (permalink / raw)
To: David Hildenbrand
Cc: linux-kernel, Heiko Carstens, Vasily Gorbik,
Christian Borntraeger, Sven Schnelle, Alexander Egorenkov,
Niklas Schnelle, Janosch Frank, linux-s390
On Mon, 3 May 2021 14:12:44 +0200
David Hildenbrand <david@redhat.com> 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 <hca@linux.ibm.com>
> Cc: Vasily Gorbik <gor@linux.ibm.com>
> Cc: Christian Borntraeger <borntraeger@de.ibm.com>
> Cc: Sven Schnelle <svens@linux.ibm.com>
> Cc: Alexander Egorenkov <egorenar@linux.ibm.com>
> Cc: Niklas Schnelle <schnelle@linux.ibm.com>
> Cc: Janosch Frank <frankja@linux.ibm.com>
> Cc: linux-s390@vger.kernel.org
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
> arch/s390/kernel/setup.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] s390: fix detection of vector enhancements facility 1 vs. vector packed decimal facility
2021-05-03 12:12 [PATCH] s390: fix detection of vector enhancements facility 1 vs. vector packed decimal facility David Hildenbrand
2021-05-03 12:17 ` Christian Borntraeger
2021-05-03 12:52 ` Cornelia Huck
@ 2021-05-03 14:11 ` Janosch Frank
2021-05-03 20:38 ` Heiko Carstens
3 siblings, 0 replies; 5+ messages in thread
From: Janosch Frank @ 2021-05-03 14:11 UTC (permalink / raw)
To: David Hildenbrand, linux-kernel
Cc: Heiko Carstens, Vasily Gorbik, Christian Borntraeger,
Sven Schnelle, Alexander Egorenkov, Niklas Schnelle, linux-s390
On 5/3/21 2:12 PM, David Hildenbrand 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.
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
>
> Fixes: 2583b848cad0 ("s390: report new vector facilities")
> Cc: Heiko Carstens <hca@linux.ibm.com>
> Cc: Vasily Gorbik <gor@linux.ibm.com>
> Cc: Christian Borntraeger <borntraeger@de.ibm.com>
> Cc: Sven Schnelle <svens@linux.ibm.com>
> Cc: Alexander Egorenkov <egorenar@linux.ibm.com>
> Cc: Niklas Schnelle <schnelle@linux.ibm.com>
> Cc: Janosch Frank <frankja@linux.ibm.com>
> Cc: linux-s390@vger.kernel.org
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
> arch/s390/kernel/setup.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
> index 72134f9f6ff5..5aab59ad5688 100644
> --- a/arch/s390/kernel/setup.c
> +++ b/arch/s390/kernel/setup.c
> @@ -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))
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] s390: fix detection of vector enhancements facility 1 vs. vector packed decimal facility
2021-05-03 12:12 [PATCH] s390: fix detection of vector enhancements facility 1 vs. vector packed decimal facility David Hildenbrand
` (2 preceding siblings ...)
2021-05-03 14:11 ` Janosch Frank
@ 2021-05-03 20:38 ` Heiko Carstens
3 siblings, 0 replies; 5+ messages in thread
From: Heiko Carstens @ 2021-05-03 20:38 UTC (permalink / raw)
To: David Hildenbrand
Cc: linux-kernel, Vasily Gorbik, Christian Borntraeger,
Sven Schnelle, Alexander Egorenkov, Niklas Schnelle,
Janosch Frank, linux-s390
On Mon, May 03, 2021 at 02:12:44PM +0200, David Hildenbrand 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 <hca@linux.ibm.com>
> Cc: Vasily Gorbik <gor@linux.ibm.com>
> Cc: Christian Borntraeger <borntraeger@de.ibm.com>
> Cc: Sven Schnelle <svens@linux.ibm.com>
> Cc: Alexander Egorenkov <egorenar@linux.ibm.com>
> Cc: Niklas Schnelle <schnelle@linux.ibm.com>
> Cc: Janosch Frank <frankja@linux.ibm.com>
> Cc: linux-s390@vger.kernel.org
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
> arch/s390/kernel/setup.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-05-03 20:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-03 12:12 [PATCH] s390: fix detection of vector enhancements facility 1 vs. vector packed decimal facility David Hildenbrand
2021-05-03 12:17 ` Christian Borntraeger
2021-05-03 12:52 ` Cornelia Huck
2021-05-03 14:11 ` Janosch Frank
2021-05-03 20:38 ` Heiko Carstens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).