From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752920AbcIBKu5 (ORCPT ); Fri, 2 Sep 2016 06:50:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35956 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752433AbcIBKuy (ORCPT ); Fri, 2 Sep 2016 06:50:54 -0400 Subject: Re: [PATCH 2/2] KVM: nVMX: make emulated nested preemption timer pinned To: Wanpeng Li , linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <1472544841-4056-1-git-send-email-wanpeng.li@hotmail.com> <1472544841-4056-2-git-send-email-wanpeng.li@hotmail.com> Cc: Wanpeng Li , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Yunhong Jiang From: Paolo Bonzini Message-ID: <9612ce34-3a80-94d0-c8d1-d99522d9643b@redhat.com> Date: Fri, 2 Sep 2016 12:48:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1472544841-4056-2-git-send-email-wanpeng.li@hotmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 02 Sep 2016 10:48:22 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/08/2016 10:14, Wanpeng Li wrote: > From: Wanpeng Li > > Commit 61abdbe0bc ("kvm: x86: make lapic hrtimer pinned") pins the emulated > lapic timer. This patch does the same for the emulated nested preemption > timer to avoid vmexit an unrelated vCPU and the latency of kicking IPI to > another vCPU. > > Cc: Paolo Bonzini > Cc: Radim Krčmář > Cc: Yunhong Jiang > Signed-off-by: Wanpeng Li > --- > arch/x86/kvm/vmx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c > index 5cede40..090a3f8 100644 > --- a/arch/x86/kvm/vmx.c > +++ b/arch/x86/kvm/vmx.c > @@ -7013,7 +7013,7 @@ static int handle_vmon(struct kvm_vcpu *vcpu) > vmx->nested.vmcs02_num = 0; > > hrtimer_init(&vmx->nested.preemption_timer, CLOCK_MONOTONIC, > - HRTIMER_MODE_REL); > + HRTIMER_MODE_REL_PINNED); > vmx->nested.preemption_timer.function = vmx_preemption_timer_fn; > > vmx->nested.vmxon = true; > Queued for 4.9, thanks. Paolo