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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 6604CC7EE25 for ; Wed, 7 Jun 2023 13:29:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AKwrrZvdrUe7pV8wqG3PPkNS0evyWeL7QfElEYQDSyo=; b=RSR6SnqA8Xky5A uaKq+dYWKuN4L31gliN17ZPLw3dfuH4hzQnjKavBx/6KY0paMwkwdfESTf2VSoave2pgKPHBoycBM dHKDse+PV+9KI9kp1R2dNmICUjVvJn+htzGRIUNGC8fxbIQsB7gjzT112nj5YYmaAK6YU4J6WaubR mtG9A17uMADdxiL67InfKUoxuofAEiI075CQ5NIkw95jtSwgeI4waO2fwuVUtut2Vq1WT1lGs0CyD s0vsc3VlwaljCq6I3tr2APrw+U68zSiOfd1Y/AHB/eGuWd+mPpy4ab7KhXVDiTwyP3V4VJrRIe5hA /TGfb9B5Sm61TDOHRxXw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q6tDQ-0066Jx-0V; Wed, 07 Jun 2023 13:28:44 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q6tDM-0066JH-2R for linux-arm-kernel@lists.infradead.org; Wed, 07 Jun 2023 13:28:42 +0000 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-3f61530506aso74214955e9.1 for ; Wed, 07 Jun 2023 06:28:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686144516; x=1688736516; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=NCR0Rk6m49JCUnfFidBMgakEp3k+e1YUOo/bxDNnCyg=; b=qlx4HGb3g1M8KIQ7tSfdrAabKQYEXrZznam6R2hO1jgi58Xrv6Qw+qG+kq+WFTjL2q A7cxSjK8Y1C4oZYyyLcBHkc/QnkHxETzFVUu04q+42jEKKLH8RymeFHcq38ZjEdrdRa2 nM/Y0JYk6NSR3/goE3XcnjjZ/bE620Fj963hAXDwWQbXdGfE/rNaokMzedlAdDCkw7Kg zafDCEEfyqFIeqOb3Wjx2qhQei9ya8JhsD5lIlzC32fYJe/T3CIjKX7hpBkBzKfoAf/i ++gzDXgeawjf7Ep0uzFO5NHZZpoMDPzAQKQVMMNUuA5VcbA3S5wtQUFeSIeTGjCOyPAY m1+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686144516; x=1688736516; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=NCR0Rk6m49JCUnfFidBMgakEp3k+e1YUOo/bxDNnCyg=; b=i99bzhFWRxrzhSUCDueMs/VnaJNWxJkn6KUvdauyz2x3PGWT50vpSgkLn8VQqdpJkf VaATV9nXfdJ5K4vQKEuqC7odSDZZxqdeluKf935r9MLmF8DfR7zPXDgXvSmtdqSIV9qz GzYAom/B347yWgvgHe0OWlpMp40ENUcN+YBtY25RVVX/ZrCYwMPQzRUkV0O21BA/W1Oa Vwvt6yWldSy5duKTy9bxKCNX+3ThNzzzAP9tZD9Tcb39gPOLaq8SydUrKZwhC701y62M v/RkTQSzmZDfKHwlFjefqRR+cmFOH+dZl8JYZwvAhwQsEdPlDTQUrw7KECoX+o5kkIpo tlfw== X-Gm-Message-State: AC+VfDz23Wmpcd2vGYRjxoLRwhm6GiwFBup/Crv3nosiY4b1WcsXBtjH /y7u7ZZVQQZ8q7X3/qpC3WRA7Q== X-Google-Smtp-Source: ACHHUZ5nu5UMw2zXQy7pWjoHQNbAcv+sR+coiEHan62nqyjEaqy1g+18b28XjsCCSB5vi90X94WvMQ== X-Received: by 2002:a7b:cd10:0:b0:3f7:e65f:7adf with SMTP id f16-20020a7bcd10000000b003f7e65f7adfmr5755472wmj.14.1686144515975; Wed, 07 Jun 2023 06:28:35 -0700 (PDT) Received: from myrica (5750a5b3.skybroadband.com. [87.80.165.179]) by smtp.gmail.com with ESMTPSA id a4-20020a05600c224400b003f5ffba9ae1sm2182683wmm.24.2023.06.07.06.28.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 06:28:35 -0700 (PDT) Date: Wed, 7 Jun 2023 14:28:19 +0100 From: Jean-Philippe Brucker To: Marc Zyngier Cc: Oliver Upton , Nathan Chancellor , james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev Subject: Re: [PATCH 1/4] KVM: arm64: vgic: Fix a circular locking issue Message-ID: <20230607132819.GA1086197@myrica> References: <20230518100914.2837292-1-jean-philippe@linaro.org> <20230518100914.2837292-2-jean-philippe@linaro.org> <20230606221525.GA2269598@dev-arch.thelio-3990X> <87h6rjoeh7.wl-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87h6rjoeh7.wl-maz@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230607_062840_802654_3627B288 X-CRM114-Status: GOOD ( 37.90 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jun 07, 2023 at 09:37:08AM +0100, Marc Zyngier wrote: > > > After this change landed in 6.4-rc5 as commit 59112e9c390b > > > ("KVM: arm64: vgic: Fix a circular locking issue"), my QEMU Fedora VM on > > > my SolidRun Honeycomb fails to get to GRUB. > > > > [...] > > > > > I built a kernel with CONFIG_PROVE_LOCKING=y but I do not see any splats > > > while this is occurring. Additionally, neither my Raspberry Pi 4 or my > > > Ampere Altra system have any issues, so it is possible this could be a > > > platform specific problem. I am more than happy to provide any > > > additional information and test kernels and patches to help get to the > > > bottom of this. My kernel configuration is attached. > > > > I was unable to reproduce the issues you're seeing on 6.4-rc5, but I > > don't have any different machines from you available atm. Based on > > your description it sounds like your VM was able to do _something_ > > since it sounds like a few escape codes got out over serial... > > I'm wondering if you're getting wedged somewhere on a VGIC MMIO access. > > > > We don't have a precise tracepoint for VGIC accesses, but kvm:kvm_mmio > > should do the trick. So, given that you're the lucky winner at > > reproducing this bug right now, do you mind collecting a dump from that > > tracepoint and sharing the access that happens before your VM gets > > wedged? > > > > Curious if Marc has any additional insight, since (unsurprisingly) he > > has a lot more experience in dealing with the GIC than I. In the > > meantime I'll stare at the locking flows and see if anything stands > > out. > > RPI4 is GICv2 nVHE, the NXP machine is GICv3 nVHE, and the Altra is > GICv3 VHE. Not sure this is relevant here, but that's one data point. > > Having been able to start the guest means that we should have fully > initialised the GIC. So a lockup is likely be an interaction with the > GIC emulation itself, either because we failed to release a lock > during initialisation, or due to some logic error in the GIC emulation > (which is not necessarily MMIO...). > > I've just given 6.4-rc5 a go on my Synquacer, which is the closest > thing I have to Nathan's NXP box, and I can't spot anything odd. > > It would also help to get access to the EDK2 build. It wouldn't be the > first time that a change in KVM breaks some EDK2 behaviour. I found a build here: https://koji.fedoraproject.org/koji/buildinfo?buildID=2204660 edk2-aarch64-20230301gitf80f052277c8-31.fc39.noarch.rpm usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.raw Haven't managed to reproduce the issue yet, but I can only test with QEMU emulating the cortex-a72 and GICv3 at the moment, and I still need to reproduce the VMM command-line exactly. I think it would be helpful to get the exact grub image as well, right now I'm using Fedora-Server-KVM-38-1.6.aarch64.qcow2 Thanks, Jean > > Finally, on top of the traces that Oliver asked above, looking at > where the QEMU vcpu threads are would be interesting (I assume they'd > be sleeping in the kernel). > > Thanks, > > M. > > -- > Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel