From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH] kvm-userspace: Make PC speaker emulation aware of in-kernel PIT Date: Fri, 24 Apr 2009 21:13:19 -0300 Message-ID: <20090425001319.GB15144@amt.cnet> References: <49F0CE65.4050005@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , kvm-devel To: Jan Kiszka Return-path: Received: from mx2.redhat.com ([66.187.237.31]:47759 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752262AbZDYAUV (ORCPT ); Fri, 24 Apr 2009 20:20:21 -0400 Content-Disposition: inline In-Reply-To: <49F0CE65.4050005@web.de> Sender: kvm-owner@vger.kernel.org List-ID: Jan, While the patch itself looks fine, IMO it would be better to move all of the timer handling to userspace, except the performance critical parts, since most of it is generic. Either periodic or one-shot timer, with: - PIO or MMIO region returns remaining time for expiration. - PIO or MMIO region programs the next event and timer mode. Oversimplified of course (kvm_timer_ops was the first step in that direction). I believe there will be a proposed HPET in-kernel driver. I don't see what is the problem with partial components that Avi talks about. On Thu, Apr 23, 2009 at 10:24:05PM +0200, Jan Kiszka wrote: > When using the in-kernel PIT the speaker emulation has to synchronize > the PIT state with KVM. Enhance the existing speaker sound device and > allow it to take over port 0x61 by using KVM_CREATE_PIT_NOSPKR when > available. This unbreaks -soundhw pcspk in KVM mode. > > Signed-off-by: Jan Kiszka