From: Paolo Bonzini <pbonzini@redhat.com>
To: Wanpeng Li <wanpeng.li@linux.intel.com>,
Jan Kiszka <jan.kiszka@siemens.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
Gleb Natapov <gleb@kernel.org>, Bandan Das <bsd@redhat.com>,
Zhang Yang <yang.z.zhang@intel.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] KVM: nVMX: fix acknowledge interrupt on exit when APICv is in use
Date: Mon, 04 Aug 2014 14:51:15 +0200 [thread overview]
Message-ID: <53DF81C3.7050302@redhat.com> (raw)
In-Reply-To: <1406880727-60001-2-git-send-email-wanpeng.li@linux.intel.com>
Il 01/08/2014 10:12, Wanpeng Li ha scritto:
> +int kvm_lapic_ack_apicv(struct kvm_vcpu *vcpu)
> +{
> + struct kvm_lapic *apic = vcpu->arch.apic;
> + int vec;
> +
> + vec = kvm_apic_has_interrupt(vcpu);
> +
> + if (vec == -1)
> + return vec;
> +
> + apic_set_vector(vec, apic->regs + APIC_ISR);
> + apic_update_ppr(apic);
> + apic_clear_vector(vec, apic->regs + APIC_IRR);
> +
> + return vec;
> +}
> +EXPORT_SYMBOL_GPL(kvm_lapic_ack_apicv);
I would prefer reusing kvm_get_apic_interrupt here (by modifying
kvm_cpu_get_interrupt, apic_set_isr and apic_clear_irr) as I had
sketched in the previous version of the patches.
There is no reason for kvm_cpu_get_interrupt to return -1 if virtual
interrupt delivery is enabled.
Paolo
next prev parent reply other threads:[~2014-08-04 12:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-01 8:12 [PATCH 1/2] KVM: nVMX: Fix nested vmexit ack intr before load vmcs01 Wanpeng Li
2014-08-01 8:12 ` [PATCH 2/2] KVM: nVMX: fix acknowledge interrupt on exit when APICv is in use Wanpeng Li
2014-08-04 2:03 ` Liu, RongrongX
2014-08-04 12:51 ` Paolo Bonzini [this message]
2014-08-04 2:01 ` [PATCH 1/2] KVM: nVMX: Fix nested vmexit ack intr before load vmcs01 Liu, RongrongX
2014-08-04 12:51 ` Paolo Bonzini
2014-08-04 19:56 ` Davidlohr Bueso
2014-08-05 4:48 ` Wanpeng Li
-- strict thread matches above, loose matches on Subject: below --
2014-08-01 8:13 [PATCH 2/2] KVM: nVMX: fix acknowledge interrupt on exit when APICv is in use Wanpeng Li
2014-08-01 8:24 ` Wanpeng Li
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=53DF81C3.7050302@redhat.com \
--to=pbonzini@redhat.com \
--cc=bsd@redhat.com \
--cc=gleb@kernel.org \
--cc=jan.kiszka@siemens.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=wanpeng.li@linux.intel.com \
--cc=yang.z.zhang@intel.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;
as well as URLs for NNTP newsgroup(s).