From nobody Sun Nov 24 21:31:59 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1720707747; cv=none; d=zohomail.com; s=zohoarc; b=MscMqqdovgI54rHp9Uv3abdCf3cjc/TffRsXg4kuJPKwSFAkger3ss8Xu2iRGbxW4cfxLrZkfC08WaOay/MiEqej2YmQMgKB1Hyt6I5wZOvP/tUdgiKYhv5SB6BoC5plH40zZoOyTmC9wDhtBr/UaEndqvqQaBHadUDvf0sWxX4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1720707747; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=0DgZsKqI5Qui8xJrG3nYJqRYaaUiPlIWM1v7RfXcJUQ=; b=GRU76POH7d/1mRnmY/qfVNC6Ibq6GlDp4Uhj+igTSNsFEPpcXEvx1dIpG38GpX7XEmA9eW1fmBukLkepyUY1Om+X2Tr51SXz7me9R7sYJd+oHl31UUQCkFx/Gsg/R7BOtYsC0wePuso2mRcwU6b3Uh8toJ+S+uLXezThxuTiRtM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1720707747321719.2655600640696; Thu, 11 Jul 2024 07:22:27 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sRudh-00030j-Ag; Thu, 11 Jul 2024 10:19:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sRudf-0002ss-4z; Thu, 11 Jul 2024 10:19:15 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sRudd-0005Rd-Jb; Thu, 11 Jul 2024 10:19:14 -0400 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-70b6003c3d2so633769b3a.0; Thu, 11 Jul 2024 07:19:11 -0700 (PDT) Received: from wheely.local0.net ([203.220.44.216]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70b54ec730fsm3308904b3a.173.2024.07.11.07.19.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jul 2024 07:19:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720707550; x=1721312350; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0DgZsKqI5Qui8xJrG3nYJqRYaaUiPlIWM1v7RfXcJUQ=; b=HzUBqwLPr9vArabkZWIizULY7uwz/vFZFgQRhL1a/ULPwF8MMmLRqMsrCz/9Xx+q8l tXUl4UxjJPD15q/4lBqYJpEzSiJ4STezkpNaCC5Z9Z9dROv2b5LuoXUUUJEGU2+Mb6wZ ibxnewmpoHLmjoD3CxoiDvtLTcGdSXTqNUUZBWo6qmhOWZs6KMwqs24B6WZSi3Muq0nZ jPTLbMGs3SLr22/ASjY5cze0C2K9/RwvblgLdvN42zTYcCIhvLRy8D5SVKbKFL/sB/N7 gcBZE8qI3dYooUXrHrS+pagPXsy66ClEI7XQqn5yc6G9GxCJQ3+K4isSJqEnfqV+znW2 pEXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720707550; x=1721312350; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0DgZsKqI5Qui8xJrG3nYJqRYaaUiPlIWM1v7RfXcJUQ=; b=MSf5pjbyyPRMlRfwUyQh/zMFQFP/xhU3YVliDkwdWL6GA3f9dgrT5PXDq7b017A1MF g4JDR4TwIKNhGk2sFkvYOAVANtz6DA5ys5ESQisWG7u8O/jzoOWSQET57lz9FFCOC+MP 6YNNGfL1I93ucT0/tBJSWkGWtGKEZR4hl6wXCOm+yorGIu/zTJNpoRnUMeoU4GeyRcQ2 +5hh/DTVKWbm6GzRPxrMhNTa66yQzjveeC/kL5v8KRCvY2o+wDklwsJeA99MsJYbWGKK OqZPasmn0Pc51R078/haKsy1k/8CoPp2HSphWTzeK8bUqdWLZgPnINQn/BVT5HQSrSl/ Pc3g== X-Forwarded-Encrypted: i=1; AJvYcCWV0IyUMSh1DVCaBl8fC7FiYKeKobq8ud1qaL2TrhEo9/2wXOF2+HRPaox3eD21vWqrQDSXn1X8mfBP/BLBEE7uWBYeq2A= X-Gm-Message-State: AOJu0YzBmo1q4fuGT9zD+mwasyPsMBmxqyaDEX4r1gl7tL9Uu9Qm96oT ULV8ax+up3DlaVLibKm7iTshVm8/z5PtyY/6iVFejDjIfaNwX6R1y4Bo4L3j X-Google-Smtp-Source: AGHT+IEklDeaqTNY8/incWvI8MIqhlhhVgYrQDVIMhozgbGm3pC2G7+pFNCAW/iJDtJAJ3zCpdRmiQ== X-Received: by 2002:a05:6a00:1ca2:b0:70b:17df:cbc1 with SMTP id d2e1a72fcca58-70b4361b82amr9217369b3a.30.1720707549695; Thu, 11 Jul 2024 07:19:09 -0700 (PDT) From: Nicholas Piggin To: qemu-ppc@nongnu.org Cc: Nicholas Piggin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Barrat?= , Harsh Prateek Bora , qemu-devel@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PATCH 02/18] ppc/pnv: Add pointer from PnvCPUState to PnvCore Date: Fri, 12 Jul 2024 00:18:34 +1000 Message-ID: <20240711141851.406677-3-npiggin@gmail.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240711141851.406677-1-npiggin@gmail.com> References: <20240711141851.406677-1-npiggin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=npiggin@gmail.com; helo=mail-pf1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1720707749191116600 This helps move core state from CPU to core structures. Reviewed-by: C=C3=A9dric Le Goater Reviewed-by: Harsh Prateek Bora Signed-off-by: Nicholas Piggin --- include/hw/ppc/pnv_core.h | 1 + hw/ppc/pnv_core.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/include/hw/ppc/pnv_core.h b/include/hw/ppc/pnv_core.h index c6d62fd145..29cab9dfd9 100644 --- a/include/hw/ppc/pnv_core.h +++ b/include/hw/ppc/pnv_core.h @@ -54,6 +54,7 @@ struct PnvCoreClass { #define PNV_CORE_TYPE_NAME(cpu_model) cpu_model PNV_CORE_TYPE_SUFFIX =20 typedef struct PnvCPUState { + PnvCore *pnv_core; Object *intc; } PnvCPUState; =20 diff --git a/hw/ppc/pnv_core.c b/hw/ppc/pnv_core.c index f40ab721d6..2da271ffb6 100644 --- a/hw/ppc/pnv_core.c +++ b/hw/ppc/pnv_core.c @@ -278,6 +278,7 @@ static void pnv_core_realize(DeviceState *dev, Error **= errp) pc->threads =3D g_new(PowerPCCPU *, cc->nr_threads); for (i =3D 0; i < cc->nr_threads; i++) { PowerPCCPU *cpu; + PnvCPUState *pnv_cpu; =20 obj =3D object_new(typename); cpu =3D POWERPC_CPU(obj); @@ -288,6 +289,8 @@ static void pnv_core_realize(DeviceState *dev, Error **= errp) object_property_add_child(OBJECT(pc), name, obj); =20 cpu->machine_data =3D g_new0(PnvCPUState, 1); + pnv_cpu =3D pnv_cpu_state(cpu); + pnv_cpu->pnv_core =3D pc; =20 object_unref(obj); } --=20 2.45.1