From patchwork Tue Sep 14 00:14:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 510555 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp1066859jao; Mon, 13 Sep 2021 17:59:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyD2J0XCfa8QXjBxAEr1tx2mwNwz0B2/t6YnD+/dcfMskGxxnGvonIo6zIQ0eoeJH3OgiFI X-Received: by 2002:ac8:4253:: with SMTP id r19mr2254372qtm.317.1631581154229; Mon, 13 Sep 2021 17:59:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631581154; cv=none; d=google.com; s=arc-20160816; b=UtoFTob2BSC1SZXnOtv8TVd+wFfA+aeSPb62rXkOadcdAQsP3dEKXmHx8JDNy9QB6u MSJKeQ+y3laN8/Wbzxq+KHHeDsnvj892iN7Hlz6IxMQBSwlruQzP0ZchmbFWYBsTW8dn QZGdD5WuxVREAzZfG2s69qdTJAxzutvbme2MX/7IUUrdn2KpOWoUhfaBxh6P5G5q856w FwWbNNmoifPdkpV3/KazS75ePS5A8q9xZYZSevWqpcfhgpVpwFqLYTEUN+q7KfdMB58J 28duTaAkjqeEisVMYewBpeivm687bN3kivd81MSZAdQOga3oMaUirPZbKufhCGNK2H8V tHiw== 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=x3+wfe7Ux0D29NdwhN6ov8jkhZkotQHpDYIJoiL5pyQ=; b=J3D/CFcppPYjBlTYJ2BS+RQ+xQmr2r7RIANk0I37OEAF89JsEb0WPuNRSdA+xX95DJ K/Y04sJv7rzKcnF9cMICqNsNK9aoR8hNliU+m16xmMhgTesfx197IVSGq8D1AzcPdjOK OXB0sM51itNzBDgzOu8mmMDJ8G8a8X5KRn6xH21aH+oc9H5r3nJHkfi9iNkaOcuNX9bm Dad4BusTi8wmRwgn2pwxGhxYp9u8yubkD7u8E+Xn4J/vdjiT3nFelg8YRKkJKNY2amro KNuLZeLm2WrmLRy3czT8vvlvNkf+5dK1Y613kr5Al7y5pVFwjOd8ZSA8xKI/GX+vZfH4 NxVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pTF6QdRM; 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 128si4761849qkd.264.2021.09.13.17.59.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 Sep 2021 17:59:14 -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=pTF6QdRM; 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]:51666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPwn3-0003cJ-NQ for patch@linaro.org; Mon, 13 Sep 2021 20:59:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPw6e-0001nL-6F for qemu-devel@nongnu.org; Mon, 13 Sep 2021 20:15:25 -0400 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]:46867) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mPw6W-0007lN-VF for qemu-devel@nongnu.org; Mon, 13 Sep 2021 20:15:21 -0400 Received: by mail-pg1-x535.google.com with SMTP id w7so10986041pgk.13 for ; Mon, 13 Sep 2021 17:15:16 -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=x3+wfe7Ux0D29NdwhN6ov8jkhZkotQHpDYIJoiL5pyQ=; b=pTF6QdRMlBW8NJiB0A8O1fDgFusClxIAaf5eo+skdcdG7+Sh8jpk82y+89jxuSnh02 EIHWm91IjJB5mBQl/beGmk+jk0k7J2tB6TRclzw4IvecRr1bclbvliwR114uiNPAWKll ZhgpJvTgRFfIHTQDNYcMh1QDGx+0quKIyh6n/lMQdQ6nmsH7pwJJn+a5QpEz8ls5TE7w BbOfeQjqRliAUPCCa6NfO0uCbdX/CQ1NFzve77ttVR2QWhp3Bys+Rpm5rd9urZqkvbvt zSVm6bBTl0ertGAcZsNoxRj9O60mYb7uZV4VhzxrzWGtLJjFtxNR16B7wMC1MOlvUZcu vO0Q== 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=x3+wfe7Ux0D29NdwhN6ov8jkhZkotQHpDYIJoiL5pyQ=; b=CP+WiPJgxcQ7dhsXcXvHTPVRMs1DCm3nEDZRdy5kNzVtT/xuozrA5rltaCNbJlqpJ7 kVSHiAYWBOvtoFyHFtkE6Li8tG86IVou8+yYEke9wLDZKLKE2PZE4gWFTz5MTfw4mGnh DIyHfj/h4nkkMqvwdM74G2IeuzCMGPB8k7Crda/UlXefQ78sJAPKQDQ/yrcxKlZT1yat ah9V2wI3yHrvanJIbXC+NGRtcOiwMkt1mLr1sSbvW/Devi9x0NfzL5zqImOrOQX3eRP+ JiT2YZzwYvg5o8E++Q8xXAkKg0rPfCBWlDMZi3mhUaFuaTTI0ereizxoGfRiwI3bUSRK /eYg== X-Gm-Message-State: AOAM530m3SCFd8LseTTCqcmNnadqK09Axk3Yd+Ys2ZKmbxEsA84EatjR FWYahfYpxDnfiFdQ/q75xAUqPxE2ziU/Ew== X-Received: by 2002:a63:ef01:: with SMTP id u1mr13261556pgh.336.1631578515054; Mon, 13 Sep 2021 17:15:15 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id m7sm9334179pgn.32.2021.09.13.17.15.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Sep 2021 17:15:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 23/44] target/nios2: Restrict cpu_exec_interrupt() handler to sysemu Date: Mon, 13 Sep 2021 17:14:35 -0700 Message-Id: <20210914001456.793490-24-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::535; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x535.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-16-f4bug@amsat.org> Signed-off-by: Richard Henderson --- target/nios2/cpu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.25.1 diff --git a/target/nios2/cpu.c b/target/nios2/cpu.c index 5e37defef8..947bb09bc1 100644 --- a/target/nios2/cpu.c +++ b/target/nios2/cpu.c @@ -127,6 +127,7 @@ static void nios2_cpu_realizefn(DeviceState *dev, Error **errp) ncc->parent_realize(dev, errp); } +#ifndef CONFIG_USER_ONLY static bool nios2_cpu_exec_interrupt(CPUState *cs, int interrupt_request) { Nios2CPU *cpu = NIOS2_CPU(cs); @@ -140,7 +141,7 @@ static bool nios2_cpu_exec_interrupt(CPUState *cs, int interrupt_request) } return false; } - +#endif /* !CONFIG_USER_ONLY */ static void nios2_cpu_disas_set_info(CPUState *cpu, disassemble_info *info) { @@ -219,10 +220,10 @@ static const struct SysemuCPUOps nios2_sysemu_ops = { static const struct TCGCPUOps nios2_tcg_ops = { .initialize = nios2_tcg_init, - .cpu_exec_interrupt = nios2_cpu_exec_interrupt, .tlb_fill = nios2_cpu_tlb_fill, #ifndef CONFIG_USER_ONLY + .cpu_exec_interrupt = nios2_cpu_exec_interrupt, .do_interrupt = nios2_cpu_do_interrupt, .do_unaligned_access = nios2_cpu_do_unaligned_access, #endif /* !CONFIG_USER_ONLY */