From nobody Tue Feb 10 12:13:58 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1635851850; cv=none; d=zohomail.com; s=zohoarc; b=Q5s7qATyyJVqSa6o0N3LLDtkU2jAUKsavbpWRFf7f2AgdHsirhon4Pu7UAPrWTURermERYomyPrKGLhL8aT1uFSl5YNS5C6jPsA4ppGebmjyC3cv6rBzuKJXPmSg5OqAMHruazcOyj/TTHcG98cCxMOyg8d82yllA9SSCvzKhbU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1635851850; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jNnLCcJOHvXqFRNx4ivHlyFLW3vo/pqpN29drgRbLjE=; b=CKqoxElXA1IJQ4VX2UvKuF8d4aBRatmnoqPoayuJtGWRrnJjqEUGC405Uia/RQvqa7BGt9oP67YPq/9t9PXc07SqOZoDbXwhPTO5+l25nL7U5QAYX9w+6Pt5+IzQnzmXhyGFr9TK1KSv9W4AJhDeXM59QX2mKhQZ1oJ0izs6aNE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1635851850961815.0925322703476; Tue, 2 Nov 2021 04:17:30 -0700 (PDT) Received: from localhost ([::1]:41712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mhrnF-0003jP-Um for importer@patchew.org; Tue, 02 Nov 2021 07:17:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43046) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhrdq-0003cO-Ce for qemu-devel@nongnu.org; Tue, 02 Nov 2021 07:07:46 -0400 Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836]:35366) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mhrdo-0000rF-GC for qemu-devel@nongnu.org; Tue, 02 Nov 2021 07:07:46 -0400 Received: by mail-qt1-x836.google.com with SMTP id n2so18482472qta.2 for ; Tue, 02 Nov 2021 04:07:44 -0700 (PDT) Received: from localhost.localdomain (rrcs-172-254-253-57.nyc.biz.rr.com. [172.254.253.57]) by smtp.gmail.com with ESMTPSA id bm7sm3568612qkb.86.2021.11.02.04.07.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Nov 2021 04:07:43 -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=jNnLCcJOHvXqFRNx4ivHlyFLW3vo/pqpN29drgRbLjE=; b=yvYzfsniw4jwUycH+nacUZQFPP59LTxmD+vlvlqksRp4fc5zGcJycMIfSBrRBRGYBf DvpQ1o084lcDDJr+yjy+vf4LNcJyyzuRyLbsTjXjUG/k8DuLT8h5W56hFqKu9SrhMKWc KrCc7gHbJ5X5VwNJdzH5d2LFfPcu5k3uemdlUDKc7RXoopPjAWZZssefL5yBtYuTL76E 1DYwanUxxNziJbbQzhQSY+znyJ9RNjxaSEWIzoJhDpqYp+QiN30/WewjOlwsqIIpQjF8 f+umoF34ktXgcA8exYLIoUiWs99RImEALqoiakg3qjPjcnnvS9kofU5vU+oJ0qcww5sI /Flw== 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=jNnLCcJOHvXqFRNx4ivHlyFLW3vo/pqpN29drgRbLjE=; b=IcxAH2mgDBTvFqYuYP8BS3tcvOZP0H83rvUUQPvI1HKVPx8UkJW8UJ4V110WRQLkhx Xb9Wu3MiuoTiA94wJ/DOAP6w1QyCPIM4o2V+Ss7DphjQxNwx6CbQw9qUrdFCa6xBbPzj BO7Vc8QqoxG4VrQ9rNOgtJxo7uRrUNnhfGj/Z4+Fozy0KzUMcvIXE66TWSEuGUurno8q A8/TGbWrIELqwauuuhx4FedyICvleWnFCeuzNFj048e72XOp5P43bkr1IHHaGDXqQU1Q GZWn3vxILND3U/7qJJajGXNqrrKTEr+aUHAw8Tjc/ziwsvH+OldSyXnB9g5PlJAK0KWU NxSQ== X-Gm-Message-State: AOAM5316/1hHyFwdW6h4nDIoEKGDalpJK4h/5n5Gb1ht8RV+ZUGx9ZFv YTw1u9DymVoYLTNyLBeDOypRgHrVI7D3LA== X-Google-Smtp-Source: ABdhPJyK3xFxmK+VluKwFDHKQDI4LM/EwHEh3vO+tDjrF9gKh/GtHtoCeL5RiAtya9O8C9t3rpHHgw== X-Received: by 2002:a05:622a:3:: with SMTP id x3mr5103195qtw.133.1635851263624; Tue, 02 Nov 2021 04:07:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 04/60] accel/tcg: Fold cpu_exit_tb_from_sighandler into caller Date: Tue, 2 Nov 2021 07:06:44 -0400 Message-Id: <20211102110740.215699-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211102110740.215699-1-richard.henderson@linaro.org> References: <20211102110740.215699-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::836; envelope-from=richard.henderson@linaro.org; helo=mail-qt1-x836.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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Warner Losh Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1635851851394100001 Content-Type: text/plain; charset="utf-8" Remove the comment about siglongjmp. We do use sigsetjmp in the main cpu loop, but we do not save the signal mask as most exits from the cpu loop do not require them. Reviewed-by: Warner Losh Signed-off-by: Richard Henderson --- accel/tcg/user-exec.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index b83f8d12f4..b1183aa4b3 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -46,17 +46,6 @@ __thread uintptr_t helper_retaddr; =20 //#define DEBUG_SIGNAL =20 -/* exit the current TB from a signal handler. The host registers are - restored in a state compatible with the CPU emulator - */ -static void QEMU_NORETURN cpu_exit_tb_from_sighandler(CPUState *cpu, - sigset_t *old_set) -{ - /* XXX: use siglongjmp ? */ - sigprocmask(SIG_SETMASK, old_set, NULL); - cpu_loop_exit_noexc(cpu); -} - /* * Adjust the pc to pass to cpu_restore_state; return the memop type. */ @@ -153,7 +142,8 @@ bool handle_sigsegv_accerr_write(CPUState *cpu, sigset_= t *old_set, * Fault caused by protection of cached translation, and the * currently executing TB was modified and must be exited immediat= ely. */ - cpu_exit_tb_from_sighandler(cpu, old_set); + sigprocmask(SIG_SETMASK, old_set, NULL); + cpu_loop_exit_noexc(cpu); /* NORETURN */ default: g_assert_not_reached(); --=20 2.25.1