From patchwork Tue Jun 20 09:15:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Guangrong X-Patchwork-Id: 778190 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wsMlr5JtWz9s4s for ; Tue, 20 Jun 2017 19:21:12 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="RVA1io95"; dkim-atps=neutral Received: from localhost ([::1]:47469 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNFLS-0003R5-Fi for incoming@patchwork.ozlabs.org; Tue, 20 Jun 2017 05:21:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53020) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNFGV-0000Ff-Ph for qemu-devel@nongnu.org; Tue, 20 Jun 2017 05:16:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNFGU-0007u9-RH for qemu-devel@nongnu.org; Tue, 20 Jun 2017 05:16:03 -0400 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]:33226) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dNFGU-0007tk-Ld for qemu-devel@nongnu.org; Tue, 20 Jun 2017 05:16:02 -0400 Received: by mail-pg0-x241.google.com with SMTP id u62so14466743pgb.0 for ; Tue, 20 Jun 2017 02:16:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=R8FZpu7zOv7rdtW+NtJ9S/Q8p4eKfZ0wR1eID0LUwI8=; b=RVA1io95E9yt1E0C83s5dGlrS/ZHvjBnnxxt+juXiey69G6bjCvaVWnPTRA9QsgORV Xoq63Wx0tZPXcjVwrHJyshHWK3bM4Wrvm4GlCg3G9TlUKIhMRAVHvr30ZpOh/uVNJX18 5Y0oNvLnW4eWQ48VfxzBZEi1s2LPfOWV/KAnGqfKREQOkM/VPSuNqVEfqZnezIAIOukN Xe9oZDRzqaU55P6LgsRFBWtSCDAas35GvjuwTrofsXrapCOfnkcDk1zcPagI93GJ2kfS QIR1mqyldMtsQlhtAeE03q+AWrKeqhxnaN5u5W9Ex0cwOzELXXs9iQPkXHe3D9d4oY3g /Tdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=R8FZpu7zOv7rdtW+NtJ9S/Q8p4eKfZ0wR1eID0LUwI8=; b=DyJEUkRvFKcZhaRyRDo47RYCP1Wus5WWRmVnTIfxmyAngRo21WG43Qw9cnJG5ilQq+ JeH13aC4q8wtm6Pf4j0oWrYD35BhMN1A+ksj9GEO9C8YutvSi4G+TThZdDTNhnaEVLtG /YSnhgEJhXbFvMXubajThgspNCyoqz6pOmzJMEK+cMCRyCqBz1AWvAAiU1LTdHXRBaXG W7FpI2PC+pnARRmHraOu94iDprcbAhjErA3CcWmk3700hG5Jhz3xtAZ5r/ryCWbchqrS WJYZWjqbUA2MNx4aeKEwv/x4jTErVilTnBb73EseCSiEfMAg2uHZUjMVmGMdQr0fg7YN 2elw== X-Gm-Message-State: AKS2vOxMPF9X2M5D8r4rFj9LyLE7RVRpP+PKZcRNcTdQP+46vgTBSnZc VMRQiaT0OZ2RNw== X-Received: by 10.101.91.7 with SMTP id y7mr30398646pgq.226.1497950161891; Tue, 20 Jun 2017 02:16:01 -0700 (PDT) Received: from eric.tencent.com ([203.205.141.35]) by smtp.gmail.com with ESMTPSA id o12sm26343810pfi.9.2017.06.20.02.15.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jun 2017 02:16:01 -0700 (PDT) From: guangrong.xiao@gmail.com X-Google-Original-From: xiaoguangrong@tencent.com To: pbonzini@redhat.com, mtosatti@redhat.com, avi.kivity@gmail.com, rkrcmar@redhat.com Date: Tue, 20 Jun 2017 17:15:26 +0800 Message-Id: <20170620091526.4287-8-xiaoguangrong@tencent.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170620091526.4287-1-xiaoguangrong@tencent.com> References: <20170620091526.4287-1-xiaoguangrong@tencent.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::241 Subject: [Qemu-devel] [PATCH v2 7/7] KVM: MMU: stop using mmu_spte_get_lockless under mmu-lock X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Xiao Guangrong , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Xiao Guangrong mmu_spte_age() is under the protection of mmu-lock, no reason to use mmu_spte_get_lockless() Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 7711953..dc00c32 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -852,7 +852,7 @@ static u64 restore_acc_track_spte(u64 spte) /* Returns the Accessed status of the PTE and resets it at the same time. */ static bool mmu_spte_age(u64 *sptep) { - u64 spte = mmu_spte_get_lockless(sptep); + u64 spte = *sptep; if (!is_accessed_spte(spte)) return false;