Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running

2016-07-06 Thread Haozhong Zhang
On 07/06/16 04:14, Paolo Bonzini wrote: > > On 07/06/16 16:01, Haozhong Zhang wrote: > > > On 07/06/16 09:46, Paolo Bonzini wrote: > > > > On 06/07/2016 08:05, Haozhong Zhang wrote: > > > > >> > Nested preemption timer is emulated by hrtimer, so it doesn't > > > > >> > influence vmcs02, why this

Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running

2016-07-06 Thread Haozhong Zhang
On 07/06/16 04:14, Paolo Bonzini wrote: > > On 07/06/16 16:01, Haozhong Zhang wrote: > > > On 07/06/16 09:46, Paolo Bonzini wrote: > > > > On 06/07/2016 08:05, Haozhong Zhang wrote: > > > > >> > Nested preemption timer is emulated by hrtimer, so it doesn't > > > > >> > influence vmcs02, why this

Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running

2016-07-06 Thread Paolo Bonzini
> On 07/06/16 16:01, Haozhong Zhang wrote: > > On 07/06/16 09:46, Paolo Bonzini wrote: > > > On 06/07/2016 08:05, Haozhong Zhang wrote: > > > >> > Nested preemption timer is emulated by hrtimer, so it doesn't > > > >> > influence vmcs02, why this is needed? > > > > Nested (L2) preemption timer is

Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running

2016-07-06 Thread Paolo Bonzini
> On 07/06/16 16:01, Haozhong Zhang wrote: > > On 07/06/16 09:46, Paolo Bonzini wrote: > > > On 06/07/2016 08:05, Haozhong Zhang wrote: > > > >> > Nested preemption timer is emulated by hrtimer, so it doesn't > > > >> > influence vmcs02, why this is needed? > > > > Nested (L2) preemption timer is

Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running

2016-07-06 Thread Haozhong Zhang
On 07/06/16 16:01, Haozhong Zhang wrote: > On 07/06/16 09:46, Paolo Bonzini wrote: > > > > > > On 06/07/2016 08:05, Haozhong Zhang wrote: > > >> > > > >> > Nested preemption timer is emulated by hrtimer, so it doesn't > > >> > influence vmcs02, why this is needed? > > > Nested (L2) preemption

Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running

2016-07-06 Thread Haozhong Zhang
On 07/06/16 16:01, Haozhong Zhang wrote: > On 07/06/16 09:46, Paolo Bonzini wrote: > > > > > > On 06/07/2016 08:05, Haozhong Zhang wrote: > > >> > > > >> > Nested preemption timer is emulated by hrtimer, so it doesn't > > >> > influence vmcs02, why this is needed? > > > Nested (L2) preemption

Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running

2016-07-06 Thread Haozhong Zhang
On 07/06/16 09:46, Paolo Bonzini wrote: > > > On 06/07/2016 08:05, Haozhong Zhang wrote: > >> > > >> > Nested preemption timer is emulated by hrtimer, so it doesn't > >> > influence vmcs02, why this is needed? > > Nested (L2) preemption timer is not affected for sure, and this patch > > is to

Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running

2016-07-06 Thread Haozhong Zhang
On 07/06/16 09:46, Paolo Bonzini wrote: > > > On 06/07/2016 08:05, Haozhong Zhang wrote: > >> > > >> > Nested preemption timer is emulated by hrtimer, so it doesn't > >> > influence vmcs02, why this is needed? > > Nested (L2) preemption timer is not affected for sure, and this patch > > is to

Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running

2016-07-06 Thread Paolo Bonzini
On 06/07/2016 08:05, Haozhong Zhang wrote: >> > >> > Nested preemption timer is emulated by hrtimer, so it doesn't >> > influence vmcs02, why this is needed? > Nested (L2) preemption timer is not affected for sure, and this patch > is to fix another problem caused by using L1 preemption timer

Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running

2016-07-06 Thread Paolo Bonzini
On 06/07/2016 08:05, Haozhong Zhang wrote: >> > >> > Nested preemption timer is emulated by hrtimer, so it doesn't >> > influence vmcs02, why this is needed? > Nested (L2) preemption timer is not affected for sure, and this patch > is to fix another problem caused by using L1 preemption timer

Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running

2016-07-06 Thread Haozhong Zhang
On 07/06/16 13:37, Wanpeng Li wrote: > Cc Jan, > 2016-07-06 13:10 GMT+08:00 Haozhong Zhang : > > A different VMCS is loaded when L2 guest is running, so it's incorrect > > to use the VMX preemption timer for L1 TSC deadline timer. This patch > > switches to hrtimer for L1

Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running

2016-07-06 Thread Haozhong Zhang
On 07/06/16 13:37, Wanpeng Li wrote: > Cc Jan, > 2016-07-06 13:10 GMT+08:00 Haozhong Zhang : > > A different VMCS is loaded when L2 guest is running, so it's incorrect > > to use the VMX preemption timer for L1 TSC deadline timer. This patch > > switches to hrtimer for L1 TSC deadline timer when

Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running

2016-07-06 Thread Paolo Bonzini
On 06/07/2016 07:37, Wanpeng Li wrote: > Cc Jan, > 2016-07-06 13:10 GMT+08:00 Haozhong Zhang : >> A different VMCS is loaded when L2 guest is running, so it's incorrect >> to use the VMX preemption timer for L1 TSC deadline timer. This patch >> switches to hrtimer for

Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running

2016-07-06 Thread Paolo Bonzini
On 06/07/2016 07:37, Wanpeng Li wrote: > Cc Jan, > 2016-07-06 13:10 GMT+08:00 Haozhong Zhang : >> A different VMCS is loaded when L2 guest is running, so it's incorrect >> to use the VMX preemption timer for L1 TSC deadline timer. This patch >> switches to hrtimer for L1 TSC deadline timer when

Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running

2016-07-05 Thread Wanpeng Li
Cc Jan, 2016-07-06 13:10 GMT+08:00 Haozhong Zhang : > A different VMCS is loaded when L2 guest is running, so it's incorrect > to use the VMX preemption timer for L1 TSC deadline timer. This patch > switches to hrtimer for L1 TSC deadline timer when entering L2 guest, >

Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running

2016-07-05 Thread Wanpeng Li
Cc Jan, 2016-07-06 13:10 GMT+08:00 Haozhong Zhang : > A different VMCS is loaded when L2 guest is running, so it's incorrect > to use the VMX preemption timer for L1 TSC deadline timer. This patch > switches to hrtimer for L1 TSC deadline timer when entering L2 guest, > and switches back to VMX

[PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running

2016-07-05 Thread Haozhong Zhang
A different VMCS is loaded when L2 guest is running, so it's incorrect to use the VMX preemption timer for L1 TSC deadline timer. This patch switches to hrtimer for L1 TSC deadline timer when entering L2 guest, and switches back to VMX preemption timer when nested VMEXIT from L2 to L1.

[PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running

2016-07-05 Thread Haozhong Zhang
A different VMCS is loaded when L2 guest is running, so it's incorrect to use the VMX preemption timer for L1 TSC deadline timer. This patch switches to hrtimer for L1 TSC deadline timer when entering L2 guest, and switches back to VMX preemption timer when nested VMEXIT from L2 to L1.