All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Yang Zhang <yang.z.zhang@intel.com>
Cc: kvm@vger.kernel.org, gleb@redhat.com, mtosatti@redhat.com,
	xiantao.zhang@intel.com, jun.nakajima@intel.com
Subject: Re: [PATCH v8 6/7] KVM: VMX: Add the algorithm of deliver posted interrupt
Date: Tue, 09 Apr 2013 18:31:20 +0200	[thread overview]
Message-ID: <51644258.7070409@redhat.com> (raw)
In-Reply-To: <1365431002-31202-7-git-send-email-yang.z.zhang@intel.com>

Il 08/04/2013 16:23, Yang Zhang ha scritto:
> + * interrupt from PIR in next vmentry.
> + */
> +static void vmx_deliver_posted_interrupt(struct kvm_vcpu *vcpu, int vector)
> +{
> +	struct vcpu_vmx *vmx = to_vmx(vcpu);
> +	int r;
> +
> +	if (pi_test_and_set_pir(vector, &vmx->pi_desc))
> +		return;
> +
> +	r = pi_test_and_set_on(&vmx->pi_desc);
> +	kvm_make_request(KVM_REQ_EVENT, vcpu);
> +	if (!r && (vcpu->mode == IN_GUEST_MODE))
> +		apic->send_IPI_mask(get_cpu_mask(vcpu->cpu),
> +				POSTED_INTR_VECTOR);
> +	else
> +		kvm_vcpu_kick(vcpu);
> +
> +	return;
> +}

No need for this return.

Paolo

  reply	other threads:[~2013-04-09 16:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-08 14:23 [PATCH v8 0/7] KVM: VMX: Add Posted Interrupt supporting Yang Zhang
2013-04-08 14:23 ` [PATCH v8 1/7] KVM: VMX: Enable acknowledge interupt on vmexit Yang Zhang
2013-04-08 14:23 ` [PATCH v8 2/7] KVM: VMX: Register a new IPI for posted interrupt Yang Zhang
2013-04-09  7:26   ` Gleb Natapov
2013-04-10  9:31     ` Ingo Molnar
2013-04-08 14:23 ` [PATCH v8 3/7] KVM: VMX: Check the posted interrupt capability Yang Zhang
2013-04-08 14:23 ` [PATCH v8 4/7] KVM: Call common update function when ioapic entry changed Yang Zhang
2013-04-09  7:45   ` Gleb Natapov
2013-04-08 14:23 ` [PATCH v8 5/7] KVM: Set TMR when programming ioapic entry Yang Zhang
2013-04-08 14:23 ` [PATCH v8 6/7] KVM: VMX: Add the algorithm of deliver posted interrupt Yang Zhang
2013-04-09 16:31   ` Paolo Bonzini [this message]
2013-04-10  2:16     ` Zhang, Yang Z
2013-04-08 14:23 ` [PATCH v8 7/7] KVM: VMX: Use posted interrupt to deliver virtual interrupt Yang Zhang
2013-04-09  8:05   ` Gleb Natapov
2013-04-09  8:55     ` Zhang, Yang Z

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=51644258.7070409@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=gleb@redhat.com \
    --cc=jun.nakajima@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=xiantao.zhang@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 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.