Message ID | 20180813145755.16566-38-marc.zyngier@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3E9E814E2 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 13 Aug 2018 15:08:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F8142945F for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 13 Aug 2018 15:08:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 13CA929463; Mon, 13 Aug 2018 15:08:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 88D142945F for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 13 Aug 2018 15:08:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=dqrmkSWxST5GDdCqHGfT9+dWLjOhr+3UeOo9gZlrxDg=; b=G3X2u5RLE028tc9M/rYUWrWhe0 WkxHK+eTTjBiUCgHsUu2icIU77hX2b3gojQMg4w241T32fHCAdFEF7+4HaKFAqoMULm0DKZc4fj92 xqMPIbc8zB4ih3v96eyVleoHw2+/2ZHzGwXa4lKpBDCwenJUq4zFAexDi0HhDA/yJ3hY15Ne9JXbG 3HOt22X7QuV97a5InSXSCSFdSJa2ncG7ief+l9VmNJVfPeNkM3jTB1/6wwzqRrJIzi7Ru8xeI1Rt6 ENLKDL5kE3bqANKLZuUIhRRalqR1LbkpPu6WBZzmKU3jx78PX/c5XP/GPlEC7rBAoBBHdlqHsGuAt o616rruQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fpESE-0004IR-Bd; Mon, 13 Aug 2018 15:08:22 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fpESC-0004Fs-2W for linux-arm-kernel@bombadil.infradead.org; Mon, 13 Aug 2018 15:08:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=xwZ7UMAMnsiwWJI0xs3vEAAoUCLBaq+oPlrS+sEn9ZI=; b=m0L0nmYvoNPGO3OcCbw4cEPiC DgcbHh/vuGSdUF9eepaSyU5uhG1qGciXrFGvabLXEENN9u023ZHZMzhHMQMln4D2NDu4aMl6geT6g hx3Q3r1uBoxlqtpFwKtMMhnLvGmRqFxyoemtcI2pVo109XHK0pp6jXU0Zt6xaqcnEl2SneVGFBVVO 8zlptNjkf/mTXBwiBY69nIL6cV0HTbsvAQhTdeGX0ohRtCEOqT+Tl/hPtSpFfZV1soCtCMwlueP9W 6fliGLAepw5IJSF2RdsiirJSYbmPnH4dwOnb4YhNuWzMsM6EA7STDIeZgPjUOrJMKgdEY6ndxQgSH rcFC6qdpA==; Received: from foss.arm.com ([217.140.101.70]) by casper.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fpEKu-0005Ow-G0 for linux-arm-kernel@lists.infradead.org; Mon, 13 Aug 2018 15:00:50 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 41DE880D; Mon, 13 Aug 2018 08:00:48 -0700 (PDT) Received: from approximate.Emea.Arm.com (approximate.Emea.Arm.com [10.4.13.119]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4FF8D3F5D0; Mon, 13 Aug 2018 08:00:45 -0700 (PDT) From: Marc Zyngier <marc.zyngier@arm.com> To: Paolo Bonzini <pbonzini@redhat.com>, =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= <rkrcmar@redhat.com> Subject: [PATCH 37/37] KVM: arm/arm64: Skip updating PTE entry if no change Date: Mon, 13 Aug 2018 15:57:55 +0100 Message-Id: <20180813145755.16566-38-marc.zyngier@arm.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180813145755.16566-1-marc.zyngier@arm.com> References: <20180813145755.16566-1-marc.zyngier@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180813_160048_745969_EA6B143C X-CRM114-Status: GOOD ( 11.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Mark Rutland <mark.rutland@arm.com>, Andrew Jones <drjones@redhat.com>, Kees Cook <keescook@chromium.org>, kvm@vger.kernel.org, "Gustavo A . R . Silva" <gustavo@embeddedor.com>, Andre Przywara <andre.przywara@arm.com>, Punit Agrawal <punit.agrawal@arm.com>, Christoffer Dall <christoffer.dall@arm.com>, Dongjiu Geng <gengdongjiu@huawei.com>, Jia He <jia.he@hxt-semitech.com>, Eric Auger <eric.auger@redhat.com>, James Morse <james.morse@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, Suzuki Poulose <suzuki.poulose@arm.com>, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
[01/37] arm64: KVM: Add support for Stage-2 control of memory types and cacheability
|
expand
|
diff --git a/virt/kvm/arm/mmu.c b/virt/kvm/arm/mmu.c index 13dfe36501aa..91aaf73b00df 100644 --- a/virt/kvm/arm/mmu.c +++ b/virt/kvm/arm/mmu.c @@ -1147,6 +1147,10 @@ static int stage2_set_pte(struct kvm *kvm, struct kvm_mmu_memory_cache *cache, /* Create 2nd stage page table mapping - Level 3 */ old_pte = *pte; if (pte_present(old_pte)) { + /* Skip page table update if there is no change */ + if (pte_val(old_pte) == pte_val(*new_pte)) + return 0; + kvm_set_pte(pte, __pte(0)); kvm_tlb_flush_vmid_ipa(kvm, addr); } else {