From nobody Sun Dec 29 16:52:01 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1721147312; cv=none; d=zohomail.com; s=zohoarc; b=ZcDYAAUcuThfKQnbTpsbDjz7A1tpzBPduIg/s/a7NsrR+SiZYIfqwnx8nYqlHAUG4Y9m72TonbiQFMYK4AtA2Z1PW2THfieaO0Spo5KcELP+Tl0qrg48leyFmcfc+LTMtSF7eC6xCijKb0AylRAFd6lDzhmsnKyhQcLphw3gsWc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1721147312; 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=W1Kz9bL3i9Hnfsbf+ezBb23joHigs7XNLbrEP9EbpXXwfB832r19D4q1gKrv3sp2p9ntqNB/FBrMYOK/1cOagwXfhxsyIdgzR8E50jT8feRvQ4GXNi3KuAylESh/U78MafaGVCHRSxcWw6UP98OTLy40r82ubN/B2RsvJAobJrg= 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+importer2=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 1721147312457199.04671258420797; Tue, 16 Jul 2024 09:28:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sTl21-0008TV-Jg; Tue, 16 Jul 2024 12:28:05 -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 1sTl0j-0005ve-I3; Tue, 16 Jul 2024 12:26:43 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sTl0e-0006Gt-3p; Tue, 16 Jul 2024 12:26:40 -0400 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-70b0ebd1ef9so3770988b3a.2; Tue, 16 Jul 2024 09:26:35 -0700 (PDT) Received: from wheely.local0.net ([203.220.44.216]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70b7eca86d6sm6722161b3a.179.2024.07.16.09.26.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jul 2024 09:26:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721147193; x=1721751993; 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=nhxZQ7/rbr+njicxKKOhiof+WFNl2/V0NLwFRcyEb4LcB5I9tM9MEWsoIUr3lOD/bM czcGcOdaM9fXZDHmnf20AF5twMutVfXhYDA0UhgwDUG9yKJc6P1iGYlNo/dbNO+Zicl+ oAT4X/NsHfJdwg9iooepPDiyBZ2tZlKxeqxgD1CG34KOJaGE8+Y47yitiRcodRNLJbNo w/tVD+7+3VE0yFsYRAavsjFYIKh/s6vOR7klxJI3Wg0+kIQV6rP40qqcdEeLKpvhKzqc sPGh6rkioz0ELsU2/bsUa9ugVbsDktsm+F2KGqJb9VPdSFYqhfpLdBvIulyph9KTa1/C b8KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721147193; x=1721751993; 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=iwXMYFzcwz3HCeEvDklzO+w//6OHbM502NsjS9lXhqTljxr8nadqCRMo5iKm6uj+ZZ fhHaIHTwRvezybDJ3hryGnsc0YnW0NRsRwbuI+F2O3rIUM9BjqSyCnPKgCU/FMeO4psZ X9wVrlnyhmA+awpNk6FsgxeMgrFN9hDyHvbalPPwwaeGvSe/UhB2+qvUN6pd++JdMNUK kVEIQ41eKqYoBUSsdn6jWFAH7qoMtvtBUSgpHaEDt+KS1cPJZhs83BOCUBiSIWuGbEgp oz/XaMKqrYaaUkrffSumZRm7RwdYtA9rZ1owbhnuyNJuhoygrlDTxEYc53g3QCkjavzJ K12w== X-Forwarded-Encrypted: i=1; AJvYcCV9WBtVl++ckSGMbld59PJqms+7LTCoDkXtgbU4FRua721HiOzIvq5sYamQuDv2aLvk0kmZrHI60qsXuty7Jd3kHobZHhw= X-Gm-Message-State: AOJu0YwjXeZJRRVfgtECeYi7JVfFuw0K3O0/e+n5a2SfxQbISKEM4DK4 TNPVttvkrl8uBS6Rb9Z9/KgePsD8jDynTA7woaBxgIuaFom27M0gsIsFyw== X-Google-Smtp-Source: AGHT+IFQkw43f03d51sDbI8D2NSH4QU3UQGqOY90NaITd8eMjiRBa5H/qykOAJuLIfnRRjD/kAVm9A== X-Received: by 2002:a05:6a00:2384:b0:706:aab7:655 with SMTP id d2e1a72fcca58-70c2e9bb1ecmr3393091b3a.26.1721147193467; Tue, 16 Jul 2024 09:26:33 -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 v3 02/19] ppc/pnv: Add pointer from PnvCPUState to PnvCore Date: Wed, 17 Jul 2024 02:25:58 +1000 Message-ID: <20240716162617.32161-3-npiggin@gmail.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240716162617.32161-1-npiggin@gmail.com> References: <20240716162617.32161-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=npiggin@gmail.com; helo=mail-pf1-x42c.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, T_SPF_TEMPERROR=0.01 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1721147313238116300 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