[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE6NW_Zqw4pvvbDcyLgJL6Zk07oKuWwfuCAobsi0LJRa_HzMzA@mail.gmail.com>
Date: Wed, 21 Jan 2026 23:59:29 -0500
From: Kevin Cheng <chengkev@...gle.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: Yosry Ahmed <yosry.ahmed@...ux.dev>, pbonzini@...hat.com, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2 1/5] KVM: SVM: Move STGI and CLGI intercept handling
On Thu, Jan 15, 2026 at 12:29 PM Sean Christopherson <seanjc@...gle.com> wrote:
>
> On Thu, Jan 15, 2026, Yosry Ahmed wrote:
> > On Thu, Jan 15, 2026 at 09:00:07AM -0800, Sean Christopherson wrote:
> > > On Thu, Jan 15, 2026, Yosry Ahmed wrote:
> > > > Or maybe it's clearer if we just put the checks in a helper like
> > > > svm_waiting_for_gif() or svm_pending_gif_interrupt().
> > >
> > > This was my first idea as well, though I would name it svm_has_pending_gif_event()
> > > to better align with kvm_vcpu_has_events().
> >
> > svm_has_pending_gif_event() sounds good.
> >
> > >
> > > I suggested a single helper because I don't love that how to react to the pending
> > > event is duplicated. But I definitely don't object to open coding the request if
> > > the consensus is that it's more readable overall.
> >
> > A single helper is nice, but I can't think of a name that would read
> > well. My first instinct is svm_check_pending_gif_event(), but we are not
> > really checking the event as much as requesting for it to be checked.
>
> Ya, that's the same problem I'm having. I can't even come up with an absurdly
> verbose name to describe the behavior.
>
> > We can do svm_request_gif_event(), perhaps? Not sure if that's better or
> > worse than svm_has_pending_gif_event().
>
> Definitely worse in my opinion. My entire motivation for a single helper would
> be to avoid bleeding implementation details (use of KVM_REQ_EVENT) to trigger
> the potential re-evaluation STGI/CLGI intercepts. And then there's the fact that
> in most cases, there probably isn't a pending event, i.e. not request will be
> made.
>
> Let's just go with svm_has_pending_gif_event().
Sounds good. Thanks for the suggestions Yosry and Sean :) And thanks
for catching this!
Powered by blists - more mailing lists