* [PATCH kvmtool] kvmtool: expose the TSC Deadline Timer feature to the guest
@ 2015-09-29 17:00 Dimitri John Ledkov
2015-09-30 15:48 ` Andre Przywara
0 siblings, 1 reply; 2+ messages in thread
From: Dimitri John Ledkov @ 2015-09-29 17:00 UTC (permalink / raw)
To: kvm; +Cc: Will Deacon, Andre Przywara
From: Arjan van de Ven <arjan@linux.intel.com>
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 <arjan@linux.intel.com>
Signed-off-by: Dimitri John Ledkov <dimitri.j.ledkov@intel.com>
---
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);
break;
case 6:
/* Clear X86_FEATURE_EPB */
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH kvmtool] kvmtool: expose the TSC Deadline Timer feature to the guest
2015-09-29 17:00 [PATCH kvmtool] kvmtool: expose the TSC Deadline Timer feature to the guest Dimitri John Ledkov
@ 2015-09-30 15:48 ` Andre Przywara
0 siblings, 0 replies; 2+ messages in thread
From: Andre Przywara @ 2015-09-30 15:48 UTC (permalink / raw)
To: Dimitri John Ledkov; +Cc: kvm@vger.kernel.org, Will Deacon
Hi Dimitri,
On 29/09/15 18:00, Dimitri John Ledkov wrote:
> From: Arjan van de Ven <arjan@linux.intel.com>
>
> 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 <arjan@linux.intel.com>
> Signed-off-by: Dimitri John Ledkov <dimitri.j.ledkov@intel.com>
> ---
> 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 */
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-30 15:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-29 17:00 [PATCH kvmtool] kvmtool: expose the TSC Deadline Timer feature to the guest Dimitri John Ledkov
2015-09-30 15:48 ` Andre Przywara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).