From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v2] KVM: x86: Prevent exposing TSC deadline timer feature in the absence of in-kernel APIC Date: Wed, 21 Dec 2011 12:44:52 +0200 Message-ID: <4EF1B8A4.2050008@redhat.com> References: <4EF1146D.208@siemens.com> <4EF1B081.3010109@siemens.com> <4EF1B423.8050707@siemens.com> <4EF1B67D.7010603@redhat.com> <4EF1B7C0.3080200@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Linus Torvalds , Alexey Zaytsev , "Liu, Jinsong" , Kernel development list , Marcelo Tosatti , "Garrett D'Amore" , kvm To: Jan Kiszka Return-path: In-Reply-To: <4EF1B7C0.3080200@siemens.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 12/21/2011 12:41 PM, Jan Kiszka wrote: > On 2011-12-21 11:35, Avi Kivity wrote: > > On 12/21/2011 12:25 PM, Jan Kiszka wrote: > >> We must not report the TSC deadline timer feature on our own when user > >> space provides the APIC as we have no clue about its features. > > > > We must not report the TSC deadline timer feature on our own, period. > > We should just update the timer mode mask there. Don't know how this > > slipped through review. > > > > I think your original idea was correct. Add a new KVM_CAP for the tsc > > deadline timer. Userspace can add the bit to cpuid if either it > > implements the feature in a userspace apic, or if it finds the new > > capability and uses the kernel apic. > > Right, we do need some control for user space to keep the feature > disabled when migrating from an older host. > > However, there is also the timer_mode_mask which requires tuning in > addition to the cpuid flag. > timer_mode_mask can just be slaved to the bit (as received by KVM_SET_CPUID); that's exactly kvm_update_cpuid()'s role. -- error compiling committee.c: too many arguments to function