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 8BB4FEB64D9 for ; Thu, 29 Jun 2023 07:04:34 +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:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XsaIzHpw1CgSwOe8UO6VdOfN81xB7qDPyHAPumtwlmc=; b=2zkYCJkUQLOXyW XsaC5JXD8k4EK0aVU2XaBJpuFE4Pcic5ZdZPjZe3lE6w4Z8fJrMvuLsyqNU2lTnAJF/z/cMbesIsN Gx1iOypMvnJVUfUc/dbIu2c9tTEFpShhbBgRrV+gcWlnA1+JkXy4TfDuu5YHedTA0zBFCNmxkbwYd OnZbXiJi8gOlVJEy1MdMBKLyf43dTa7yvWRxbiSU0IKvOrJN0VnuXRLL4/2tc6Q6Q/iffc5VNpF/1 VYHv1EPMPrCUbX0txhG+uhaCZgzTySukDPh8Y2hWjC9hPhbD5fge2OXkKJ8W2fcyNvNaX5BszWJiN VLEESFHdPfsgeG+ApDRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qElhD-000Aaf-0I; Thu, 29 Jun 2023 07:04:03 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qElhA-000AaA-23 for linux-arm-kernel@lists.infradead.org; Thu, 29 Jun 2023 07:04:02 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C9E7A614D4; Thu, 29 Jun 2023 07:03:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A4BCC433C0; Thu, 29 Jun 2023 07:03:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688022239; bh=xkLqBErAFocSqwaMvvYgTCSblzk377PNuJV6yLnjSrE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=SkFszQOovfQWK3X0BecUv5fT+qUTVR9q1jxrKrp6xw5JcGljSGpFfLsdurrivhlUF kfpNWLKV2onqO6GU6783CtllxsWkeMeriPkgerxbaqbWiiVkT2JqVQYhppi8Z9ddms cYAF9fmFvmN7rK+WB/yezEYwPuGW3/Ep0JYvl2XqJM/Y4DNS6RsSW06X4sK1TyQ51Q WR+DebxLPcoL1wbKwyvnHuuhEz+ortrlylsMFIpxm2Z1ueDfUQELtSKavXg7YU67ff LFEVdPaVdha4j6TenjUXAjmMdf4lkJEciS6UYo7ImuwDw/J/yjt/Gu8QUOgxZvx/ex Gv+7vGUBh1qeA== Received: from [82.132.185.49] (helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qElh0-009Hdp-4x; Thu, 29 Jun 2023 08:03:56 +0100 Date: Thu, 29 Jun 2023 08:03:36 +0100 Message-ID: <877crmzr5j.wl-maz@kernel.org> From: Marc Zyngier To: Ganapatrao Kulkarni , Miguel Luis Cc: kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Alexandru Elisei , Andre Przywara , Chase Conklin , Christoffer Dall , Darren Hart , Jintack Lim , Russell King , James Morse , Suzuki K Poulose , Oliver Upton , Zenghui Yu , Eric Auger Subject: Re: [PATCH v10 00/59] KVM: arm64: ARMv8.3/8.4 Nested Virtualization support In-Reply-To: References: <20230515173103.1017669-1-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 82.132.185.49 X-SA-Exim-Rcpt-To: gankulkarni@os.amperecomputing.com, miguel.luis@oracle.com, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, alexandru.elisei@arm.com, andre.przywara@arm.com, chase.conklin@arm.com, christoffer.dall@arm.com, darren@os.amperecomputing.com, jintack@cs.columbia.edu, rmk+kernel@armlinux.org.uk, james.morse@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, yuzenghui@huawei.com, eauger@redhat.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230629_000400_776022_B2ACB4D5 X-CRM114-Status: GOOD ( 35.99 ) 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 Hi Ganapatrao, On Wed, 28 Jun 2023 07:45:55 +0100, Ganapatrao Kulkarni wrote: > > > Hi Marc, > > > On 15-05-2023 11:00 pm, Marc Zyngier wrote: > > This is the 4th drop of NV support on arm64 for this year. > > > > For the previous episodes, see [1]. > > > > What's changed: > > > > - New framework to track system register traps that are reinjected in > > guest EL2. It is expected to replace the discrete handling we have > > enjoyed so far, which didn't scale at all. This has already fixed a > > number of bugs that were hidden (a bunch of traps were never > > forwarded...). Still a work in progress, but this is going in the > > right direction. > > > > - Allow the L1 hypervisor to have a S2 that has an input larger than > > the L0 IPA space. This fixes a number of subtle issues, depending on > > how the initial guest was created. > > > > - Consequently, the patch series has gone longer again. Boo. But > > hopefully some of it is easier to review... > > > > I am facing issue in booting NestedVM with V9 as well with 10 patchset. > > I have tried V9/V10 on Ampere platform using kvmtool and I could boot > Guest-Hypervisor and then NestedVM without any issue. > However when I try to boot using QEMU(not using EDK2/EFI), > Guest-Hypervisor is booted with Fedora 37 using virtio disk. From > Guest-Hypervisor console(or ssh shell), If I try to boot NestedVM, > boot hangs very early stage of the boot. > > I did some debug using ftrace and it seems the Guest-Hypervisor is > getting very high rate of arch-timer interrupts, > due to that all CPU time is going on in serving the Guest-Hypervisor > and it is never going back to NestedVM. > > I am using QEMU vanilla version v7.2.0 with top-up patches for NV [1] So I went ahead and gave QEMU a go. On my systems, *nothing* works (I cannot even boot a L1 with 'virtualization=on" (the guest is stuck at the point where virtio gets probed and waits for its first interrupt). Worse, booting a hVHE guest results in QEMU generating an assert as it tries to inject an interrupt using the QEMU GICv3 model, something that should *NEVER* be in use with KVM. With help from Eric, I got to a point where the hVHE guest could boot as long as I kept injecting console interrupts, which is again a symptom of the vGIC not being used. So something is *majorly* wrong with the QEMU patches. I don't know what makes it possible for you to even boot the L1 - if the GIC is external, injecting an interrupt in the L2 is simply impossible. Miguel, can you please investigate this? In the meantime, I'll add some code to the kernel side to refuse the external interrupt controller configuration with NV. Hopefully that will lead to some clues about what is going on. 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