From: Sean Christopherson <seanjc@google.com>
To: Isaku Yamahata <isaku.yamahata@intel.com>
Cc: kvm@vger.kernel.org, isaku.yamahata@gmail.com,
Paolo Bonzini <pbonzini@redhat.com>,
isaku.yamahata@linux.intel.com
Subject: Re: [kvm-unit-tests PATCH] x86: apic, vmexit: replace nop with serialize to wait for deadline timer
Date: Wed, 4 Feb 2026 06:21:48 -0800 [thread overview]
Message-ID: <aYNV_KJc6WDo0_cH@google.com> (raw)
In-Reply-To: <aYJFdgUxYWXkavfi@iyamahat-desk>
On Tue, Feb 03, 2026, Isaku Yamahata wrote:
> On Tue, Feb 03, 2026 at 10:30:06AM -0800,
> Sean Christopherson <seanjc@google.com> wrote:
>
> > > +static inline void serialize(void)
> > > +{
> > > + /* serialize instruction. It needs binutils >= 2.35. */
> >
> > And a CPU that supports it... I don't see any point in using SERIALIZE. To check
> > for support, this code would need to do CPUID to query X86_FEATURE_SERIALIZE, and
> > CPUID itself is serializing (the big reason to favor SERIALIZE over CPUID is to
> > avoid a VM-Exit for performance reasons).
>
> Thank you for pointing it out. I'll replace it with raw_cpuid(0, 0).
> Or do you want to opencode cpuid() in each places?
It probably makes sense to add a helper to arm the deadline timer, and deal with
the serialization there. E.g. start_tsc_deadline_timer() also has a nop() of
dubious value.
prev parent reply other threads:[~2026-02-04 14:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-03 18:20 [kvm-unit-tests PATCH] x86: apic, vmexit: replace nop with serialize to wait for deadline timer isaku.yamahata
2026-02-03 18:30 ` Sean Christopherson
2026-02-03 18:59 ` Isaku Yamahata
2026-02-04 14:21 ` Sean Christopherson [this message]
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=aYNV_KJc6WDo0_cH@google.com \
--to=seanjc@google.com \
--cc=isaku.yamahata@gmail.com \
--cc=isaku.yamahata@intel.com \
--cc=isaku.yamahata@linux.intel.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.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 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.