Re: arm64 regression in kernel 5.12 related to the (n)VHE
From: Rafał Miłecki <zajec5@gmail.com>
Date: 2021-08-12 07:40:53
On 12.08.2021 08:51, Marc Zyngier wrote:
Interestingly, all your CPUs are booting at EL2. Which is great. Can you try and enable KVM on your existing 5.10 kernel? Just selecting CONFIG_KVM should be enough. Does it boot correctly with KVM enabled? My suspicion is that the firmware doesn't set SCR_EL3.HCE, and that the HVC instruction UNDEFs at EL1. That would be bad news.
Interesting! I had to enable CONFIG_VIRTUALIZATION and CONFIG_NET first. First I verified kernel built with those options still boots. It does. Then I enabled CONFIG_KVM and kernel seems to hang around switching from bootconsole to the console. Starting program at 0x0000000000080000 /memory = 0x40000000 WARNING: Node's property /reserved-memory/dt_reserved_buffer is not defined WARNING: Node's property /reserved-memory/dt_reserved_flow is not defined WARNING: Node's property /reserved-memory/dt_reserved_dhd2 is not defined Booting Linux on physical CPU 0x0000000000 [0x420f1000] Linux version 5.11.22-g0453a426c37b (rmilecki@localhost.localdomain) (aarch64-buildroot-linux-uclibc-gcc.br_real (Buildroot -g91617ed) 9.3.0, GNU ld (GNU Binutils) 2.33.1) #8 SMP Thu Aug 12 09:25:55 CEST 2021 Machine model: Asus GT-AC5300 earlycon: bcm63xx_uart0 at MMIO 0x00000000ff800640 (options '') printk: bootconsole [bcm63xx_uart0] enabled efi: UEFI not found. [Firmware Bug]: Kernel image misaligned at boot, please fix your bootloader! Zone ranges: DMA [mem 0x0000000000000000-0x000000003fffffff] DMA32 empty Normal empty Movable zone start for each node Early memory node ranges node 0: [mem 0x0000000000000000-0x000000003fffffff] Initmem setup node 0 [mem 0x0000000000000000-0x000000003fffffff] percpu: Embedded 18 pages/cpu s43904 r0 d29824 u73728 Detected VIPT I-cache on CPU0 CPU features: detected: ARM erratum 843419 Built 1 zonelists, mobility grouping on. Total pages: 258048 Kernel command line: earlycon=bcm63xx_uart,0xff800640 Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear) Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear) mem auto-init: stack:off, heap alloc:off, heap free:off Memory: 1019556K/1048576K available (4352K kernel code, 678K rwdata, 860K rodata, 2496K init, 232K bss, 29020K reserved, 0K cma-reserved) SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 rcu: Hierarchical RCU implementation. rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies. NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0 GIC: Using split EOI/Deactivate mode random: get_random_bytes called from start_kernel+0x33c/0x52c with crng_init=0 arch_timer: cp15 timer(s) running at 50.00MHz (phys). clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xb8812736b, max_idle_ns: 440795202655 ns sched_clock: 56 bits at 50MHz, resolution 20ns, wraps every 4398046511100ns Console: colour dummy device 80x25 printk: console [tty0] enabled printk: bootconsole [bcm63xx_uart0] disabled (Unless it's a false conclusion and CONFIG_KVM just breaks console somehow) Enabling CONFIG_KVM resulted in enablig few more options but I believe it's actually CONFIG_KVM itself that affects booting process.
--- config-nokvm 2021-08-12 09:21:50.670046231 +0200
+++ config-kvm 2021-08-12 09:22:35.897103038 +0200@@ -292,6 +292,7 @@ CONFIG_ARM64_ERRATUM_824069=y CONFIG_ARM64_ERRATUM_819472=y CONFIG_ARM64_ERRATUM_832075=y +CONFIG_ARM64_ERRATUM_834220=y CONFIG_ARM64_ERRATUM_843419=y CONFIG_ARM64_ERRATUM_1024718=y CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y
@@ -502,8 +503,21 @@ CONFIG_ARCH_SUPPORTS_ACPI=y # CONFIG_ACPI is not set +CONFIG_IRQ_BYPASS_MANAGER=y CONFIG_VIRTUALIZATION=y -# CONFIG_KVM is not set +CONFIG_KVM=y +CONFIG_HAVE_KVM_IRQCHIP=y +CONFIG_HAVE_KVM_IRQFD=y +CONFIG_HAVE_KVM_IRQ_ROUTING=y +CONFIG_HAVE_KVM_EVENTFD=y +CONFIG_KVM_MMIO=y +CONFIG_HAVE_KVM_MSI=y +CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y +CONFIG_KVM_VFIO=y +CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL=y +CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y +CONFIG_HAVE_KVM_IRQ_BYPASS=y +CONFIG_HAVE_KVM_VCPU_RUN_PID_CHANGE=y # # General architecture-dependent options
@@ -616,6 +630,7 @@ # CONFIG_IOSCHED_BFQ is not set # end of IO Schedulers +CONFIG_PREEMPT_NOTIFIERS=y CONFIG_ARCH_INLINE_SPIN_TRYLOCK=y CONFIG_ARCH_INLINE_SPIN_TRYLOCK_BH=y CONFIG_ARCH_INLINE_SPIN_LOCK=y
@@ -712,6 +727,7 @@ CONFIG_MIGRATION=y CONFIG_PHYS_ADDR_T_64BIT=y CONFIG_BOUNCE=y +CONFIG_MMU_NOTIFIER=y # CONFIG_KSM is not set CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y
@@ -2508,6 +2524,7 @@ CONFIG_DECOMPRESS_LZ4=y CONFIG_DECOMPRESS_ZSTD=y CONFIG_GENERIC_ALLOCATOR=y +CONFIG_INTERVAL_TREE=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y CONFIG_HAS_DMA=y
_______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel