Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp554912pxb; Wed, 25 Aug 2021 09:19:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSjnqtPZzCrBFYTRFY6NoIQSOsxLcIVRm4Z5rUW+HI1IJf2Sgc6vV4qHe1iSdSFOnE0TKD X-Received: by 2002:a17:906:49d5:: with SMTP id w21mr46471918ejv.30.1629908385936; Wed, 25 Aug 2021 09:19:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629908385; cv=none; d=google.com; s=arc-20160816; b=Q1Sm2Fcu+QkB50bwZEyGAL8awdsNGe6JaQDjYuvbqAQ0usG9klY8E1k1dUB/SFdL0N OWDJ0dPd1rEy1v5Xmyv/uJyZcyKt5oUfF7JOblXwpB3HyQvHQyV5XSgy+NZtNuL3vCbO tw3JOsIsQqTeq3ib2tzYm1O3rpmh8tkD4iDaT8Xr3swfkq2sy6vDqLcxOQ2qjSjjSaWC NrRT2Rbz3ovs4KtI15BLWp2zZrVVAjPMN4Dq3XhuvZGJ/vgr4sD2NNvQPJj64lWGVgvr L+H0OKNb69QS2UH+V7rDk/6D47flk0tyWz7XBHzauHLW1xgCC16fKb594HcxjHy2afsu Yc8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from; bh=ydCi3RJfE4i2iJ0wd3Kq+W7Tq108I0RWVN4eNpZLL68=; b=NV3o0WjxrN/snDr34ueEmMbckQEaEWvt5eSOrCIHdeTnhoz87rUxy6jB2Nw+0iysLi nAaYwZcx12AfXjWkV28JFMk9nenclEVIn8ySy9VIPahWEuuLqsJ3goZXLEkPFXwoEP8P Q9V/O0cN2hmtUef5LR95dsNd8Uw/N6CaLNXCZKZsZR/Nfluz5IxtcouCDy0NAgtNUuoT SvscRj4aDEWR26xAiZb5u4+rG7y60biBZLLWCUOf2UxpSnygzdG25t/L+nKSZb4knlzU voolxSsVkbZtAk7pdTTbuMkpgxIEbyNGgo6ajdIJW4OMICAbboQWoZCFViH32aQ8oN+3 /+Yg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j15si419033edq.329.2021.08.25.09.19.21; Wed, 25 Aug 2021 09:19:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240819AbhHYQSQ (ORCPT + 99 others); Wed, 25 Aug 2021 12:18:16 -0400 Received: from foss.arm.com ([217.140.110.172]:54682 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240453AbhHYQSJ (ORCPT ); Wed, 25 Aug 2021 12:18:09 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6F8F91042; Wed, 25 Aug 2021 09:17:23 -0700 (PDT) Received: from monolith.cable.virginm.net (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 199F83F66F; Wed, 25 Aug 2021 09:17:21 -0700 (PDT) From: Alexandru Elisei To: maz@kernel.org, james.morse@arm.com, suzuki.poulose@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, will@kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH v4 07/39] KVM: arm64: Unlock memslots after stage 2 tables are freed Date: Wed, 25 Aug 2021 17:17:43 +0100 Message-Id: <20210825161815.266051-8-alexandru.elisei@arm.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210825161815.266051-1-alexandru.elisei@arm.com> References: <20210825161815.266051-1-alexandru.elisei@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Unpin the backing pages mapped at stage 2 after the stage 2 translation tables are destroyed. Signed-off-by: Alexandru Elisei --- arch/arm64/kvm/mmu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c index cd44b6f2c53e..27b7befd4fa9 100644 --- a/arch/arm64/kvm/mmu.c +++ b/arch/arm64/kvm/mmu.c @@ -1907,6 +1907,7 @@ void kvm_arch_memslots_updated(struct kvm *kvm, u64 gen) void kvm_arch_flush_shadow_all(struct kvm *kvm) { kvm_free_stage2_pgd(&kvm->arch.mmu); + unlock_all_memslots(kvm); } void kvm_arch_flush_shadow_memslot(struct kvm *kvm, -- 2.33.0