[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YK68sDu3nBfYi10W@google.com>
Date: Wed, 26 May 2021 21:25:04 +0000
From: Sean Christopherson <seanjc@...gle.com>
To: Ben Gardon <bgardon@...gle.com>
Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
Paolo Bonzini <pbonzini@...hat.com>,
Peter Xu <peterx@...hat.com>, Peter Shier <pshier@...gle.com>,
Peter Feiner <pfeiner@...gle.com>,
Junaid Shahid <junaids@...gle.com>,
Jim Mattson <jmattson@...gle.com>,
Yulei Zhang <yulei.kernel@...il.com>,
Wanpeng Li <kernellwp@...il.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Xiao Guangrong <xiaoguangrong.eric@...il.com>
Subject: Re: [PATCH v2 01/13] KVM: x86/mmu: Re-add const qualifier in
kvm_tdp_mmu_zap_collapsible_sptes
On Thu, Apr 01, 2021, Ben Gardon wrote:
> kvm_tdp_mmu_zap_collapsible_sptes unnecessarily removes the const
> qualifier from its memlsot argument, leading to a compiler warning. Add
> the const annotation and pass it to subsequent functions.
>
> Signed-off-by: Ben Gardon <bgardon@...gle.com>
> ---
> arch/x86/kvm/mmu/mmu.c | 10 +++++-----
> arch/x86/kvm/mmu/mmu_internal.h | 5 +++--
> arch/x86/kvm/mmu/tdp_mmu.c | 5 +++--
> arch/x86/kvm/mmu/tdp_mmu.h | 3 ++-
> include/linux/kvm_host.h | 2 +-
> 5 files changed, 14 insertions(+), 11 deletions(-)
>
> diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
> index efb41f31e80a..617809529987 100644
> --- a/arch/x86/kvm/mmu/mmu.c
> +++ b/arch/x86/kvm/mmu/mmu.c
> @@ -715,8 +715,7 @@ static void kvm_mmu_page_set_gfn(struct kvm_mmu_page *sp, int index, gfn_t gfn)
> * handling slots that are not large page aligned.
> */
> static struct kvm_lpage_info *lpage_info_slot(gfn_t gfn,
> - struct kvm_memory_slot *slot,
> - int level)
> + const struct kvm_memory_slot *slot, int level)
I'd prefer to let this poke out (it's only 2 chars) instead of having an unaligned
param list. And if we want to make it pretty, we could always do:
static struct kvm_lpage_info *lpage_info_slot(const struct kvm_memory_slot *slot,
gfn_t gfn, int level)
Powered by blists - more mailing lists