Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755031AbbBTT3u (ORCPT ); Fri, 20 Feb 2015 14:29:50 -0500 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:45563 "EHLO e06smtp10.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753521AbbBTT3s (ORCPT ); Fri, 20 Feb 2015 14:29:48 -0500 Date: Fri, 20 Feb 2015 20:29:19 +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 13/15] cpu-model/s390: Add processor property routines Message-ID: <20150220202919.29cc7b32@bee> In-Reply-To: <54E76823.9000106@suse.de> References: <1424183053-4310-1-git-send-email-mimu@linux.vnet.ibm.com> <1424183053-4310-14-git-send-email-mimu@linux.vnet.ibm.com> <54E73EB2.6050700@suse.de> <20150220163209.4e082e0b@bee> <54E76823.9000106@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: 15022019-0041-0000-0000-000003525224 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3011 Lines: 74 On Fri, 20 Feb 2015 18:00:19 +0100 Alexander Graf wrote: > > So above s390_set/get_processor_props() the code is accelerator independent. > > Any particular reason you can't do it like PPC? That seems to be a short question... and when I started one year ago, I oriented myself on the PPC version and I'm also willing to revisit it but I can't give you a quick answer different from no currently to that. There are no PVRs for s390x CPUs and thus I came up with "pseudo PVRs": /* * bits 0-7 : CMOS generation * bits 8-9 : reserved * bits 10-11 : machine class 0=unknown 1=EC 2=BC * bits 12-15 : GA * bits 16-31 : machine type * * note: bits are named according to s390 * architecture specific endienness */ enum { CPU_S390_2064_GA1 = 0x07112064, CPU_S390_2064_GA2 = 0x07122064, CPU_S390_2064_GA3 = 0x07132064, CPU_S390_2066_GA1 = 0x07212066, CPU_S390_2084_GA1 = 0x08112084, CPU_S390_2084_GA2 = 0x08122084, CPU_S390_2084_GA3 = 0x08132084, CPU_S390_2084_GA4 = 0x08142084, CPU_S390_2084_GA5 = 0x08152084, CPU_S390_2086_GA1 = 0x08212086, CPU_S390_2086_GA2 = 0x08222086, CPU_S390_2086_GA3 = 0x08232086, CPU_S390_2094_GA1 = 0x09112094, CPU_S390_2094_GA2 = 0x09122094, CPU_S390_2094_GA3 = 0x09132094, CPU_S390_2096_GA1 = 0x09212096, CPU_S390_2096_GA2 = 0x09222096, CPU_S390_2097_GA1 = 0x0a112097, CPU_S390_2097_GA2 = 0x0a122097, CPU_S390_2097_GA3 = 0x0a132097, CPU_S390_2098_GA1 = 0x0a212098, CPU_S390_2098_GA2 = 0x0a222098, CPU_S390_2817_GA1 = 0x0b112817, CPU_S390_2817_GA2 = 0x0b122817, CPU_S390_2818_GA1 = 0x0b212818, CPU_S390_2827_GA1 = 0x0c112827, CPU_S390_2827_GA2 = 0x0c122827, CPU_S390_2828_GA1 = 0x0c212828, CPU_S390_2964_GA1 = 0x0d112964, }; And initially I had a version that was limiting the accelerator to be able to implement just them with all their properties encapsulated in the a accelerator as well. After identifying the real processor related attributes defining the model, I changed the interface such that KVM or other accelerators give hints what it is able to support in dependency of the current code version and the hosting machine and let QEMU decide how to set these attributes (cpuid,ibc,fac_list). Thus I think the implementation is now quite open and easily adoptable also for TCG and possibly others as well. Eventually the integration and also some trigger points of my code are to adjust. So coming back to your question, the answer is still no for the whole item but eventually yes if you have limited it to the s390_set/get_processor_props() triggers. But I have to look into it first again. I will do that when I'm back on Tuesday morning. Thanks and have a nice WE Michael -- 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/