Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754770AbbBTPSQ (ORCPT ); Fri, 20 Feb 2015 10:18:16 -0500 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:47026 "EHLO e06smtp13.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754463AbbBTPSO (ORCPT ); Fri, 20 Feb 2015 10:18:14 -0500 Date: Fri, 20 Feb 2015 16:18:05 +0100 From: Michael Mueller To: Alexander Graf Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Gleb Natapov , Christian Borntraeger , "Jason J. Herne" , Cornelia Huck , Paolo Bonzini , Andreas Faerber , Richard Henderson Subject: Re: [Qemu-devel] [RFC PATCH v2 09/15] cpu-model/s390: Add KVM VM attribute interface routines 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> Organization: IBM X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15022015-0013-0000-0000-00000309A481 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1758 Lines: 53 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/