public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Radim Krčmář" <rkrcmar@redhat.com>, linux-kernel@vger.kernel.org
Cc: kvm@vger.kernel.org, Yuki Shibuya <shibuya.yk@ncos.nec.co.jp>
Subject: Re: [PATCH] KVM: x86: zero apic_arb_prio on reset
Date: Mon, 2 Nov 2015 12:57:12 +0100	[thread overview]
Message-ID: <56374F98.4050502@redhat.com> (raw)
In-Reply-To: <1446216500-14267-1-git-send-email-rkrcmar@redhat.com>



On 30/10/2015 15:48, Radim Krčmář wrote:
> BSP doesn't get INIT so its apic_arb_prio isn't zeroed after reboot.
> BSP won't get lowest priority interrupts until other VCPUs get enough
> interrupts to match their pre-reboot apic_arb_prio.
> 
> That behavior doesn't fit into KVM's round-robin-like interpretation of
> lowest priority delivery ... userspace should KVM_SET_LAPIC on reset, so
> just zero apic_arb_prio there.
> 
> Reported-by: Yuki Shibuya <shibuya.yk@ncos.nec.co.jp>
> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
> ---
>  arch/x86/kvm/lapic.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
> index 1b02c44c7b8b..08655020417d 100644
> --- a/arch/x86/kvm/lapic.c
> +++ b/arch/x86/kvm/lapic.c
> @@ -1924,6 +1924,8 @@ void kvm_apic_post_state_restore(struct kvm_vcpu *vcpu,
>  	kvm_make_request(KVM_REQ_EVENT, vcpu);
>  	if (ioapic_in_kernel(vcpu->kvm))
>  		kvm_rtc_eoi_tracking_restore_one(vcpu);
> +
> +	vcpu->arch.apic_arb_prio = 0;
>  }
>  
>  void __kvm_migrate_apic_timer(struct kvm_vcpu *vcpu)
> 

Applied, thanks.

Paolo

      reply	other threads:[~2015-11-02 11:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-30 14:48 [PATCH] KVM: x86: zero apic_arb_prio on reset Radim Krčmář
2015-11-02 11:57 ` Paolo Bonzini [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=56374F98.4050502@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rkrcmar@redhat.com \
    --cc=shibuya.yk@ncos.nec.co.jp \
    /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