From nobody Thu May 16 12:08:10 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 163373507067279.46345373234885; Fri, 8 Oct 2021 16:17:50 -0700 (PDT) Received: from localhost ([::1]:45430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYz7d-0002my-4A for importer@patchew.org; Fri, 08 Oct 2021 19:17:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYz5J-0008PA-Ga for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:25 -0400 Received: from mail-io1-xd2e.google.com ([2607:f8b0:4864:20::d2e]:40710) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYz5G-0006S4-C8 for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:25 -0400 Received: by mail-io1-xd2e.google.com with SMTP id x1so8478394iof.7 for ; Fri, 08 Oct 2021 16:15:21 -0700 (PDT) Received: from dune.bsdimp.com (50-253-99-174-static.hfc.comcastbusiness.net. [50.253.99.174]) by smtp.gmail.com with ESMTPSA id b15sm293628ion.8.2021.10.08.16.15.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 16:15:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SaGqHKjeNHsGyyOiYm73uNe53IqF6hF9aBdLsXSA2EM=; b=CLffQe/3N6pOGX64njuzsGh+8OpfwOblPL0aP9Kf8CDg9cUTtY4pCfQOANoWpuiSen W3BorKiuCF2D+eYBeFJxAutz99ppuf9EoBe6C9CIY6xEh9tU92ZPIdaFKD2fiqAfEDvP /JzH7u1yVNLhr2M6b0ac2rz2SaJnkTzUep9rVD/w1aK54ib4CA0mEeRkwasBTFyS0QNt M0W+98bNXXpJusvWFF7sE9zYVUc/rIe/12tK2ksDCh+fUfMQx0+2VmRmkoDpLbqMWJQo +uZr1FtT/jB1rird4MbSBdyfzbZMq82NyBKHCttcDTU04ZluQJLSZAg4B2zY/X83lgCd Vz4A== 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=SaGqHKjeNHsGyyOiYm73uNe53IqF6hF9aBdLsXSA2EM=; b=rWZOSVZczgLnIybFfaGs67qobGHwpCYmoEulXcIhGUbsaLytlWap64uZigj8XUzKdQ xiNhGiCz/YJz6qdTstf8tJSO+r4u8zcHN51l/QdMadf+m+tc4IL5an8I0Nzv4pNyhlgA UXla+NX2bOPioJoTIwcTfivyihxV3bep2kuXzWcy848+S0R48+tCRfPohXTXmc15emM8 yHtZo7g/f/QVdoRBBdfZcmKh+sPXBglDuzsUMYQpvmQTfSBcApRJfxOaTlyNqngknkh0 +aTKaBhks1bi4kJegK2DsjrYgZV+M/TfTDpXVccJIzPRkYEWSLFz/MXtZqbe12i8ceok /ndg== X-Gm-Message-State: AOAM532ByjwAWFI0TI5Kv3v7BCIjUzquVK2WxwKE2yz2bFj+RKVBD6rD bnETfeMgSk2Njgis6kSdreIIwLi5X4xAlQ== X-Google-Smtp-Source: ABdhPJzshHPYHlClT+6cC+w8YXRRpdKAdR+f4bt9HN6uDVcth+uK2/JZkozWOCVYsOAA4QyURsgZbw== X-Received: by 2002:a02:9a14:: with SMTP id b20mr951498jal.83.1633734920893; Fri, 08 Oct 2021 16:15:20 -0700 (PDT) From: Warner Losh To: qemu-devel@nongnu.org Subject: [PATCH v2 01/15] meson: *-user: only descend into *-user when configured Date: Fri, 8 Oct 2021 17:14:52 -0600 Message-Id: <20211008231506.17471-2-imp@bsdimp.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211008231506.17471-1-imp@bsdimp.com> References: <20211008231506.17471-1-imp@bsdimp.com> 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: none client-ip=2607:f8b0:4864:20::d2e; envelope-from=imp@bsdimp.com; helo=mail-io1-xd2e.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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: Kyle Evans , richard.henderson@linaro.org, Laurent Vivier , f4bug@amsat.org, Paolo Bonzini , Warner Losh , Warner Losh Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1633735072679100001 To increase flexibility, only descend into *-user when that is configured. This allows *-user to selectively include directories based on the host OS which may not exist on all hosts. Adopt Paolo's suggestion of checking the configuration in the directories that know about the configuration. Message-Id: <20210926220103.1721355-2-f4bug@amsat.org> Message-Id: <20210926220103.1721355-3-f4bug@amsat.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Warner Losh Acked-by: Paolo Bonzini Sponsored by: Netflix Reviewed-by: Kyle Evans --- bsd-user/meson.build | 4 ++++ linux-user/meson.build | 4 ++++ meson.build | 3 +-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/bsd-user/meson.build b/bsd-user/meson.build index 0369549340..243fb78930 100644 --- a/bsd-user/meson.build +++ b/bsd-user/meson.build @@ -1,3 +1,7 @@ +if not config_target.has_key('CONFIG_BSD_USER') + subdir_done() +endif + bsd_user_ss.add(files( 'bsdload.c', 'elfload.c', diff --git a/linux-user/meson.build b/linux-user/meson.build index 9549f81682..602255a3d6 100644 --- a/linux-user/meson.build +++ b/linux-user/meson.build @@ -1,3 +1,7 @@ +if not config_target.has_key('CONFIG_LINUX_USER') + subdir_done() +endif + linux_user_ss.add(files( 'elfload.c', 'exit.c', diff --git a/meson.build b/meson.build index 99a0a3e689..1f2da5f7d9 100644 --- a/meson.build +++ b/meson.build @@ -2303,10 +2303,9 @@ subdir('ebpf') =20 common_ss.add(libbpf) =20 -bsd_user_ss.add(files('gdbstub.c')) specific_ss.add_all(when: 'CONFIG_BSD_USER', if_true: bsd_user_ss) =20 -linux_user_ss.add(files('gdbstub.c', 'thunk.c')) +linux_user_ss.add(files('thunk.c')) specific_ss.add_all(when: 'CONFIG_LINUX_USER', if_true: linux_user_ss) =20 # needed for fuzzing binaries --=20 2.32.0 From nobody Thu May 16 12:08:10 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 163373507571217.482246530941325; Fri, 8 Oct 2021 16:17:55 -0700 (PDT) Received: from localhost ([::1]:45804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYz7h-00032v-JX for importer@patchew.org; Fri, 08 Oct 2021 19:17:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYz5K-0008RM-8O for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:26 -0400 Received: from mail-io1-xd35.google.com ([2607:f8b0:4864:20::d35]:41918) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYz5G-0006Xg-V6 for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:25 -0400 Received: by mail-io1-xd35.google.com with SMTP id q205so12406325iod.8 for ; Fri, 08 Oct 2021 16:15:22 -0700 (PDT) Received: from dune.bsdimp.com (50-253-99-174-static.hfc.comcastbusiness.net. [50.253.99.174]) by smtp.gmail.com with ESMTPSA id b15sm293628ion.8.2021.10.08.16.15.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 16:15:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GpTkD/ioau0lPTJz3AxbBkKH8FVbgzE0jEysborlCV0=; b=i0aJRTtAaLFpOOMU1n0SgXdRdOGFJiBDvI8kiSc7Ou+mCBHogU1KBd5p1Keve7huID CfKJmivPNGmchNaGqrQKVL/vvef63Uelf71X0dBUduC4rPQASzO5cQflSFp7muiAXj5n /BF1FQgNRk1xRxCPW6A/T8WJo5kgV7cCNPQrkm+JVbVQXvDoZzCQ36Jr/Szbw8BCbj8f /UNIAg+mJdZkMvInqYtspZomoKvOqfu20pvXZd8tFeobZw0dd1lK1LlsZInebPYEUY/A l/IKGwrgYxKHUCRMzTRlt+rYVSQkm6WJFqIaY78gOhQEJd81B4Msh7E1JQGdFDoBfPQZ OU0w== 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=GpTkD/ioau0lPTJz3AxbBkKH8FVbgzE0jEysborlCV0=; b=onYUa2ANL0Dg45IPHxIbswyNQlrt5gxQsTDmxAeKN5Se8TKjVXDDm/h0hVYLAq+KHL NfumPQm8oZqIo42pH0WD52Fp6+LzzKMO4ZsNJI1Fx8YK4EljSCVBKfG2+JgqLA83a6cJ FIx4XRaNAZ8JGG5sOk5vlXB5Yqs54ij0ipYBs4lUUIAVTc6nWdF87NmjjBjseAVe/bqO ojljg6gndopGD3GVaSWokkDjd6KiQOmLhfNUQILuhqJypidQMnfMdz8sOAMKhe+NFAIU bXmQifcFOxVAcMlksYegMXgkwL+8XJ/hdGgQW/RAGNZeWKLOcwPehHJEnndans5P8DKr XqaQ== X-Gm-Message-State: AOAM530J3Y8BALTsWO/3dEgJlZoLINIwTSkK+xYctD+eiwlyRpm/FPKv +4f+pAY5d2c+CFfAUVhHkSIQenM03AwYvg== X-Google-Smtp-Source: ABdhPJyUe3jrwZXa8h0AaBajS7ilXRGgXqG3eBhfp96egibtbmxAjjmVq6FvGEgBkUUZzs3/N2scMQ== X-Received: by 2002:a6b:dd0c:: with SMTP id f12mr9408835ioc.117.1633734921598; Fri, 08 Oct 2021 16:15:21 -0700 (PDT) From: Warner Losh To: qemu-devel@nongnu.org Subject: [PATCH v2 02/15] bsd-user/target_os-user.h: Remove support for FreeBSD older than 12.0 Date: Fri, 8 Oct 2021 17:14:53 -0600 Message-Id: <20211008231506.17471-3-imp@bsdimp.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211008231506.17471-1-imp@bsdimp.com> References: <20211008231506.17471-1-imp@bsdimp.com> 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: none client-ip=2607:f8b0:4864:20::d35; envelope-from=imp@bsdimp.com; helo=mail-io1-xd35.google.com X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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: Kyle Evans , richard.henderson@linaro.org, Laurent Vivier , Warner Losh , f4bug@amsat.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1633735076439100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Kyle Evans --- bsd-user/freebsd/target_os_user.h | 100 +----------------------------- 1 file changed, 1 insertion(+), 99 deletions(-) diff --git a/bsd-user/freebsd/target_os_user.h b/bsd-user/freebsd/target_os= _user.h index 95b1fa9f99..19892c5071 100644 --- a/bsd-user/freebsd/target_os_user.h +++ b/bsd-user/freebsd/target_os_user.h @@ -61,15 +61,7 @@ struct target_sockaddr_storage { /* * from sys/user.h */ -#if defined(__FreeBSD_version) && __FreeBSD_version >=3D 1200031 #define TARGET_KI_NSPARE_INT 2 -#elif defined(__FreeBSD_version) && __FreeBSD_version >=3D 1100000 -#define TARGET_KI_NSPARE_INT 4 -#elif defined(__FreeBSD_version) && __FreeBSD_version >=3D 1000000 -#define TARGET_KI_NSPARE_INT 7 -#else -#define TARGET_KI_NSPARE_INT 9 -#endif /* ! __FreeBSD_version >=3D 1000000 */ #define TARGET_KI_NSPARE_LONG 12 #define TARGET_KI_NSPARE_PTR 6 =20 @@ -116,11 +108,7 @@ struct target_kinfo_proc { int32_t ki_tsid; /* Terminal session ID */ int16_t ki_jobc; /* job control counter */ int16_t ki_spare_short1; /* unused (just here for alignment) */ -#if defined(__FreeBSD_version) && __FreeBSD_version >=3D 1200031 int32_t ki_tdev__freebsd11; /* controlling tty dev */ -#else - int32_t ki_tdev; /* controlling tty dev */ -#endif target_sigset_t ki_siglist; /* Signals arrived but not delivered */ target_sigset_t ki_sigmask; /* Current signal mask */ target_sigset_t ki_sigignore; /* Signals being ignored */ @@ -164,45 +152,24 @@ struct target_kinfo_proc { int8_t ki_nice; /* Process "nice" value */ char ki_lock; /* Process lock (prevent swap) count */ char ki_rqindex; /* Run queue index */ -#if defined(__FreeBSD_version) && __FreeBSD_version >=3D 1100000 u_char ki_oncpu_old; /* Which cpu we are on (legacy) */ u_char ki_lastcpu_old; /* Last cpu we were on (legacy) */ -#else - u_char ki_oncpu; /* Which cpu we are on */ - u_char ki_lastcpu; /* Last cpu we were on */ -#endif /* ! __FreeBSD_version >=3D 1100000 */ -#if defined(__FreeBSD_version) && __FreeBSD_version >=3D 900000 char ki_tdname[TARGET_TDNAMLEN + 1]; /* thread name */ -#else - char ki_ocomm[TARGET_TDNAMLEN + 1]; /* thread name */ -#endif /* ! __FreeBSD_version >=3D 900000 */ char ki_wmesg[TARGET_WMESGLEN + 1]; /* wchan message */ char ki_login[TARGET_LOGNAMELEN + 1]; /* setlogin name */ char ki_lockname[TARGET_LOCKNAMELEN + 1]; /* lock name */ char ki_comm[TARGET_COMMLEN + 1]; /* command name */ char ki_emul[TARGET_KI_EMULNAMELEN + 1]; /* emulation name */ -#if defined(__FreeBSD_version) && __FreeBSD_version >=3D 900000 char ki_loginclass[TARGET_LOGINCLASSLEN + 1]; /* login class */ -#endif /* ! __FreeBSD_version >=3D 900000 */ =20 -#if defined(__FreeBSD_version) && __FreeBSD_version >=3D 900000 char ki_sparestrings[50]; /* spare string space */ -#else - char ki_sparestrings[68]; /* spare string space */ -#endif /* ! __FreeBSD_version >=3D 900000 */ int32_t ki_spareints[TARGET_KI_NSPARE_INT]; /* spare room for grow= th */ -#if defined(__FreeBSD_version) && __FreeBSD_version >=3D 1200031 - uint64_t ki_tdev; /* controlling tty dev */ -#endif -#if defined(__FreeBSD_version) && __FreeBSD_version >=3D 1100000 + uint64_t ki_tdev; /* controlling tty dev */ int32_t ki_oncpu; /* Which cpu we are on */ int32_t ki_lastcpu; /* Last cpu we were on */ int32_t ki_tracer; /* Pid of tracing process */ -#endif /* __FreeBSD_version >=3D 1100000 */ -#if defined(__FreeBSD_version) && __FreeBSD_version >=3D 900000 int32_t ki_flag2; /* P2_* flags */ int32_t ki_fibnum; /* Default FIB number */ -#endif /* ! __FreeBSD_version >=3D 900000 */ uint32_t ki_cr_flags; /* Credential flags */ int32_t ki_jid; /* Process jail ID */ int32_t ki_numthreads; /* XXXKSE number of threads in total */ @@ -234,18 +201,8 @@ struct target_kinfo_file { int32_t kf_flags; /* Flags. */ int32_t kf_pad0; /* Round to 64 bit alignment. */ int64_t kf_offset; /* Seek location. */ -#if defined(__FreeBSD_version) && __FreeBSD_version < 1200031 - int32_t kf_vnode_type; /* Vnode type. */ - int32_t kf_sock_domain; /* Socket domain. */ - int32_t kf_sock_type; /* Socket type. */ - int32_t kf_sock_protocol; /* Socket protocol. */ - struct target_sockaddr_storage kf_sa_local; /* Socket address. */ - struct target_sockaddr_storage kf_sa_peer; /* Peer address. */ -#endif -#if defined(__FreeBSD_version) && __FreeBSD_version >=3D 900000 union { struct { -#if defined(__FreeBSD_version) && __FreeBSD_version >=3D 1200031 uint32_t kf_spareint; /* Socket domain. */ int kf_sock_domain0; @@ -257,7 +214,6 @@ struct target_kinfo_file { struct sockaddr_storage kf_sa_local; /* Peer address. */ struct sockaddr_storage kf_sa_peer; -#endif /* Address of so_pcb. */ uint64_t kf_sock_pcb; /* Address of inp_ppcb. */ @@ -272,7 +228,6 @@ struct target_kinfo_file { uint32_t kf_sock_pad0; } kf_sock; struct { -#if defined(__FreeBSD_version) && __FreeBSD_version >=3D 1200031 /* Vnode type. */ int kf_file_type; /* Space for future use */ @@ -290,16 +245,6 @@ struct target_kinfo_file { uint32_t kf_file_fsid_freebsd11; /* File device, FreeBSD 11 compat. */ uint32_t kf_file_rdev_freebsd11; -#else - /* Global file id. */ - uint64_t kf_file_fileid; - /* File size. */ - uint64_t kf_file_size; - /* Vnode filesystem id. */ - uint32_t kf_file_fsid; - /* File device. */ - uint32_t kf_file_rdev; -#endif /* File mode. */ uint16_t kf_file_mode; /* Round to 64 bit alignment. */ @@ -307,18 +252,14 @@ struct target_kinfo_file { uint32_t kf_file_pad1; } kf_file; struct { -#if defined(__FreeBSD_version) && __FreeBSD_version >=3D 1200031 uint32_t kf_spareint[4]; uint64_t kf_spareint64[32]; -#endif uint32_t kf_sem_value; uint16_t kf_sem_mode; } kf_sem; struct { -#if defined(__FreeBSD_version) && __FreeBSD_version >=3D 1200031 uint32_t kf_spareint[4]; uint64_t kf_spareint64[32]; -#endif uint64_t kf_pipe_addr; uint64_t kf_pipe_peer; uint32_t kf_pipe_buffer_cnt; @@ -326,7 +267,6 @@ struct target_kinfo_file { uint32_t kf_pipe_pad0[3]; } kf_pipe; struct { -#if defined(__FreeBSD_version) && __FreeBSD_version >=3D 1200031 uint32_t kf_spareint[4]; uint64_t kf_spareint64[32]; uint32_t kf_pts_dev_freebsd11; @@ -334,34 +274,18 @@ struct target_kinfo_file { uint64_t kf_pts_dev; /* Round to 64 bit alignment. */ uint32_t kf_pts_pad1[4]; -#else - uint32_t kf_pts_dev; - /* Round to 64 bit alignment. */ - uint32_t kf_pts_pad0[7]; -#endif } kf_pts; struct { -#if defined(__FreeBSD_version) && __FreeBSD_version >=3D 1200031 uint32_t kf_spareint[4]; uint64_t kf_spareint64[32]; -#endif int32_t kf_pid; } kf_proc; } kf_un; uint16_t kf_status; /* Status flags. */ uint16_t kf_pad1; /* Round to 32 bit alignment. */ int32_t _kf_ispare0; /* Space for more stuff. */ -#if defined(__FreeBSD_version) && __FreeBSD_version >=3D 1000000 target_cap_rights_t kf_cap_rights; /* Capability rights. */ uint64_t _kf_cap_spare; /* Space for future cap_rights_t. */ -#else /* ! __FreeBSD_version >=3D 1000000 */ - uint64_t kf_cap_rights; - int _kf_ispare[4]; -#endif /* ! __FreeBSD_version >=3D 1000000 */ - -#else /* ! __FreeBSD_version >=3D 900000 */ - int _kf_ispare[16]; -#endif /* ! __FreeBSD_version >=3D 900000 */ /* Truncated before copyout in sysctl */ char kf_path[PATH_MAX]; /* Path to file, if any. */ }; @@ -372,34 +296,19 @@ struct target_kinfo_vmentry { uint64_t kve_start; /* Starting address. */ uint64_t kve_end; /* Finishing address. */ uint64_t kve_offset; /* Mapping offset in object */ -#if defined(__FreeBSD_version) && __FreeBSD_version >=3D 900000 uint64_t kve_vn_fileid; /* inode number if vnode */ -#if defined(__FreeBSD_version) && __FreeBSD_version >=3D 1200031 uint32_t kve_vn_fsid_freebsd11; /* dev_t of vnode location */ -#else - uint32_t kve_vn_fsid; /* dev_t of vnode location */ -#endif -#else /* ! __FreeBSD_version >=3D 900000 */ - uint64_t kve_fileid; /* inode number if vnode */ - uint32_t kve_fsid; /* dev_t of vnode location */ -#endif /* ! __FreeBSD_version >=3D 900000 */ int32_t kve_flags; /* Flags on map entry. */ int32_t kve_resident; /* Number of resident pages. */ int32_t kve_private_resident; /* Number of private pages. */ int32_t kve_protection; /* Protection bitmask. */ int32_t kve_ref_count; /* VM obj ref count. */ int32_t kve_shadow_count; /* VM obj shadow count. */ -#if defined(__FreeBSD_version) && __FreeBSD_version >=3D 900000 int32_t kve_vn_type; /* Vnode type. */ uint64_t kve_vn_size; /* File size. */ -#if defined(__FreeBSD_version) && __FreeBSD_version >=3D 1200031 uint32_t kve_vn_rdev_freebsd11; /* Device id if device. */ -#else - uint32_t kve_vn_rdev; /* Device id if device. */ -#endif uint16_t kve_vn_mode; /* File mode. */ uint16_t kve_status; /* Status flags. */ -#if defined(__FreeBSD_version) && __FreeBSD_version >=3D 1200031 #if (__FreeBSD_version >=3D 1300501 && __FreeBSD_version < 1400000) || \ __FreeBSD_version >=3D 1400009 union { @@ -413,13 +322,6 @@ struct target_kinfo_vmentry { #endif uint64_t kve_vn_rdev; /* Device id if device. */ int _kve_ispare[8]; /* Space for more stuff. */ -#else - int32_t _kve_ispare[12]; /* Space for more stuff. */ -#endif -#else /* ! __FreeBSD_version >=3D 900000 */ - int _kve_pad0; - int32_t _kve_ispare[16]; /* Space for more stuff. */ -#endif /* ! __FreeBSD_version >=3D 900000 */ /* Truncated before copyout in sysctl */ char kve_path[PATH_MAX]; /* Path to VM obj, if any. */ }; --=20 2.32.0 From nobody Thu May 16 12:08:10 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1633735070593490.0974066789378; Fri, 8 Oct 2021 16:17:50 -0700 (PDT) Received: from localhost ([::1]:45448 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYz7c-0002ne-VE for importer@patchew.org; Fri, 08 Oct 2021 19:17:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYz5J-0008QJ-QM for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:25 -0400 Received: from mail-il1-x12b.google.com ([2607:f8b0:4864:20::12b]:46002) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYz5H-0006cr-Nn for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:25 -0400 Received: by mail-il1-x12b.google.com with SMTP id i11so10490266ila.12 for ; Fri, 08 Oct 2021 16:15:23 -0700 (PDT) Received: from dune.bsdimp.com (50-253-99-174-static.hfc.comcastbusiness.net. [50.253.99.174]) by smtp.gmail.com with ESMTPSA id b15sm293628ion.8.2021.10.08.16.15.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 16:15:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nemaLJ3YI2rLMZki8aqe2bhWUhXyuEblpfd7VRz22Jc=; b=sLZlDwtRbR3t+EoiqnVTo6UNCR83KNi7vewdIgREymvRNkvumNPbh4N45s8GM73bMg 3NdRzKJTvXpX2g3bbpBEElsrPsftZqgOS65z1BvXWwL5c6yY1VZVfDOLsRv7QcQYNQeN uugWwUffKZQaGWvLRPhovXhneOTjhwhdWkNDF/Bv+nurjQPxB3bYd71psoYUL6Cnecjq h/5EcGuyBBwDt/XPWxoWKqb+wKkVBDBa4a3rTAFSsrb7c/Ux7HznizceuKvb2KDjNz5i m/Kyj5FgRUajuyfHmDr46UPjyHguOdS1qzzhGrS+j4IVO4qt0xgvffrRvtEgHPLWcQni ASMw== 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=nemaLJ3YI2rLMZki8aqe2bhWUhXyuEblpfd7VRz22Jc=; b=SIcYBcwFoGc82+D1UIAtlLOVCm1fWnuKiwIiWoB0XRwQ2fxQYMo/EykZvG4Tcc0F02 tRWDfDglP0YOq5WCOFxv8CrD/Xg1XE7v8IxBUlyyP3KnOEAWJKsKoATPnvsN18egA1R7 ekME/PtvuAduJI4g+tdDSEoM2oCk2Wju0cPfZ1KbtaJHE07JSLOh8IeIh4gb5EQszKrC HR5IFLQFDUnLtSHXbcupeqBByJj155yp61aiaNwOFa6O0RNQWnZnMUkTbuJXP+waT7tH QsFa8VYkayQ82mbopEmk40ebtpg9gefwEEVyx8C1TMBGPgnvYaozoYNOJ7KbfwISuxHM TwuA== X-Gm-Message-State: AOAM5322y973C1woKggd1+V0xV0s6XH3RJwAlIb+hNFHS8UUbRCOycKU vAwIFB4cB0GVaoeGZvolh0BRpScNR/3a5g== X-Google-Smtp-Source: ABdhPJyJUmyvOwf/UINZfBP+AE1awboJFEtY1RWT2eoZ94A+L7kyVIRmBgOaDn//elifbgu0G5waMA== X-Received: by 2002:a05:6e02:1bae:: with SMTP id n14mr10499659ili.253.1633734922450; Fri, 08 Oct 2021 16:15:22 -0700 (PDT) From: Warner Losh To: qemu-devel@nongnu.org Subject: [PATCH v2 03/15] bsd-user/strace.list: Remove support for FreeBSD versions older than 12.0 Date: Fri, 8 Oct 2021 17:14:54 -0600 Message-Id: <20211008231506.17471-4-imp@bsdimp.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211008231506.17471-1-imp@bsdimp.com> References: <20211008231506.17471-1-imp@bsdimp.com> 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: none client-ip=2607:f8b0:4864:20::12b; envelope-from=imp@bsdimp.com; helo=mail-il1-x12b.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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: Kyle Evans , richard.henderson@linaro.org, Laurent Vivier , Warner Losh , f4bug@amsat.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1633735072682100002 Content-Type: text/plain; charset="utf-8" Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Kyle Evans --- bsd-user/freebsd/strace.list | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/bsd-user/freebsd/strace.list b/bsd-user/freebsd/strace.list index b01b5f36e8..275d2dbe27 100644 --- a/bsd-user/freebsd/strace.list +++ b/bsd-user/freebsd/strace.list @@ -33,10 +33,6 @@ { TARGET_FREEBSD_NR___syscall, "__syscall", NULL, NULL, NULL }, { TARGET_FREEBSD_NR___sysctl, "__sysctl", NULL, print_sysctl, NULL }, { TARGET_FREEBSD_NR__umtx_op, "_umtx_op", "%s(%#x, %d, %d, %#x, %#x)", NUL= L, NULL }, -#if defined(__FreeBSD_version) && __FreeBSD_version < 1000000 -{ TARGET_FREEBSD_NR__umtx_lock, "__umtx_lock", NULL, NULL, NULL }, -{ TARGET_FREEBSD_NR__umtx_unlock, "__umtx_unlock", NULL, NULL, NULL }, -#endif { TARGET_FREEBSD_NR_accept, "accept", "%s(%d,%#x,%#x)", NULL, NULL }, { TARGET_FREEBSD_NR_accept4, "accept4", "%s(%d,%d,%#x,%#x)", NULL, NULL }, { TARGET_FREEBSD_NR_access, "access", "%s(\"%s\",%#o)", NULL, NULL }, @@ -49,10 +45,6 @@ { TARGET_FREEBSD_NR_cap_fcntls_get, "cap_fcntls_get", NULL, NULL, NULL }, { TARGET_FREEBSD_NR_cap_fcntls_limit, "cap_fcntls_limit", NULL, NULL, NULL= }, { TARGET_FREEBSD_NR_cap_getmode, "cap_getmode", NULL, NULL, NULL }, -#if defined(__FreeBSD_version) && __FreeBSD_version < 1000000 -{ TARGET_FREEBSD_NR_cap_getrights, "cap_getrights", NULL, NULL, NULL }, -{ TARGET_FREEBSD_NR_cap_new, "cap_new", NULL, NULL, NULL }, -#endif { TARGET_FREEBSD_NR_cap_ioctls_get, "cap_ioctls_get", NULL, NULL, NULL }, { TARGET_FREEBSD_NR_cap_ioctls_limit, "cap_ioctls_limit", NULL, NULL, NULL= }, { TARGET_FREEBSD_NR_cap_rights_limit, "cap_rights_limit", NULL, NULL, NULL= }, @@ -146,9 +138,6 @@ { TARGET_FREEBSD_NR_freebsd11_kevent, "freebsd11_kevent", NULL, NULL, NULL= }, { TARGET_FREEBSD_NR_kevent, "kevent", NULL, NULL, NULL }, { TARGET_FREEBSD_NR_kill, "kill", NULL, NULL, NULL }, -#if defined(__FreeBSD_version) && __FreeBSD_version < 1000000 -{ TARGET_FREEBSD_NR_killpg, "killpg", NULL, NULL, NULL }, -#endif { TARGET_FREEBSD_NR_kqueue, "kqueue", NULL, NULL, NULL }, { TARGET_FREEBSD_NR_ktrace, "ktrace", NULL, NULL, NULL }, { TARGET_FREEBSD_NR_lchown, "lchown", NULL, NULL, NULL }, --=20 2.32.0 From nobody Thu May 16 12:08:10 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1633735201649504.77492122376214; Fri, 8 Oct 2021 16:20:01 -0700 (PDT) Received: from localhost ([::1]:54008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYz9k-0008Tw-JC for importer@patchew.org; Fri, 08 Oct 2021 19:20:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33858) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYz5K-0008Rt-MX for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:26 -0400 Received: from mail-io1-xd2d.google.com ([2607:f8b0:4864:20::d2d]:33471) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYz5I-0006gL-MA for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:26 -0400 Received: by mail-io1-xd2d.google.com with SMTP id n7so3565927iod.0 for ; Fri, 08 Oct 2021 16:15:24 -0700 (PDT) Received: from dune.bsdimp.com (50-253-99-174-static.hfc.comcastbusiness.net. [50.253.99.174]) by smtp.gmail.com with ESMTPSA id b15sm293628ion.8.2021.10.08.16.15.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 16:15:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=06eB4JezVTDOp6PNsNCkhgYjdtZ/snCLoQwHZu1R2oc=; b=r6SEq8zJcw7wt2jRlFbujSBNajeMDsuKcvnh9Sv5sJqMrLnh8zvBhe+E5d1qn1T3qO LA3HxOaNmWCjCClgnQtp7vrhLzl3ZMNhk5+xdbjGauqZP9xeOhH3BP7RceXRbidXYatc xXSY3i4UQsed0NG/bXZeT5lA5/UDQGsbMMm12ZVtccgMJwSN3Bby+R7I7l+e/bfz3sCG l5XwgEk/Q5S6MfekNgrIrr7j79TJ0tK/Bq1qNT/+7EMcqVdaaCXS+oK99nzEt7lqB768 lMYXcALkqquPyHhZ1pj1sX39uVJb8Zh1lx5wqv1XoeoJi0027dCMs0qyXODyWAkeeUKw 81ng== 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=06eB4JezVTDOp6PNsNCkhgYjdtZ/snCLoQwHZu1R2oc=; b=6cx2tv0Z3HsTlynjiN+2PbqlHH59NyWXXPYPjUc7TjyLNqqMnOJmsrF4XiEe2fhgXv 2sCG84yV2UodN8hsNUHNyIgpuFsCQceJQprnOV+NPsG6UYnDkwGoTjDcvj1leLkFD9Uk 3au2xZdTkZ1h08/YadpjWjt/qdXkrK0ACRH1nWq3uTDecUBWXlwBwcFbZb1sfUUEsyzN /L0tjTzSzj4UFJnH6U5jy5V4V0n/0JVO64a4wwcps+igz/fs+q64DciRhdnaRnBlSGpS QH8G8JOw3xjD82Z+GNb2liwXAT70i9hFWIb/t1BBbN/ZTDRlwUJ4I4a7lJYAxo/qExC+ r+Jg== X-Gm-Message-State: AOAM531Ofs2RqFHt1PVEY2kcLj8NcJ9e9J3QApbz4rD7c5YCw+pvHxgW likUE0VUSZ9bk8IBogdjXjVfUyjeNabtDA== X-Google-Smtp-Source: ABdhPJxlA2iPTTq7l61NQ24aG1Rfd36rohpws5RyYclCBb41Ve1nnCN3EGn1Kzu0uaQQTx7gStGCTg== X-Received: by 2002:a05:6638:1909:: with SMTP id p9mr9813960jal.108.1633734923215; Fri, 08 Oct 2021 16:15:23 -0700 (PDT) From: Warner Losh To: qemu-devel@nongnu.org Subject: [PATCH v2 04/15] bsd-user: TARGET_RESET define is unused, remove it Date: Fri, 8 Oct 2021 17:14:55 -0600 Message-Id: <20211008231506.17471-5-imp@bsdimp.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211008231506.17471-1-imp@bsdimp.com> References: <20211008231506.17471-1-imp@bsdimp.com> 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: none client-ip=2607:f8b0:4864:20::d2d; envelope-from=imp@bsdimp.com; helo=mail-io1-xd2d.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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: Kyle Evans , richard.henderson@linaro.org, Laurent Vivier , Warner Losh , f4bug@amsat.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1633735202315100003 Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Kyle Evans --- bsd-user/i386/target_arch_cpu.h | 2 -- bsd-user/x86_64/target_arch_cpu.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/bsd-user/i386/target_arch_cpu.h b/bsd-user/i386/target_arch_cp= u.h index 978e8066af..b28602adbb 100644 --- a/bsd-user/i386/target_arch_cpu.h +++ b/bsd-user/i386/target_arch_cpu.h @@ -23,8 +23,6 @@ =20 #define TARGET_DEFAULT_CPU_MODEL "qemu32" =20 -#define TARGET_CPU_RESET(cpu) - static inline void target_cpu_init(CPUX86State *env, struct target_pt_regs *regs) { diff --git a/bsd-user/x86_64/target_arch_cpu.h b/bsd-user/x86_64/target_arc= h_cpu.h index 5f5ee602f9..5172b230f0 100644 --- a/bsd-user/x86_64/target_arch_cpu.h +++ b/bsd-user/x86_64/target_arch_cpu.h @@ -23,8 +23,6 @@ =20 #define TARGET_DEFAULT_CPU_MODEL "qemu64" =20 -#define TARGET_CPU_RESET(cpu) - static inline void target_cpu_init(CPUX86State *env, struct target_pt_regs *regs) { --=20 2.32.0 From nobody Thu May 16 12:08:10 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1633735110235748.3907983802811; Fri, 8 Oct 2021 16:18:30 -0700 (PDT) Received: from localhost ([::1]:47422 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYz8H-00048b-8L for importer@patchew.org; Fri, 08 Oct 2021 19:18:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33870) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYz5L-0008Sn-8z for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:27 -0400 Received: from mail-io1-xd2e.google.com ([2607:f8b0:4864:20::d2e]:41912) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYz5J-0006hl-9z for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:26 -0400 Received: by mail-io1-xd2e.google.com with SMTP id q205so12406403iod.8 for ; Fri, 08 Oct 2021 16:15:24 -0700 (PDT) Received: from dune.bsdimp.com (50-253-99-174-static.hfc.comcastbusiness.net. [50.253.99.174]) by smtp.gmail.com with ESMTPSA id b15sm293628ion.8.2021.10.08.16.15.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 16:15:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZrY4IzgmSGF5kPEVygHrEE3pWr9J6Uh1T3Fv8vVqhP0=; b=3cZPnxKGWxmKm5CLZC8v+fi71QVQf97v8ylQ0bqGVxczUFKcOm2fXLryejrJ8dYTD6 NFMwah1wKGq49QN7/BduW91MgoeXbpvRlcpOIV5wpg4ovOwXC/hyWvn7KD3SX2A+yATd K2csMFwrh6t2Yx3vrS+pOJugLz3oo+Q0JUvTM0fNqsZeje08xoR7xx+RHv8aL8keM5Xl dzNJPzxBIaYQcNQIsw8Z/Ec00HzVQEllJs9p6yjU/QDb9ECsDWxEbTRS8cUs6PqdbFH3 MzpyM11VhULiyQ7RA3ZC7yOToy6fxurNV/lGY8eifuG5ShttUfLg+mSLmSL8H17Ck0fv OmnA== 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=ZrY4IzgmSGF5kPEVygHrEE3pWr9J6Uh1T3Fv8vVqhP0=; b=hVvsttiPP8wRKrgw9spl3+Z5GokhRfhJ8NktnX3yeg+Fx+Gt3NorwEtlMvlOO8fQg+ 1jz87c5tjgmQm/gKoOxdnpFubUHilO1qsKHi6kQsoGssnRbQGY9DS9YMb3NbbGltNaD6 nPg79XOeOg4SASo6bffzJSjRwc6Y+VVv7CQ8qS4GAKPPwngjld5eM+1tZB0eUq8Z63Xi EAfRfZSg7FrQePHnk+6VLvB4NJOIeo39JUPGR8fuRWWIuSNvyyMVZMXoNtEWw8sL+lBP qNTX7M+t4wEKEsZK55KBlPq48iZvrCWo2MD/0FB4xauAod6twcGjg29PdXbojcnEH0uF PZFg== X-Gm-Message-State: AOAM5317q8anfi914Hq8wBySLiAK1DzH/6Fgbp1pp4nkWPfOyT7LqqE0 ucyQ7u4uEuZA6699p9JKWx2aQ5eFeab1Uw== X-Google-Smtp-Source: ABdhPJzwYZ2eDXIDUtnM/Wbzy+S4xjsEkQLAiDPirevkZFIwh1he7JyXwio5IAa8EgP3ceO+Fl07og== X-Received: by 2002:a6b:3e04:: with SMTP id l4mr8300772ioa.19.1633734924050; Fri, 08 Oct 2021 16:15:24 -0700 (PDT) From: Warner Losh To: qemu-devel@nongnu.org Subject: [PATCH v2 05/15] bsd-user: export get_errno and is_error from syscall.c Date: Fri, 8 Oct 2021 17:14:56 -0600 Message-Id: <20211008231506.17471-6-imp@bsdimp.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211008231506.17471-1-imp@bsdimp.com> References: <20211008231506.17471-1-imp@bsdimp.com> 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: none client-ip=2607:f8b0:4864:20::d2e; envelope-from=imp@bsdimp.com; helo=mail-io1-xd2e.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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: Kyle Evans , richard.henderson@linaro.org, Laurent Vivier , Warner Losh , f4bug@amsat.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1633735111982100001 Make get_errno and is_error global so files other than syscall.c can use them. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Kyle Evans --- bsd-user/qemu.h | 4 ++++ bsd-user/syscall.c | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 522d6c4031..3b8475394c 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -235,6 +235,10 @@ extern unsigned long target_dflssiz; extern unsigned long target_maxssiz; extern unsigned long target_sgrowsiz; =20 +/* syscall.c */ +abi_long get_errno(abi_long ret); +bool is_error(abi_long ret); + /* user access */ =20 #define VERIFY_READ PAGE_READ diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c index 372836d44d..2fd2ba8330 100644 --- a/bsd-user/syscall.c +++ b/bsd-user/syscall.c @@ -33,18 +33,18 @@ static abi_ulong target_brk; static abi_ulong target_original_brk; =20 -static inline abi_long get_errno(abi_long ret) +abi_long get_errno(abi_long ret) { - if (ret =3D=3D -1) + if (ret =3D=3D -1) { /* XXX need to translate host -> target errnos here */ return -(errno); - else - return ret; + } + return ret; } =20 #define target_to_host_bitmask(x, tbl) (x) =20 -static inline int is_error(abi_long ret) +bool is_error(abi_long ret) { return (abi_ulong)ret >=3D (abi_ulong)(-4096); } --=20 2.32.0 From nobody Thu May 16 12:08:10 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1633735200091860.2843349532744; Fri, 8 Oct 2021 16:20:00 -0700 (PDT) Received: from localhost ([::1]:53944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYz9j-0008RH-1W for importer@patchew.org; Fri, 08 Oct 2021 19:19:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33896) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYz5M-00004r-Ei for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:28 -0400 Received: from mail-io1-xd2e.google.com ([2607:f8b0:4864:20::d2e]:34662) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYz5K-0006jP-Q8 for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:28 -0400 Received: by mail-io1-xd2e.google.com with SMTP id i189so4699644ioa.1 for ; Fri, 08 Oct 2021 16:15:26 -0700 (PDT) Received: from dune.bsdimp.com (50-253-99-174-static.hfc.comcastbusiness.net. [50.253.99.174]) by smtp.gmail.com with ESMTPSA id b15sm293628ion.8.2021.10.08.16.15.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 16:15:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DSuGwz93zTnJPuHkeKfY3uCmx4ow+sgYGpnTK4hqzWc=; b=uH5RmUPm7FgLWZfCSymdX07jjMKjXXqioft9yX3VkDHa8hvdYvVgO/+5skSJHFTygZ +r/LWaVaHktM4vLFi+Bxcjg3tqndbQIweNrL6KAQU8kSCEMaI1lvEmi3SBCogVOPuqV3 LYRfFwdN54I1xTu4mur+CMwgztAVJhHCeUTVhxlNAAHbQqvC7Jb5cnyj1ch99if+Nvnb Qfmd+/9QcP8Rwp+bK6ldtqZ4kTUyWEslbXCGgdPDOwlkag8GupaTsus4XYGO6VwhLCPL H9nEX7RBPj19Lp6ARm6hCNeBPPJD+yNNtUPv0dqK7LX9mg4CzFbm5vpV+AVOalTJnHwt K3JQ== 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=DSuGwz93zTnJPuHkeKfY3uCmx4ow+sgYGpnTK4hqzWc=; b=ZS33PJTC32Cw1oNzFsN0u9s3aMxJUZ0iTcd4JKPTFIy11fj+60oeY14x7GTeaL2PGp zPyd4p7QxBDMeSidOtysK46QFjbApOmE4U46dlsGHHU9EJDOWyWXPH/H54ear4Dxdd3u 12ibichCkd0wdrdwhtNtAOikiJNaV620hUvDlFNxvuOKeN3SvF3SHFAKxRG1C/RXFOR5 Jo8Tr+jaiDg8xe0S5v4O9n8wDqVGL1E9W4xhG12R8azuRoForVhGHwnUbaOrhc9vnlw5 QRNTOrPNDpiqBL12FY0Oo2W+M00P7G+sRi+ljTvgo4UQS9oYnq0qB4wkubh7wPEW71An NZrw== X-Gm-Message-State: AOAM530jbYCtwwGBt+DxmbI7y9v9SrqtBbK0emp+Ccp4Vkg9qnoXhlFw +M4aRxSvh7QiQRoyrAL9jtPK2M7fpI1mXA== X-Google-Smtp-Source: ABdhPJwcv3c6utH5KWheqfUt3Etop/1MmYUq6/pBTcYNJKGL6/4JQvgqRwvkY8/Aosf9mdADDo/ccw== X-Received: by 2002:a6b:cd87:: with SMTP id d129mr9096114iog.28.1633734925347; Fri, 08 Oct 2021 16:15:25 -0700 (PDT) From: Warner Losh To: qemu-devel@nongnu.org Subject: [PATCH v2 06/15] bsd-user/errno_defs.h: Add internal error numbers Date: Fri, 8 Oct 2021 17:14:57 -0600 Message-Id: <20211008231506.17471-7-imp@bsdimp.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211008231506.17471-1-imp@bsdimp.com> References: <20211008231506.17471-1-imp@bsdimp.com> 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: none client-ip=2607:f8b0:4864:20::d2e; envelope-from=imp@bsdimp.com; helo=mail-io1-xd2e.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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: Stacey Son , Kyle Evans , richard.henderson@linaro.org, Laurent Vivier , f4bug@amsat.org, Warner Losh Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1633735202123100001 Content-Type: text/plain; charset="utf-8" From: Stacey Son To emulate signals and interrupted system calls, we need to have the same mechanisms we have in the kernel, including these errno values. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Kyle Evans --- bsd-user/errno_defs.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/bsd-user/errno_defs.h b/bsd-user/errno_defs.h index 1efa502a12..b538dd93da 100644 --- a/bsd-user/errno_defs.h +++ b/bsd-user/errno_defs.h @@ -1,6 +1,3 @@ -/* $OpenBSD: errno.h,v 1.20 2007/09/03 14:37:52 millert Exp $ */ -/* $NetBSD: errno.h,v 1.10 1996/01/20 01:33:53 jtc Exp $ */ - /* * Copyright (c) 1982, 1986, 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -37,6 +34,9 @@ * @(#)errno.h 8.5 (Berkeley) 1/21/94 */ =20 +#ifndef _ERRNO_DEFS_H_ +#define _ERRNO_DEFS_H_ + #define TARGET_EPERM 1 /* Operation not permitted= */ #define TARGET_ENOENT 2 /* No such file or directo= ry */ #define TARGET_ESRCH 3 /* No such process */ @@ -147,3 +147,11 @@ #define TARGET_EIDRM 89 /* Identifier removed */ #define TARGET_ENOMSG 90 /* No message of desired t= ype */ #define TARGET_ELAST 90 /* Must be equal largest e= rrno */ + +/* Internal errors: */ +#define TARGET_EJUSTRETURN 254 /* Just return without + modifing regs */ +#define TARGET_ERESTART 255 /* Restart syscall */ +#define TARGET_ERESTARTSYS TARGET_ERESTART /* Linux compat */ + +#endif /* ! _ERRNO_DEFS_H_ */ --=20 2.32.0 From nobody Thu May 16 12:08:10 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1633735369559702.8713871388966; Fri, 8 Oct 2021 16:22:49 -0700 (PDT) Received: from localhost ([::1]:34212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYzCS-0005k9-8s for importer@patchew.org; Fri, 08 Oct 2021 19:22:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33922) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYz5N-00007L-EU for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:29 -0400 Received: from mail-il1-x133.google.com ([2607:f8b0:4864:20::133]:34718) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYz5L-0006kD-Mo for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:29 -0400 Received: by mail-il1-x133.google.com with SMTP id g2so10428672ild.1 for ; Fri, 08 Oct 2021 16:15:27 -0700 (PDT) Received: from dune.bsdimp.com (50-253-99-174-static.hfc.comcastbusiness.net. [50.253.99.174]) by smtp.gmail.com with ESMTPSA id b15sm293628ion.8.2021.10.08.16.15.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 16:15:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lzsrSCdLmohaYjA922DztDXVjy0WqIWWd5Kt064dJN8=; b=OwjzKyqK69ktQxrE9ksfkFtKM1o6sQUm8szL+e3uhzDqi/L8Tpmi7QBe21Sd1khvPz 8UKLnnkrV5lf72v4y2JFPFsY0oJhKCeOfC6pm1JFwhaGvCaidxZJBm1RITXr3MuRCQGU L+ihAQDItmwq7jCiczj/Q9dS/eUJ5/p86YM+VSh04onwRkyoMLzlP9pT8WvI13W/X9bh 0qgoZznzeUwjlrfn/9Z+TiT1Fssf01EDsNh4HLk5djqZVByAq0SkyPkHUTRaQKP4zIfB N+qJs8I7HIUT/qC54W5/19jm/1v2CPVvfS9bQXdU+8o+XArSv5eH0Zjh93lWfN8z5Bu2 6YKA== 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=lzsrSCdLmohaYjA922DztDXVjy0WqIWWd5Kt064dJN8=; b=MzD25YGwQiYGdHd7/M5zhdGA+0LCnksNFnWAGy16yZk0dj0DGy3wsf/p+1ju7w1bD9 5ArrVu9bdra0RFE16sV2Q1xW6iiY0fONA21Hc8D/XMLDv3TFi8CQFdZndgypMnQ07e7I PEFM4RpGF2YW39mDrNsqUQ/SuYyYeV3UenqVzR2al5MjlNWUFedWIXV53aZv904QRYEz y9REaD9SYZtDrkFvI6U/yZNGhmLGQsx5uxVgdSgiRVAMnW2fxX4AL3Upd7Z+vH1Nkcz3 u8fY3k27Xb8dozFB+3ZVT8T4gsfmpvgejSM313uqIPCTBM+Aw5N4HI6Wp5oTUaBO8afk wX/Q== X-Gm-Message-State: AOAM531xIZURs3Xqhoj0wcnu8dz6CoVduZZNdnWUyu0/jQxjtP16ELxF DSWXtQ5064SdLlXJ9Vy7ylbi9B/k84/9Yw== X-Google-Smtp-Source: ABdhPJyIV44JhG4RTYAtxV//wAg9McuGVxlREdySk8yY0uhNLUctxEIDOBdmIfb9RdPiHPMWupdl5g== X-Received: by 2002:a05:6e02:1a27:: with SMTP id g7mr9831937ile.123.1633734926238; Fri, 08 Oct 2021 16:15:26 -0700 (PDT) From: Warner Losh To: qemu-devel@nongnu.org Subject: [PATCH v2 07/15] bsd-user: move TARGET_MC_GET_CLEAR_RET to target_os_signal.h Date: Fri, 8 Oct 2021 17:14:58 -0600 Message-Id: <20211008231506.17471-8-imp@bsdimp.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211008231506.17471-1-imp@bsdimp.com> References: <20211008231506.17471-1-imp@bsdimp.com> 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: none client-ip=2607:f8b0:4864:20::133; envelope-from=imp@bsdimp.com; helo=mail-il1-x133.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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: Kyle Evans , richard.henderson@linaro.org, Laurent Vivier , Warner Losh , f4bug@amsat.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1633735370979100001 Move TARGET_MC_GET_CLEAR_RET to freebsd/target_os_signal.h since it's architecture agnostic on FreeBSD. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Kyle Evans --- bsd-user/freebsd/target_os_signal.h | 3 +++ bsd-user/i386/target_arch_signal.h | 2 -- bsd-user/x86_64/target_arch_signal.h | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/bsd-user/freebsd/target_os_signal.h b/bsd-user/freebsd/target_= os_signal.h index 3ed454e086..1a4c5faf19 100644 --- a/bsd-user/freebsd/target_os_signal.h +++ b/bsd-user/freebsd/target_os_signal.h @@ -1,6 +1,9 @@ #ifndef _TARGET_OS_SIGNAL_H_ #define _TARGET_OS_SIGNAL_H_ =20 +/* FreeBSD's sys/ucontext.h defines this */ +#define TARGET_MC_GET_CLEAR_RET 0x0001 + #include "target_os_siginfo.h" #include "target_arch_signal.h" =20 diff --git a/bsd-user/i386/target_arch_signal.h b/bsd-user/i386/target_arch= _signal.h index 9812c6b034..a90750d602 100644 --- a/bsd-user/i386/target_arch_signal.h +++ b/bsd-user/i386/target_arch_signal.h @@ -27,8 +27,6 @@ #define TARGET_MINSIGSTKSZ (512 * 4) /* min sig stack size = */ #define TARGET_SIGSTKSZ (MINSIGSTKSZ + 32768) /* recommended size */ =20 -#define TARGET_MC_GET_CLEAR_RET 0x0001 - struct target_sigcontext { /* to be added */ }; diff --git a/bsd-user/x86_64/target_arch_signal.h b/bsd-user/x86_64/target_= arch_signal.h index 4c1ff0e5ba..4bb753b08b 100644 --- a/bsd-user/x86_64/target_arch_signal.h +++ b/bsd-user/x86_64/target_arch_signal.h @@ -27,8 +27,6 @@ #define TARGET_MINSIGSTKSZ (512 * 4) /* min sig stack size = */ #define TARGET_SIGSTKSZ (MINSIGSTKSZ + 32768) /* recommended size */ =20 -#define TARGET_MC_GET_CLEAR_RET 0x0001 - struct target_sigcontext { /* to be added */ }; --=20 2.32.0 From nobody Thu May 16 12:08:10 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1633735206400708.0631832016865; Fri, 8 Oct 2021 16:20:06 -0700 (PDT) Received: from localhost ([::1]:54372 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYz9p-0000J5-CE for importer@patchew.org; Fri, 08 Oct 2021 19:20:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYz5N-00008W-RB for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:29 -0400 Received: from mail-il1-x133.google.com ([2607:f8b0:4864:20::133]:37472) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYz5M-0006kp-8G for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:29 -0400 Received: by mail-il1-x133.google.com with SMTP id i13so11515240ilm.4 for ; Fri, 08 Oct 2021 16:15:27 -0700 (PDT) Received: from dune.bsdimp.com (50-253-99-174-static.hfc.comcastbusiness.net. [50.253.99.174]) by smtp.gmail.com with ESMTPSA id b15sm293628ion.8.2021.10.08.16.15.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 16:15:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tC2oq89wBfOJKjYnjMrgrMvZ3iT23Ggo33hVTxbERVQ=; b=2u0l1D99B1Sy2oEo0LEEE4N8kU3m2MuY4wXhT46d8dh9IKVnFa0dOU9CpNz+ZZyNzl 2Tvu/IDjMkthks4VG3cutlC0CKydfes9lLUt28KDyg60ha/AWGX9oNq2w3V3a+29eIhT AaWVxSUSOQF36K1oT31z5UC8uEz/wI1l8blTeOT/IC6rlPJVvC6SMC0hgDtOrF2IIE+i iekvcIhL6icVmhYfPMc74zXlYNDT4sKkl58BwRqu690e1pjlOnwCdsn5h1pMU4SmoZM+ +WJEv6exnjv335Lr0ZfzoGGzFZBCz+SoPfTpM47haSlZnt82wcVDP0FnWXvtB5hjUgd8 cNJA== 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=tC2oq89wBfOJKjYnjMrgrMvZ3iT23Ggo33hVTxbERVQ=; b=v7mD3c42CWh7D3FN3pbsYHvDTCI2AuR1pPDR3iOULXYsvS+tFIfGBLVHy8/yUImzhO Doo/7ww41pI4iBSd/VBHwf32Q8a9iAGNjhoGOZrFdruDZvbFqIou4vFzK0KmJbJGSo+4 SYUBcB3L2FX8GoWXRmsXAZS+oxBoAiWURSdWj5JWVmTSQ+l25y9Be7cf2aiL0O/ojwzl 94THRfjk2ZJMAZj/Uy0sj9yN7EcCh9a+6M2eIA8BvQ6VRU9CqFrl53skd04TMR72goJ0 2yN9XcFc+OIHYBF2G4GAc/Nhpp8cJHcw3oG65MCMjCAx7xyRTJsyr5HnM92ItuMUWBBZ hxEQ== X-Gm-Message-State: AOAM530kEKNmThRd+F050TshI5NRxafuJ3DDmmv1dgDeZexghjhcxE9c wkTVmHbN+aHkCROdBEWsG9lMp/tKhQYaBA== X-Google-Smtp-Source: ABdhPJyy2+1a01tSTkYJhTbdSIii+hQ89/zhM68eKY3uaRSF8jOzxF4uYrX8Axah9UtShA9fZ1aN7A== X-Received: by 2002:a05:6e02:1c41:: with SMTP id d1mr9834112ilg.31.1633734926945; Fri, 08 Oct 2021 16:15:26 -0700 (PDT) From: Warner Losh To: qemu-devel@nongnu.org Subject: [PATCH v2 08/15] bsd-user/target_os_elf.h: Remove fallback ELF_HWCAP and reorder Date: Fri, 8 Oct 2021 17:14:59 -0600 Message-Id: <20211008231506.17471-9-imp@bsdimp.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211008231506.17471-1-imp@bsdimp.com> References: <20211008231506.17471-1-imp@bsdimp.com> 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: none client-ip=2607:f8b0:4864:20::133; envelope-from=imp@bsdimp.com; helo=mail-il1-x133.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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: Kyle Evans , richard.henderson@linaro.org, Laurent Vivier , Warner Losh , f4bug@amsat.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1633735206644100001 All architectures have a ELF_HWCAP, so remove the fallback ifdef. Place ELF_HWCAP in the same order as on native FreeBSD. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Kyle Evans --- bsd-user/freebsd/target_os_elf.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/bsd-user/freebsd/target_os_elf.h b/bsd-user/freebsd/target_os_= elf.h index 2d03a883aa..adcffd1ddb 100644 --- a/bsd-user/freebsd/target_os_elf.h +++ b/bsd-user/freebsd/target_os_elf.h @@ -38,10 +38,6 @@ #define ELF_PLATFORM (NULL) #endif =20 -#ifndef ELF_HWCAP -#define ELF_HWCAP 0 -#endif - /* XXX Look at the other conflicting AT_* values. */ #define FREEBSD_AT_NCPUS 19 #define FREEBSD_AT_HWCAP 25 @@ -114,12 +110,12 @@ static abi_ulong target_create_elf_tables(abi_ulong p= , int argc, int envc, NEW_AUX_ENT(AT_FLAGS, (abi_ulong)0); NEW_AUX_ENT(FREEBSD_AT_NCPUS, (abi_ulong)bsd_get_ncpu()); NEW_AUX_ENT(AT_ENTRY, load_bias + exec->e_entry); + features =3D ELF_HWCAP; + NEW_AUX_ENT(FREEBSD_AT_HWCAP, features); NEW_AUX_ENT(AT_UID, (abi_ulong)getuid()); NEW_AUX_ENT(AT_EUID, (abi_ulong)geteuid()); NEW_AUX_ENT(AT_GID, (abi_ulong)getgid()); NEW_AUX_ENT(AT_EGID, (abi_ulong)getegid()); - features =3D ELF_HWCAP; - NEW_AUX_ENT(FREEBSD_AT_HWCAP, features); target_auxents =3D sp; /* Note where the aux entries are in the ta= rget */ #ifdef ARCH_DLINFO /* --=20 2.32.0 From nobody Thu May 16 12:08:10 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16337352468209.220646241794952; Fri, 8 Oct 2021 16:20:46 -0700 (PDT) Received: from localhost ([::1]:55766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYzAT-0001FM-SI for importer@patchew.org; Fri, 08 Oct 2021 19:20:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYz5O-0000BD-QN for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:30 -0400 Received: from mail-il1-x134.google.com ([2607:f8b0:4864:20::134]:34719) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYz5N-0006mF-6f for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:30 -0400 Received: by mail-il1-x134.google.com with SMTP id g2so10428714ild.1 for ; Fri, 08 Oct 2021 16:15:28 -0700 (PDT) Received: from dune.bsdimp.com (50-253-99-174-static.hfc.comcastbusiness.net. [50.253.99.174]) by smtp.gmail.com with ESMTPSA id b15sm293628ion.8.2021.10.08.16.15.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 16:15:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NJfk0n48BOWpkXyZ5ySu54DMX1fxRfS+CzrpXRoYLXM=; b=bFPq7nzdSU3QwNZxVJNiQOpzPSrZbqywqf15GuAcPuQz0bAhr0EvvdXKYGLQvAwmIO T2HqCBKexioF2jdN2jnToSos9vJhfPduXCwo+X4N8EP5spB7KJZzasZHl3LHe5Wd3yRh LG/4SYeIxGBvTUmHzeiBs1aBKYTSZo2Lk+dSfBqKUhPDbEjUMvkCgPNdIF4oe9XkViW3 mniCusOchXF6mwyslxkAorEo9ZMvP8YOIqufDeel8zYkHuXh1MKDZNX8faprc+yxsVje jANXkCJX7ISUeUBZoC3zsh+CASPukKj1K19LvaqlFxtmk/3u1RgZb3xaGVp5vvRBu0Nm Gtlg== 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=NJfk0n48BOWpkXyZ5ySu54DMX1fxRfS+CzrpXRoYLXM=; b=yhh1g7cZgbsTcPeQnU8zJ9ZadPd070klyhLlgSAgGnAqfQDyVQgqJI1ZJMpprZmf8w OdFykB33yim+ZkI8/jBi/7S0PJAyGklNcvUJXBcN18R5t/IfckFkr/XQACk6t2SjxriM rYfBc/kBXeIswpytK1yyTP4zJyjMUsFB+UDSBrvzog1qm+iEXPiFdIDEQNW8CV0Wexpn qWtwMIDFT91sXmTT8uQQCVuAYTzdRWKiz616s9SCrRsfSbuLciYbRNOPVvo20iJsQLRz RkWTnGhlL4g9ep/RXMcItczkd7zPHWR/BKHQB5XoD4WgSBHShLKzJ/eN8QtAPDIgXZNa 13+w== X-Gm-Message-State: AOAM533ANW8ztQQYgnQYCKaIWzTIXP3mUXEpeswUEw7NTHoa655uIP+x Qzr11IElRd6DJ3AzSEeIqT8wxwJhbklltg== X-Google-Smtp-Source: ABdhPJxNYULUinJlu5icgJaIzNgFJaD8SrAgALj96HxGqBXGrLQCeSAOki7O/ciJrzA4gI8UJPYatA== X-Received: by 2002:a05:6e02:1bee:: with SMTP id y14mr10370585ilv.21.1633734927901; Fri, 08 Oct 2021 16:15:27 -0700 (PDT) From: Warner Losh To: qemu-devel@nongnu.org Subject: [PATCH v2 09/15] bsd-user/target_os_elf: If ELF_HWCAP2 is defined, publish it Date: Fri, 8 Oct 2021 17:15:00 -0600 Message-Id: <20211008231506.17471-10-imp@bsdimp.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211008231506.17471-1-imp@bsdimp.com> References: <20211008231506.17471-1-imp@bsdimp.com> 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: none client-ip=2607:f8b0:4864:20::134; envelope-from=imp@bsdimp.com; helo=mail-il1-x134.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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: Kyle Evans , richard.henderson@linaro.org, Laurent Vivier , Warner Losh , f4bug@amsat.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1633735248914100001 Some architectures publish AT_HWCAP2 as well as AT_HWCAP. Those architectures will define ELF_HWCAP2 in their target_arch_elf.h files for the value for this process. If it is defined, then publish it. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Kyle Evans --- bsd-user/freebsd/target_os_elf.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bsd-user/freebsd/target_os_elf.h b/bsd-user/freebsd/target_os_= elf.h index adcffd1ddb..e5ac8e8e50 100644 --- a/bsd-user/freebsd/target_os_elf.h +++ b/bsd-user/freebsd/target_os_elf.h @@ -112,6 +112,10 @@ static abi_ulong target_create_elf_tables(abi_ulong p,= int argc, int envc, NEW_AUX_ENT(AT_ENTRY, load_bias + exec->e_entry); features =3D ELF_HWCAP; NEW_AUX_ENT(FREEBSD_AT_HWCAP, features); +#ifdef ELF_HWCAP2 + features =3D ELF_HWCAP2; + NEW_AUX_ENT(FREEBSD_AT_HWCAP2, features); +#endif NEW_AUX_ENT(AT_UID, (abi_ulong)getuid()); NEW_AUX_ENT(AT_EUID, (abi_ulong)geteuid()); NEW_AUX_ENT(AT_GID, (abi_ulong)getgid()); --=20 2.32.0 From nobody Thu May 16 12:08:10 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1633735407956527.6282551739009; Fri, 8 Oct 2021 16:23:27 -0700 (PDT) Received: from localhost ([::1]:35990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYzD4-0006xi-Pd for importer@patchew.org; Fri, 08 Oct 2021 19:23:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33962) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYz5Q-0000D0-HK for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:32 -0400 Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]:35543) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYz5N-0006n1-U6 for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:32 -0400 Received: by mail-io1-xd2b.google.com with SMTP id b78so12441603iof.2 for ; Fri, 08 Oct 2021 16:15:29 -0700 (PDT) Received: from dune.bsdimp.com (50-253-99-174-static.hfc.comcastbusiness.net. [50.253.99.174]) by smtp.gmail.com with ESMTPSA id b15sm293628ion.8.2021.10.08.16.15.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 16:15:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vH3A6hCjitY3ABsVB710hfZ64cv7ryaJ9SdUFmCZAKM=; b=o/KcXRuI43t5YMgbYHSWSMioDUHcUyyShczAmRxJlMO626upZ4a2znNdCSseT4Hjdd 7DZa6ah8aS45u+YuTqQRL7ZNKT+OF7mmCweEWsjw94PfJxexUnfRSNZCumWGkj2wvbAh ftZAFVahtRKroPf5E9QRYlTBlG0lvxvYJATBzOfVx6PjUBFdbJ5vZ5dwfvEGJn2nEj+L nc9JSgtifxZUnkef1zA/bHVwD4iMd6LAtKJkXJp/hxBGLk7jESwjzkpXb+jLjqCMdFek Z8NwG/zyN7l5fUYYVcL2Z1EW9wua7Z1i94Df/2N8LoVnR2HDsfPob46alDfvlAvc8VHJ 1iaQ== 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=vH3A6hCjitY3ABsVB710hfZ64cv7ryaJ9SdUFmCZAKM=; b=koUZj8ua7hHxaq7niaY0U+SnUn5oVzYevbj3+F8KYBIsB6NE9DXAz4LY0ZeWMwTnTU MgGsD5gz/qu2SSOjXljg/ZbNUbsXrpCwZmeN9wT4JQqv2UvDRdLcAWpAq44PxCTZdklH GBGvja/K9S/HYc1yD7vPWxvV6SzNJStZlivuvqLTu11eiUddKpdCoS6+CIE/DkG9PKMZ d5u60vBCcP7Y3R9y6kh+pmvbl4pks/VlkiQbTV6bz+hyxZTd/KS8PfkNdGcWI+lr+qlF P7RYbV5c/tMPH/9Zp1FO4UbARsnqVwLVgZs3/Rn9qbVX1yWoZWQSYJejOJWf/G9MxPt/ 7mIQ== X-Gm-Message-State: AOAM533yTGTWVF50qW2gEpYsJmy4kE3tJNDXkmSF2RdT7Twl7jSVTtFZ AYpuXse5hi2LO7lb4bVMzH6ExknZVGAvaA== X-Google-Smtp-Source: ABdhPJz0Z5EDEP9XaGlmpxC6yjzGDao2GJJJmAMJXkAkLUrjlu2IQanfGVWHqADooChOgym/QzoLbA== X-Received: by 2002:a05:6638:4192:: with SMTP id az18mr9582685jab.78.1633734928667; Fri, 08 Oct 2021 16:15:28 -0700 (PDT) From: Warner Losh To: qemu-devel@nongnu.org Subject: [PATCH v2 10/15] bsd-user: Remove used from TaskState Date: Fri, 8 Oct 2021 17:15:01 -0600 Message-Id: <20211008231506.17471-11-imp@bsdimp.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211008231506.17471-1-imp@bsdimp.com> References: <20211008231506.17471-1-imp@bsdimp.com> 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: none client-ip=2607:f8b0:4864:20::d2b; envelope-from=imp@bsdimp.com; helo=mail-io1-xd2b.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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: Kyle Evans , richard.henderson@linaro.org, Laurent Vivier , Warner Losh , f4bug@amsat.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1633735409799100001 The 'used' field in TaskState is write only. Remove it from TaskState. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Kyle Evans --- bsd-user/main.c | 1 - bsd-user/qemu.h | 1 - 2 files changed, 2 deletions(-) diff --git a/bsd-user/main.c b/bsd-user/main.c index 48643eeabc..ee84554854 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -210,7 +210,6 @@ void init_task_state(TaskState *ts) { int i; =20 - ts->used =3D 1; ts->first_free =3D ts->sigqueue_table; for (i =3D 0; i < MAX_SIGQUEUE_SIZE - 1; i++) { ts->sigqueue_table[i].next =3D &ts->sigqueue_table[i + 1]; diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 3b8475394c..c1170f14d9 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -92,7 +92,6 @@ typedef struct TaskState { =20 struct TaskState *next; struct bsd_binprm *bprm; - int used; /* non zero if used */ struct image_info *info; =20 struct emulated_sigtable sigtab[TARGET_NSIG]; --=20 2.32.0 From nobody Thu May 16 12:08:10 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1633735469536972.7507647469631; Fri, 8 Oct 2021 16:24:29 -0700 (PDT) Received: from localhost ([::1]:40882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYzE4-0001lX-Jf for importer@patchew.org; Fri, 08 Oct 2021 19:24:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYz5W-0000HR-Kf for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:40 -0400 Received: from mail-il1-x136.google.com ([2607:f8b0:4864:20::136]:43727) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYz5Q-0006o0-3b for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:37 -0400 Received: by mail-il1-x136.google.com with SMTP id h11so3757473ila.10 for ; Fri, 08 Oct 2021 16:15:31 -0700 (PDT) Received: from dune.bsdimp.com (50-253-99-174-static.hfc.comcastbusiness.net. [50.253.99.174]) by smtp.gmail.com with ESMTPSA id b15sm293628ion.8.2021.10.08.16.15.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 16:15:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VlZFGEcJ9mFJTqjW2+vGMQhKRbnVgW4Kcl7j68uvzJM=; b=Z8ercKG5/yEUUIvjZEBZoHF9V6lZWtrZv3C+CqN3TrC62SLMIFX4xNlwZiw2qriqCI J2SruZvtF2jDxHtCs2w+S7vfxquxQWkfeM37RQPGEGZn9wC+8QKTTTdkwSBtgrUCQGub w2+8VAmZCS+NNqvjUgVwwjvLyocqDAGoGwvFp9cXon2T59ML94TiAnOoriIpvgZpng8U E0Z+f2ojwoAlHf8Vc0MDLODwTV0QWyfOm/sd8j/IILPxiFgxbUZv707aBOg0DPT+QE08 56TD2ueIkuNwD4Pm6eQ/m+qKwfdicGCyFpBSGCW+3VJAr82S+8ptK8WlG2l8dl6N3o0V Aomg== 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=VlZFGEcJ9mFJTqjW2+vGMQhKRbnVgW4Kcl7j68uvzJM=; b=Yi5UaUNkvGXOvw0mtZvdGs43tDw+El1FdTgKSKeYJlUk0Wp3uvsK8NCrzFJRzY1PGV qdkgWSXHYbX5uySaLv8nlZz0xnwWS9BABmXBlXginyDDxu+o+CdrhVtj7LXBC1GMw1HE IzYjh5R3pyL3ZtHamMSrbPKMs8MtnwFo/zArMNscmRUgz/RuVOwXpT4XSfxd1ZODrbaf ivu30uqlz4K9VOXSs/aKTsuPRSz9QwZZH+xvUXBg8eWJZyIbL4dzeXb9URka104yb/Ye vEXzPaQ2GOd89WUnvVeJEHZgBwH4mmtykEiFqpvarPePt5Zj2XwCZy1tGFmLg5IePSuj aTXA== X-Gm-Message-State: AOAM532PReWdykaYk9XL/icTEMbkbhpmFwwyVng12UCaGhXeo33Pa1gc /yaKAd4Sym5SPWgFPfners9pzc7KdvWf6Q== X-Google-Smtp-Source: ABdhPJzS9sPXv5zgsHzNCVfS3UV3qOchQtg3j7BzQqM8Ly7W7U7HlMZKbydC+ViNAQTR+QFiprxsJQ== X-Received: by 2002:a05:6e02:178f:: with SMTP id y15mr10320026ilu.175.1633734929794; Fri, 08 Oct 2021 16:15:29 -0700 (PDT) From: Warner Losh To: qemu-devel@nongnu.org Subject: [PATCH v2 11/15] bsd-user: Add stop_all_tasks Date: Fri, 8 Oct 2021 17:15:02 -0600 Message-Id: <20211008231506.17471-12-imp@bsdimp.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211008231506.17471-1-imp@bsdimp.com> References: <20211008231506.17471-1-imp@bsdimp.com> 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: none client-ip=2607:f8b0:4864:20::136; envelope-from=imp@bsdimp.com; helo=mail-il1-x136.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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: Stacey Son , Kyle Evans , richard.henderson@linaro.org, Laurent Vivier , f4bug@amsat.org, Warner Losh Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1633735469876100001 Content-Type: text/plain; charset="utf-8" Similar to the same function in linux-user: this stops all the current task= s. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Richard Henderson --- bsd-user/main.c | 9 +++++++++ bsd-user/qemu.h | 1 + 2 files changed, 10 insertions(+) diff --git a/bsd-user/main.c b/bsd-user/main.c index ee84554854..cb5ea40236 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -195,6 +195,15 @@ static void usage(void) =20 __thread CPUState *thread_cpu; =20 +void stop_all_tasks(void) +{ + /* + * We trust when using NPTL (pthreads) start_exclusive() handles thread + * stopping correctly. + */ + start_exclusive(); +} + bool qemu_cpu_is_self(CPUState *cpu) { return thread_cpu =3D=3D cpu; diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index c1170f14d9..cdb85140f4 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -103,6 +103,7 @@ typedef struct TaskState { } __attribute__((aligned(16))) TaskState; =20 void init_task_state(TaskState *ts); +void stop_all_tasks(void); extern const char *qemu_uname_release; =20 /* --=20 2.32.0 From nobody Thu May 16 12:08:10 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1633735502632132.60558873164052; Fri, 8 Oct 2021 16:25:02 -0700 (PDT) Received: from localhost ([::1]:41716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYzEb-0002Jn-AM for importer@patchew.org; Fri, 08 Oct 2021 19:25:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYz5R-0000FZ-Vj for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:34 -0400 Received: from mail-il1-x129.google.com ([2607:f8b0:4864:20::129]:46972) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYz5P-0006p8-Si for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:33 -0400 Received: by mail-il1-x129.google.com with SMTP id w10so11478468ilc.13 for ; Fri, 08 Oct 2021 16:15:31 -0700 (PDT) Received: from dune.bsdimp.com (50-253-99-174-static.hfc.comcastbusiness.net. [50.253.99.174]) by smtp.gmail.com with ESMTPSA id b15sm293628ion.8.2021.10.08.16.15.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 16:15:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=E1dDLXIS3VU8edOJUSfrWs60E6rqxuCQQWruLcK+nTs=; b=f4RT7OZCqRmIDuvfQY54SMImALD6uFvqodReJ2EV6V2ZEvwpOMBMoeXHz/bvauIena uuPLmhtoX8XvgbhxdBm8cq4XxCPLb13XnMowrcKdt+4SgBKKlYuHiT6PQ8CBXlp37WE+ 97j72nR8GEWm00vWpwpp2/el5cDuNCRlwdCrYCgvEoA8SvpbA+Ee3fPuH3LH+LBjLV6b PoyqiJvmdcaIAzSzXB8LrwX+5bZ9IG9BeGKcbJ3hb5cGvgsfvN5PdbuczSJM/C6ZDiGn xVJWhKE5l13AzrR4nY84nH5GANDMd+LwJ1m4Ob7O06rczWdrHzv4hWm14++G8H0Z2Em8 ehow== 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=E1dDLXIS3VU8edOJUSfrWs60E6rqxuCQQWruLcK+nTs=; b=DnCJQlE+3haXiclptg6PwtDYb5rPPwdPY17foviQFVmZw2Eig/bQ0tW+joHAUMyPcF x/KBhTz5Sm5J0lv5CyidezGh9NeQgwDN32Fy8p6CC4hqyCcVMMBpinD+XDZFxKQRPob/ vtFb/joDZCqMkPLPfBtn84Cx6RmzudMSCWPmwgeRRUHov4pa/zgIVc7yn2BLHg0sbHJo W2E1t3W6SWA8bAcSOrygII9iFnHeQZ6IAkg/+Us99Wxl55qoUTlsHMknPnt8WM/hebOO tL1SdtwOAB+Xyp/8ziNGMkZ8HownFvdDzbDLtNZTg5yxJKtpTDz667gKUqelqHqYHZSJ XONA== X-Gm-Message-State: AOAM530EpgXGXI6H8bs9/bqwyYxrUbh+J+k4+RFJ6m+i1g91Syo1ZJcU Ywbw0b30dxF+m4bmpbkiNugEKIGKrRjxKA== X-Google-Smtp-Source: ABdhPJx8uhFQ4eP4CzUFnH+qX3AcFU1E0U5/+4JBDzPEN0evhprEqIztRZwybnYsSzjorGdAG+QOFg== X-Received: by 2002:a92:c56e:: with SMTP id b14mr9719641ilj.71.1633734930531; Fri, 08 Oct 2021 16:15:30 -0700 (PDT) From: Warner Losh To: qemu-devel@nongnu.org Subject: [PATCH v2 12/15] bsd-user/sysarch: Move to using do_freebsd_arch_sysarch interface Date: Fri, 8 Oct 2021 17:15:03 -0600 Message-Id: <20211008231506.17471-13-imp@bsdimp.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211008231506.17471-1-imp@bsdimp.com> References: <20211008231506.17471-1-imp@bsdimp.com> 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: none client-ip=2607:f8b0:4864:20::129; envelope-from=imp@bsdimp.com; helo=mail-il1-x129.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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: Kyle Evans , richard.henderson@linaro.org, Laurent Vivier , Warner Losh , f4bug@amsat.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1633735503110100001 Content-Type: text/plain; charset="utf-8" do_freebsd_arch_sysarch() exists in $ARCH/target_arch_sysarch.h for x86. Call it from do_freebsd_sysarch() and remove the mostly duplicate version in syscall.c. Future changes will move it to os-sys.c and support other architectures. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Kyle Evans --- bsd-user/syscall.c | 45 +-------------------------------------------- 1 file changed, 1 insertion(+), 44 deletions(-) diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c index 2fd2ba8330..d3b9f431e2 100644 --- a/bsd-user/syscall.c +++ b/bsd-user/syscall.c @@ -91,50 +91,7 @@ static abi_long do_obreak(abi_ulong new_brk) #if defined(TARGET_I386) static abi_long do_freebsd_sysarch(CPUX86State *env, int op, abi_ulong par= ms) { - abi_long ret =3D 0; - abi_ulong val; - int idx; - - switch (op) { -#ifdef TARGET_ABI32 - case TARGET_FREEBSD_I386_SET_GSBASE: - case TARGET_FREEBSD_I386_SET_FSBASE: - if (op =3D=3D TARGET_FREEBSD_I386_SET_GSBASE) -#else - case TARGET_FREEBSD_AMD64_SET_GSBASE: - case TARGET_FREEBSD_AMD64_SET_FSBASE: - if (op =3D=3D TARGET_FREEBSD_AMD64_SET_GSBASE) -#endif - idx =3D R_GS; - else - idx =3D R_FS; - if (get_user(val, parms, abi_ulong)) - return -TARGET_EFAULT; - cpu_x86_load_seg(env, idx, 0); - env->segs[idx].base =3D val; - break; -#ifdef TARGET_ABI32 - case TARGET_FREEBSD_I386_GET_GSBASE: - case TARGET_FREEBSD_I386_GET_FSBASE: - if (op =3D=3D TARGET_FREEBSD_I386_GET_GSBASE) -#else - case TARGET_FREEBSD_AMD64_GET_GSBASE: - case TARGET_FREEBSD_AMD64_GET_FSBASE: - if (op =3D=3D TARGET_FREEBSD_AMD64_GET_GSBASE) -#endif - idx =3D R_GS; - else - idx =3D R_FS; - val =3D env->segs[idx].base; - if (put_user(val, parms, abi_ulong)) - return -TARGET_EFAULT; - break; - /* XXX handle the others... */ - default: - ret =3D -TARGET_EINVAL; - break; - } - return ret; + do_freebsd_arch_sysarch(env, op, parms); } #endif =20 --=20 2.32.0 From nobody Thu May 16 12:08:10 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1633735369558724.9358612841313; Fri, 8 Oct 2021 16:22:49 -0700 (PDT) Received: from localhost ([::1]:34262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYzCS-0005lz-7N for importer@patchew.org; Fri, 08 Oct 2021 19:22:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYz5W-0000IW-PK for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:40 -0400 Received: from mail-io1-xd2f.google.com ([2607:f8b0:4864:20::d2f]:35547) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYz5R-0006rL-1R for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:38 -0400 Received: by mail-io1-xd2f.google.com with SMTP id b78so12441682iof.2 for ; Fri, 08 Oct 2021 16:15:32 -0700 (PDT) Received: from dune.bsdimp.com (50-253-99-174-static.hfc.comcastbusiness.net. [50.253.99.174]) by smtp.gmail.com with ESMTPSA id b15sm293628ion.8.2021.10.08.16.15.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 16:15:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=piPIEwSR0Pxb7i39KbgYug1Bnr819V88PhrigZ0VDaY=; b=vsPGrPFuq+tw2DLgNmqRl/pgrnt1QoNF4aGLNtEaABpTUNVIMLjWwqpXTfMpD7U6+5 xNWce6Q6zb5psRAv/h6KzbY5I5ArHIPtp+LD8mCPBKlSVYMOUptVcXnI0U5FJ0B14hrS xxRlS9AlQoimbyuVUqLKpyb/kK9g8oL5uBc7u8CTlEFRElA87xVWosJoFf2hCJYnqE7h AR8pZK/KjynMIqq/2SUkgtLjWU/fvruWSOjR5/SnYuGtz0vLrsAVtS8eBwtI89dAqEgB dS6XYPgNYueB8ll2VUggIqd/V2uYQTSA13yZ/Y1PZBUKKiVthR2dzEMCjbyPTT+zjPsP dxKQ== 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=piPIEwSR0Pxb7i39KbgYug1Bnr819V88PhrigZ0VDaY=; b=nwFXo0AXVY2ElCnTgr1vPBBAeJeb82NTXAVXqAXP8UQLs5qkML4kQ8/Sz/U2iT6gto IMRivtYM7q6YVD8pbMzuoHAk6/W8Wl+WFlE3gNd4UdgSe8OSaAK3JJfP+CGQikupc7/J j6pi1GZ9NNufn3z2PlQe3BtikoTHWUU1T5F1q2krejOHDtLFDB/8bjZhe52tKOYvP1Lo +L4nBsZEJyR3EhsqWCTK5ZoZXjO/SHUGUMhl2fWIEMJ3+jnGHonwGhrm0ETuZINHxDqU XueWzJ2clFL0KtbhDQCflQw2SJ7ncYtEGiIrGXAic+RJGJ6IzfPzxoEA1iGt8/4ti4Yz Xoww== X-Gm-Message-State: AOAM532pWQpm30/J0v85xa6fo4RZx7mGAnnrG/hw8abS0/HjW0RU+YWs OLrfomnDfFZ1imOSc5Edr1fXafMU+bDQSg== X-Google-Smtp-Source: ABdhPJwuhlbBYnK7uofF83cqpYCFLRm5AKsWWP1jorPz+xvYGtLeq8VdC7z927Y1P8Bvf/5qeM2Bgw== X-Received: by 2002:a02:1049:: with SMTP id 70mr9660040jay.123.1633734931745; Fri, 08 Oct 2021 16:15:31 -0700 (PDT) From: Warner Losh To: qemu-devel@nongnu.org Subject: [PATCH v2 13/15] bsd-user/sysarch: Provide a per-arch framework for sysarch syscall Date: Fri, 8 Oct 2021 17:15:04 -0600 Message-Id: <20211008231506.17471-14-imp@bsdimp.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211008231506.17471-1-imp@bsdimp.com> References: <20211008231506.17471-1-imp@bsdimp.com> 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: none client-ip=2607:f8b0:4864:20::d2f; envelope-from=imp@bsdimp.com; helo=mail-io1-xd2f.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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: Stacey Son , Kyle Evans , richard.henderson@linaro.org, Laurent Vivier , f4bug@amsat.org, Warner Losh Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1633735370991100002 Content-Type: text/plain; charset="utf-8" Add the missing glue to pull in do_freebsd_sysarch to call do_freebsd_arch_sysarch. Put it in os-sys.c, which will be used for sysctl and sysarch system calls because they are mostly arch specific. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Kyle Evans --- bsd-user/freebsd/meson.build | 3 +++ bsd-user/freebsd/os-sys.c | 27 +++++++++++++++++++++++++++ bsd-user/meson.build | 3 +++ bsd-user/qemu.h | 3 +++ bsd-user/syscall.c | 7 ------- 5 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 bsd-user/freebsd/meson.build create mode 100644 bsd-user/freebsd/os-sys.c diff --git a/bsd-user/freebsd/meson.build b/bsd-user/freebsd/meson.build new file mode 100644 index 0000000000..4b69cca7b9 --- /dev/null +++ b/bsd-user/freebsd/meson.build @@ -0,0 +1,3 @@ +bsd_user_ss.add(files( + 'os-sys.c', +)) diff --git a/bsd-user/freebsd/os-sys.c b/bsd-user/freebsd/os-sys.c new file mode 100644 index 0000000000..309e27b9d6 --- /dev/null +++ b/bsd-user/freebsd/os-sys.c @@ -0,0 +1,27 @@ +/* + * FreeBSD sysctl() and sysarch() system call emulation + * + * Copyright (c) 2013-15 Stacey D. Son + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "qemu.h" +#include "target_arch_sysarch.h" + +/* sysarch() is architecture dependent. */ +abi_long do_freebsd_sysarch(void *cpu_env, abi_long arg1, abi_long arg2) +{ + return do_freebsd_arch_sysarch(cpu_env, arg1, arg2); +} diff --git a/bsd-user/meson.build b/bsd-user/meson.build index 243fb78930..a4163c91ff 100644 --- a/bsd-user/meson.build +++ b/bsd-user/meson.build @@ -12,3 +12,6 @@ bsd_user_ss.add(files( 'syscall.c', 'uaccess.c', )) + +# Pull in the OS-specific build glue, if any +subdir(targetos) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index cdb85140f4..e65e41d53d 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -239,6 +239,9 @@ extern unsigned long target_sgrowsiz; abi_long get_errno(abi_long ret); bool is_error(abi_long ret); =20 +/* os-sys.c */ +abi_long do_freebsd_sysarch(void *cpu_env, abi_long arg1, abi_long arg2); + /* user access */ =20 #define VERIFY_READ PAGE_READ diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c index d3b9f431e2..d3322760f4 100644 --- a/bsd-user/syscall.c +++ b/bsd-user/syscall.c @@ -88,13 +88,6 @@ static abi_long do_obreak(abi_ulong new_brk) return 0; } =20 -#if defined(TARGET_I386) -static abi_long do_freebsd_sysarch(CPUX86State *env, int op, abi_ulong par= ms) -{ - do_freebsd_arch_sysarch(env, op, parms); -} -#endif - #ifdef __FreeBSD__ /* * XXX this uses the undocumented oidfmt interface to find the kind of --=20 2.32.0 From nobody Thu May 16 12:08:10 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1633735651244914.3635842459508; Fri, 8 Oct 2021 16:27:31 -0700 (PDT) Received: from localhost ([::1]:45974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYzH0-0005G7-6F for importer@patchew.org; Fri, 08 Oct 2021 19:27:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34012) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYz5W-0000Hj-Kc for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:40 -0400 Received: from mail-il1-x12d.google.com ([2607:f8b0:4864:20::12d]:34713) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYz5R-0006sN-NG for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:37 -0400 Received: by mail-il1-x12d.google.com with SMTP id g2so10428808ild.1 for ; Fri, 08 Oct 2021 16:15:33 -0700 (PDT) Received: from dune.bsdimp.com (50-253-99-174-static.hfc.comcastbusiness.net. [50.253.99.174]) by smtp.gmail.com with ESMTPSA id b15sm293628ion.8.2021.10.08.16.15.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 16:15:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RsH2uGQG+H5kNjUvUvYqnVTq0HxSNPvaGumcXkHmkA4=; b=IVVV0Bt/4uxAgY2Apkk92ai52h8DHM1WXCmmFvB6N4Jj1ph9SYVE2STgTKVyJAV0UR Sgs0GD6eDclNt5lGhnLDKhy1rnQ1/ma8o57R6PK8j/69/mH5yK1XnpDAvh/FeB99ppWN +bZymFjbxtYSSFQp9AbIKMncN5uwxBEbCfOovyA3Z33sRz4F2jYUYBSjnn2aHNlCB1qK euVG/+gU15AtlqnbeLxGEZi8RXN+r4QwzJyZoxaFFy/MeW25kSB9ejC1Cd9Q8H8xixOM NBGXjwF7yo69fjwQ77qQHuYh2WaQHJhe+TvLtnPlc3gJzs+A+3hYDVCUBzWuiK2d3XwG APhQ== 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=RsH2uGQG+H5kNjUvUvYqnVTq0HxSNPvaGumcXkHmkA4=; b=X2gHahKv3TbA/KMYltW4Gpp6kF4Do1NK4GK2Xgzh82FGPW+7orxEfJkmyLyhQOM4lH N6g2maNwQflZ28XlxXKZZGue3PC8exazahb7iRSXnDYBIzzkxQb79vvkqs60LXhLlWeQ zkrAm6p0xihEqT0MAP+crEFL1iBr2YhFFJPrNMLCHkFvv5T/huKcRRo0oOujUIL0HryF 90BOCuuJ2eoz1/8/b2BiN6oB69j+zCtgcaPv0Bp89Ovklx1VGzW8rLyAFaxLV2Lwdzax oTAwKdk0LhJSVQZ20fwqPgs8vvZ3NB2q+5kU4+lfd5Z6QJnj2BquKhcbIK/mRcmBQXkG 4w/g== X-Gm-Message-State: AOAM532Ad7bV2oUl670bCjWWDM3O1od3bvSIRmq1QB14VETc5zTsny+2 B3Mn+T7YcJ8UUOdrIK0m6fdcudGO5nG0eg== X-Google-Smtp-Source: ABdhPJxuszGg4KOWIoXSfiQd9KT/xMGH4uDWkEt2DZt8QEAuXaenweo4r38IKTsvBhF1ZROZMcmqOw== X-Received: by 2002:a92:1a08:: with SMTP id a8mr9844819ila.301.1633734932417; Fri, 08 Oct 2021 16:15:32 -0700 (PDT) From: Warner Losh To: qemu-devel@nongnu.org Subject: [PATCH v2 14/15] bsd-user: Rename sigqueue to qemu_sigqueue Date: Fri, 8 Oct 2021 17:15:05 -0600 Message-Id: <20211008231506.17471-15-imp@bsdimp.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211008231506.17471-1-imp@bsdimp.com> References: <20211008231506.17471-1-imp@bsdimp.com> 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: none client-ip=2607:f8b0:4864:20::12d; envelope-from=imp@bsdimp.com; helo=mail-il1-x12d.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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: Kyle Evans , richard.henderson@linaro.org, Laurent Vivier , Warner Losh , f4bug@amsat.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1633735651471100001 To avoid a name clash with FreeBSD's sigqueue data structure in signalvar.h, rename sigqueue to qemu_sigqueue. This sturcture is currently defined, but unused. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Kyle Evans --- bsd-user/qemu.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index e65e41d53d..5b815c3a23 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -73,15 +73,15 @@ struct image_info { =20 #define MAX_SIGQUEUE_SIZE 1024 =20 -struct sigqueue { - struct sigqueue *next; +struct qemu_sigqueue { + struct qemu_sigqueue *next; + target_siginfo_t info; }; =20 struct emulated_sigtable { int pending; /* true if signal is pending */ - struct sigqueue *first; - /* in order to always have memory for the first signal, we put it here= */ - struct sigqueue info; + struct qemu_sigqueue *first; + struct qemu_sigqueue info; /* Put first signal info here */ }; =20 /* @@ -95,8 +95,8 @@ typedef struct TaskState { struct image_info *info; =20 struct emulated_sigtable sigtab[TARGET_NSIG]; - struct sigqueue sigqueue_table[MAX_SIGQUEUE_SIZE]; /* siginfo queue */ - struct sigqueue *first_free; /* first free siginfo queue entry */ + struct qemu_sigqueue sigqueue_table[MAX_SIGQUEUE_SIZE]; /* siginfo que= ue */ + struct qemu_sigqueue *first_free; /* first free siginfo queue entry */ int signal_pending; /* non zero if a signal may be pending */ =20 uint8_t stack[]; --=20 2.32.0 From nobody Thu May 16 12:08:10 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1633735628343823.301037589617; Fri, 8 Oct 2021 16:27:08 -0700 (PDT) Received: from localhost ([::1]:45182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYzGd-0004jr-9X for importer@patchew.org; Fri, 08 Oct 2021 19:27:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYz5Z-0000J3-1r for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:42 -0400 Received: from mail-il1-x134.google.com ([2607:f8b0:4864:20::134]:46011) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYz5W-0006tN-6j for qemu-devel@nongnu.org; Fri, 08 Oct 2021 19:15:40 -0400 Received: by mail-il1-x134.google.com with SMTP id i11so10490582ila.12 for ; Fri, 08 Oct 2021 16:15:34 -0700 (PDT) Received: from dune.bsdimp.com (50-253-99-174-static.hfc.comcastbusiness.net. [50.253.99.174]) by smtp.gmail.com with ESMTPSA id b15sm293628ion.8.2021.10.08.16.15.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 16:15:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XEk73uKVfZpm8z5h/+0J1fZF1BlRdZmKpQRA57KJATI=; b=mpNKan6AIQvIu3/Oq9KoiZVdMfp4zXd4jR+dK/rjoaK4hQlIsbAmBnbtF+qhLGiW5T x+5c+U18NPHZbxrptSTDRhvs6Mzf0C683ZLxFEkfb+rnpv0NIhoCjaBQEX/bCIzXOng4 ywsLV6PGGXwiFqGftTiz+MGotCE2eH9p83IMnSohipCuw0v05QyjqpHSakKyzlhEoHxd vYf/EyzkxBBr7+FjYk+nw/2EIXKb7ZQgdP2QoZQuqtQcUCHutxqe9PDJd65UtpEM9dSC 1f4dyM+9LMRZIGWjdC9spPdbtFXTXWSNzODqlNxSMtPT+BaGkOg9uuE37k0RqyLOElSm Ic1g== 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=XEk73uKVfZpm8z5h/+0J1fZF1BlRdZmKpQRA57KJATI=; b=799sILadYSMwwevyzT3tX9ziwW3OQPL7+VTsOYQsKFtnzdFeGVmuUehnbtsWLou3mc 0LuPiR779YNV2UnzRElxc+lq/310Kpr5lg5QMVoYDW8IpCcMHmyZ/lRFsS8BBkBWw0n7 Y/HlQKYwatXY5d8ZEjgFks8QG9IYg4guriv0lLsKboPJQk4gz0YT4BTzTzXx/gJ7qLjl FQ4JzeXan8E9MV0RKMxdyX262fvQNeyqsC2WwtnS2GMo3KM/hpRXAKodPvnzQyJdZM6o fvcf7gKtgIg87AheBUAlYnmyaqYu97qr2KGig2g3NEwHBQ3Nojf1G8Rtv/UIGP1QbUY/ mjAA== X-Gm-Message-State: AOAM530DBw9kNC5vC5efRQqTvEago2vrI+rKA9Doac6dtBquCrRqinEk rDHrHj4j0vM4vWUyZ2lyHY9shCQlU25dIA== X-Google-Smtp-Source: ABdhPJw3AIJ9STtBZJfXfEk3BwnDaP6yJ6r0yvzsZV7AZYYWxs65WBuiv8kGwR1YDg8p/jpcJu0OFw== X-Received: by 2002:a05:6e02:18ce:: with SMTP id s14mr824268ilu.96.1633734933586; Fri, 08 Oct 2021 16:15:33 -0700 (PDT) From: Warner Losh To: qemu-devel@nongnu.org Subject: [PATCH v2 15/15] bsd-user/signal: Create a dummy signal queueing function Date: Fri, 8 Oct 2021 17:15:06 -0600 Message-Id: <20211008231506.17471-16-imp@bsdimp.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211008231506.17471-1-imp@bsdimp.com> References: <20211008231506.17471-1-imp@bsdimp.com> 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: none client-ip=2607:f8b0:4864:20::134; envelope-from=imp@bsdimp.com; helo=mail-il1-x134.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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: Kyle Evans , richard.henderson@linaro.org, Laurent Vivier , Warner Losh , f4bug@amsat.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1633735630401100001 Content-Type: text/plain; charset="utf-8" Create dummy signal queueing function so we can start to integrate other architectures (at the cost of signals remaining broken) to tame the dependency graph a bit and to bring in signals in a more controlled fashion. Log unimplemented events to it in the mean time. Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Richard Henderson --- bsd-user/qemu.h | 2 +- bsd-user/signal.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 5b815c3a23..62095eb975 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -17,7 +17,6 @@ #ifndef QEMU_H #define QEMU_H =20 - #include "qemu/osdep.h" #include "cpu.h" #include "qemu/units.h" @@ -209,6 +208,7 @@ void process_pending_signals(CPUArchState *cpu_env); void signal_init(void); long do_sigreturn(CPUArchState *env); long do_rt_sigreturn(CPUArchState *env); +void queue_signal(CPUArchState *env, int sig, target_siginfo_t *info); abi_long do_sigaltstack(abi_ulong uss_addr, abi_ulong uoss_addr, abi_ulong= sp); =20 /* mmap.c */ diff --git a/bsd-user/signal.c b/bsd-user/signal.c index ad6d935569..0c1093deb1 100644 --- a/bsd-user/signal.c +++ b/bsd-user/signal.c @@ -16,10 +16,19 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ -#include "qemu/osdep.h" =20 +#include "qemu/osdep.h" #include "qemu.h" =20 +/* + * Queue a signal so that it will be send to the virtual CPU as soon as + * possible. + */ +void queue_signal(CPUArchState *env, int sig, target_siginfo_t *info) +{ + qemu_log_mask(LOG_UNIMP, "No signal queueing, dropping signal %d\n", s= ig); +} + void signal_init(void) { } --=20 2.32.0