From: Sean Christopherson <seanjc@google.com>
To: Yosry Ahmed <yosry.ahmed@linux.dev>
Cc: Kevin Cheng <chengkev@google.com>,
pbonzini@redhat.com, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2 1/5] KVM: SVM: Move STGI and CLGI intercept handling
Date: Thu, 15 Jan 2026 09:29:40 -0800 [thread overview]
Message-ID: <aWkkBPH3IWn40rVN@google.com> (raw)
In-Reply-To: <ugrjf3qqpeqafg6tnavw6p4l5seapl6mfx6ypypka25shvu6by@pq4qpwn24dyi>
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().
next prev parent reply other threads:[~2026-01-15 17:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-12 17:45 [PATCH V2 0/5] Align SVM with APM defined behaviors Kevin Cheng
2026-01-12 17:45 ` [PATCH V2 1/5] KVM: SVM: Move STGI and CLGI intercept handling Kevin Cheng
2026-01-12 20:37 ` Yosry Ahmed
2026-01-15 1:39 ` Sean Christopherson
2026-01-15 16:41 ` Yosry Ahmed
2026-01-15 17:00 ` Sean Christopherson
2026-01-15 17:05 ` Yosry Ahmed
2026-01-15 17:29 ` Sean Christopherson [this message]
2026-01-22 4:59 ` Kevin Cheng
2026-01-12 17:45 ` [PATCH V2 2/5] KVM: SVM: Inject #UD for STGI if EFER.SVME=0 and SVM Lock and DEV are not available Kevin Cheng
2026-01-12 20:50 ` Yosry Ahmed
2026-01-22 5:02 ` Kevin Cheng
2026-01-12 17:45 ` [PATCH V2 3/5] KVM: SVM: Inject #UD for INVLPGA if EFER.SVME=0 Kevin Cheng
2026-01-12 20:51 ` Yosry Ahmed
2026-01-12 17:45 ` [PATCH V2 4/5] KVM: SVM: Recalc instructions intercepts when EFER.SVME is toggled Kevin Cheng
2026-01-12 17:45 ` [PATCH V2 5/5] KVM: SVM: Raise #UD if VMMCALL instruction is not intercepted Kevin Cheng
2026-01-12 20:54 ` Yosry Ahmed
2026-01-14 5:20 ` Manali Shukla
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=aWkkBPH3IWn40rVN@google.com \
--to=seanjc@google.com \
--cc=chengkev@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=yosry.ahmed@linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.