From patchwork Tue Sep 14 00:14:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 510265 Delivered-To: patch@linaro.org Received: by 2002:a17:906:f46:0:0:0:0 with SMTP id h6csp4451706ejj; Mon, 13 Sep 2021 17:17:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMqSxEMHdM0f2uAjc70HpJ5u8W6kP4bwOpe1BbNi9MZSPDEBMT4N70cpSWDXX6SB8hdU+A X-Received: by 2002:a05:6102:40f:: with SMTP id d15mr7461115vsq.57.1631578623926; Mon, 13 Sep 2021 17:17:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631578623; cv=none; d=google.com; s=arc-20160816; b=PqWF711fpHGpSiHk1xWWYK6/UWtwabRnqYP+ASN5P5gn6GkaFrrGMhmTjwC79ZxVTy KOAEJuME/owX2t7EpolPP0XBKPPbb+CeXKubgSqy7mFIv6Da1OfY0EFfo4KwUcEPSYEm N0DBciPyeZxkU5zc48bvIR+auGF7QVTMYfDylWuDwI6uAnCuMpKaT94k0R4qdNyBDm2K S0QHQsN0cq65QOBhfZAzd1gSxWftGs49E2kbV2zIr4tHN5X5s78ESxO4fOkOLPHtJqtx Wgi2M3aGIvv8VTjJc4Sm/yXDZrm4SGC1rF+vCAwc/ZOZJ+nDTn8sjt10wCVX6lFOngYN llgw== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=7+Cu38KkW/P4DawV4m76NJ3ExR7AdjcVZeZmlLwca4o=; b=GrMJQPB2x71D7x1pblKO7Sfh8aqtvgdnsykhr3Md7vBW3KoegMkfnS9thOt9K4KFRI C8zVQMVvP9KFDG/nX0KXwzAoOoJs9NZPgbRPFxnPklDHBfMbwJ1DDULDslBNg9tBcoRm 07AI4VQD8NoHSHG2RqjWtyMZlo9C/qeX6vLbhAkGMcCShx9FWF1c4JLqpirRExr2/Az6 PovTKUWtrcs0hsDVfVd9w5AdWd9/ZnbvRVg4HEC3kY2hUgYE6UdntE7+leTOBiYo/CE5 ysNAkskKBDApUo7qlGgoALn14LgNXTQnXUhOhgAbIBHmqu9m8UArkgxV4CHJ6VhGYHSX YtAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TkvD64bB; 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 192si2321836vky.7.2021.09.13.17.17.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 Sep 2021 17:17:03 -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=TkvD64bB; 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]:47318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPw8F-0001uo-8r for patch@linaro.org; Mon, 13 Sep 2021 20:17:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPw6S-0001kB-P3 for qemu-devel@nongnu.org; Mon, 13 Sep 2021 20:15:12 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]:41914) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mPw6Q-0007ge-2g for qemu-devel@nongnu.org; Mon, 13 Sep 2021 20:15:12 -0400 Received: by mail-pf1-x436.google.com with SMTP id x7so10429264pfa.8 for ; Mon, 13 Sep 2021 17:15:09 -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=7+Cu38KkW/P4DawV4m76NJ3ExR7AdjcVZeZmlLwca4o=; b=TkvD64bBG29Q8yZvSvi27/n6MGi4HH7hUOjVn2851GxGS759NnUqF64Vjz1lw9xj6V QKfv1of7jVVCNdENcyWEGm+rIiZsErZUwlNV1C6PVoxWP/uE1wlz0rgg9u3H6IeftXmC s8UsFlGkPiJhhVrJ8XZ0Fy2QUIu1SX7CZA+5Q930FNz1IvEjRrmecqjvQqgj01Z1q7GH VxcWDx3/t/yZDhK45qJ81rn1/S6AP/IV5x6OKc9Ym6XEGhEcPL5ydZWVRAFBdOQw9FOI WiOwR7z3FDPvxiDMsi4sNw+l4g603DdWmxXBgGKwHAZh7MVTZMqJhssNptJROzvX5YRV s3xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7+Cu38KkW/P4DawV4m76NJ3ExR7AdjcVZeZmlLwca4o=; b=1HGhB6hSXB0jSJ+PbGwqXFfCRKuOPu/tQWGEr2+vZbi/dH2XyH8l9yI9lvOvosGOhc sdETUvjPf/jYjpxndjsil+Y186JBg5c29g2dkmZhofISBKhMZkpU6AR6d3d9h1XAG+Bl Z23KQsV6WxD5A1m5BBLMUG+RUEd0CENYeAcxbR9W2naPIdTAxVUtnCCuzXGvFdladyLP xcDpOsMo4G1sH/E3tGPnyV/oqjFxzn/EDgeh3Chp7ulNr7xM0WM8yWn/B4kNN1hgopNm v71o2Pvp9ql0ZNKWYz/wfaOgpep9lyEVvaW2YO7FIFCeSYatSDWFtzHNck+eCVERglJF 6ILg== X-Gm-Message-State: AOAM530Q2ZUukFB8wKJhYXtIQfyAtDYX3XHLNyGp/ejOrbBl2nm+Z8g4 Pt3ro3ZNPZW8oUPZ2s+uTUWxwFfNlEBf7g== X-Received: by 2002:a65:62d1:: with SMTP id m17mr13156393pgv.370.1631578508608; Mon, 13 Sep 2021 17:15:08 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id m7sm9334179pgn.32.2021.09.13.17.15.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Sep 2021 17:15:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 14/44] target/alpha: Restrict cpu_exec_interrupt() handler to sysemu Date: Mon, 13 Sep 2021 17:14:26 -0700 Message-Id: <20210914001456.793490-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210914001456.793490-1-richard.henderson@linaro.org> References: <20210914001456.793490-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x436.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: peter.maydell@linaro.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Warner Losh Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Restrict cpu_exec_interrupt() and its callees to sysemu. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Message-Id: <20210911165434.531552-7-f4bug@amsat.org> Signed-off-by: Richard Henderson --- target/alpha/cpu.h | 2 +- target/alpha/cpu.c | 2 +- target/alpha/helper.c | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) -- 2.25.1 diff --git a/target/alpha/cpu.h b/target/alpha/cpu.h index 82df108967..4e993bd15b 100644 --- a/target/alpha/cpu.h +++ b/target/alpha/cpu.h @@ -274,10 +274,10 @@ struct AlphaCPU { #ifndef CONFIG_USER_ONLY extern const VMStateDescription vmstate_alpha_cpu; -#endif void alpha_cpu_do_interrupt(CPUState *cpu); bool alpha_cpu_exec_interrupt(CPUState *cpu, int int_req); +#endif /* !CONFIG_USER_ONLY */ void alpha_cpu_dump_state(CPUState *cs, FILE *f, int flags); hwaddr alpha_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); int alpha_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 4871ad0c0a..93e16a2ffb 100644 --- a/target/alpha/cpu.c +++ b/target/alpha/cpu.c @@ -218,10 +218,10 @@ static const struct SysemuCPUOps alpha_sysemu_ops = { static const struct TCGCPUOps alpha_tcg_ops = { .initialize = alpha_translate_init, - .cpu_exec_interrupt = alpha_cpu_exec_interrupt, .tlb_fill = alpha_cpu_tlb_fill, #ifndef CONFIG_USER_ONLY + .cpu_exec_interrupt = alpha_cpu_exec_interrupt, .do_interrupt = alpha_cpu_do_interrupt, .do_transaction_failed = alpha_cpu_do_transaction_failed, .do_unaligned_access = alpha_cpu_do_unaligned_access, diff --git a/target/alpha/helper.c b/target/alpha/helper.c index 4f56fe4d23..81550d9e2f 100644 --- a/target/alpha/helper.c +++ b/target/alpha/helper.c @@ -293,7 +293,6 @@ bool alpha_cpu_tlb_fill(CPUState *cs, vaddr addr, int size, prot, mmu_idx, TARGET_PAGE_SIZE); return true; } -#endif /* USER_ONLY */ void alpha_cpu_do_interrupt(CPUState *cs) { @@ -348,7 +347,6 @@ void alpha_cpu_do_interrupt(CPUState *cs) cs->exception_index = -1; -#if !defined(CONFIG_USER_ONLY) switch (i) { case EXCP_RESET: i = 0x0000; @@ -404,7 +402,6 @@ void alpha_cpu_do_interrupt(CPUState *cs) /* Switch to PALmode. */ env->flags |= ENV_FLAG_PAL_MODE; -#endif /* !USER_ONLY */ } bool alpha_cpu_exec_interrupt(CPUState *cs, int interrupt_request) @@ -451,6 +448,8 @@ bool alpha_cpu_exec_interrupt(CPUState *cs, int interrupt_request) return false; } +#endif /* !CONFIG_USER_ONLY */ + void alpha_cpu_dump_state(CPUState *cs, FILE *f, int flags) { static const char linux_reg_names[31][4] = {