[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <429fab49-91a8-92c5-ec81-71e9336f2571@de.ibm.com>
Date: Mon, 3 May 2021 14:17:54 +0200
From: Christian Borntraeger <borntraeger@...ibm.com>
To: David Hildenbrand <david@...hat.com>, linux-kernel@...r.kernel.org
Cc: Heiko Carstens <hca@...ux.ibm.com>,
Vasily Gorbik <gor@...ux.ibm.com>,
Sven Schnelle <svens@...ux.ibm.com>,
Alexander Egorenkov <egorenar@...ux.ibm.com>,
Niklas Schnelle <schnelle@...ux.ibm.com>,
Janosch Frank <frankja@...ux.ibm.com>,
linux-s390@...r.kernel.org
Subject: Re: [PATCH] s390: fix detection of vector enhancements facility 1 vs.
vector packed decimal facility
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@...ux.ibm.com>
> Cc: Vasily Gorbik <gor@...ux.ibm.com>
> Cc: Christian Borntraeger <borntraeger@...ibm.com>
> Cc: Sven Schnelle <svens@...ux.ibm.com>
> Cc: Alexander Egorenkov <egorenar@...ux.ibm.com>
> Cc: Niklas Schnelle <schnelle@...ux.ibm.com>
> Cc: Janosch Frank <frankja@...ux.ibm.com>
> Cc: linux-s390@...r.kernel.org
> Signed-off-by: David Hildenbrand <david@...hat.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@...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))
>
Powered by blists - more mailing lists