public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
To: Sean Christopherson <seanjc@google.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"gshan@redhat.com" <gshan@redhat.com>,
	"maz@kernel.org" <maz@kernel.org>
Subject: RE: [PATCH] KVM: Add the missing stub function for kvm_dirty_ring_check_request()
Date: Thu, 16 Mar 2023 20:02:26 +0000	[thread overview]
Message-ID: <a026b6ddf62843129193842d80edd182@huawei.com> (raw)
In-Reply-To: <ZBN0pFN/nF8G3fWl@google.com>



> -----Original Message-----
> From: Sean Christopherson [mailto:seanjc@google.com]
> Sent: 16 March 2023 19:57
> To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
> Cc: linux-kernel@vger.kernel.org; kvm@vger.kernel.org; gshan@redhat.com;
> maz@kernel.org
> Subject: Re: [PATCH] KVM: Add the missing stub function for
> kvm_dirty_ring_check_request()
> 
> 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.

Agree, it buys nothing now:) It just came up while I was playing with a custom
build without HAVE_KVM_DIRTY_RING. Since all other functions there has a stub
just thought it would make it easier for future common usage. We could very well
leave it till that comes up as well.

Thanks,
Shameer

  reply	other threads:[~2023-03-16 20:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16 15:45 [PATCH] KVM: Add the missing stub function for kvm_dirty_ring_check_request() Shameer Kolothum
2023-03-16 17:02 ` Sean Christopherson
2023-03-16 19:39   ` Shameerali Kolothum Thodi
2023-03-16 19:57     ` Sean Christopherson
2023-03-16 20:02       ` Shameerali Kolothum Thodi [this message]
2023-03-17  0:18         ` Sean Christopherson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a026b6ddf62843129193842d80edd182@huawei.com \
    --to=shameerali.kolothum.thodi@huawei.com \
    --cc=gshan@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=seanjc@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox