From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: [patch 01/12] [PATCH] kvm-s390: ioctl to switch to user controlled virtual machines Date: Thu, 08 Dec 2011 11:53:49 +0200 Message-ID: <1323338029.3904.15.camel@lappy> References: <20111208091230.874920251@de.ibm.com> <20111208091728.908715499@de.ibm.com> <1323336309.3904.12.camel@lappy> <4EE08721.4060701@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Carsten Otte , Marcelo Tossati , Christian Borntraeger , Heiko Carstens , Martin Schwidefsky , Cornelia Huck , KVM , Joachim von Buttlar , Jens Freimann , Constantin Werner , Alexander Graf , Xiantao Zhang To: Avi Kivity Return-path: Received: from mail-bw0-f46.google.com ([209.85.214.46]:33166 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752398Ab1LHJyM (ORCPT ); Thu, 8 Dec 2011 04:54:12 -0500 Received: by bkbzv3 with SMTP id zv3so1391641bkb.19 for ; Thu, 08 Dec 2011 01:54:11 -0800 (PST) In-Reply-To: <4EE08721.4060701@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, 2011-12-08 at 11:45 +0200, Avi Kivity wrote: > On 12/08/2011 11:25 AM, Sasha Levin wrote: > > On Thu, 2011-12-08 at 10:12 +0100, Carsten Otte wrote: > > > plain text document attachment (enable-ucontrol.patch) > > > This patch introduces a new config option for user controlled kernel > > > virtual machines. It introduces an optional parameter to > > > KVM_CREATE_VM in order to create a user controlled virtual machine. > > > The parameter is passed to kvm_arch_init_vm for all architectures. > > > Valid values for the new parameter are KVM_VM_REGULAR (defined to 0 > > > for backward compatibility to old KVM_CREATE_VM) and > > > KVM_VM_S390_UCONTROL for s390 only. > > > > Why is it s390 specific? why isn't it KVM_VM_UCONTROL which is currently > > only implemented on s390? > > It's not possible (or at least very difficult) to implement ucontrol on > x86. For example, to update VMCSs you need privileged instructions. It > might be doable on svm, but there's no point, really. Might not work for x86, but maybe on arm? ppc? or some other random arch that will be added in the future? No point in limiting it to s390 from day one. It also makes code a bit cleaner (kvm_main.c shouldn't have arch names in the code). -- Sasha.