From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOpLO-0008T8-1d for qemu-devel@nongnu.org; Fri, 20 Feb 2015 10:18:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOpLK-0000IN-RE for qemu-devel@nongnu.org; Fri, 20 Feb 2015 10:18:17 -0500 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:36994) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOpLK-0000I5-Hn for qemu-devel@nongnu.org; Fri, 20 Feb 2015 10:18:14 -0500 Received: from /spool/local by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 20 Feb 2015 15:18:11 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id B99E417D8063 for ; Fri, 20 Feb 2015 15:18:23 +0000 (GMT) Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t1KFI9Xl63635486 for ; Fri, 20 Feb 2015 15:18:09 GMT Received: from d06av11.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t1KFI8DN030910 for ; Fri, 20 Feb 2015 08:18:09 -0700 Date: Fri, 20 Feb 2015 16:18:05 +0100 From: Michael Mueller Message-ID: <20150220161805.3d04097a@bee> In-Reply-To: <54E73DB8.20902@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> 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 14:59:20 +0100 Alexander Graf wrote: > > +typedef struct S390ProcessorProps { > > + uint64_t cpuid; > > + uint16_t ibc; > > + uint8_t pad[6]; > > + uint64_t fac_list[S390_ARCH_FAC_LIST_SIZE_UINT64]; > > +} S390ProcessorProps; > > + > > +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; > > What are those structs there for? To convert between a kvm facing > interface to an internal interface? Yes, that's their current use, but if the interface structs: +struct kvm_s390_vm_cpu_processor { + __u64 cpuid; + __u16 ibc; + __u8 pad[6]; + __u64 fac_list[256]; +}; + +/* kvm S390 machine related attributes are r/o */ +#define KVM_S390_VM_CPU_MACHINE 1 +struct kvm_s390_vm_cpu_machine { + __u64 cpuid; + __u32 ibc_range; + __u8 pad[4]; + __u64 fac_mask[256]; + __u64 fac_list[256]; +}; are visible here, I'll reuse them... But stop, that will not work in the --disable-kvm case... I need them! > > I don't think they're necessary. The internal layout is visible from the > KVM code. Just either spawn the class straight from the kvm file or if > you consider that ugly, pass the values of that struct that you need as > function parameters to a function in cpu-models.c.