Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754293AbcJLGxL (ORCPT ); Wed, 12 Oct 2016 02:53:11 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:33769 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754179AbcJLGw6 (ORCPT ); Wed, 12 Oct 2016 02:52:58 -0400 From: Wanpeng Li X-Google-Original-From: Wanpeng Li To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Yunhong Jiang , Wanpeng Li Subject: [PATCH RFC V2 0/2] KVM: x86: Support using the VMX preemption timer for APIC Timer periodic/oneshot mode Date: Wed, 12 Oct 2016 14:52:50 +0800 Message-Id: <1476255172-3357-1-git-send-email-wanpeng.li@hotmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1079 Lines: 28 Most windows guests which I have on hand currently still utilize APIC Timer periodic/oneshot mode instead of APIC Timer tsc-deadline mode: - windows 2008 server r2 - windows 2012 server r2 - windows 7 - windows 10 This patchset adds the support using the VMX preemption timer for APIC Timer periodic/oneshot mode. I add periodic mode testcase to kvm-unit-tests/apic.flat and observed that w/ patch the latency is ~13% of w/o patch. I think maybe something is still not right in the patchset. Your comments to improve the patchset is a great appreciated. v1 -> v2: * remember the timeout when setting up the timer to get a correct TMCCT * move apic->lapic_timer.period/tscdeadline caculations to start_apic_timer() Wanpeng Li (2): KVM: lapic: introduce start_sw_period() to handle oneshot/periodic mode KVM: x86: Support using the VMX preemption timer for APIC Timer periodic/oneshot mode arch/x86/kvm/lapic.c | 166 ++++++++++++++++++++++++++++++++------------------- arch/x86/kvm/lapic.h | 1 + 2 files changed, 107 insertions(+), 60 deletions(-) -- 1.9.1