From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WV4IA-0006gY-01 for qemu-devel@nongnu.org; Tue, 01 Apr 2014 15:24:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WV4Hz-0007yp-Nm for qemu-devel@nongnu.org; Tue, 01 Apr 2014 15:24:13 -0400 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:51454) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WV4Hz-0007yY-CB for qemu-devel@nongnu.org; Tue, 01 Apr 2014 15:24:03 -0400 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 1 Apr 2014 20:24:02 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 5C37E2190041 for ; Tue, 1 Apr 2014 20:23:53 +0100 (BST) Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by b06cxnps4074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s31JNlmc26149114 for ; Tue, 1 Apr 2014 19:23:47 GMT Received: from d06av05.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s31JNwCn016828 for ; Tue, 1 Apr 2014 13:23:58 -0600 Message-ID: <533B124D.4060707@de.ibm.com> Date: Tue, 01 Apr 2014 21:23:57 +0200 From: Christian Borntraeger MIME-Version: 1.0 References: <1396363663-50450-1-git-send-email-borntraeger@de.ibm.com> <533AD457.7030701@suse.de> In-Reply-To: <533AD457.7030701@suse.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH/RFC] s390: Provide a configuration and control device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: linux-s390 , Michael Mueller , KVM , Ekaterina Tumanova , qemu-devel , Jens Freimann , Cornelia Huck On 01/04/14 16:59, Alexander Graf wrote: > On 04/01/2014 04:47 PM, Christian Borntraeger wrote: >> We want to configure several things in KVM that go beyond what >> ENABLE_CAP (we need payload) or ONE_REG (we need it for the VM >> and we need to do more complex actions) can provide. Instead of >> adding several s390 specific ioctls, lets provide a configuration >> and control device that encapsulates different commands into >> groups of the same area (MEMORY, CPU, ..) >> >> We also provide an initial nameless base group, with a simple first >> user to set the guest name. We need that name in the kernel for >> the emulation of STSI (which provides the guest name to the guest) >> but we need to implement the emulation in supervisor mode, as it >> also provides the underlying levels of hipervisors. >> >> Currently we have the following GROUPS and ATTRs pending, which >> configure some memory management related function or allow to set >> the guest facilities, cpuids etc: >> >> #define KVM_DEV_CONFIG_GROUP 0 >> #define KVM_DEV_CONFIG_NAME 0 >> >> #define KVM_DEV_CONFIG_GROUP_MEM 1 >> #define KVM_DEV_CONFIG_MEM_ENABLE_CMMA 0 >> #define KVM_DEV_CONFIG_MEM_CLR_CMMA 1 >> #define KVM_DEV_CONFIG_MEM_CLR_PAGES 2 >> >> #define KVM_DEV_CONFIG_GROUP_CPU 2 >> #define KVM_DEV_CONFIG_CPU_TYPE 0 >> #define KVM_DEV_CONFIG_CPU_FAC 1 >> #define KVM_DEV_CONFIG_CPU_FAC_MASK 2 >> #define KVM_DEV_CONFIG_CPU_IBC 3 >> #define KVM_DEV_CONFIG_CPU_IBC_RANGE 4 > > Why would CPU specific information be set in the VM? Might be a misleading name here. This is about CPU id and facility list (mostly CPU features). The list of facilities and the cpu id is unique on VM level. It is queried via a CPU instruction, though. Providing some VM-wide setting via a CPU interface would make the interface look like the user can have different settings per-CPU. Since we cant, its better to make this explicit. > > > Alex > >> >> >> >> In addition other groups like >> #define KVM_DEV_CONFIG_GROUP_CRYPTO >> are under consideration to configure crypto acceleration. >> >> Unless there is a major concern, I will add this to the next >> s390 PULL requests for KVM. >> >> Christian >> >