From patchwork Mon Mar 15 18:45:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 400533 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3679589jai; Mon, 15 Mar 2021 11:59:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPoLn4s+M0mjtQ/OMxGT5/+hN6LGckT3hPqgxENwi2HpkN5tVl2X5cRjO1HKIkN4dP7sUX X-Received: by 2002:a5d:8707:: with SMTP id u7mr760002iom.18.1615834784288; Mon, 15 Mar 2021 11:59:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615834784; cv=none; d=google.com; s=arc-20160816; b=Y6TbgtlcZtaMm+5x/wSSLNcSXiwCCFglcNOdLSJ+7gKP5V2YeW3CvYsmIQ5f+J39ER Zl3iFUHj3dAvQTASZAyQp+4S/lJ/LCuNhZNQmFemxlRX0Hws//z0egRibboFXPMI6tm2 jTIaCp7gmoW6R9QWug/MMruLHXn1hk+9xgyptddbIjZDHtq/d4oQIgwRstr5FFxT0Fiu HyL1lD53LUJVojmoglQAb+qm7a9em90kroJX6aeEHd88q15FWEvt3mI3e+ecj9WJ5k9z nJv8fGvRxLMQHKfkHSbI3HU/P+SqNB77e+IT1ZFvba2LyWCeyNgyPWIrfwyYo7NMesII hVUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=FMwWPzmXLiFfE6r8NewSj71aXFVvcRa1lk5paQ/WV4M=; b=QWukoZsoaG1ds3/NbYl8c5Vwg/BYbX7Q7mD9tq7sPbar+HnChQ68dsS5DBI5cAUlOy CRLbBYqj0IEM7wLUBFTGOUtJdXd96gN6pdFN72vWI3V/sUlS+tQoig5n8WdTCT4nw7TF /mvEkyhsBt9OVYOl6+DQxmgwohOolRbl9y4vsL0ZpkPJbm1FHT+7a2mk4H/ivM2UDE2M zbFF+EpqysQEq6zl1hhlzcSUJVnc45JzJ9NwIGX048HhgkFmoVOfc1kKNL+CLOinRa9t ITMPRh28u+tuWYk3d/Pc3tVZF6jt5tCHR8jQLzBw7udUBEakC7ItjIFODn+0x59oqSR0 0Vkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Id0Ju0n7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k16si12482442ili.91.2021.03.15.11.59.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Mar 2021 11:59:44 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Id0Ju0n7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:43600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLsRL-0007pD-N6 for patch@linaro.org; Mon, 15 Mar 2021 14:59:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLsEQ-0006xH-56 for qemu-devel@nongnu.org; Mon, 15 Mar 2021 14:46:22 -0400 Received: from mail-ot1-x32c.google.com ([2607:f8b0:4864:20::32c]:36023) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lLsEN-0001X0-3u for qemu-devel@nongnu.org; Mon, 15 Mar 2021 14:46:21 -0400 Received: by mail-ot1-x32c.google.com with SMTP id t16so7488902ott.3 for ; Mon, 15 Mar 2021 11:46:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=FMwWPzmXLiFfE6r8NewSj71aXFVvcRa1lk5paQ/WV4M=; b=Id0Ju0n7igYRGWSBRbN1D03EujrPMbW6SHZR7htjrw1EC4go2ZOoWFrOH3cvB1DXBn Tk6xoQQOvfgpdixkWTN5ehHHHgk55AR+DkQ5pODt1oQq97b6DoAnHftdqAxr+Db4Sdkl gM2BBc25BBU0TXrKMWkuZmjuwL/s7doLXzop7B+YWsXZAELfYFhZkRBecZa8UTDhYyRT wZV/hoxwChcakggvQeX4ApaURKrJ2o9zgjquncA7GzGDX3DI3dIlklU+nXNLlCI30JjR hA8Y/nOa9uZWjJDeoQhscCZtNxGR5WOQKhx6NNs+aRqRp99XChsSwem8PaVv5eVdkb7d 8Ukw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=FMwWPzmXLiFfE6r8NewSj71aXFVvcRa1lk5paQ/WV4M=; b=QC9+ra6MX6t8WlsPPx3MJehcPndbE9GX1JGQSH2eDiZzqIPiquapACD8U5KYWLS3kX wLmcnNpWdOyAGS9v51u+yJlguwm8JqPBk+lYVI53odkCSCsLxDRPBz4MxhsQXE8ZhzId GoraERlYgurA4dBRJWyMYP242KkkY4/ws/KN1BawudrCIgE0xrpkT7CeGW1zZ8DoEUwd Hozru1QtkTi374wnIhymzZDHqYm1gBAxWvLYoi7e8uNOoTraddRkES3XVu9OuowYgG9P gzte8LJa1Vq+xrivRyTgumP2lS2E5A/PItc3D6Kttn06s/yD7tTX0eEw+dzLJVqYbFAF JC/A== X-Gm-Message-State: AOAM532pZBPP0Jc7J3W/gAJqoYEwAjpdskNivPZf5KMwSWMs7XMGl7DH 0z6APaeQ+UKe4h2WsZc6Qn4XjKF10FfFiyzZ X-Received: by 2002:a05:6830:1e4d:: with SMTP id e13mr438574otj.146.1615833977707; Mon, 15 Mar 2021 11:46:17 -0700 (PDT) Received: from localhost.localdomain (fixed-187-189-51-144.totalplay.net. [187.189.51.144]) by smtp.gmail.com with ESMTPSA id o25sm7519851otk.11.2021.03.15.11.46.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Mar 2021 11:46:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 00/17] target/ppc: Fix truncation of env->hflags Date: Mon, 15 Mar 2021 12:45:58 -0600 Message-Id: <20210315184615.1985590-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::32c; envelope-from=richard.henderson@linaro.org; helo=mail-ot1-x32c.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Changes for v4: * Use hregs_recompute_hflags for hw/ppc/ reset. -- Incorporate Cedric's feedback. Changes for v3: * Fixes for linux-user, signal handling and startup. -- Oops, the directory in which I did testing for v2 had a reduced set of targets. Changes for v2: * Do not put tcg internal state into migration, except to retain backward compatibility. * Do not touch anything in env in ppc_tr_init_disas_context. * Do make sure that hflags contains everything that it should. * Do verify that hflags is properly updated. r~ Richard Henderson (17): target/ppc: Move helper_regs.h functions out-of-line target/ppc: Move 601 hflags adjustment to hreg_compute_hflags target/ppc: Properly sync cpu state with new msr in cpu_load_old target/ppc: Do not call hreg_compute_mem_idx after ppc_store_msr target/ppc: Retain hflags_nmsr only for migration target/ppc: Fix comment for MSR_FE{0,1} target/ppc: Disconnect hflags from MSR target/ppc: Reduce env->hflags to uint32_t target/ppc: Put dbcr0 single-step bits into hflags target/ppc: Create helper_scv target/ppc: Put LPCR[GTSE] in hflags target/ppc: Remove MSR_SA and MSR_AP from hflags target/ppc: Remove env->immu_idx and env->dmmu_idx hw/ppc/pnv_core: Update hflags after setting msr hw/ppc/spapr_rtas: Update hflags after setting msr linux-user/ppc: Fix msr updates for signal handling target/ppc: Validate hflags with CONFIG_DEBUG_TCG target/ppc/cpu.h | 50 +++++- target/ppc/helper.h | 1 + target/ppc/helper_regs.h | 183 +-------------------- hw/ppc/pnv_core.c | 3 +- hw/ppc/spapr_rtas.c | 2 + linux-user/ppc/cpu_loop.c | 5 +- linux-user/ppc/signal.c | 23 ++- target/ppc/excp_helper.c | 9 ++ target/ppc/helper_regs.c | 272 ++++++++++++++++++++++++++++++++ target/ppc/int_helper.c | 1 + target/ppc/machine.c | 27 ++-- target/ppc/mem_helper.c | 2 +- target/ppc/misc_helper.c | 13 +- target/ppc/mmu-hash64.c | 3 + target/ppc/translate.c | 98 ++++-------- target/ppc/translate_init.c.inc | 4 +- target/ppc/meson.build | 1 + 17 files changed, 410 insertions(+), 287 deletions(-) create mode 100644 target/ppc/helper_regs.c -- 2.25.1