On 07/08/2017 14:28, Longpeng(Mike) wrote:
> * kvm_arch_spin_in_kernel() returns whether the vcpu (which exits due to
> spinlock) is CPL=0. It only be called by kvm_vcpu_on_spin(), and the
> input vcpu is 'me' which get a PAUSE exit now. *
>
> I split kvm_arch_vcpu_in_kernel(in RFC) into two
On 07/08/2017 14:28, Longpeng(Mike) wrote:
> * kvm_arch_spin_in_kernel() returns whether the vcpu (which exits due to
> spinlock) is CPL=0. It only be called by kvm_vcpu_on_spin(), and the
> input vcpu is 'me' which get a PAUSE exit now. *
>
> I split kvm_arch_vcpu_in_kernel(in RFC) into two
On 08/07/2017 06:45 PM, Paolo Bonzini wrote:
On 07/08/2017 10:44, Longpeng(Mike) wrote:
+
+ /*
+* Intel sdm vol3 ch-25.1.3 says: The “PAUSE-loop exiting”
+* VM-execution control is ignored if CPL > 0. So the vcpu
+* is always exiting with CPL=0 if it uses PLE.
On 08/07/2017 06:45 PM, Paolo Bonzini wrote:
On 07/08/2017 10:44, Longpeng(Mike) wrote:
+
+ /*
+* Intel sdm vol3 ch-25.1.3 says: The “PAUSE-loop exiting”
+* VM-execution control is ignored if CPL > 0. So the vcpu
+* is always exiting with CPL=0 if it uses PLE.
On 07/08/2017 10:44, Longpeng(Mike) wrote:
> +
> + /*
> + * Intel sdm vol3 ch-25.1.3 says: The “PAUSE-loop exiting”
> + * VM-execution control is ignored if CPL > 0. So the vcpu
> + * is always exiting with CPL=0 if it uses PLE.
This is not true (how can it be?). What 25.1.3
On 07/08/2017 10:44, Longpeng(Mike) wrote:
> +
> + /*
> + * Intel sdm vol3 ch-25.1.3 says: The “PAUSE-loop exiting”
> + * VM-execution control is ignored if CPL > 0. So the vcpu
> + * is always exiting with CPL=0 if it uses PLE.
This is not true (how can it be?). What 25.1.3
Implements the kvm_arch_vcpu_spin/preempt_in_kernel(), because get_cpl
requires vcpu_load, so we must cache the result(whether the vcpu was
preempted when its cpl=0) in kvm_arch_vcpu.
Signed-off-by: Longpeng(Mike)
---
arch/x86/include/asm/kvm_host.h | 5 +
Implements the kvm_arch_vcpu_spin/preempt_in_kernel(), because get_cpl
requires vcpu_load, so we must cache the result(whether the vcpu was
preempted when its cpl=0) in kvm_arch_vcpu.
Signed-off-by: Longpeng(Mike)
---
arch/x86/include/asm/kvm_host.h | 5 +
arch/x86/kvm/svm.c |
8 matches
Mail list logo