From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Przywara Subject: Re: [PATCH kvmtool] kvmtool: expose the TSC Deadline Timer feature to the guest Date: Wed, 30 Sep 2015 16:48:00 +0100 Message-ID: <560C0430.90805@arm.com> References: <1443546029-1202-1-git-send-email-dimitri.j.ledkov@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: "kvm@vger.kernel.org" , Will Deacon To: Dimitri John Ledkov Return-path: Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:61749 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753837AbbI3PsX (ORCPT ); Wed, 30 Sep 2015 11:48:23 -0400 In-Reply-To: <1443546029-1202-1-git-send-email-dimitri.j.ledkov@intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Hi Dimitri, On 29/09/15 18:00, Dimitri John Ledkov wrote: > From: Arjan van de Ven > > with the TSC deadline timer feature, we don't need to calibrate the apic > timers anymore, which saves more than 100 milliseconds of boot time. > > Signed-off-by: Arjan van de Ven > Signed-off-by: Dimitri John Ledkov > --- > x86/cpuid.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/x86/cpuid.c b/x86/cpuid.c > index c3b67d9..1d8bd23 100644 > --- a/x86/cpuid.c > +++ b/x86/cpuid.c > @@ -31,6 +31,9 @@ static void filter_cpuid(struct kvm_cpuid2 *kvm_cpuid) > /* Set X86_FEATURE_HYPERVISOR */ > if (entry->index == 0) > entry->ecx |= (1 << 31); > + /* Set CPUID_EXT_TSC_DEADLINE_TIMER*/ > + if (entry->index == 0) > + entry->ecx |= (1 << 24); This can only be enabled if the kernel supports emulation of that feature (reported via KVM_CAP_TSC_DEADLINE_TIMER) (cf: Documentation/virtual/kvm/api.txt and respective QEMU code in target-i386/kvm.c) Cheers, Andre. > break; > case 6: > /* Clear X86_FEATURE_EPB */ >