[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160706060558.sklnb3qso6tnmbrs@hz-desktop>
Date: Wed, 6 Jul 2016 14:05:58 +0800
From: Haozhong Zhang <haozhong.zhang@...el.com>
To: Wanpeng Li <kernellwp@...il.com>
Cc: kvm <kvm@...r.kernel.org>, Paolo Bonzini <pbonzini@...hat.com>,
Radim Krcmar <rkrcmar@...hat.com>,
Yunhong Jiang <yunhong.jiang@...el.com>,
Wanpeng Li <wanpeng.li@...mail.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Jan Kiszka <jan.kiszka@...mens.com>
Subject: Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when
L2 guest is running
On 07/06/16 13:37, Wanpeng Li wrote:
> Cc Jan,
> 2016-07-06 13:10 GMT+08:00 Haozhong Zhang <haozhong.zhang@...el.com>:
> > 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.
>
> 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 for L1
TSC deadline timer. When we use L1 VMX preemption timer for L1 TSC
deadline timer, we intend to use the pin-based exec config and the VMX
preemption timer value in vmcs01. However, when L2 guest is running,
vmcs02 is loaded as the current VMCS so that a different VMX
preemption timer config is used (i.e. VMX preemption timer is disabled
in prepare_vmcs02()). If we still use preemption timer for L1 TSC
deadline timer at this moment, then L1 TSC deadline timer will not be
able to be triggered when L2 guest is running.
Thanks,
Haozhong
Powered by blists - more mailing lists