Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754815AbcJMLwf (ORCPT ); Thu, 13 Oct 2016 07:52:35 -0400 Received: from mail-qk0-f196.google.com ([209.85.220.196]:34225 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754504AbcJMLw0 (ORCPT ); Thu, 13 Oct 2016 07:52:26 -0400 MIME-Version: 1.0 In-Reply-To: References: <1476255172-3357-1-git-send-email-wanpeng.li@hotmail.com> <1476255172-3357-3-git-send-email-wanpeng.li@hotmail.com> <20161012174109.GF30525@potion> From: Wanpeng Li Date: Thu, 13 Oct 2016 19:52:09 +0800 Message-ID: Subject: Re: [PATCH RFC V2 2/2] KVM: x86: Support using the VMX preemption timer for APIC Timer periodic/oneshot mode To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= Cc: "linux-kernel@vger.kernel.org" , kvm , Paolo Bonzini , Yunhong Jiang , Wanpeng Li Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id u9DBqcBo017989 Content-Length: 901 Lines: 24 2016-10-13 19:38 GMT+08:00 Wanpeng Li : > 2016-10-13 1:41 GMT+08:00 Radim Krčmář : >> 2016-10-12 14:52+0800, Wanpeng Li: [...] >>> @@ -1711,8 +1753,7 @@ u64 kvm_get_lapic_tscdeadline_msr(struct kvm_vcpu *vcpu) >>> { >>> struct kvm_lapic *apic = vcpu->arch.apic; >>> >>> - if (!lapic_in_kernel(vcpu) || apic_lvtt_oneshot(apic) || >>> - apic_lvtt_period(apic)) >> >> rdmsr MSR_IA32_TSCDEADLINE has to return 0 when the timer is not in tsc >> deadline mode, so the condition should stay. (and check for >> apic_lvtt_tscdeadline(), but that is a unrelated cleanup.) Actually I modify this function to get apic->lapic_timer.tscdeadline in kvm_arch_vcpu_load() for periodic/oneshot mode, I introduce another function to handle this in order to avoid break rdmsr MSR_IA32_TSCDEADLINE sanity check in RFC V3. Regards, Wanpeng Li