Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1348485

Summary: backport gic fixes from stable
Product: Red Hat Enterprise Linux 7 Reporter: Andrew Jones <drjones>
Component: kernel-aarch64Assignee: Andrew Jones <drjones>
kernel-aarch64 sub component: Other QA Contact: Erico Nunes <ernunes>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: jbastian, mlangsdo, sherold
Version: 7.3   
Target Milestone: rc   
Target Release: ---   
Hardware: aarch64   
OS: Unspecified   
Whiteboard:
Fixed In Version: kernel-aarch64-4.5.0-0.44.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 22:46:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1174832    

Description Andrew Jones 2016-06-21 09:48:32 UTC
There are a couple fixes in stable that I think we should take

f86c4fbd930ff irqchip/gic: Ensure ordering between read of INTACK and shared data
dd5f1b049dc13 irqchip/gic-v3: Fix ICC_SGI1R_EL1.INTID decoding mask

The first would be tough to test, but the commit message sold me. The second isn't a problem for a Linux guest kernel, atm, but I can reproduce easily with kvm-unit-tests.

Comment 1 Andrew Jones 2016-06-21 12:07:12 UTC
Forgot

7c9b973061b03 irqchip/gic-v3: Configure all interrupts as non-secure Group-1

This one is necessary to be able to run the RHELSA kernel under QEMU emulation (TCG)

Comment 3 Erico Nunes 2016-07-29 16:59:56 UTC
Verified on cavium-thunderx2-01.khw.lab.eng.bos.redhat.com , kernel 4.5.0-0.47.el7.aarch64. I asked drjones for suggestions on how to test these patches, and executed the tests below:

(In reply to Andrew Jones from comment #0)
> f86c4fbd930ff irqchip/gic: Ensure ordering between read of INTACK and shared
> data
> dd5f1b049dc13 irqchip/gic-v3: Fix ICC_SGI1R_EL1.INTID decoding mask

Ran kvm-unit-tests from https://github.com/rhdrjones/kvm-unit-tests.git , branch arm/gic (commit 47722c7). This caused a kernel panic when testing without the fix, but works now with the fix:

[root@cavium-thunderx2-01 kvm-unit-tests]# uname -r
4.5.0-0.47.el7.aarch64
[root@cavium-thunderx2-01 kvm-unit-tests]# dmesg | grep -i gic
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] GIC: using LPI property table @0x0000000ffbf60000
[    1.065786] CPU features: detected feature: GIC system register CPU interface
[    1.102768] ACPI: Using GIC for interrupt routing
[    5.706505] kvm [1]: disabling GICv2 emulation
[    5.706519] kvm [1]: GIC V3, GICv Base=0x0, IRQ=56
[   11.469482] sd 0:0:0:0: [sda] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
[root@cavium-thunderx2-01 kvm-unit-tests]# qemu-system-aarch64 --version
QEMU emulator version 2.6.90 (v2.7.0-rc0), Copyright (c) 2003-2008 Fabrice Bellard
[root@cavium-thunderx2-01 kvm-unit-tests]# ./run_tests.sh 
PASS selftest-setup (2 tests)
PASS selftest-vectors-kernel (2 tests)
PASS selftest-vectors-user (2 tests)
PASS selftest-smp (97 tests)
SKIP gicv2-ipi (timeout -k 1s --foreground 90s qemu-system-aarch64 -machine virt,gic-version=host,accel=kvm -cpu host -device virtio-serial-device -device virtconsole,chardev=ctd -chardev testdev,id=ctd -display none -serial stdio -kernel _NO_FILE_4Uhere_ -smp 8 -machine gic-version=2 -append ipi
KVM_SET_DEVICE_ATTR failed: Invalid argument)
PASS gicv3-ipi (3 tests)



(In reply to Andrew Jones from comment #1)
> 7c9b973061b03 irqchip/gic-v3: Configure all interrupts as non-secure Group-1

Ran qemu-system-aarch64 with RHELSA kernel as a guest, boots up to shell without hanging. This was tested to hang during boot without the fix, but works now with the fix:

[root@cavium-thunderx2-01 ~]# qemu-system-aarch64 -M virt,accel=tcg,gic-version=3 -cpu cortex-a57 -display none -serial stdio -kernel vmlinuz-4.5.0-0.48.el7.aarch64 --initrd initramfs-4.5.0-0.48.el7.aarch64.img -m 1024 -append 'init=/bin/sh quiet'
[    0.000000] ACPI: Failed to init ACPI tables
[    2.885556] dmi: Firmware registration failed.
[   17.123499] kvm [1]: HYP mode not available
[   18.648617] dmi-sysfs: dmi entry is absent.

 [ ... ]

Entering emergency mode. Exit the shell to continue.
Type "journalctl" to view system logs.
You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot
after mounting them and attach it to a bug report.

:/#

Comment 5 errata-xmlrpc 2016-11-03 22:46:30 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, 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://rhn.redhat.com/errata/RHBA-2016-2145.html