From patchwork Thu Jul 29 00:46:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 488618 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:1185:0:0:0:0 with SMTP id f5csp1700517jas; Wed, 28 Jul 2021 17:48:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzn7fM9QK1xo1fRRb31QxtRG94t4eLjePtNld67QJll7ifEjzjsDRgs5DjLZ/NpNUEzMB5j X-Received: by 2002:a05:6638:218:: with SMTP id e24mr2153975jaq.38.1627519736968; Wed, 28 Jul 2021 17:48:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627519736; cv=none; d=google.com; s=arc-20160816; b=P6roZYYwgJaWlMBE6kz97NP8LV9pbFUpd+V2wp9RFs3gkhx7752GbMtYyE6S/rcFqe 5pj9POATE5VR5p72ExWNhTpjOC3Bqw6qlDEVu5j09oTFiS5llH/IQyHFt7q7TnRlxqy2 CFoASnX7pWN3k2fvbVMnKHv4EboSfEK69wx7JDbzvEVqdE8bTi/ox3kAtVt56AxMd7hm ztHYIp3ng0d56B1hCOkBiFiiSEpJzMBsm/5biI8aYWJsyGgdCZJ21QwXb+IMBCnPcQV6 BP3I/nVXK0amcJl8cy0+YcGQgmsvPB0c5v35ax+dSPokkO4MveD4YT+yOU7qbUmTSNLh vG9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=0AkpqeTt4XZrVCGSl1psMF5yX6hJb+/zHSmbVTbcVTo=; b=qVnvEKSNBFV87hnOL6v3+CLRWGc5ueB7sIwZ5FN9zNSSiNKgUwI2iMiOSr6JXQ+nbh f33ukoCaw0nUUGd8h9gxhrrFZj7yM7QOJRzswagGAx6Srsu/QckHwQFERSNVjyh5q1wI BsKbipF8XLsCcfI5zs5VpIobrPgB43VqnJNlBFZNDxgWG38rZ/M//51EXrs6cIoW7n8i 75kK71FlIfJZRHK4RF0WsiuN9zWhK9BY7gGXa73tQcfGVXOHbJ2CQBCtoDU+0OFU0oKI KkAsNmpRzrz/7KoJN96d2MYOUvresotTSUtL2FXtOA1z5WaA0iBPC59KCz8a7aVGzUuh Edrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K4CSMo21; 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 w12si1536305iox.55.2021.07.28.17.48.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Jul 2021 17:48:56 -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=K4CSMo21; 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]:59384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m8uEK-0003ur-Cv for patch@linaro.org; Wed, 28 Jul 2021 20:48:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m8uCO-0003sN-0n for qemu-devel@nongnu.org; Wed, 28 Jul 2021 20:46:56 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]:44986) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m8uCL-0002MU-Ve for qemu-devel@nongnu.org; Wed, 28 Jul 2021 20:46:55 -0400 Received: by mail-pl1-x629.google.com with SMTP id q2so4834199plr.11 for ; Wed, 28 Jul 2021 17:46:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=0AkpqeTt4XZrVCGSl1psMF5yX6hJb+/zHSmbVTbcVTo=; b=K4CSMo21OWtfWqHpL99O3Es/n/UzyLTv3Jv+iYUohhRQNu+ctZhCA/sLlCxs+azzT1 dHExeCPQEHqY1/BHvxVXB0SvNezbUrhWfeYjAv37plhjl8wFkRHpeA++ygSZuMVDRE3m Ri8te0/ke8g+Hgs2caR1KKsKQ4qOHU3viTnr72f4cH7AJ2/CbegyItndSB/qnTYXyEfW yaBNVyiaqw5QJtK6Gdfwn3IGOCgQNOa1qOqrYqjX0TDFlT/gThEpkoyREe6VqP2FcVeU TFWuzuEQt/nmRfin3QB4Ouu7Z78/cIe37KuBWemfd9SlJEQLPHdKHkw4X0QgePv8GYsN 7Rcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0AkpqeTt4XZrVCGSl1psMF5yX6hJb+/zHSmbVTbcVTo=; b=ivQgofYvoMZE8rfL6189Zo9TK0tnzdJDQTob+p2sMxZV369uXvtoL/g3kRLfWCjxa4 rhYvK/wKmXwxcG/fj3WxiOLCcZp3ab8+yaYjT8NKLyInt71bsmZm2CKgZHG7d/LUw0iC Nhx+OVrfFagtFE7kyW75IzuYcsd32U0myxoIypuOUBEctifqBuTYv88FzWf5eTfaWcfg kUYLkRmVnmKmZWXMHfPxdL7CM5bOPDF+JzrUM4xbHf/M2mfOBGTadbyHBAvY2IcGIyJ5 wB8fZRhgT285bPYPTcMksWg6r2ZPGRprUFbndugVuEOABv9RJq7BkSLLHGHd0Gw4ZYw0 g6FQ== X-Gm-Message-State: AOAM531Rn7cnZW2rr0pePYHf25AC4KUhCxSUQ84HkiFDULbWHQ67UDIP OfcrWB5a8f7Hzcblw1NssrTGzeqM0mXUbw== X-Received: by 2002:a17:90a:404a:: with SMTP id k10mr2462710pjg.145.1627519612734; Wed, 28 Jul 2021 17:46:52 -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.46.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 17:46:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.2 02/43] target/alpha: Implement do_unaligned_access for user-only Date: Wed, 28 Jul 2021 14:46:06 -1000 Message-Id: <20210729004647.282017-3-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 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/alpha/cpu.c | 2 +- target/alpha/mem_helper.c | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 4871ad0c0a..cb7e5261bd 100644 --- a/target/alpha/cpu.c +++ b/target/alpha/cpu.c @@ -220,11 +220,11 @@ static const struct TCGCPUOps alpha_tcg_ops = { .initialize = alpha_translate_init, .cpu_exec_interrupt = alpha_cpu_exec_interrupt, .tlb_fill = alpha_cpu_tlb_fill, + .do_unaligned_access = alpha_cpu_do_unaligned_access, #ifndef CONFIG_USER_ONLY .do_interrupt = alpha_cpu_do_interrupt, .do_transaction_failed = alpha_cpu_do_transaction_failed, - .do_unaligned_access = alpha_cpu_do_unaligned_access, #endif /* !CONFIG_USER_ONLY */ }; diff --git a/target/alpha/mem_helper.c b/target/alpha/mem_helper.c index 75e72bc337..e3cf98b270 100644 --- a/target/alpha/mem_helper.c +++ b/target/alpha/mem_helper.c @@ -23,30 +23,28 @@ #include "exec/exec-all.h" #include "exec/cpu_ldst.h" -/* Softmmu support */ -#ifndef CONFIG_USER_ONLY void alpha_cpu_do_unaligned_access(CPUState *cs, vaddr addr, MMUAccessType access_type, int mmu_idx, uintptr_t retaddr) { AlphaCPU *cpu = ALPHA_CPU(cs); CPUAlphaState *env = &cpu->env; - uint64_t pc; uint32_t insn; cpu_restore_state(cs, retaddr, true); - pc = env->pc; - insn = cpu_ldl_code(env, pc); + insn = cpu_ldl_code(env, env->pc); env->trap_arg0 = addr; env->trap_arg1 = insn >> 26; /* opcode */ env->trap_arg2 = (insn >> 21) & 31; /* dest regno */ + cs->exception_index = EXCP_UNALIGN; env->error_code = 0; cpu_loop_exit(cs); } +#ifndef CONFIG_USER_ONLY void alpha_cpu_do_transaction_failed(CPUState *cs, hwaddr physaddr, vaddr addr, unsigned size, MMUAccessType access_type,