public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Wei Yang <richardw.yang@linux.intel.com>
To: Wei Yang <richardw.yang@linux.intel.com>
Cc: kvm@vger.kernel.org, x86@kernel.org, pbonzini@redhat.com,
	rkrcmar@redhat.com
Subject: Re: [PATCH 1/3] kvm: x86: check kvm_apic_sw_enabled() is enough
Date: Tue, 4 Jun 2019 11:11:58 +0800	[thread overview]
Message-ID: <20190604031158.GB27794@richard> (raw)
In-Reply-To: <20190401021723.5682-1-richardw.yang@linux.intel.com>

Ping...

On Mon, Apr 01, 2019 at 10:17:21AM +0800, Wei Yang wrote:
>On delivering irq to apic, we iterate on vcpu and do the check like
>this:
>
>    kvm_apic_present(vcpu)
>    kvm_lapic_enabled(vpu)
>        kvm_apic_present(vcpu) && kvm_apic_sw_enabled(vcpu->arch.apic)
>
>Since we have already checked kvm_apic_present(), it is reasonable to
>replace kvm_lapic_enabled() with kvm_apic_sw_enabled().
>
>Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
>---
> arch/x86/kvm/irq_comm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/arch/x86/kvm/irq_comm.c b/arch/x86/kvm/irq_comm.c
>index 3cc3b2d130a0..188beb301cc5 100644
>--- a/arch/x86/kvm/irq_comm.c
>+++ b/arch/x86/kvm/irq_comm.c
>@@ -86,7 +86,7 @@ int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src,
> 			if (r < 0)
> 				r = 0;
> 			r += kvm_apic_set_irq(vcpu, irq, dest_map);
>-		} else if (kvm_lapic_enabled(vcpu)) {
>+		} else if (kvm_apic_sw_enabled(vcpu->arch.apic)) {
> 			if (!kvm_vector_hashing_enabled()) {
> 				if (!lowest)
> 					lowest = vcpu;
>-- 
>2.19.1

-- 
Wei Yang
Help you, Help me

       reply	other threads:[~2019-06-04  3:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190401021723.5682-1-richardw.yang@linux.intel.com>
2019-06-04  3:11 ` Wei Yang [this message]
     [not found] ` <20190401021723.5682-2-richardw.yang@linux.intel.com>
2019-06-06 12:07   ` [PATCH 2/3] kvm: x86: use same convention to name apic_clear_vector() Paolo Bonzini
2019-06-06 15:43     ` Wei Yang

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=20190604031158.GB27794@richard \
    --to=richardw.yang@linux.intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --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