From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.2 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E647C4338F for ; Thu, 12 Aug 2021 07:40:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C5CC16101E for ; Thu, 12 Aug 2021 07:40:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C5CC16101E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qV+QW7SfCxDxhBfHTtidA7WbEe2xuTvoR9xcXYGwIb8=; b=IXteExa+kQ6YQh2qARPOriYh5b yRC9++gJ/Ph8DzdWh1nFGawpZFqTsWHCCxYS6H97JX82bYhjeyTtVJW1U0SPgXGMrD1Dv+UnMckfU 7RKFddbzXlz1N6UN29hy2Q16ZPc6uMMx8hKsjHFTGrjKKtmHLfYJd5OhX3YoxiCdCTIDUDqrmtlc+ ET46vPGiJCNnBnFbrpCiRpT+LYhJix1qeiG1xo/V5kcZ3+5KRM4QMnMEm2R3iHSxMX3BRNkKNNqL+ TCLLmUgcAZpyqW7Epl/xeXvAh+fPCWrcjG1k3P+EXoB3j7XTL3nwsd4fMguXRFdrIV/GZo8OTMLac j81epY8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mE5GP-008vxz-30; Thu, 12 Aug 2021 07:36:31 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mE5CD-008ukj-IQ for linux-arm-kernel@lists.infradead.org; Thu, 12 Aug 2021 07:32:11 +0000 Received: by mail-lf1-x12b.google.com with SMTP id z2so11819093lft.1 for ; Thu, 12 Aug 2021 00:32:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=K4u3zbW+rN48fh89Z7dz6MVMhEVBRtsEQtLGtKUldFI=; b=p4xml8+uy/mvzB+fk4qb4MdaT8i5fwsNmajGJZ5a9ymc5sYNtOoynK1KmzJK+uTD+/ 2hBbXn/1TsK8MvJNYWjkB5owqYkotQ3llZ/ZS4QKJqSZxpHtacblXoYT0MVt1vAtTnCM JL863mkvBsi9+YJ9wtTUpMNJeExhlt6GDvdKqNHe3uhlHjJbQ4gtZiS2/GpqiMZU2Hyl 7l8yVrBb0P8LlPNV4OQOAk4kVSkeukBcYNieLzIXpQ6lNsixt2WUcoPqGYocBIOxgkjl M2DZX69QR6L2tNDd1zOBQZFHBhxfFXhH0khLVtDRsToh3Fl6gzaeMgc0srIONleP92fF PpTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=K4u3zbW+rN48fh89Z7dz6MVMhEVBRtsEQtLGtKUldFI=; b=nrA4i/0ku1DwEgTermuNon1uEOS755+Ju/aK1orHYgepJQUtvfe+3QBY4cKXkxPj8t FMsBAMhVwofWUaUp6JVd2mchM5+c40PJ2ugaIjZpiNEy5o189gJSKWP+03t6cP+SVZQe dBe+gjCBmIuT8UXRS4QijNb8mzmZyVMdnI10654PR0/k+C6o0K3hIAz7SD6bqYVdy7bm S5sx/2mJcdAsWBCPLgSRFcQy3lHywG2bz5PFh0THGjNZcDGSb1La6o8bbheFXrxJ8j9V CL3IxqOxSSjRf/eufHIcZzLd0S/CVOP4qRw78ofDJbGst6BCtNAAnqg3OiT3W5sbsghZ wK1w== X-Gm-Message-State: AOAM532kOo9Au9ilry58aDH198eRM94qtNIGFPZIm89s4FvBcZc0yXhD wvYPjhtWG1c+YMg+Lyr50Rg= X-Google-Smtp-Source: ABdhPJwqjOEVal4izPpv2HFfKgSARRi1jkKE9t9wIH3bfUsf3j8LkCrJz7Ci1Ej4UFeuVqSCieaC4w== X-Received: by 2002:ac2:5192:: with SMTP id u18mr1586842lfi.527.1628753525089; Thu, 12 Aug 2021 00:32:05 -0700 (PDT) Received: from localhost.localdomain (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.googlemail.com with ESMTPSA id n24sm111755ljj.107.2021.08.12.00.32.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Aug 2021 00:32:04 -0700 (PDT) Subject: Re: arm64 regression in kernel 5.12 related to the (n)VHE To: Marc Zyngier Cc: David Brazdil , Catalin Marinas , Will Deacon , linux-arm-kernel , Mark Rutland , Ard Biesheuvel , Marco Elver , BCM Kernel Feedback , Florian Fainelli References: <53f3a2d2-22f8-edee-2507-d41a4090dad7@gmail.com> <87r1f09md8.wl-maz@kernel.org> <87czqj9mvo.wl-maz@kernel.org> From: =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= Message-ID: Date: Thu, 12 Aug 2021 09:32:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <87czqj9mvo.wl-maz@kernel.org> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210812_003209_711358_59662F54 X-CRM114-Status: GOOD ( 19.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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