The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Yikebaer Aizezi <yikebaer61@gmail.com>
Subject: Re: [PATCH] KVM: x86: Remove WARN sanity check on hypervisor timer vs. UNINITIALIZED vCPU
Date: Thu, 10 Aug 2023 08:33:50 -0700	[thread overview]
Message-ID: <ZNUDXsDaRwczONAu@google.com> (raw)
In-Reply-To: <941e45b1-49eb-fcba-20d4-71b1db8041c5@redhat.com>

On Thu, Aug 10, 2023, Paolo Bonzini wrote:
> On 8/9/23 01:20, Sean Christopherson wrote:
> >   		/*
> > -		 * It should be impossible for the hypervisor timer to be in
> > -		 * use before KVM has ever run the vCPU.
> > +		 * Don't bother switching APIC timer emulation from the
> > +		 * hypervisor timer to the software timer, the only way for the
> > +		 * APIC timer to be active is if userspace stuffed vCPU state,
> > +		 * i.e. put the vCPU into a nonsensical state.  Only an INIT
> > +		 * will transition the vCPU out of UNINITIALIZED (without more
> > +		 * state stuffing from userspace), which will reset the local
> > +		 * APIC and thus smother the timer anyways, i.e. the APIC timer
> 
> "Cancel" is probably more understandable to non-native speakers, though
> undoubtedly less poetic.

I intentionally avoided "cancel" because there is no guaranteed the timer would
actually be canceled (if KVM switched to the software timer).  I am/was trying to
call out that even if the timer expires and pends an interrupts, the interrupt
will ultimately be dropped.

Maybe "squashed"?

  reply	other threads:[~2023-08-10 15:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-08 23:20 [PATCH] KVM: x86: Remove WARN sanity check on hypervisor timer vs. UNINITIALIZED vCPU Sean Christopherson
2023-08-10 13:46 ` Paolo Bonzini
2023-08-10 15:33   ` Sean Christopherson [this message]
2023-08-18  0:09 ` 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=ZNUDXsDaRwczONAu@google.com \
    --to=seanjc@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=yikebaer61@gmail.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