From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752124AbcGUJP3 (ORCPT ); Thu, 21 Jul 2016 05:15:29 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:36745 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751126AbcGUJPY (ORCPT ); Thu, 21 Jul 2016 05:15:24 -0400 Subject: Re: [PATCH 3/4] mmu: don't pass *kvm to spte_write_protect To: Bandan Das , kvm@vger.kernel.org References: <1469053536-11130-1-git-send-email-bsd@redhat.com> <1469053536-11130-4-git-send-email-bsd@redhat.com> Cc: rkrcmar@redhat.com, linux-kernel@vger.kernel.org From: Paolo Bonzini Message-ID: <077ad26d-e12e-f8c6-012b-4a1e50d9888a@redhat.com> Date: Thu, 21 Jul 2016 11:15:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <1469053536-11130-4-git-send-email-bsd@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/07/2016 00:25, Bandan Das wrote: > That parameter isn't used in the function, > it's probably a historical artifact. Same for spte_clear_dirty and spte_set_dirty, please. Paolo > Signed-off-by: Bandan Das > --- > arch/x86/kvm/mmu.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c > index def97b3..aaecd10 100644 > --- a/arch/x86/kvm/mmu.c > +++ b/arch/x86/kvm/mmu.c > @@ -1204,7 +1204,7 @@ static void drop_large_spte(struct kvm_vcpu *vcpu, u64 *sptep) > * > * Return true if tlb need be flushed. > */ > -static bool spte_write_protect(struct kvm *kvm, u64 *sptep, bool pt_protect) > +static bool spte_write_protect(u64 *sptep, bool pt_protect) > { > u64 spte = *sptep; > > @@ -1230,7 +1230,7 @@ static bool __rmap_write_protect(struct kvm *kvm, > bool flush = false; > > for_each_rmap_spte(rmap_head, &iter, sptep) > - flush |= spte_write_protect(kvm, sptep, pt_protect); > + flush |= spte_write_protect(sptep, pt_protect); > > return flush; > } >