From patchwork Fri Oct 1 17:11:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 515068 Delivered-To: patch@linaro.org Received: by 2002:a02:606e:0:0:0:0:0 with SMTP id d46csp1008238jaf; Fri, 1 Oct 2021 10:27:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw91OVU+vmEqI8+qS7xFpLGvOq2Zh1i24I2qwlJKo69yMWJOuPKNUKnwRCGMnbynZSymbTq X-Received: by 2002:a9f:234a:: with SMTP id 68mr11531421uae.13.1633109236477; Fri, 01 Oct 2021 10:27:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633109236; cv=none; d=google.com; s=arc-20160816; b=j+6SjwBcyxddMGL8b7LzIf0CZhqdiDPw7Zv3hPGfIyQvHGLvCdcnJ47nDdvzOsSL0H K01IpRUQN9MiMILDaalhZmt19DeYvrfrDUfCJ3LUf5RIIMssL7kOHGFxCbSeQFjS03/v Bq694jRY2cJXLEKA2bCYZyDamS/SsMXeLGe0Yzmc6Okgf5OYnxZuQ78FzOCI3kp/W4nu rLsn25BWxjBBRPNHCjajX7jhfAbB/GFeAI2M0gH3mJc7eHMGqla4wCtZZcgtS8wEYEFh 0ZcPMFwo9gkiheyELdMf/9Q6qPBn0qLMsWXy3iIN+lUKzh4k0aLh55fE4/+nitBMg+KG 0bqw== 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=plpjMgZs0Fmj1no4dWQvatctpg292W263ogwu9LIdH8=; b=bgABpHl180EbPVuC3cFSUtI6Wxl7WeoZLWTcWtZ69sYhc6kblc/kKMflGsYl66+bf2 DST1Ti6BiaJAONnzDIBkO9WEpt0e+VqpXyXdLS+HKzBwTd/vA3trkFFVcWzzbJgIWtsF 5QqO+e8hgT2zlf3Mgu909aXjyKiJBhziP2bWr3G9z23re6PjynUf3/3f8zqe8BkpBFfg X2wjJL1YnJ+XM5VdiMxQmXEB77Lpexk6LKGJ5tP7bDveyRzNrJUX/6MVhrB9kiioDxK7 PtJwordwfvSMPi08hifPW9f31PjD1VnBwRlnAAPiRyXp/uz4wVavD24Ok2gecEWpEYF2 h4cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=otGns6K9; 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=fail (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 t1si1312077vsm.178.2021.10.01.10.27.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Oct 2021 10:27:16 -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=fail header.i=@linaro.org header.s=google header.b=otGns6K9; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWMJX-0002wM-Pn for patch@linaro.org; Fri, 01 Oct 2021 13:27:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54808) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWM50-0004py-HF for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:12:14 -0400 Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]:42628) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWM4v-00056t-T5 for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:12:14 -0400 Received: by mail-qk1-x72e.google.com with SMTP id x12so9810800qkf.9 for ; Fri, 01 Oct 2021 10:12:09 -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=plpjMgZs0Fmj1no4dWQvatctpg292W263ogwu9LIdH8=; b=otGns6K9LbdwNOmejpmuDxPUaHT3dlCKnwXo+BvZwjQp6r9i/YX32rNDzD1o7qWfkH yDH0qmoEZ/b+DnMzVjWRgsbFgcA02KDlIfSgVqbVAnFAXxx3wckiR456+kX1aM6Tx/Av dpM+25P9ciO3tcMtOHnQ8+wLl719rGCM6p/Rwi+8Yf43nJqT7BUUdoPJsVjLrBLILBsY wrVtZB9BXvTgo3SkBRkpcMp8rtBDUITFU9DEdLm9R2oKurS+XROF0VgvGqWSOqohRY02 kAvBkzDEukaNe/9AVPjP4YafY/IyV2BlKXQ7aZTwveXGenZjIjuVNqcPF2iZ8Izm/IFa RLtA== 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=plpjMgZs0Fmj1no4dWQvatctpg292W263ogwu9LIdH8=; b=6z2Rb3ASIvcJuzzNdvv/fMDH2IWbcL/b/Ddhhz0ZrUk6Nc/jIUrswi5MneBBFCSY/0 pT9XguxVsfVPDoSCwQQqtUJXBcFRBVT4CLlB77hlGDo7HsFiVXJ1bED7ciE+O1KEayIg ryG3naLpm2hhcUjBQzkk9Fa5qr0VX97rvtEiZ/PKqvwL8aX38wLYKW89NUihZcbOiZy+ /916Hd0TIyXdtgcH2Uj+GQwbjRPRaiRN/JQHyxwV+QR0asG1GmqlTnQf+658HwizpOzi HH7cJJGICFIWWNtD2qTP1Db2WGeKg7tcqSnuzyJVzpvc0aQ1NnA8o7vDfcE90pe2pmLH jHVA== X-Gm-Message-State: AOAM532Q+P4Tgj3xmGth3as415Tu/LQ+CphaRfLowFHxUQf4xDpHYDv5 WJXlkjpeJ6uPvcozXkI9OMd+nMua3d6vQw== X-Received: by 2002:a37:27d5:: with SMTP id n204mr10251474qkn.31.1633108328922; Fri, 01 Oct 2021 10:12:08 -0700 (PDT) Received: from localhost.localdomain (c-67-174-166-185.hsd1.ga.comcast.net. [67.174.166.185]) by smtp.gmail.com with ESMTPSA id y15sm3557250qko.78.2021.10.01.10.12.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 10:12:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 18/41] linux-user/signal: Drop HOST_SIGNAL_PLACEHOLDER Date: Fri, 1 Oct 2021 13:11:28 -0400 Message-Id: <20211001171151.1739472-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211001171151.1739472-1-richard.henderson@linaro.org> References: <20211001171151.1739472-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::72e; envelope-from=richard.henderson@linaro.org; helo=mail-qk1-x72e.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: alex.bennee@linaro.org, laurent@vivier.eu, =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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é Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 12 ------------ linux-user/signal.c | 14 -------------- 2 files changed, 26 deletions(-) -- 2.25.1 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); -/** - * 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 bab47a6962..537c6c41c0 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -777,17 +777,6 @@ static void host_signal_handler(int host_sig, siginfo_t *info, void *puc) ucontext_t *uc = 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 == SIGSEGV || host_sig == SIGBUS) - && info->si_code > 0) { - if (cpu_signal_handler(host_sig, info, puc)) { - return; - } - } -#else uintptr_t pc = 0; bool sync_sig = false; @@ -847,7 +836,6 @@ static void host_signal_handler(int host_sig, siginfo_t *info, void *puc) sync_sig = true; } -#endif /* get target signal number */ guest_sig = host_to_target_signal(host_sig); @@ -862,7 +850,6 @@ static void host_signal_handler(int host_sig, siginfo_t *info, void *puc) k->pending = guest_sig; ts->signal_pending = 1; -#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 @@ -872,7 +859,6 @@ static void host_signal_handler(int host_sig, siginfo_t *info, void *puc) cpu->exception_index = EXCP_INTERRUPT; cpu_loop_exit_restore(cpu, pc); } -#endif rewind_if_in_safe_syscall(puc);