Bug 1348485 - backport gic fixes from stable
Summary: backport gic fixes from stable
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: kernel-aarch64
Version: 7.3
Hardware: aarch64
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Andrew Jones
QA Contact: Erico Nunes
URL:
Whiteboard:
Depends On:
Blocks: 1174832
TreeView+ depends on / blocked
 
Reported: 2016-06-21 09:48 UTC by Andrew Jones
Modified: 2016-11-03 22:46 UTC (History)
3 users (show)

Fixed In Version: kernel-aarch64-4.5.0-0.44.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 22:46:30 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2145 0 normal SHIPPED_LIVE kernel-aarch64 bug fix and enhancement update 2016-11-03 13:11:35 UTC

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


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