From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from esa10.hc1455-7.c3s2.iphmx.com (esa10.hc1455-7.c3s2.iphmx.com [139.138.36.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1DC232B107 for ; Wed, 20 May 2026 07:32:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=139.138.36.225 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779262352; cv=none; b=BbXfh4U+IFHepUE2BO629kHqnNv+VzCeyzhDgLrR6jTjflRU+1slaxJTbPajlx9PyXeS/22LbD9GlM8RXeBUpmFOQMbDLLzfTaKyoc0l2jxoWcMKX+e5hRp2Ceu9FVLqRV8EPazc1Qj+DmwUmTyw6SOe2/jEjMM36vuJ2a00vOQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779262352; c=relaxed/simple; bh=3E0wRnExgvvSMI/XFpx5dzXw0vlKkYMdNcB4WowrgL8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CUewSnomutrRpC84lMKcK/b/li/WkedrRxs9b6uR3GDu1kYYPKJXfiQ0YG0sdb7yEXk+Wtxz5nYZKqstdaY/c9qoSZxrzy7U0m8/kouq+ZfdCSwAdTgf3a5ljNw70mgOXCoQbnl1KlQ2LKifGGcwM4oZGQlIf1AtVMkePD08aQM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=fujitsu.com; spf=pass smtp.mailfrom=fujitsu.com; dkim=pass (2048-bit key) header.d=fujitsu.com header.i=@fujitsu.com header.b=ifjdshAv; arc=none smtp.client-ip=139.138.36.225 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=fujitsu.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fujitsu.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fujitsu.com header.i=@fujitsu.com header.b="ifjdshAv" DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj2; t=1779262351; x=1810798351; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=3E0wRnExgvvSMI/XFpx5dzXw0vlKkYMdNcB4WowrgL8=; b=ifjdshAvCJeHPNXD5xK8jXq9hIa7Lidk0Aj2jc/8V16qj7MPpxwTIR45 FpWoxZVOcgHu4JW+XX/bd7Ev0dKyU35zbgdGvLRZlKV9RO9wH9pQ3+r+/ sE4VBZuwnQDvPfyhTzhsA3JMxJJi4WPEfQ9Px4if3Ln5ZNAOdT5an3E05 tItfEsw5u8Ws6Kd5O8BFea+9lH9SaIWkSq5rYmNQrAGhqCnqo0/ntX4b2 Bx2244l3BJh+STbVJczzs4H04hMH9tFPICcvV9I81+laiGXXqGYpE4HoH zS2RxRrFE247aW9ylEQmf35Qpj7jqE95YOy/OqX79UMotPwQOjbS0yTr6 Q==; X-CSE-ConnectionGUID: /btilAFoQx6eDntweMnwEg== X-CSE-MsgGUID: yKLFwBykRyiUygnOxl3jQg== X-IronPort-AV: E=McAfee;i="6800,10657,11791"; a="227363233" X-IronPort-AV: E=Sophos;i="6.23,243,1770562800"; d="scan'208";a="227363233" Received: from gmgwuk01.global.fujitsu.com ([172.187.114.235]) by esa10.hc1455-7.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2026 16:31:20 +0900 Received: from az2uksmgm3.o.css.fujitsu.com (unknown [10.151.22.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by gmgwuk01.global.fujitsu.com (Postfix) with ESMTPS id 6C0341C0168B for ; Wed, 20 May 2026 07:31:20 +0000 (UTC) Received: from az2uksmom4.o.css.fujitsu.com (az2uksmom4.o.css.fujitsu.com [10.151.22.204]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by az2uksmgm3.o.css.fujitsu.com (Postfix) with ESMTPS id 282D7C09670 for ; Wed, 20 May 2026 07:31:20 +0000 (UTC) Received: from sm-arm-grace07 (sm-x86-stp01.soft.fujitsu.com [10.124.178.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by az2uksmom4.o.css.fujitsu.com (Postfix) with ESMTPS id B953340D518; Wed, 20 May 2026 07:31:15 +0000 (UTC) Date: Wed, 20 May 2026 16:31:12 +0900 From: Itaru Kitayama To: Wei-Lin Chang Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, Marc Zyngier , Oliver Upton , Joey Gouly , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon Subject: Re: [PATCH v3 0/5] KVM: arm64: nv: Implement nested stage-2 reverse map Message-ID: References: <20260510145338.322962-1-weilin.chang@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260510145338.322962-1-weilin.chang@arm.com> Hi Wei Lin, On Sun, May 10, 2026 at 03:53:33PM +0100, Wei-Lin Chang wrote: > Hi, > > This is v3 of optimizing the shadow s2 mmu unmapping during MMU > notifiers. > > Two new preparatory patches are added, one reduces a hole in kvm_s2_mmu > and another refactors the code a bit during s2 faults. Other changes are > listed below. > > * Changes from v2 [1]: > > - Removed "polluted" teminology. > > - Use xa_{mk, to}_value() when storing and retriving values from maple > trees. > > - Avoid using the 63rd bit in maple tree values so that xa_{mk, to}_value() > does not lose us a bit. > > - Added reverse map removal during TLBI handling. > > - Other suggested refactorings. > > Thanks! With this series applied on the recent kvmarm/fixes (minor local modification), your v3 hello_nested runs fine on all three page granules; without this 16KB kernel can't handle stage 2 unmapping paths. I tested using the latest QEMU only so wonder how you're testing. Thanks, Itaru. > > [1]: https://lore.kernel.org/kvmarm/20260411125024.3735989-1-weilin.chang@arm.com/ > > Wei-Lin Chang (5): > KVM: arm64: Use a variable for the canonical GPA in kvm_s2_fault_map() > KVM: arm64: Move shadow_pt_debugfs_dentry to reduce holes in > kvm_s2_mmu > KVM: arm64: nv: Avoid full shadow s2 unmap > KVM: arm64: nv: Remove reverse map entries during TLBI handling > KVM: arm64: nv: Create nested IPA direct map to speed up reverse map > removal > > arch/arm64/include/asm/kvm_host.h | 17 +- > arch/arm64/include/asm/kvm_nested.h | 6 + > arch/arm64/kvm/mmu.c | 43 +++-- > arch/arm64/kvm/nested.c | 238 +++++++++++++++++++++++++++- > arch/arm64/kvm/sys_regs.c | 3 + > 5 files changed, 290 insertions(+), 17 deletions(-) > > -- > 2.43.0 >