lkml.org 
[lkml]   [2015]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v8 11/13] KVM: Update Posted-Interrupts Descriptor when vCPU is blocked
From
Date


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


\
 
 \ /
  Last update: 2015-09-16 12:01    [W:0.121 / U:1.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site