Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755908Ab2BGKEy (ORCPT ); Tue, 7 Feb 2012 05:04:54 -0500 Received: from cantor2.suse.de ([195.135.220.15]:49621 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753662Ab2BGKEx convert rfc822-to-8bit (ORCPT ); Tue, 7 Feb 2012 05:04:53 -0500 Subject: Re: [Qemu-devel] [RFC] Next gen kvm api Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii From: Alexander Graf In-Reply-To: <1328597934.6802.6.camel@concordia> Date: Tue, 7 Feb 2012 11:04:44 +0100 Cc: Scott Wood , Anthony Liguori , Eric Northup , Avi Kivity , linux-kernel , KVM list , qemu-devel Content-Transfer-Encoding: 8BIT Message-Id: References: <4F2AB552.2070909@redhat.com> <4F2C6517.3040203@codemonkey.ws> <4F302E0D.20302@freescale.com> <1328597934.6802.6.camel@concordia> To: michael@ellerman.id.au X-Mailer: Apple Mail (2.1251.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1899 Lines: 51 On 07.02.2012, at 07:58, Michael Ellerman wrote: > On Mon, 2012-02-06 at 13:46 -0600, Scott Wood wrote: >> On 02/03/2012 04:52 PM, Anthony Liguori wrote: >>> On 02/03/2012 12:07 PM, Eric Northup wrote: >>>> On Thu, Feb 2, 2012 at 8:09 AM, Avi Kivity wrote: >>>> [...] >>>>> >>>>> Moving to syscalls avoids these problems, but introduces new ones: >>>>> >>>>> - adding new syscalls is generally frowned upon, and kvm will need >>>>> several >>>>> - syscalls into modules are harder and rarer than into core kernel code >>>>> - will need to add a vcpu pointer to task_struct, and a kvm pointer to >>>>> mm_struct >>>> - Lost a good place to put access control (permissions on /dev/kvm) >>>> for which user-mode processes can use KVM. >>>> >>>> How would the ability to use sys_kvm_* be regulated? >>> >>> Why should it be regulated? >>> >>> It's not a finite or privileged resource. >> >> You're exposing a large, complex kernel subsystem that does very >> low-level things with the hardware. It's a potential source of exploits >> (from bugs in KVM or in hardware). I can see people wanting to be >> selective with access because of that. > > Exactly. > > In a perfect world I'd agree with Anthony, but in reality I think > sysadmins are quite happy that they can prevent some users from using > KVM. > > You could presumably achieve something similar with capabilities or > whatever, but a node in /dev is much simpler. Well, you could still keep the /dev/kvm node and then have syscalls operate on the fd. But again, I don't see the problem with the ioctl interface. It's nice, extensible and works great for us. Alex -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/