RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2036955 - glibc: A64FX SVE optimized memory operations break "sve=off" guest mode
Summary: glibc: A64FX SVE optimized memory operations break "sve=off" guest mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: glibc
Version: 8.6
Hardware: aarch64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Florian Weimer
QA Contact: Martin Coufal
URL:
Whiteboard:
Depends On:
Blocks: 1885765
TreeView+ depends on / blocked
 
Reported: 2022-01-04 14:05 UTC by Eric Auger
Modified: 2023-07-18 14:30 UTC (History)
13 users (show)

Fixed In Version: glibc-2.28-183.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-10 15:18:10 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1929928 1 None None None 2023-07-18 14:30:35 UTC
Red Hat Issue Tracker RHELPLAN-106800 0 None None None 2022-01-04 14:15:25 UTC
Red Hat Product Errata RHBA-2022:2005 0 None None None 2022-05-10 15:18:31 UTC
Sourceware 28744 0 P2 NEW A64FX string functions are selected without SVE HWCAP 2022-01-04 14:10:47 UTC

Description Eric Auger 2022-01-04 14:05:19 UTC
Bug 1929928 - [Fujitsu 8 FEAT] Support of glibc memory operation A64FX SVE performance improvement

backports the upstream series

[v2,0/6] aarch64: Added optimized memcpy/memmove/memset for A64FX [1]

This latter uses SVE instructions for some memory operation optimizations. However the enablement is based on the SVE asm capability and on the MIDR:

for instance in sysdeps/aarch64/multiarch/memset.c:
> 
> > +#if HAVE_AARCH64_SVE_ASM
> > +	       : (IS_A64FX (midr)
../..

Unfortunately, when launching a VM it is possible to turn the SVE feature off at VCPU level. In that specific case, when running on A64FX, the guest kernel panics at /init because some SVE instructions are attempted by userspace while the vcpu does not support them.

So the problem needs to be fixed upstream and backported on 8.6 on top of [1].

"sve=off" vcpu mode is not the default operating mode so the BZ has rather low priority but we think it is also good to get it fixed upstream to discourage other coders to rely on MIDR only and downstream for arm-virt CI.

The arm-virt team will be happy to test the fix :-)

Comment 1 Florian Weimer 2022-01-07 10:07:11 UTC
Upstream fix has been committed:

commit e5fa62b8db546f8792ec9e5c61e6419f4f8e3f4d
Author: Wilco Dijkstra <wdijkstr>
Date:   Thu Jan 6 14:36:28 2022 +0000

    AArch64: Check for SVE in ifuncs [BZ #28744]
    
    Add a check for SVE in the A64FX ifuncs for memcpy, memset and memmove.
    This fixes BZ #28744.

Comment 5 Eric Auger 2022-01-10 17:28:55 UTC
Hi Yihuang,

Would you have cycles to test it?

Thanks

Eric

Comment 6 Yihuang Yu 2022-01-11 13:33:37 UTC
(In reply to Eric Auger from comment #5)
> Hi Yihuang,
> 
> Would you have cycles to test it?
> 
> Thanks
> 
> Eric

Hello Eric,

It's easy for me if I can reserve a FJ host to do it. However, I am not sure how to test with glibc? Using this version to build a kernel or it's there any kernel built by glibc-2.28-183.el8?

Comment 9 Eric Auger 2022-01-17 13:03:34 UTC
Sure trying to get a loan to either of the machines

Comment 10 Eric Auger 2022-01-17 20:43:15 UTC
I was able to launch a VM on Fujitsu machine with

  <cpu mode='host-passthrough' check='none'>
    <feature policy='disable' name='sve'/>
  </cpu>


inducing at qemu command line level: -cpu host,sve=off

The installed glibc is 2.28-184.el8
Yihuang, please can you move this BZ to verified?

Comment 11 Yihuang Yu 2022-01-18 01:57:41 UTC
Thank you Eric for your help, I will set "Tested" first.

Comment 14 Yihuang Yu 2022-01-21 05:36:04 UTC
Test with glibc-2.28-184.el8.aarch64 on RHEL-8.6.0-20220118.5 compose, test case passed without call trace occurs.

(2/4) Host_RHEL.m8.u6.product_rhel.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.8.6.0.aarch64.io-github-autotest-qemu.sve_basic.arm64-pci: PASS (384.85 s)
(3/4) Host_RHEL.m8.u6.product_rhel.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.8.6.0.aarch64.io-github-autotest-qemu.sve_basic.unsupported_length.arm64-pci: PASS (38.20 s)
(4/4) Host_RHEL.m8.u6.product_rhel.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.8.6.0.aarch64.io-github-autotest-qemu.sve_basic.unsupported_length.invalid_length.arm64-pci: PASS (8.33 s)

Comment 15 Martin Coufal 2022-01-21 09:27:46 UTC
Thank you both @yihyu and @eric.auger for testing.

Comment 18 errata-xmlrpc 2022-05-10 15:18:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (glibc bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:2005


Note You need to log in before you can comment on or make changes to this bug.