From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Otte Subject: Re: [patch 01/12] [PATCH] kvm-s390: add parameter for KVM_CREATE_VM Date: Fri, 09 Dec 2011 12:50:42 +0100 Message-ID: <4EE1F612.5040602@de.ibm.com> References: <20111209112326.454852716@de.ibm.com> <20111209112751.100776193@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Marcelo Tossati , borntrae@linux.vnet.ibm.com, heicars2@linux.vnet.ibm.com, mschwid2@linux.vnet.ibm.com, huckc@linux.vnet.ibm.com, KVM , Joachim von Buttlar , Jens Freimann , Constantin Werner , Xiantao Zhang To: Alexander Graf Return-path: Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:49028 "EHLO e06smtp16.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751961Ab1LILvM (ORCPT ); Fri, 9 Dec 2011 06:51:12 -0500 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 9 Dec 2011 11:51:11 -0000 Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by d06nrmr1707.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pB9Bp9TT2658500 for ; Fri, 9 Dec 2011 11:51:09 GMT Received: from d06av11.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pB9Bp8DH019373 for ; Fri, 9 Dec 2011 04:51:08 -0700 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 09.12.2011 12:32, Alexander Graf wrote: >> +KVM_CAP_UCONTROL > KVM_S390_CAP_UCONTROL I'm happy either way. It seemed to me that the discussion between Avi and Sasha for V2 of the patch series on this naming has concluded to KVM_CAP_UCONTROL/KVM_VM_UCONTROL without _S390 in it. > KVM_ENABLE_CAP(KVM_S390_CAP_UCONTROL)? It doesn't look like you can't switch from kernel-controlled to user controlled mode during runtime. All you need to do is remove the gmap again and you should be fine, no? This was the case via an ioctl KVM_S390_ENABLE_UCONTROL in version 1. Avi pointed out some possible race conditions with that, and recommended to switch it via KVM_CREATE_VM. I'm happy either way, just let me know what's prefered. > We do something similar on PPC where we just call ENABLE_CAP to switch to PAPR mode. If otherwise too difficult you can for example also define that the ENABLE_CAP has to happen before your first VCPU_RUN. Code looks to me like you do ENABLE_CAP per vcpu on ppc (chapter 4.37 of api.txt agrees with that). We need something per VM, we cannot switch individual CPUs between ucontrol/regular because with ucontrol the VM does not have a common address space.