From nobody Sun Dec 29 01:41:15 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1719511525; cv=none; d=zohomail.com; s=zohoarc; b=fHxfgLJNyjyIpdgcZ6Be/LqobBsJjpNuW6kPjq/cdztcwuRlMCF66ZRtcGlIDjDIw9oCexUIauWqwJLp19NWF5BQagwuXDAWIChwZ4IRZLfI6Uy0Y4nGRmN7XVH2ZpKB7S07jtC4Shs4Y5X2KJmaF+YYSiZAgpET4A0VgjBxvMo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719511525; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=TAEbuMWRBzQhtzD9qy0BIESVSrOd35nsQcBa/S7f+Kw=; b=dRBICo73lhgPK3M0f5Je/1Nqfn2b4U3LjzVjomdA4bsS+Xj6l43nMghQqVuoYROP3L26U4Eg7cu5OoxR1tBngsoT8nmyKkTF/ksApC/ieNOZX5i85qhqaPYDYbLSPf6mNEZLePMhRwBW7WDBjVHuJg0XWRwcpzABzed5HXIeAN4= 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+importer2=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 1719511525246336.3146978947103; Thu, 27 Jun 2024 11:05:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMtTh-0001Ad-Ch; Thu, 27 Jun 2024 14:04:13 -0400 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 1sMtTe-0001A1-8V for qemu-devel@nongnu.org; Thu, 27 Jun 2024 14:04:10 -0400 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMtTP-0001M1-8j for qemu-devel@nongnu.org; Thu, 27 Jun 2024 14:04:09 -0400 Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-7178ba1c24bso4587360a12.3 for ; Thu, 27 Jun 2024 11:03:54 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70803ecf764sm2170b3a.106.2024.06.27.11.03.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jun 2024 11:03:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719511434; x=1720116234; darn=nongnu.org; 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=TAEbuMWRBzQhtzD9qy0BIESVSrOd35nsQcBa/S7f+Kw=; b=ucUhODRpQUnzl5mVD1nKMZl4ptEf1xudg8JOp+PRtq1tiVI6X6bZmfMDY90U7y82iG topoq18AfXYQEaym2iTKmSaAzus09cUqEor2k41CHxEVJyghRVIGowz9WiGxCFUJbtCI MUpV+9/SdL13cjZtM403LEKGVzjYxOlcV4djUkVgCKj9Vu16VW6Z8Y/yP4cG2aYH2AvR ODk5GpU27rY7MzUtJfhwUhjSmNFlctplOatV1HXsvkc1xsYU/sDYRsyj2Ch3SDrXUtCL 7s+euDVusjhGT92ZW6et+Ui6/Wu01JC9Xby1MWmX7fgvR/qopbLUy6MWFi5VdGXeGY1U J79w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719511434; x=1720116234; 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=TAEbuMWRBzQhtzD9qy0BIESVSrOd35nsQcBa/S7f+Kw=; b=oVyB2UtvjEHGTyqx+0cBoiGn5/+by7Mijxbzk7fXNDFbAINN130wurSfC6hp1KgxBY 4JDFTlhyWEjeLXHU+Je28lItBAkFVvoovlz+C8+VCTI2a+5x6c5Ct8NqlAD1Js6NK+5i N3IFfULC4N4i50Oj6VfSKIhRWu75HBLIsqoN37iXiDJFuvIlZggqhYeK5E8MhWtVDP25 BFsLpou8B5pB2cHeNOOGCPM3yoU8DGjCYZ6us1OSClnQ3kRy4wNLdUd9RrT9trd/Y/16 wILUl5OmWPt+9YnTLPPJk4ZVS8Y0w65jwHgCDcqEe6wH4wbymmZn7/YbfBaPH1dRWzHv t/vg== X-Gm-Message-State: AOJu0Yz2HRMtcufPbSR4soC6ghiM7q6onh90074Yz+lC7mrcPYDz/w/p 27D0s/60eQ1TwymDr5qtEkiA7VadzgHWPGlQU/JfZrdCoPecVvqjGhFfnO1Ytda1dd2htmlOO82 m X-Google-Smtp-Source: AGHT+IGXSFP2+4psHHtj7esSeslMhh2C2UF84vt8IthcQqZ11PSL1nqfb2oPk9IXGLeFYnnwxWNdaQ== X-Received: by 2002:a05:6a21:3289:b0:1be:cea5:c77e with SMTP id adf61e73a8af0-1becea5cf6fmr3546140637.7.1719511433704; Thu, 27 Jun 2024 11:03:53 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: brad@comstyle.com, Alistair.Francis@wdc.com, palmer@dabbelt.com, qemu-riscv@nongnu.org Subject: [PATCH 2/3] util/cpuinfo-riscv: Support OpenBSD signal frame Date: Thu, 27 Jun 2024 11:03:49 -0700 Message-Id: <20240627180350.128575-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240627180350.128575-1-richard.henderson@linaro.org> References: <20240627180350.128575-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::533; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x533.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719511525702100001 Content-Type: text/plain; charset="utf-8" Reported-by: Brad Smith Signed-off-by: Richard Henderson Acked-by: Alistair Francis Acked-by: Daniel Henrique Barboza Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- util/cpuinfo-riscv.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/util/cpuinfo-riscv.c b/util/cpuinfo-riscv.c index 6b97100620..abf799794f 100644 --- a/util/cpuinfo-riscv.c +++ b/util/cpuinfo-riscv.c @@ -13,7 +13,14 @@ static void sigill_handler(int signo, siginfo_t *si, voi= d *data) { /* Skip the faulty instruction */ ucontext_t *uc =3D (ucontext_t *)data; + +#ifdef __linux__ uc->uc_mcontext.__gregs[REG_PC] +=3D 4; +#elif defined(__OpenBSD__) + uc->sc_sepc +=3D 4; +#else +# error Unsupported OS +#endif =20 got_sigill =3D 1; } --=20 2.34.1