lkml.org 
[lkml]   [2023]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] KVM: Add the missing stub function for kvm_dirty_ring_check_request()
From
On Thu, Mar 16, 2023, Shameerali Kolothum Thodi wrote:
> > From: Sean Christopherson [mailto:seanjc@google.com]
> > On Thu, Mar 16, 2023, Shameer Kolothum wrote:
> > > The stub for !CONFIG_HAVE_KVM_DIRTY_RING case is missing.
> >
> > No stub is needed. kvm_dirty_ring_check_request() isn't called from
> > common code,
> > and should not (and isn't unless I'm missing something) be called from arch
> > code
> > unless CONFIG_HAVE_KVM_DIRTY_RING=y.
> >
> > x86 and arm64 are the only users, and they both select
> > HAVE_KVM_DIRTY_RING
> > unconditionally when KVM is enabled.
>
> Yes, it is at present not called from anywhere other than x86 and arm64.
> But I still think since it is a common helper, better to have a stub.

Why? It buys us nothing other than dead code, and even worse it could let a bug
that would otherwise be caught during build time escape to run time.

\
 
 \ /
  Last update: 2023-03-27 01:04    [W:0.950 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site