From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33343) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOsWz-0000y9-5Y for qemu-devel@nongnu.org; Fri, 20 Feb 2015 13:42:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOsWu-0001i0-9k for qemu-devel@nongnu.org; Fri, 20 Feb 2015 13:42:29 -0500 Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:32979) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOsWu-0001hn-0a for qemu-devel@nongnu.org; Fri, 20 Feb 2015 13:42:24 -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, 20 Feb 2015 18:42:22 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 2CF0F1B0804B for ; Fri, 20 Feb 2015 18:42:33 +0000 (GMT) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t1KIgJQg2621850 for ; Fri, 20 Feb 2015 18:42:19 GMT Received: from d06av01.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t1KIgItE020319 for ; Fri, 20 Feb 2015 11:42:19 -0700 Date: Fri, 20 Feb 2015 19:42:15 +0100 From: Michael Mueller Message-ID: <20150220194215.7afcc73a@bee> In-Reply-To: <54E767E2.4060100@suse.de> References: <1424183053-4310-1-git-send-email-mimu@linux.vnet.ibm.com> <1424183053-4310-10-git-send-email-mimu@linux.vnet.ibm.com> <54E73DB8.20902@suse.de> <20150220161805.3d04097a@bee> <54E767E2.4060100@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH v2 09/15] cpu-model/s390: Add KVM VM attribute interface routines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: linux-s390@vger.kernel.org, kvm@vger.kernel.org, Gleb Natapov , qemu-devel@nongnu.org, linux-kernel@vger.kernel.org, Christian Borntraeger , "Jason J. Herne" , Cornelia Huck , Paolo Bonzini , Andreas Faerber , Richard Henderson On Fri, 20 Feb 2015 17:59:14 +0100 Alexander Graf wrote: > But please give a nutshell explanation on what exactly you're patching > at all here. Please don't ask in riddles... :-) S390ProcessorProps are attributes that represent cpu model related properties of the processor. typedef struct S390ProcessorProps { uint64_t cpuid; uint16_t ibc; uint8_t pad[6]; uint64_t fac_list[S390_ARCH_FAC_LIST_SIZE_UINT64]; } S390ProcessorProps; S390MachineProps are attributes that represent cpu model related properties that a specific host offers. fac_list_mask are the facilities that are supported by the accelerator code and the hosting machine in case of KVM it is kvm_s390_fac_list_mask & STFLE, fac_list is STFLE only typedef struct S390MachineProps { uint64_t cpuid; uint32_t ibc_range; uint8_t pad[4]; uint64_t fac_list_mask[S390_ARCH_FAC_LIST_SIZE_UINT64]; uint64_t fac_list[S390_ARCH_FAC_LIST_SIZE_UINT64]; } S390MachineProps; The various S390CPUModel classes represent all well defined cpu models (those which have been implemented as real machines). Not all of these models are executable on a given host. Only the most current machine implementation is able to run all models. The list of "runnable" cpu models is calculated by "matching" the S390MachineProps with the S390CPUModel classes and the qemu_s390_fac_list_mask[] (indicates the facilities that are implemented by QEMU itself.) The qemu cpu_model is translated to the respective S390CPUModel class and its processor properties (S390ProcessorProps) are used with the s390_set_proceccor_props() call to communicate them to the accelerator what specific cpuid,ibc,fac_list shall be used. Michael