From nobody Sat Jul 12 15:09:27 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1486013875870973.3577021520007; Wed, 1 Feb 2017 21:37:55 -0800 (PST) Received: from localhost ([::1]:54317 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZA5i-0003ya-4I for importer@patchew.org; Thu, 02 Feb 2017 00:37:54 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZ9jh-0007Aj-6p for qemu-devel@nongnu.org; Thu, 02 Feb 2017 00:15:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZ9je-0003Wu-4S for qemu-devel@nongnu.org; Thu, 02 Feb 2017 00:15:09 -0500 Received: from ozlabs.org ([103.22.144.67]:55729) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cZ9jd-0003UB-Ku; Thu, 02 Feb 2017 00:15:05 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 3vDSqM5N6kz9s7W; Thu, 2 Feb 2017 16:14:55 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1486012495; bh=eRP5ASp5RSgnbwlgrKtGPPq2SNy8gz7EMH1TaZBOFmE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CazYBnBEjbHJZ7B3IZgHzk+8cCx0LW8crc97hk+Tz5pKZ8T3fRmcGbSxdXrztGpGr gSpU6r1GzD4iE1yoX78/itfmMfQyQwv67KkUUId9Aly1yD3jARe6h0iqOS1iKMrb7P XsKdWKCQS1omqRmS+USq6uCFGjkCZCSA0x7wBAEo= From: David Gibson To: peter.maydell@linaro.org Date: Thu, 2 Feb 2017 16:13:14 +1100 Message-Id: <20170202051445.5735-17-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170202051445.5735-1-david@gibson.dropbear.id.au> References: <20170202051445.5735-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [PULL 016/107] pseries: Make cpu_update during CAS unconditional 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: lvivier@redhat.com, thuth@redhat.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, agraf@suse.de, aik@ozlabs.ru, qemu-ppc@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" spapr_h_cas_compose_response() includes a cpu_update parameter which controls whether it includes updated information on the CPUs in the device tree fragment returned from the ibm,client-architecture-support (CAS) call. Providing the updated information is essential when CAS has negotiated compatibility options which require different cpu information to be presented to the guest. However, it should be safe to provide in other cases (it will just override the existing data in the device tree with identical data). This simplifies the code by removing the parameter and always providing the cpu update information. Signed-off-by: David Gibson Reviewed-by: Alexey Kardashevskiy --- hw/ppc/spapr.c | 5 +---- hw/ppc/spapr_hcall.c | 8 ++------ include/hw/ppc/spapr.h | 1 - 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index cef696c..ca78e31 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -685,7 +685,6 @@ out: =20 int spapr_h_cas_compose_response(sPAPRMachineState *spapr, target_ulong addr, target_ulong size, - bool cpu_update, sPAPROptionVector *ov5_updates) { void *fdt, *fdt_skel; @@ -704,9 +703,7 @@ int spapr_h_cas_compose_response(sPAPRMachineState *spa= pr, g_free(fdt_skel); =20 /* Fixup cpu nodes */ - if (cpu_update) { - _FDT((spapr_fixup_cpu_dt(fdt, spapr))); - } + _FDT((spapr_fixup_cpu_dt(fdt, spapr))); =20 if (spapr_dt_cas_updates(spapr, fdt, ov5_updates)) { return -1; diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index b2a8e48..1333110 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_hcall.c @@ -945,7 +945,7 @@ static target_ulong h_client_architecture_support(Power= PCCPU *cpu_, target_ulong ov_table; PowerPCCPUClass *pcc =3D POWERPC_CPU_GET_CLASS(cpu_); CPUState *cs; - bool cpu_match =3D false, cpu_update =3D true; + bool cpu_match =3D false; unsigned old_cpu_version =3D cpu_->cpu_version; unsigned compat_lvl =3D 0, cpu_version =3D 0; unsigned max_lvl =3D get_compat_level(cpu_->max_compat); @@ -999,10 +999,6 @@ static target_ulong h_client_architecture_support(Powe= rPCCPU *cpu_, } } =20 - if (!cpu_version) { - cpu_update =3D false; - } - /* For the future use: here @ov_table points to the first option vecto= r */ ov_table =3D list; =20 @@ -1028,7 +1024,7 @@ static target_ulong h_client_architecture_support(Pow= erPCCPU *cpu_, =20 if (!spapr->cas_reboot) { spapr->cas_reboot =3D - (spapr_h_cas_compose_response(spapr, args[1], args[2], cpu_upd= ate, + (spapr_h_cas_compose_response(spapr, args[1], args[2], ov5_updates) !=3D 0); } spapr_ovec_cleanup(ov5_updates); diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index f8d444d..04d2821 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -589,7 +589,6 @@ void spapr_events_init(sPAPRMachineState *sm); void spapr_dt_events(sPAPRMachineState *sm, void *fdt); int spapr_h_cas_compose_response(sPAPRMachineState *sm, target_ulong addr, target_ulong size, - bool cpu_update, sPAPROptionVector *ov5_updates); sPAPRTCETable *spapr_tce_new_table(DeviceState *owner, uint32_t liobn); void spapr_tce_table_enable(sPAPRTCETable *tcet, --=20 2.9.3