From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:57698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rxf5I-0000Hn-Gs for qemu-devel@nongnu.org; Wed, 15 Feb 2012 08:39:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rxf5H-0003db-4U for qemu-devel@nongnu.org; Wed, 15 Feb 2012 08:39:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34285) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rxf5G-0003dP-KF for qemu-devel@nongnu.org; Wed, 15 Feb 2012 08:39:46 -0500 Message-ID: <4F3BB59D.2020505@redhat.com> Date: Wed, 15 Feb 2012 15:39:41 +0200 From: Avi Kivity MIME-Version: 1.0 References: <4F2AB552.2070909@redhat.com> <20120205093723.GQ23536@redhat.com> <4F2E4F8B.8090504@redhat.com> <20120205095153.GA29265@redhat.com> <4F2EAFF6.7030006@codemonkey.ws> <4F2F9E89.7090607@redhat.com> <87vcnih5qt.fsf@rustcorp.com.au> In-Reply-To: <87vcnih5qt.fsf@rustcorp.com.au> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC] Next gen kvm api List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Rusty Russell Cc: qemu-devel , KVM list , Gleb Natapov , linux-kernel On 02/07/2012 08:12 PM, Rusty Russell wrote: > > I would really love to have this, but the problem is that we'd need a > > general purpose bytecode VM with binding to some kernel APIs. The > > bytecode VM, if made general enough to host more complicated devices, > > would likely be much larger than the actual code we have in the kernel now. > > We have the ability to upload bytecode into the kernel already. It's in > a great bytecode interpreted by the CPU itself. Unfortunately it's inflexible (has to come with the kernel) and open to security vulnerabilities. > If every user were emulating different machines, LPF this would make > sense. Are they? They aren't. > Or should we write those helpers once, in C, and > provide that for them. There are many of them: PIT/PIC/IOAPIC/MSIX tables/HPET/kvmclock/Hyper-V stuff/vhost-net/DMA remapping/IO remapping (just for x86), and some of them are quite complicated. However implementing them in bytecode amounts to exposing a stable kernel ABI, since they use such a vast range of kernel services. -- error compiling committee.c: too many arguments to function