From patchwork Mon Jan 29 23:01:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 767441 Delivered-To: patch@linaro.org Received: by 2002:adf:ee41:0:b0:33a:e5bd:fedd with SMTP id w1csp1118345wro; Mon, 29 Jan 2024 15:07:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IE9tArA6l3gnPiHwoORdJBE6Z37Yy9Y3b1Td0Tf2S5LL5l7u39n0vzcEsUGmtPFCcHRJoTG X-Received: by 2002:a05:620a:673:b0:783:f759:a9f7 with SMTP id a19-20020a05620a067300b00783f759a9f7mr3258143qkh.19.1706569656743; Mon, 29 Jan 2024 15:07:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706569656; cv=none; d=google.com; s=arc-20160816; b=WOZx/Y0rs1jstp4CXRWBnudOmt3THoEVBSgdQzso9u0/TfqozYhz/NQ31kpwY4gcb/ IdlwvkRh1ScIx6bSV/qvF6Tlh+AaNkdzB1vyaEQpq1rFe2gE6V/JiLeA/ThKxSI3ellv NH/b4hIkha7DmxDev8QPh/dA041Eai6o8jrcvU4cHKppSoqq6T7RHKrpH/1bWOKXwCcP /Yk8JAF3jCwcL51ZosWCU+HcJuY+8Tg3259jFcPeYmULMy3ZonqkasC0MPEFcNYNa7u/ R71VyWtavbqjoTHPjiFw13N7wtcTtNSMlZw3mOz/wDSZRqfeplTnrN35b22bb1cBIb7x fbIw== 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=2hwCZNX7r6WcP/DB6F59Yv2bYfXzcZik2wXoCrV2EBg=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=kuaB+EoKYedZ0OMZn6iSsr+sRg6RF3uy2Oa9JIBUDlOFRvOeyFhNrAGIwCvDAxEuPA oInvlxccwV4kcx+pDYvpnVhigE2sH/yVJtYb4f8m43zOOjXJVkHwx6I7cP329r9bexV1 whRd052It/zuAlSXnQJuX1AbKH85dY/NMJooZ+1gz6SOvheYeIUItkWm557lfBtgaZNn 0LdJk8t5DZU5ozPNhXejFf/87xroyMa3waBOo00qvLKtjpC41XLaQIC3djGj8iAnJOoA z9NzfTps2euByRyfT4qdr99FIzUif1K7lJ7u0Byhxi04Yx8LNMN0gg2AZgtK2JUrliyk 0Lig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CdT4eWum; 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 v18-20020a05620a0a9200b00783f3cdae82si5066852qkg.73.2024.01.29.15.07.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jan 2024 15:07:36 -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=CdT4eWum; 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 1rUafU-0007e1-MJ; Mon, 29 Jan 2024 18:04:00 -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 1rUaeJ-00071n-OS for qemu-devel@nongnu.org; Mon, 29 Jan 2024 18:03:00 -0500 Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rUaeI-00006g-4N for qemu-devel@nongnu.org; Mon, 29 Jan 2024 18:02:43 -0500 Received: by mail-oi1-x22a.google.com with SMTP id 5614622812f47-3be62ccda4bso738160b6e.1 for ; Mon, 29 Jan 2024 15:02:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706569361; x=1707174161; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=2hwCZNX7r6WcP/DB6F59Yv2bYfXzcZik2wXoCrV2EBg=; b=CdT4eWumuD93e7Xp9Np0/b9qZ0wYgOLGpKeLbNRcMI4XOWDpLbfdi9bb9nhlrGzgjL +UdtBPmakmeEpaN9JN9oeNbFV0spiCSCa2PmFjRzAt41a09p9w3z2xbEiHZMdTprqCgt awgg7GBGSDGDmNS8vafpu00wbo0FAlytcoaRt6fdZVILutS47wfQhJioWEOIHwfGN2iA fMxHGAT0NoB2bRRz820wbgIUhjUYOlEQHkyKCS0rsr7F2VBev5fap0GboL7IWv9LZes/ +/upB8V5KqA69IqEP+OCSQL6GH12QvXeKhlHwSemUFyGCQ495QcpNI11kh1v/vrES1/N 79mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706569361; x=1707174161; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2hwCZNX7r6WcP/DB6F59Yv2bYfXzcZik2wXoCrV2EBg=; b=OIV9b4Q4Ubq9z0cPHWSIcYfgWNAlj7W2CWUXoqtEO9jToIn8ys3jt2exG35b3BT5/U 8tHaLi6sM9DqXEtlqcCxZ6FRX8gGGnDkOzu+ekYRDaRlOUNshBFsr/bj3zZ63z6uTeju CKWE///a5ob5Q3LZj10SV+CbdYcdXkflfGp0HL0t/3ibFUt5z6nUh5xWlqctFJAnP9CJ x8dD8tvXSGPxEnuFoj+zzthuFtken1Maxf7Xbcb/4Iuc84SFgS7FDEuJfHMfvNUzIE6E fLs9x6lOdgUADc11usi+mNfIPdDtWkYjuoTeO8RBBa/U4iNVKPUYnFtY2R9LiCA/X9IM 4tow== X-Gm-Message-State: AOJu0Yy8FPn29RXHH5KCuJDAD+g8RXSBM1d6B3UKfzNV9nbBAt73SSo4 mlPTeAcBPm/pxCjBXGCsvKUlYSKRHEZtsA7Cv6jDBJ/855f2sS/yaI+Po4pKAzOwCz307xi029V aXnM= X-Received: by 2002:a05:6808:1b08:b0:3be:7667:4eef with SMTP id bx8-20020a0568081b0800b003be76674eefmr1963750oib.27.1706569360793; Mon, 29 Jan 2024 15:02:40 -0800 (PST) Received: from stoup.. ([103.210.27.218]) by smtp.gmail.com with ESMTPSA id r10-20020aa78b8a000000b006ddcf56fb78sm6419368pfd.62.2024.01.29.15.02.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 15:02:40 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 29/31] accel/tcg: Inline need_replay_interrupt Date: Tue, 30 Jan 2024 09:01:19 +1000 Message-Id: <20240129230121.8091-30-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240129230121.8091-1-richard.henderson@linaro.org> References: <20240129230121.8091-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::22a; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x22a.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 The function is now trivial, and with inlining we can re-use the calling function's tcg_ops variable. Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 2eacd694ea..75f7ba7bed 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -765,20 +765,6 @@ static inline bool cpu_handle_exception(CPUState *cpu, int *ret) return false; } -#ifndef CONFIG_USER_ONLY -/* - * CPU_INTERRUPT_POLL is a virtual event which gets converted into a - * "real" interrupt event later. It does not need to be recorded for - * replay purposes. - */ -static inline bool need_replay_interrupt(CPUState *cpu, int interrupt_request) -{ - const TCGCPUOps *tcg_ops = cpu->cc->tcg_ops; - return !tcg_ops->need_replay_interrupt - || tcg_ops->need_replay_interrupt(interrupt_request); -} -#endif /* !CONFIG_USER_ONLY */ - static inline bool icount_exit_request(CPUState *cpu) { if (!icount_enabled()) { @@ -862,7 +848,8 @@ static inline bool cpu_handle_interrupt(CPUState *cpu, if (tcg_ops->cpu_exec_interrupt && tcg_ops->cpu_exec_interrupt(cpu, interrupt_request)) { - if (need_replay_interrupt(cpu, interrupt_request)) { + if (!tcg_ops->need_replay_interrupt || + tcg_ops->need_replay_interrupt(interrupt_request)) { replay_interrupt(); } /*