From nobody Tue Feb 10 10:04:01 2026 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1627520419; cv=none; d=zohomail.com; s=zohoarc; b=WMKFd828/4polkn7mAHx6Cfdt5pjYThBQW7bsH0hvYZAaCv1C+rDHDsVucEcPtbgXdzEGhq2AMSRYUtz6wSDdCa2ZuzCusgk/JZrh1AeBou/T5Ftqk7I1U6IOgLJJSENfepCyZ/AbTPpwRwCJa1MhNKhq3GQE6Tf+WpN2sDcMes= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1627520419; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=2hRhZVNp9BeoKX1Zle9XByXKmFM2EsSbQBT6FZfwUEg=; b=jW6wJASLlHufV6bzdMQWKTECUOA64aigOVBvhqGRgDe9jGw68TY0lb6SzqGR0TPcVdeoHihmaeUiZeRdXE5KvqJu041s/FtiC4VAWKjaLgNRXH9r9HsctBkohMiDUDzPPUHnYDncjsYW1HjVuB2R3224AnxC8dK2N6dGkvrd/fM= 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 1627520419916761.0282106428897; Wed, 28 Jul 2021 18:00:19 -0700 (PDT) Received: from localhost ([::1]:33616 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m8uPK-0008Ie-Nq for importer@patchew.org; Wed, 28 Jul 2021 21:00:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m8uCY-0004FJ-Dr for qemu-devel@nongnu.org; Wed, 28 Jul 2021 20:47:06 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]:46705) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m8uCW-0002VV-Me for qemu-devel@nongnu.org; Wed, 28 Jul 2021 20:47:06 -0400 Received: by mail-pl1-x629.google.com with SMTP id t21so4820182plr.13 for ; Wed, 28 Jul 2021 17:47:04 -0700 (PDT) Received: from cloudburst.home (2603-800c-3202-ffa7-dcaa-9e71-a2b2-2604.res6.spectrum.com. [2603:800c:3202:ffa7:dcaa:9e71:a2b2:2604]) by smtp.gmail.com with ESMTPSA id t205sm1305005pfc.32.2021.07.28.17.47.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 17:47:03 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=2hRhZVNp9BeoKX1Zle9XByXKmFM2EsSbQBT6FZfwUEg=; b=zrv9SKVRMugrecd61FvR/FmGyBNDFEGZ7KEvmKP4RyKuibL3pMiEUw2pHmrefG1lnl puJh25RkHpcvco5aCF8vHNLmYiIDLO2NuLTOCfSjWcFIEH5QXlod0fhWX8ENe8VU+HDS rp2ZZ7C4zgcM/UCdGNgyxB0+pttQ7CYcfI2++jtLqNocI1cEo1yWZ+X90VXLTjItdGuO lbT6rSkAFSHjl+53vCfIOlMpciOiwlfk9JiNNuXBK/nkI1C+stjAyo889vJhpA85nPtT +Q5wHPPmsxYsyI2ZmBmwQftyqiVs8nj23EDcazWE3Mv1mzpuOV9FjtYKle2tLwRzfN7I cK4Q== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=2hRhZVNp9BeoKX1Zle9XByXKmFM2EsSbQBT6FZfwUEg=; b=rIEsO9Y7xafQh8ieMsGxX0Wi2MhsKnPP5uy4P1lQsnsFxZwki0Zje5JBO5znSeBdIh 2D2+d6EFGpcE7xOHyn3QsKnPicquF5tSXP3mf7UynN2prsoh6VVc/cU3DNiMMKzbsqvG Jx9c6h58q80Lb+eFT/wrXFS4xzwVBM0bVskMW/hH/fqlPEbFBtR28+m3IJuckTKpURK2 FhAMrm0JwG2bUSyrOA+hbMWgbKz9Lt25tLM8eR62aqJ0TJKvXHuOyFlLl/0NisNtr6e+ 68ksAasaPdO6GnhPOquqsJ6euYvcnZEULaNceeuh7XB5vwJQKwYL6NWXeD9W5X8HB5K+ 5A8Q== X-Gm-Message-State: AOAM530V9RfFF4pLVJtCbe25e832CxisqzZyO0HUUgLAAzWzZtgNmeQO aOFdYLMLY8T4sIHQIdwiCivs8b38nsUWcw== X-Google-Smtp-Source: ABdhPJzi//zZKbSsxpBLcgZUihVCdNW7Z7JKXLdbAsiTmVa685k1ok0iiRP8goZ+0i8TSjYsBX/RMg== X-Received: by 2002:a17:90b:17c3:: with SMTP id me3mr3832232pjb.203.1627519623477; Wed, 28 Jul 2021 17:47:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 11/43] target/sh4: Set fault address in superh_cpu_do_unaligned_access Date: Wed, 28 Jul 2021 14:46:15 -1000 Message-Id: <20210729004647.282017-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210729004647.282017-1-richard.henderson@linaro.org> References: <20210729004647.282017-1-richard.henderson@linaro.org> MIME-Version: 1.0 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::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.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=ham 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: Yoshinori Sato Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1627520421637100001 Content-Type: text/plain; charset="utf-8" We ought to have been recording the virtual address for reporting to the guest trap handler. Cc: Yoshinori Sato Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/sh4/op_helper.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target/sh4/op_helper.c b/target/sh4/op_helper.c index c0cbb95382..d6d70c339f 100644 --- a/target/sh4/op_helper.c +++ b/target/sh4/op_helper.c @@ -29,6 +29,9 @@ void superh_cpu_do_unaligned_access(CPUState *cs, vaddr a= ddr, MMUAccessType access_type, int mmu_idx, uintptr_t retaddr) { + CPUSH4State *env =3D cs->env_ptr; + + env->tea =3D addr; switch (access_type) { case MMU_INST_FETCH: case MMU_DATA_LOAD: @@ -37,6 +40,8 @@ void superh_cpu_do_unaligned_access(CPUState *cs, vaddr a= ddr, case MMU_DATA_STORE: cs->exception_index =3D 0x100; break; + default: + g_assert_not_reached(); } cpu_loop_exit_restore(cs, retaddr); } --=20 2.25.1