From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] kvm: x86: Allow PIT emulation without speaker port Date: Mon, 04 May 2009 12:32:16 +0300 Message-ID: <49FEB620.6040102@redhat.com> References: <49F0CE5A.8040405@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm-devel To: Jan Kiszka Return-path: Received: from mx2.redhat.com ([66.187.237.31]:56678 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751122AbZEDJcv (ORCPT ); Mon, 4 May 2009 05:32:51 -0400 In-Reply-To: <49F0CE5A.8040405@web.de> Sender: kvm-owner@vger.kernel.org List-ID: Jan Kiszka wrote: > The in-kernel speaker emulation is only a dummy and also unneeded from > the performance point of view. Rather, it takes user space support to > generate sound output on the host, e.g. console beeps. > > To allow this, introduce KVM_CREATE_PIT_NOSPKR which is simply > KVM_CREATE_PIT without registration of the speaker_dev. > > Nothing wrong with the patch, but let's make it a little more forward looking. Have a CREATE_PIT2 (or something) which accepts a structure with a flags field and some padding. Define the first flag as speaker in kernel vs speaker in userspace. This would allow us to hack the PIT some more in the future if we find we need too. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.