Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1225894

Re: [PATCH v8 11/13] KVM: Update Posted-Interrupts Descriptor when vCPU is blocked

From Paolo Bonzini <pbonzini@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v8 11/13] KVM: Update Posted-Interrupts Descriptor when vCPU is blocked
Date 2015-09-16 11:40 +0200
Message-ID <q9hm4-uy-29@gated-at.bofh.it> (permalink)
References <q9gSZ-8o1-5@gated-at.bofh.it> <q9gSZ-8o1-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 16/09/2015 10:50, Feng Wu wrote:
>  		 * are two possible cases:
> -		 * 1. After running 'pi_pre_block', context switch
> +		 * 1. After running 'pre_block', context switch

Please fold this in the previous patch.

>  		 *    happened. For this case, 'sn' was set in
>  		 *    vmx_vcpu_put(), so we need to clear it here.
> -		 * 2. After running 'pi_pre_block', we were blocked,
> +		 * 2. After running 'pre_block', we were blocked,
>  		 *    and woken up by some other guy. For this case,

(Same).

> +	spin_lock(&per_cpu(blocked_vcpu_on_cpu_lock, cpu));
> +	list_for_each_entry(vcpu, &per_cpu(blocked_vcpu_on_cpu, cpu),
> +			blocked_vcpu_list) {
> +		struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu);
> +
> +		if (pi_test_on(pi_desc) == 1)
> +			kvm_vcpu_kick(vcpu);
> +	}
> +	spin_unlock(&per_cpu(blocked_vcpu_on_cpu_lock, cpu));
> +}

Please document the lock in Documentation/virtual/kvm/locking.txt.

Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v8 00/13] Add VT-d Posted-Interrupts support Feng Wu <feng.wu@intel.com> - 2015-09-16 11:10 +0200
  [PATCH v8 10/13] KVM: Update Posted-Interrupts Descriptor when vCPU is preempted Feng Wu <feng.wu@intel.com> - 2015-09-16 11:10 +0200
    Re: [PATCH v8 10/13] KVM: Update Posted-Interrupts Descriptor when  vCPU is preempted Paolo Bonzini <pbonzini@redhat.com> - 2015-09-16 11:30 +0200
  [PATCH v8 11/13] KVM: Update Posted-Interrupts Descriptor when vCPU is blocked Feng Wu <feng.wu@intel.com> - 2015-09-16 11:10 +0200
    Re: [PATCH v8 11/13] KVM: Update Posted-Interrupts Descriptor when  vCPU is blocked Paolo Bonzini <pbonzini@redhat.com> - 2015-09-16 11:40 +0200
  [PATCH v8 13/13] iommu/vt-d: Add a command line parameter for VT-d posted-interrupts Feng Wu <feng.wu@intel.com> - 2015-09-16 11:10 +0200
  [PATCH v8 02/13] KVM: Add some helper functions for Posted-Interrupts Feng Wu <feng.wu@intel.com> - 2015-09-16 11:10 +0200
  [PATCH v8 04/13] KVM: Make struct kvm_irq_routing_table accessible Feng Wu <feng.wu@intel.com> - 2015-09-16 11:10 +0200
  [PATCH v8 12/13] KVM: Warn if 'SN' is set during posting interrupts by software Feng Wu <feng.wu@intel.com> - 2015-09-16 11:10 +0200
    Re: [PATCH v8 12/13] KVM: Warn if 'SN' is set during posting  interrupts by software Paolo Bonzini <pbonzini@redhat.com> - 2015-09-16 11:40 +0200
  [PATCH v8 06/13] vfio: Register/unregister irq_bypass_producer Feng Wu <feng.wu@intel.com> - 2015-09-16 11:10 +0200
  [PATCH v8 09/13] KVM: Add an arch specific hooks in 'struct kvm_kernel_irqfd' Feng Wu <feng.wu@intel.com> - 2015-09-16 11:10 +0200
    Re: [PATCH v8 09/13] KVM: Add an arch specific hooks in 'struct  kvm_kernel_irqfd' Paolo Bonzini <pbonzini@redhat.com> - 2015-09-16 11:30 +0200
      RE: [PATCH v8 09/13] KVM: Add an arch specific hooks in 'struct  kvm_kernel_irqfd' "Wu, Feng" <feng.wu@intel.com> - 2015-09-17 04:00 +0200
        Re: [PATCH v8 09/13] KVM: Add an arch specific hooks in 'struct  kvm_kernel_irqfd' Paolo Bonzini <pbonzini@redhat.com> - 2015-09-17 11:40 +0200
  [PATCH v8 07/13] KVM: x86: Update IRTE for posted-interrupts Feng Wu <feng.wu@intel.com> - 2015-09-16 11:10 +0200
  [PATCH v8 01/13] KVM: Extend struct pi_desc for VT-d Posted-Interrupts Feng Wu <feng.wu@intel.com> - 2015-09-16 11:20 +0200
  [PATCH v8 05/13] KVM: make kvm_set_msi_irq() public Feng Wu <feng.wu@intel.com> - 2015-09-16 11:20 +0200
  [PATCH v8 03/13] KVM: Define a new interface kvm_intr_is_single_vcpu() Feng Wu <feng.wu@intel.com> - 2015-09-16 11:20 +0200
    Re: [PATCH v8 03/13] KVM: Define a new interface  kvm_intr_is_single_vcpu() Paolo Bonzini <pbonzini@redhat.com> - 2015-09-16 11:30 +0200
      RE: [PATCH v8 03/13] KVM: Define a new interface  kvm_intr_is_single_vcpu() "Wu, Feng" <feng.wu@intel.com> - 2015-09-17 05:20 +0200
        Re: [PATCH v8 03/13] KVM: Define a new interface  kvm_intr_is_single_vcpu() Paolo Bonzini <pbonzini@redhat.com> - 2015-09-17 11:50 +0200
          RE: [PATCH v8 03/13] KVM: Define a new interface  kvm_intr_is_single_vcpu() "Wu, Feng" <feng.wu@intel.com> - 2015-09-17 15:40 +0200
            Re: [PATCH v8 03/13] KVM: Define a new interface  kvm_intr_is_single_vcpu() Paolo Bonzini <pbonzini@redhat.com> - 2015-09-17 16:30 +0200
              Re: [PATCH v8 03/13] KVM: Define a new interface  kvm_intr_is_single_vcpu() Radim Krčmář <rkrcmar@redhat.com> - 2015-09-17 18:00 +0200
                Re: [PATCH v8 03/13] KVM: Define a new interface  kvm_intr_is_single_vcpu() Paolo Bonzini <pbonzini@redhat.com> - 2015-09-17 18:10 +0200
                RE: [PATCH v8 03/13] KVM: Define a new interface  kvm_intr_is_single_vcpu() "Wu, Feng" <feng.wu@intel.com> - 2015-09-18 01:20 +0200
                Re: [PATCH v8 03/13] KVM: Define a new interface  kvm_intr_is_single_vcpu() Paolo Bonzini <pbonzini@redhat.com> - 2015-09-18 18:20 +0200
                Re: [PATCH v8 03/13] KVM: Define a new interface  kvm_intr_is_single_vcpu() Radim Krčmář <rkrcmar@redhat.com> - 2015-09-18 18:20 +0200
              RE: [PATCH v8 03/13] KVM: Define a new interface  kvm_intr_is_single_vcpu() "Wu, Feng" <feng.wu@intel.com> - 2015-09-18 01:20 +0200
  Re: [PATCH v8 00/13] Add VT-d Posted-Interrupts support Paolo Bonzini <pbonzini@redhat.com> - 2015-09-16 11:40 +0200

csiph-web