From patchwork Tue Jan 24 02:04:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 646015 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp2512336pvb; Mon, 23 Jan 2023 18:07:00 -0800 (PST) X-Google-Smtp-Source: AMrXdXvmKdim9NUi0bmHNs/N6LlADpZKw1fugbS0p0mooTHJA83gJkdIAWtTNCEvxNls+qX1p1Xg X-Received: by 2002:ac8:1202:0:b0:3a7:f2b0:c4b7 with SMTP id x2-20020ac81202000000b003a7f2b0c4b7mr35059134qti.57.1674526020129; Mon, 23 Jan 2023 18:07:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674526020; cv=none; d=google.com; s=arc-20160816; b=wFw83sG8nC6BV8YqXAhBDFu4vKaYTI062yiDEDCKa7az/ie/FdlXcOnvYIPpAmwuNy HaFNp2PdbDlqOizWuMv3a7DOTweLpKmETWGRrgfwq4DtigcD8wGULnCmq1HLg5cXX5DA HZua2y9DwsPiWbsIUcJfvdHtYdX+RnVn53OxmBOKbGYzkBukbGz+d5RfiS/jlfkusK20 FHkugG8i1tBnKGjrXTdBcONaWbtuoW7f1V2Yn5cj97GWOJf+BWJ2XS6VlCjy/hrPaf2V 99uhCLBM9MQxFHG5ccU2HkKkAQWDnVC15EpW9swW1o+4wSZ4y9gd8Y5YsP6RJJXoLTDF X7UQ== 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=CfRyloWDcwQ5PnWko6alt4B+5d+l5sPHbkZcyIVlTxE=; b=PW+7EG482ESEOMVGf61rlecO8UIoejzRHl9TVG4DhiiEff4yqY28I+RyfYTUiNLorr ywUs8QEs4SEFL898gSdN4AJ8FltYNOAokMkZz/AmaoShuV73XmrQjKiQlGAyz8kHVgGm UR84A9pYDYmhgjSNBX55EGTGmNe6vhE0AjcNFRNqgeWJTuFxpudfHKQcTNjZBjeuY2jY p9CR1yWPEt2gsxSeVTcvvuLT53lMzuoyE4s9JHMPhVgDTr8sex5g916yxdpQRf/tn+NH XyH0fypoA41hEmVq99uqh5bzoLu1W7sdvsyZzBTW4HVEH9gHUh+1va+Sby4ZJhvfLqo0 pbpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lWTxdJNp; 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 p8-20020ac87408000000b003a4c78edb99si450049qtq.584.2023.01.23.18.06.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jan 2023 18:07:00 -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=lWTxdJNp; 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 1pK8gc-0008On-K2; Mon, 23 Jan 2023 21:05:22 -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 1pK8ga-0008OJ-On for qemu-devel@nongnu.org; Mon, 23 Jan 2023 21:05:20 -0500 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pK8gY-0003oT-Ag for qemu-devel@nongnu.org; Mon, 23 Jan 2023 21:05:19 -0500 Received: by mail-pl1-x62a.google.com with SMTP id a18so789830plm.2 for ; Mon, 23 Jan 2023 18:05:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=CfRyloWDcwQ5PnWko6alt4B+5d+l5sPHbkZcyIVlTxE=; b=lWTxdJNpXyotrOLdViv5VBxkHWatqx597XhzkbfENSkcvsmY9qyGTquad9psZj1hGQ U8lqzsM8+PLH1HWXE/IfoKWrpd63UoLfhAMaZEdUNsE6QO/fLyvuYJawH48YSbtHzIQ6 219k5ODe/LhptpNQiKRj+lKjqBTkWAucF+M+z6IYZU1tXD7wRO5PKAzN38bDHG3SS5wc F2Y7/qMcwnqQrtfMYiiAgHx7XzutcjZTrjFx8FzicweOYb5Fab5HmkQmKaecJHqm53IX TuzN29SfSy5mcvOW6k1+lYZXp4mcKaQjYYx4iXF170oUEINXQEHW3gnf9XmHb7tnuY6b ++Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=CfRyloWDcwQ5PnWko6alt4B+5d+l5sPHbkZcyIVlTxE=; b=z3O1iU0r97lThc2flxYpXqOEmqetxDDHFLg+rIV6QSZQ+Zzrf6LQJG0ny6+n+Sk3dH fMFksHsB+JQ5F4G091l2k4IgcqjQetWftBXdBI/VCo//QzD5H0uHefiEThS3XMwbjgcs qaigjcngIfLSvVZK5W1/k44lwA5yrml90fS27/ztDg/NEiGL8VRS8mQPIi7U/SNh0q78 7bTgD8z28w/HCWk/TCdk0VtdhAKhtYPXhET4I3eTbmgMNANNslhRW93KDpMR0R1TcaEf KRc/XCYGzK7eyLGQOmjZSCcpybjSwysF747iL7qRmaGtgrvszUM6O0KnhmBNDv7Vv9jA 2fng== X-Gm-Message-State: AFqh2kqVIvkry9ZAqzS0gFPm+xtf6kjGkhfyr31lO4DOmYuzgNkA4hCy bBzpoNd/UwsBIi1MMaTVdtltifoQPi5bWaRr X-Received: by 2002:a17:90a:460f:b0:227:23c3:5db1 with SMTP id w15-20020a17090a460f00b0022723c35db1mr27648486pjg.47.1674525916783; Mon, 23 Jan 2023 18:05:16 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id fh3-20020a17090b034300b00228e56d375asm283936pjb.33.2023.01.23.18.05.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jan 2023 18:05:16 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, Daniel Henrique Barboza Subject: [PULL v2 04/15] linux-user: Implment host/ppc/host-signal.h Date: Mon, 23 Jan 2023 16:04:56 -1000 Message-Id: <20230124020507.3732200-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230124020507.3732200-1-richard.henderson@linaro.org> References: <20230124020507.3732200-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This commit re-enables ppc32 as a linux-user host, as existance of the directory is noted by configure. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1097 Signed-off-by: Richard Henderson Reviewed-by: Daniel Henrique Barboza Message-Id: <20220729172141.1789105-3-richard.henderson@linaro.org> --- linux-user/include/host/ppc/host-signal.h | 39 +++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 linux-user/include/host/ppc/host-signal.h diff --git a/linux-user/include/host/ppc/host-signal.h b/linux-user/include/host/ppc/host-signal.h new file mode 100644 index 0000000000..de25c803f5 --- /dev/null +++ b/linux-user/include/host/ppc/host-signal.h @@ -0,0 +1,39 @@ +/* + * host-signal.h: signal info dependent on the host architecture + * + * Copyright (c) 2022 Linaro Ltd. + * + * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. + * See the COPYING file in the top-level directory. + */ + +#ifndef PPC_HOST_SIGNAL_H +#define PPC_HOST_SIGNAL_H + +#include + +/* The third argument to a SA_SIGINFO handler is ucontext_t. */ +typedef ucontext_t host_sigcontext; + +static inline uintptr_t host_signal_pc(host_sigcontext *uc) +{ + return uc->uc_mcontext.regs->nip; +} + +static inline void host_signal_set_pc(host_sigcontext *uc, uintptr_t pc) +{ + uc->uc_mcontext.regs->nip = pc; +} + +static inline void *host_signal_mask(host_sigcontext *uc) +{ + return &uc->uc_sigmask; +} + +static inline bool host_signal_write(siginfo_t *info, host_sigcontext *uc) +{ + return uc->uc_mcontext.regs->trap != 0x400 + && (uc->uc_mcontext.regs->dsisr & 0x02000000); +} + +#endif