From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35880) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0gYc-00008f-KC for qemu-devel@nongnu.org; Fri, 27 Jun 2014 20:32:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0gYS-0001Ds-O8 for qemu-devel@nongnu.org; Fri, 27 Jun 2014 20:31:54 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:50951) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0gYS-0001Dd-Iq for qemu-devel@nongnu.org; Fri, 27 Jun 2014 20:31:44 -0400 Received: by mail-pa0-f54.google.com with SMTP id et14so5316042pad.13 for ; Fri, 27 Jun 2014 17:31:43 -0700 (PDT) Message-ID: <53AE0CEB.2000300@ozlabs.ru> Date: Sat, 28 Jun 2014 10:31:39 +1000 From: Alexey Kardashevskiy MIME-Version: 1.0 References: <1403884480-25547-1-git-send-email-aik@ozlabs.ru> <53AD9876.20903@suse.de> <53AE05BB.9030401@ozlabs.ru> In-Reply-To: <53AE05BB.9030401@ozlabs.ru> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH] target-ppc: Add compatibility between P7/P7+ and P8E/P8 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf , qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org On 06/28/2014 10:00 AM, Alexey Kardashevskiy wrote: > On 06/28/2014 02:14 AM, Alexander Graf wrote: >> >> On 27.06.14 17:54, Alexey Kardashevskiy wrote: >>> At the moment POWER7+ and POWER7 CPUs are different incompatible >>> families in QOM. The same is valid for POWER8E and POWER8 CPUs. >>> However, these couples are architecturally equal and there is no >>> good reason, for example, not to let run -cpu POWER7 on the real >>> POWER7+ CPU machine. >>> >>> This introduces one more level in hierarchy of POWERPC CPU classes. >>> New macro POWERPC_FAMILY_2 takes a family class and the parent family >>> class and, for example, for POWER7+ the hierarchy looks like: >>> TYPE_CPU >>> TYPE_POWERPC_CPU >>> POWER7-powerpc64-cpu >>> POWER7+-powerpc64-cpu >>> >>> This registers new dynamic POWERPC CPU classes for all classes between >>> the lowest one which matches the real PVR and TYPE_POWERPC_CPU. >>> So for POWER7, it is still going to be just a single dynamic "POWER7" >>> class but for POWER7+ inherited from POWER7 there are going to be >>> 2 dynamic classes - "POWER7+" and "POWER7" so management software >>> can use both to ensure successful migration. >>> >>> Since POWER7+ inherits from POWER7 and POWER8E from POWER8, this >>> removes recurring pieces of code. CPUs with shorter names were chosen >>> as parents. >>> >>> Signed-off-by: Alexey Kardashevskiy >>> --- >>> >>> This is rather RFC patch and there is no hurry in reviewing this, >>> and this is not 2.1 material and everyhting, just tried to solve >>> a QOM puzzle here :) >> >> I'm not sure - I'd rather make sure we have this sorted out for 2.1 so we >> can keep the -cpu list stable. >> >> Could we make the PVR matching a function callback rather than value+mask? >> Then we could have p7 and p8 just match on 2 different PVR ranges. > > POWER8: >>>> bin(0x4d) > '0b1001101' >>>> bin(0x4b) > '0b1001011' >>>> bin(0x4c) > '0b1001100' > > 4D == POWER8, 4B == POWER8E, 4C - does not exist and when it will, I do not > know what it is going to be. > > POWER7: >>>> bin(0x3f) > '0b111111' >>>> bin(0x4a) > '0b1001010' >>>> > > > What should mask look like for P7 and P8? Re-read your email :) Callback you say... And we will loose POWER7+ and POWER8E. May it is all right as we drop bottom 16bits already... -- Alexey