From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: KVM: migrate PIT timer Date: Wed, 28 May 2008 09:34:41 +0300 Message-ID: <483CFD01.60505@qumranet.com> References: <20080525052911.GA20802@dmt> <483C09EA.1020800@qumranet.com> <20080527151020.GA9438@dmt> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm-devel To: Marcelo Tosatti Return-path: Received: from il.qumranet.com ([212.179.150.194]:37273 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752111AbYE1Gem (ORCPT ); Wed, 28 May 2008 02:34:42 -0400 In-Reply-To: <20080527151020.GA9438@dmt> Sender: kvm-owner@vger.kernel.org List-ID: Marcelo Tosatti wrote: > On Tue, May 27, 2008 at 04:17:30PM +0300, Avi Kivity wrote: > >> Instead of having two timer bits, how about keeping just on >> MIGRATE_TIMER bit which migrates both, and having >> __kvm_migrate_pit_timer() return if not on vcpu 0? >> >> This can result in shorter code, and in less proliferation of the "pit >> is bound to vcpu 0" logic. >> > > Sure. > > Migrate the PIT timer to the physical CPU which vcpu0 is scheduled on, > similarly to what is done for the LAPIC timers, otherwise PIT interrupts > will be delayed until an unrelated event causes an exit. > > Thanks, applied. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.