From nobody Tue Feb 10 20:30:26 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=1635852857; cv=none; d=zohomail.com; s=zohoarc; b=j225SPTrUgzEwBNQerh4WGpq+gcDfU6N7sr92ldcGkP0AhmAIeWUimI7bO4jIxiftxlFPzQ65C22K/UoaH09EzGSK4wqNQ6S0MzBq0wxIKSZq/uqBey0jqOFKUj+rCmrM/HEGODJEVbfuWYuEWmcc4GJyIzsUyW6l+NP2QRAb5w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1635852857; h=Content-Type: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=BEoOYfyvrRlliP3CVpcV5+AEGq6qhapGY3bb4mVGTHg=; b=hmVmWA3kbcnH/b3PPZ+XXUPiIobkzzHB4ycaO8TV9cFqJOtLLFnUKeuJMAMR394ZVN566QJ5r9GxrKWJtD/9I3ej3GnOIGY8vjXZMZbzBcGCf4o/+J9LGCEfPuooYZI9B9MAc1GZciOJE9kjcJNaYcbWu+09qAoBMqvqqgKewEk= 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 1635852857176541.2137894186754; Tue, 2 Nov 2021 04:34:17 -0700 (PDT) Received: from localhost ([::1]:36874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mhs3U-0005EA-62 for importer@patchew.org; Tue, 02 Nov 2021 07:34:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhreB-0003nX-Pk for qemu-devel@nongnu.org; Tue, 02 Nov 2021 07:08:07 -0400 Received: from mail-qt1-x82f.google.com ([2607:f8b0:4864:20::82f]:33501) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mhre0-0000uh-FR for qemu-devel@nongnu.org; Tue, 02 Nov 2021 07:07:59 -0400 Received: by mail-qt1-x82f.google.com with SMTP id h16so14036787qtk.0 for ; Tue, 02 Nov 2021 04:07:52 -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.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Nov 2021 04:07:52 -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=BEoOYfyvrRlliP3CVpcV5+AEGq6qhapGY3bb4mVGTHg=; b=FFU5BWwwGn+SsA3IB4vNCzUdtUYaH0vC37mTtTDE7fKYg7Vj85GKmaC3li9IdC82Iu zZpTwehtziNiC3M204qllouO0Rfs7/7siHsSLO14Sh0p45VA/D3nIHx/q7btNxYCs6Yv V2eEHVsCtvqu/Doepmp7+/92IwwnicaIruWv/IHd7V1XSalkLvFqZjaD3Wre3snw6BfT jOCLmY6H2ZH0ZT8zpS8fFaqgRuz6y8ZM8Tryq2crHjJ4+3qr5URf17uAT/2zAoQGlNZn /G3XIKV5cjaG9s0lY6cNE/dHfri2P5i8HbLH0UcnPNwcNLKo6LLwyl/7Ajdnv5a8WxaE NOhg== 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=BEoOYfyvrRlliP3CVpcV5+AEGq6qhapGY3bb4mVGTHg=; b=s0T5oViLYV0DbRZUjha9FQNoOEi/BO83E2Z1ntcrVxKNIaNusrLmp0VrQUOUis2bUb 80jegQf04EqYBe0PBI3S1j/xqHeIvTqoOG23D0iBHwMBRy80oETSOoLid76CTbPrw9vm x1U54RZUc2qA5H5TNTaZmx7RX3ufma+xj90qG16VpNiBv2ARqEfsSkxZ/JCECcWNpNcP SQmBuoc30DPTXZfw5W93MqNMxVzInCpya/KneJ1Zxy/kllNbU1oPiSqpfIDzRoaaL4mv QWCFdok9smkeL1ANMQrO1D5zcRnTl3zLULzNoDo0Txy+wvuxTtFuo8SaNCMC4Mn+aU+s vopw== X-Gm-Message-State: AOAM530ATzwjk0iUGH7yHWD8Ep8MBwRvo1r/xwBvHafoMGxulXSlkE5H BCH3yK1w++8O7Rfllvj000M1IYWdtCaw7Q== X-Google-Smtp-Source: ABdhPJzqxYeWXxlrQlMvtg/Yia39lDCqTxGKfiZ9jgJhbrCBTaBiFYWwbCTMQ9uG7MaUnvS1hXwqXQ== X-Received: by 2002:a05:622a:346:: with SMTP id r6mr37424173qtw.0.1635851272330; Tue, 02 Nov 2021 04:07:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 18/60] linux-user/signal: Drop HOST_SIGNAL_PLACEHOLDER Date: Tue, 2 Nov 2021 07:06:58 -0400 Message-Id: <20211102110740.215699-19-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-Type: text/plain; charset="utf-8" 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::82f; envelope-from=richard.henderson@linaro.org; helo=mail-qt1-x82f.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: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1635852857623100003 Now that all of the linux-user hosts have been converted to host-signal.h, drop the compatibility code. Reviewed by: Warner Losh Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 12 ------------ linux-user/signal.c | 14 -------------- 2 files changed, 26 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 5f94d799aa..5dd663c153 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -685,18 +685,6 @@ MMUAccessType adjust_signal_pc(uintptr_t *pc, bool is_= write); bool handle_sigsegv_accerr_write(CPUState *cpu, sigset_t *old_set, uintptr_t host_pc, abi_ptr guest_addr); =20 -/** - * cpu_signal_handler - * @signum: host signal number - * @pinfo: host siginfo_t - * @puc: host ucontext_t - * - * To be called from the SIGBUS and SIGSEGV signal handler to inform the - * virtual cpu of exceptions. Returns true if the signal was handled by - * the virtual CPU. - */ -int cpu_signal_handler(int signum, void *pinfo, void *puc); - #else static inline void mmap_lock(void) {} static inline void mmap_unlock(void) {} diff --git a/linux-user/signal.c b/linux-user/signal.c index 6900acb122..b816678ba5 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -780,17 +780,6 @@ static void host_signal_handler(int host_sig, siginfo_= t *info, void *puc) ucontext_t *uc =3D puc; struct emulated_sigtable *k; int guest_sig; - -#ifdef HOST_SIGNAL_PLACEHOLDER - /* the CPU emulator uses some host signals to detect exceptions, - we forward to it some signals */ - if ((host_sig =3D=3D SIGSEGV || host_sig =3D=3D SIGBUS) - && info->si_code > 0) { - if (cpu_signal_handler(host_sig, info, puc)) { - return; - } - } -#else uintptr_t pc =3D 0; bool sync_sig =3D false; =20 @@ -850,7 +839,6 @@ static void host_signal_handler(int host_sig, siginfo_t= *info, void *puc) =20 sync_sig =3D true; } -#endif =20 /* get target signal number */ guest_sig =3D host_to_target_signal(host_sig); @@ -865,7 +853,6 @@ static void host_signal_handler(int host_sig, siginfo_t= *info, void *puc) k->pending =3D guest_sig; ts->signal_pending =3D 1; =20 -#ifndef HOST_SIGNAL_PLACEHOLDER /* * For synchronous signals, unwind the cpu state to the faulting * insn and then exit back to the main loop so that the signal @@ -875,7 +862,6 @@ static void host_signal_handler(int host_sig, siginfo_t= *info, void *puc) cpu->exception_index =3D EXCP_INTERRUPT; cpu_loop_exit_restore(cpu, pc); } -#endif =20 rewind_if_in_safe_syscall(puc); =20 --=20 2.25.1