From patchwork Fri Oct 28 02:05:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 688126 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3t4qpH10zRz9srZ for ; Fri, 28 Oct 2016 15:02:15 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.b=akevghic; dkim-atps=neutral Received: from localhost ([::1]:46416 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzyHT-0007xP-TZ for incoming@patchwork.ozlabs.org; Thu, 27 Oct 2016 23:56:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzxHa-0005kN-9w for qemu-devel@nongnu.org; Thu, 27 Oct 2016 22:52:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzxHW-0003tM-Gs for qemu-devel@nongnu.org; Thu, 27 Oct 2016 22:52:38 -0400 Received: from ozlabs.org ([103.22.144.67]:37531) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bzxHV-0003rz-4x; Thu, 27 Oct 2016 22:52:34 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3t4pFC26M5z9ssP; Fri, 28 Oct 2016 13:51:59 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1477623119; bh=wK8Id/eTq6vw3rCXVYCiBXRUJ8+8pQwsRRWQU4JhISo=; h=From:To:Cc:Subject:Date:From; b=akevghicHH5KpTWxo6g2yFciU2T5M3WdV/JXfw2gu6iSf+seenwFoiP7kRl+FA5FS Q/Qdne9+/CDz8Ka078Ys7NTPfkH7B/yw1LHzXfn0J6+DaDtfbikw44ENIbFpvE6kc8 e1Ti5P3Q0alpWW7N5tb4LRHc75oJsoMXiw/5AVJs= From: David Gibson To: clg@kaod.org Date: Fri, 28 Oct 2016 13:05:01 +1100 Message-Id: <1477620301-24822-1-git-send-email-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [RFC] powernv: CPU compatibility modes don't make sense for powernv X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" powernv has some code (derived from the spapr equivalent) used in device tree generation which depends on the CPU's compatibility mode / logical PVR. However, compatibility modes don't make sense on powernv - at least not as a property controlled by the host - because the guest in powernv has full hypervisor level access to the virtual system, and so owns the PCR (Processor Compatibility Register) which implements compatiblity modes. Signed-off-by: David Gibson Reviewed-by: Greg Kurz Reviewed-by: Cédric Le Goater --- hw/ppc/pnv.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) Hi Cédric, I'd appreciate it if you can double check my reasoning here. This patch gets powernv out of the way of a bunch of compatibility mode cleanups I have in the works. diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 82276e0..6af3424 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -110,7 +110,7 @@ static void powernv_create_core_node(PnvChip *chip, PnvCore *pc, void *fdt) CPUState *cs = CPU(DEVICE(pc->threads)); DeviceClass *dc = DEVICE_GET_CLASS(cs); PowerPCCPU *cpu = POWERPC_CPU(cs); - int smt_threads = ppc_get_compat_smt_threads(cpu); + int smt_threads = CPU_CORE(pc)->nr_threads; CPUPPCState *env = &cpu->env; PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cs); uint32_t servers_prop[smt_threads]; @@ -206,10 +206,6 @@ static void powernv_create_core_node(PnvChip *chip, PnvCore *pc, void *fdt) _FDT((fdt_setprop(fdt, offset, "ibm,pa-features", pa_features, sizeof(pa_features)))); - if (cpu->cpu_version) { - _FDT((fdt_setprop_cell(fdt, offset, "cpu-version", cpu->cpu_version))); - } - /* Build interrupt servers properties */ for (i = 0; i < smt_threads; i++) { servers_prop[i] = cpu_to_be32(pc->pir + i);