From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755384AbcGHPrM (ORCPT ); Fri, 8 Jul 2016 11:47:12 -0400 Received: from mail-pa0-f67.google.com ([209.85.220.67]:32839 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754881AbcGHPrH (ORCPT ); Fri, 8 Jul 2016 11:47:07 -0400 Subject: Re: [PATCH v4 2/2] KVM: nVMX: Fix preemption timer bit set in vmcs02 even if L1 doesn't enable it To: Wanpeng Li References: <1467893939-3335-1-git-send-email-wanpeng.li@hotmail.com> <1467893939-3335-2-git-send-email-wanpeng.li@hotmail.com> <7e971b90-164b-9c2c-49f3-acfde4d0be47@redhat.com> <2c360513-3ac7-3139-6614-45dfdff9646b@redhat.com> Cc: "linux-kernel@vger.kernel.org" , kvm , Wanpeng Li , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Yunhong Jiang , Jan Kiszka , Haozhong Zhang From: Paolo Bonzini Message-ID: Date: Fri, 8 Jul 2016 17:47:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/07/2016 16:08, Wanpeng Li wrote: > 2016-07-08 21:58 GMT+08:00 Wanpeng Li : >> We can't get preemption timer vmexit which vmcs02 is loaded since >> preemtion timer bit in vmcs02 is not set, then how can we get the >> incorrect preemption timer vmexit in nested guest which patch 1 fixed? >> Because the scenario I mentioned in patch 2 set vmcs02. >> >> w/o patch1 + w/o enable "L1 TSC deadline timer to trigger while L2 is >> running" => we will get the bug calltrace mentioned in patch1 since >> incorrect vmcs02 bit is set due to the bug mentioned in patch 2. So >> apply patch2 can fix it. >> >> However, after enable "L1 TSC deadline timer to trigger while L2 is >> running", we should have patch 1 to correctly capture nested vmexit >> for preemption timer. >> >> My setup is L0 and L1 both are latest kvm queue branch w/ Yunhong's >> preemption timer enable patches and my previous "fix missed >> cancellation of TSC deadline timer" patches. I always enable >> preemption timer in L0, but try to enable or disable preemption timer >> in L1. > > Btw, my L1 is a full dynticks guest in order that hrtimer in L1 will > be heavily used. Thanks---I'd be grateful if you tested my patch series. Paolo