Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp327621rdb; Tue, 19 Dec 2023 19:40:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IGC4Rp2qQxQuI1PtgSDklaBIt8+lHjkQYVdWgaoBroqn5iQKj93yQ9iobu6/DjCB5FY2W2q X-Received: by 2002:a05:6e02:1d16:b0:35f:c9a7:aa87 with SMTP id i22-20020a056e021d1600b0035fc9a7aa87mr548326ila.87.1703043648208; Tue, 19 Dec 2023 19:40:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703043648; cv=none; d=google.com; s=arc-20160816; b=tU5CegbzhiAosMMLW7NuZOTCoIsKEVRLG2BByScMse2dVv8MqkMlY5ehcraeZA8B25 zZ9EY/h1qQ1znuWCs8nhhBBvIVMvT9E4PSudZCo3cDWESHLR/NFyH+Ymj6FeoguF3Bmk nvM8bvlMy9akc5J1hYVLO0K0IR+ep+KVi0UNTgN4xdW8yUObB17tt0Nut89X47tAgtn+ IfO4uVsu9eGgvhsZUhIkElyZLf+Zz4H2PGn7WdMUoeJ4h+IKUYxikx6Z+2nWdssv7d7G Fh4Tbfv3wESfOPYOjvktOBnawsjF9GBNae21E8Akx3qFNV1Yf8bLPEXdhdD9qtsVdWyk X34g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=LxXYxW2bs3l7KuPRCYllTwAzb73+N1q9RxfmHtoBHi8=; fh=GFHoB4Vcc4yzsUBJskbj+oNjpU2L93e3eUaDyXTSZq4=; b=TLXrAO53Jq9M+HFIvSum3vZIib5FMSslVwoFYXYUdkuNpVqZLapS6fsiymMEpVJtqf QZin/LcAQ4ApW7CZQq06zk695wzin/fKtuNRZIbr6QNnAa4tITl1Lzjj4bpoDsc17IvA S9ADSEdo8vKuvbjUPgxUhrSEkx2nnUGJsXPEoLBAPFhMcwf7NrSx4YlQ/gBYursFS4wC 9FJ5cN4ST99ufAw5u1gJx029jIKSxzS4/6y8EPQWNwnszDSLseu8hm2jQyfy10f9G3FR zfhbLR2SZRQgZXotDuHmLFgNjt29vvOAmGgZrtn7OzeXbo1mQhBLbQ7oWqKLFh5LLkgi SbCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b="FE/TZjwL"; spf=pass (google.com: domain of linux-kernel+bounces-6323-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6323-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id ba6-20020a170902720600b001cfb52ebfdbsi20261526plb.152.2023.12.19.19.40.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 19:40:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6323-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b="FE/TZjwL"; spf=pass (google.com: domain of linux-kernel+bounces-6323-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6323-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id BAF7EB24951 for ; Wed, 20 Dec 2023 03:40:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DBF5D8F7D; Wed, 20 Dec 2023 03:40:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=canb.auug.org.au header.i=@canb.auug.org.au header.b="FE/TZjwL" X-Original-To: linux-kernel@vger.kernel.org Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (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 1FDD58C02; Wed, 20 Dec 2023 03:40:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canb.auug.org.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=canb.auug.org.au DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1703043626; bh=LxXYxW2bs3l7KuPRCYllTwAzb73+N1q9RxfmHtoBHi8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=FE/TZjwLf/1r2JSv1gEW2d/POdIGdxzhk1uGywp5bjkqTpv30NZ+K00N6gdJdG0En q8DsuG5vdXNAL9djC4dxY9AnufCRZA1JQWjT6Xf8uL3mI/jeutaUG8W36uwwoLQCeB VKBgNwePzvh/R5FyCNTQr/kAfA2SBOybG3IkmMsmGlaCAoL9AZa8kNY4sJKgdw6ZrX hpDpIWDsjypITPRvR4T+PSDsEyDLwsAblGWGrwl8sXkgZPNYDMWd4DrTqminTUnzpf fVvNNICtZSYhmXQwX7GlvhclRWC1av5pHnyZN1iMNornDDHaYMTE4tw15A0o7LjS8u tTBLRsM+JM5fg== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4Svzpx3Bt1z4wd4; Wed, 20 Dec 2023 14:40:25 +1100 (AEDT) Date: Wed, 20 Dec 2023 14:40:24 +1100 From: Stephen Rothwell To: Paolo Bonzini Cc: Randy Dunlap , Huacai Chen , Huacai Chen , Tianrui Zhao , Bibo Mao , kvm@vger.kernel.org, loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, Xuerui Wang , Jiaxun Yang Subject: Re: [PATCH] LoongArch: KVM: Fix build due to API changes Message-ID: <20231220144024.7d9fd46b@canb.auug.org.au> In-Reply-To: <15ba5868-42de-4563-9903-ccd0297e2075@infradead.org> References: <20231115090735.2404866-1-chenhuacai@loongson.cn> <15ba5868-42de-4563-9903-ccd0297e2075@infradead.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_//S5PCuZDLoPcwX41DFKdeRu"; protocol="application/pgp-signature"; micalg=pgp-sha256 --Sig_//S5PCuZDLoPcwX41DFKdeRu Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi all, On Fri, 15 Dec 2023 21:08:06 -0800 Randy Dunlap wro= te: > > Someone please merge this patch... I have applied it to my merge of the kvm tree today and will keep applying it until it is applied to the kvm tree ... It looks like this: From: Huacai Chen To: Paolo Bonzini , Huacai Chen , Tianrui Zhao , Bibo Mao Cc: kvm@vger.kernel.org, loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, Xuerui Wang , Jiaxun Yang , Huacai Chen Subject: [PATCH] LoongArch: KVM: Fix build due to API changes Date: Wed, 15 Nov 2023 17:07:35 +0800 Commit 8569992d64b8f750e34b7858eac ("KVM: Use gfn instead of hva for mmu_notifier_retry") replaces mmu_invalidate_retry_hva() usage with mmu_invalidate_retry_gfn() for X86, LoongArch also need similar changes to fix build. Fixes: 8569992d64b8 ("KVM: Use gfn instead of hva for mmu_notifier_retry") Signed-off-by: Huacai Chen Reported-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested Acked-by: Randy Dunlap Signed-off-by: Stephen Rothwell --- arch/loongarch/kvm/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/loongarch/kvm/mmu.c b/arch/loongarch/kvm/mmu.c index 80480df5f550..9463ebecd39b 100644 --- a/arch/loongarch/kvm/mmu.c +++ b/arch/loongarch/kvm/mmu.c @@ -627,7 +627,7 @@ static bool fault_supports_huge_mapping(struct kvm_memo= ry_slot *memslot, * * There are several ways to safely use this helper: * - * - Check mmu_invalidate_retry_hva() after grabbing the mapping level, be= fore + * - Check mmu_invalidate_retry_gfn() after grabbing the mapping level, be= fore * consuming it. In this case, mmu_lock doesn't need to be held during = the * lookup, but it does need to be held while checking the MMU notifier. * @@ -807,7 +807,7 @@ static int kvm_map_page(struct kvm_vcpu *vcpu, unsigned= long gpa, bool write) =20 /* Check if an invalidation has taken place since we got pfn */ spin_lock(&kvm->mmu_lock); - if (mmu_invalidate_retry_hva(kvm, mmu_seq, hva)) { + if (mmu_invalidate_retry_gfn(kvm, mmu_seq, gfn)) { /* * This can happen when mappings are changed asynchronously, but * also synchronously if a COW is triggered by --=20 2.39.3 Though my Signed-off-by is not necessary if it applied to the kvm tree. --=20 Cheers, Stephen Rothwell --Sig_//S5PCuZDLoPcwX41DFKdeRu Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAmWCYigACgkQAVBC80lX 0Gw0hgf/dBEXxvqYb+gUvVeOe+ITNt6ui/uaSnXarJOtRq0NUOfL/gW/TGK5NoVO r0MrXU6jAkr1K3+P0NvF/vJ52tlYaRjxNGNiB/cmLocgTLF8nCsjNSL6yTEraGqy L9Lx2osHr8w1VoTL7k2b7Uoa46xk/YCE9ssMNcSJe4w5ONwzqfM/MVplCyV4pDdE 1fppL1Dt7uu5rozcoFPklB5e3kpt0/29/36QnI+fak1nXpSbhKwyxFpSzB8gDJBF aZxgUh5me1CEsLsPP9rRKTaMFg2+KbSjQrmVIfY4cMiqzDBILIntW1sTMfxMP0+W 6prGmrL8hvSA3Z5m0RMSM6m6Jstnow== =eOfT -----END PGP SIGNATURE----- --Sig_//S5PCuZDLoPcwX41DFKdeRu--