All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH 1/3] KVM: APIC: remove unnecessary double checks on APIC existence
Date: Tue, 9 Feb 2016 14:55:03 +0100	[thread overview]
Message-ID: <20160209135502.GA30378@potion.brq.redhat.com> (raw)
In-Reply-To: <1454948146-35353-2-git-send-email-pbonzini@redhat.com>

2016-02-08 17:15+0100, Paolo Bonzini:
> Usually the in-kernel APIC's existence is checked in the caller.  Do not
> bother checking it again in lapic.c.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
>  static int __apic_accept_irq(struct kvm_lapic *apic, int delivery_mode,
> @@ -1601,8 +1595,7 @@ static int apic_mmio_write(struct kvm_vcpu *vcpu, struct kvm_io_device *this,
>  
>  void kvm_lapic_set_eoi(struct kvm_vcpu *vcpu)
>  {
> -	if (kvm_vcpu_has_lapic(vcpu))
> -		apic_reg_write(vcpu->arch.apic, APIC_EOI, 0);
> +	apic_reg_write(vcpu->arch.apic, APIC_EOI, 0);

This is most likely going to bug on the following path:
  handle_apic_access -> kvm_lapic_set_eoi

Before the change, handle_apic_access would just drop EOIs that should
have gone to user space ... I'm not sure if we tested it, or the path is
really never taken.

  reply	other threads:[~2016-02-09 13:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-08 16:15 [PATCH 0/3] KVM: x86: consolidate "has lapic" checks Paolo Bonzini
2016-02-08 16:15 ` [PATCH 1/3] KVM: APIC: remove unnecessary double checks on APIC existence Paolo Bonzini
2016-02-09 13:55   ` Radim Krčmář [this message]
2016-02-09 15:06     ` Paolo Bonzini
2016-02-09 15:18       ` Radim Krčmář
2016-02-08 16:15 ` [PATCH 2/3] KVM: x86: consolidate "has lapic" checks into irq.c Paolo Bonzini
2016-02-09 14:05   ` Radim Krčmář
2016-02-09 15:07     ` Paolo Bonzini
2016-02-09 15:21       ` Radim Krčmář
2016-02-08 16:15 ` [PATCH 3/3] KVM: x86: consolidate different ways to test for in-kernel LAPIC Paolo Bonzini
2016-02-09 14:14   ` Radim Krčmář

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=20160209135502.GA30378@potion.brq.redhat.com \
    --to=rkrcmar@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@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.