From patchwork Sun Jan 28 04:41:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 767231 Delivered-To: patch@linaro.org Received: by 2002:adf:ee41:0:b0:33a:e5bd:fedd with SMTP id w1csp348261wro; Sat, 27 Jan 2024 20:46:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IETkd11mj8md9zNKF6wTjnv2ewx6JGeCEzeTgOxeW6IR8MHYFoDFaINftk57T3gGUhyGw4F X-Received: by 2002:ac8:7d15:0:b0:42a:687c:6029 with SMTP id g21-20020ac87d15000000b0042a687c6029mr2834579qtb.71.1706417190933; Sat, 27 Jan 2024 20:46:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706417190; cv=none; d=google.com; s=arc-20160816; b=tOnAvptCRJ/sXO3+YTcU0cAwiFyNMcuqB9iUFDbvvWY0h6U6HMdES4kifbFGR9sKtL /lArcFS8kwoDq6neplflloYXuqi95BRW9xpcNarOADKXe4biZIoeVNty9IzzElBfcaxa 1Zepy44WNo9rDGqvXOuAJuh3mCpzZRve57kQbsEXaFR3EE5i3qisCDmOxCS2SwSFx/wR 6k/nzSJHAQSpN92QbUPqSbCqYj0pJdLgTBwaRmQ/2PAGempDHE8t84s0p1pgqbhyTv5d 57FEaZuuHR2+irjxg/IuAFqUY89kQN6VPd0T2gppDADtokd6ua79gvTMdkn5xmBUWjRG 34Ig== 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:cc:to :from:dkim-signature; bh=0IsJCYKuWrursPA6kPyaSh6Iig/if/7dsXp1H2oDJMs=; fh=l3rThTWYtfg9kQ3pwkdseR7wGfUMT6wsJF5cqMswxYY=; b=0UryTSkMLO9IRAETOSpz8B37A8rm2aU1hpB0JDdO8CjDC/WSdfqV29N/YzBgaP3epO kz/oxRPV3CcSXam1lEpWJSppKeZtFKCMLYcBRtkLKs3uga6/ri5AcpDLQQca5HT9hoZB ypDGfti9gLDG+QHns4WSRZgauG/ZiZn4V9bE5y2/9IyNYpOPhS5mn83SHBb+/qOjuAPo RBKFRr+SmeOfFQ6hCi/gFQkrQ9gBdCLkBlihQ+xT244c/n8XHnPRj7JiXaxAadxp+Znl xOkJRdpyf/oWxxCCjq3rWrpMHQAf2lE50vbEJGJcgDlParpwsZTcFCicekckfZpkQ1U2 2I6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BaOPrRv9; 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 t32-20020a05622a182000b0042a39eca0b5si980815qtc.264.2024.01.27.20.46.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 27 Jan 2024 20:46:30 -0800 (PST) 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=BaOPrRv9; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rTx0M-0004kS-4m; Sat, 27 Jan 2024 23:42:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTx0K-0004kI-Pg for qemu-devel@nongnu.org; Sat, 27 Jan 2024 23:42:48 -0500 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rTx0J-0004JL-9j for qemu-devel@nongnu.org; Sat, 27 Jan 2024 23:42:48 -0500 Received: by mail-pj1-x1034.google.com with SMTP id 98e67ed59e1d1-290483f8c7bso1322954a91.3 for ; Sat, 27 Jan 2024 20:42:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706416966; x=1707021766; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0IsJCYKuWrursPA6kPyaSh6Iig/if/7dsXp1H2oDJMs=; b=BaOPrRv980yaVACOJTE4DnWzuGl/0lVF+rWL52lIIC7JNOGVEee0Ckvz8Kl7p5tjxh Itd9ZlY6pC3z0bdp63LBFXwa7jIpHQYBjuAoFpiDBq5W28cB099b4Zo/H8AiJdyuzV/x Ilq0T/BDp2Eq7w0DvxhfhZe2WFrgNBlXgXG8fos3ZEQJwSjuusqQUG4GqIa5ajjBVKfs u2oyhz7iJ8wZw4wSyRBC2hZCvzWzYNNZIsc4VENuaqkqhdDBIZSxtW9hjYHxIPRigt2D /MjpzO5m2bgEBzhtgwgfPlcUJ8TQlg2LJq+8j3bgaSrm9aOfAvJnP/etTPx9keNBcnyK 46wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706416966; x=1707021766; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0IsJCYKuWrursPA6kPyaSh6Iig/if/7dsXp1H2oDJMs=; b=qX17bqvGgCKkkKlIbA0TkwsMHItEifTGm64THynG/Lul+ELT+1AL6Ymcj76CcLczhA kwwDfw9GrJjMOO7oEF0nIeOec6lo0myeLyNlXSqzZemZVJryibDX++OQ95XfbBiDoJEQ 0fo5vf31hNxXXAtkJ4InllqLb7vJ7QGxGbb48glPr1IRP3vf61yMJm7Auky54U+0dauc lWjs+3qJOLKVhpg+MTillGcOqqyG21N3tWDhYDAU7nCSYAQWRPN+PbsdN5qTkna4l/WP zx8Z5QhOM5vc6PyRJePOlcPvEVk7jLXnZJd0PV2ar9bj2cmHJvP2j+fr/PRloQcuWyd2 0kAQ== X-Gm-Message-State: AOJu0YzH2gntopdIEUkwUKMohly5kzSC4Alf77DF8v8i+ub29+iQUFuG 1Z3bSC9XMtC+QSXxeNo5JQgDpk/4jifQ9aasJY5cCN6uKA4pHWmMJFPVN1IN5V+n3hUpJO11TuW 6KIEsrg== X-Received: by 2002:a17:90a:5d07:b0:293:e0bf:39ae with SMTP id s7-20020a17090a5d0700b00293e0bf39aemr1659675pji.59.1706416965937; Sat, 27 Jan 2024 20:42:45 -0800 (PST) Received: from stoup.. (ppp121-45-131-89.bri-pow-que-bras31.tpg.internode.on.net. [121.45.131.89]) by smtp.gmail.com with ESMTPSA id w24-20020a17090aaf9800b002906e09e1d1sm5631873pjq.18.2024.01.27.20.42.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jan 2024 20:42:45 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Anton Johansson Subject: [PATCH 11/33] include/hw/core: Move do_interrupt in TCGCPUOps Date: Sun, 28 Jan 2024 14:41:51 +1000 Message-Id: <20240128044213.316480-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240128044213.316480-1-richard.henderson@linaro.org> References: <20240128044213.316480-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1034.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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-bounces+patch=linaro.org@nongnu.org From: Anton Johansson The ifdef out of which it is moved is not quite right: do_interrupt is only needed for system mode. Move it to the top of a different ifdef block, which preserves its position within the structure for that case. Signed-off-by: Anton Johansson Message-Id: <20240119144024.14289-18-anjo@rev.ng> [rth: Split from a larger patch and simplified.] Signed-off-by: Richard Henderson --- include/hw/core/tcg-cpu-ops.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/include/hw/core/tcg-cpu-ops.h b/include/hw/core/tcg-cpu-ops.h index 479713a36e..d6fe55d471 100644 --- a/include/hw/core/tcg-cpu-ops.h +++ b/include/hw/core/tcg-cpu-ops.h @@ -58,11 +58,6 @@ struct TCGCPUOps { * cpu execution loop (hack for x86 user mode). */ void (*fake_user_interrupt)(CPUState *cpu); -#else - /** - * @do_interrupt: Callback for interrupt handling. - */ - void (*do_interrupt)(CPUState *cpu); #endif /* !CONFIG_USER_ONLY || !TARGET_I386 */ #ifdef CONFIG_USER_ONLY /** @@ -114,6 +109,8 @@ struct TCGCPUOps { void (*record_sigbus)(CPUState *cpu, vaddr addr, MMUAccessType access_type, uintptr_t ra); #else + /** @do_interrupt: Callback for interrupt handling. */ + void (*do_interrupt)(CPUState *cpu); /** @cpu_exec_interrupt: Callback for processing interrupts in cpu_exec */ bool (*cpu_exec_interrupt)(CPUState *cpu, int interrupt_request); /**