mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Sean Christopherson <seanjc@google.com>
Cc: kvm <kvm@vger.kernel.org>, Paul Durrant <paul@xen.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] KVM: x86: Use fast path for Xen timer delivery
Date: Mon, 02 Oct 2023 18:05:40 +0100	[thread overview]
Message-ID: <c57dc32ee6ef31854cac372fde8dc097aa2dab40.camel@infradead.org> (raw)
In-Reply-To: <ZRr3NvZg4OiXyjoq@google.com>

[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]

On Mon, 2023-10-02 at 10:00 -0700, Sean Christopherson wrote:
> 
> >         case KVM_XEN_VCPU_ATTR_TYPE_TIMER:
> > +               /*
> > +                * Ensure a consistent snapshot of state is captured, with a
> > +                * timer either being pending, or the event channel delivered
> > +                * to the corresponding bit in the shared_info. Not still
> > +                * lurking in the timer_pending flag for deferred delivery.
> > +                * Purely as an optimisation, if the timer_expires field is
> > +                * zero, that means the timer isn't active (or even in the
> > +                * timer_pending flag) and there is no need to cancel it.
> > +                */
> 
> Ah, kvm_xen_start_timer() zeros timer_pending.
> 
> Given that, shouldn't it be impossible for xen_timer_callback() to observe a
> non-zero timer_pending value?  E.g. couldn't this code WARN?
> 
>         if (atomic_read(&vcpu->arch.xen.timer_pending))
>                 return HRTIMER_NORESTART;
> 
> Obviously not a blocker for this patch, I'm mostly just curious to know if I'm
> missing something.

Yes, I believe that is true.

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5965 bytes --]

  reply	other threads:[~2023-10-02 17:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-30 13:58 David Woodhouse
2023-10-02 10:35 ` Paul Durrant
2023-10-02 17:00 ` Sean Christopherson
2023-10-02 17:05   ` David Woodhouse [this message]
2023-10-05  1:29 ` Sean Christopherson
2024-02-06 18:41 ` Sean Christopherson
2024-02-06 18:51   ` David Woodhouse
2024-02-07  2:58     ` Sean Christopherson
2024-02-07  3:29       ` David Woodhouse
2024-02-07  4:28         ` Sean Christopherson
2024-02-07  4:36           ` David Woodhouse

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=c57dc32ee6ef31854cac372fde8dc097aa2dab40.camel@infradead.org \
    --to=dwmw2@infradead.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paul@xen.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®