From nobody Sun May 5 14:30:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1567602777; cv=none; d=zoho.com; s=zohoarc; b=e1ccwxhVabjz6x3Ff4HCyveXl4MN7TUOBQYv0LEUVVS3eDkJBaFBXal/Us3VZMb++Wc8dW0x3uMV5BhJyamzagSPIQpRXGMOe4OQ6ubhuQz1Y1VtVKDaiG7vT+Ob4Hrgj7vXr2xt6tIVta11oHvKJTuCYVoVPyx77WFajnJzR2o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567602777; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=YgFCkpxKtk3VNYEJMMAfAy3K8kMn4zk9+IPFB7ouYec=; b=dMAdMdBugu81yPFmldazeyrW7arM++UxprwIJWEhR59oTc/UNSNEDu9qw2X9T96W6eYRCT3WQgFz+/Mm2Ms6kKoEqtQOtuTL498+HIrMuwu7ydKKPZ+SEe2xN3/pxHfv3M58bzhZjHpoTKyED9MJXhxGgONTwfMYSdTcos2hqgc= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 1567602777461995.5996983588375; Wed, 4 Sep 2019 06:12:57 -0700 (PDT) Received: from localhost ([::1]:57674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5V5k-00041s-D1 for importer@patchew.org; Wed, 04 Sep 2019 09:12:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54841) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5Utt-0001cm-TA for qemu-devel@nongnu.org; Wed, 04 Sep 2019 09:00:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5Utr-00087s-Vo for qemu-devel@nongnu.org; Wed, 04 Sep 2019 09:00:41 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:44143 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i5Utr-0007RK-M6 for qemu-devel@nongnu.org; Wed, 04 Sep 2019 09:00:39 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 43BBE1A218B; Wed, 4 Sep 2019 14:59:34 +0200 (CEST) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id 22E151A1DCC; Wed, 4 Sep 2019 14:59:34 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Wed, 4 Sep 2019 14:59:21 +0200 Message-Id: <1567601968-26946-2-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1567601968-26946-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1567601968-26946-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PATCH v6 1/8] linux-user: Add support for semtimedop() syscall 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: riku.voipio@iki.fi, laurent@vivier.eu, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Aleksandar Rikalo Add support for semtimedop() emulation. It is based on invocation of safe_semtimedop(). Conversion is left out of safe_semtimedop(), since other safe_xxx() usually don't contain similar conversions. Signed-off-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic --- linux-user/syscall.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 8367cb1..b5bc6e4 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6649,7 +6649,43 @@ static inline abi_long host_to_target_statx(struct t= arget_statx *host_stx, return 0; } #endif +#ifdef TARGET_NR_semtimedop +static inline abi_long do_semtimedop(int semid, abi_long ptr, unsigned nso= ps, + abi_long timeout) +{ + struct sembuf *sops; + struct timespec ts, *pts; + abi_long ret; + + if (timeout) { + pts =3D &ts; + if (target_to_host_timespec(pts, timeout)) { + return -TARGET_EFAULT; + } + } else { + pts =3D NULL; + } =20 + sops =3D g_malloc(sizeof(struct sembuf) * nsops); + if (sops =3D=3D NULL) { + return -TARGET_EFAULT; + } + + if (target_to_host_sembuf(sops, ptr, nsops)) { + g_free(sops); + return -TARGET_EFAULT; + } + +#ifdef __NR_semtimedop + ret =3D get_errno(safe_semtimedop(semid, sops, nsops, pts)); +#else + ret =3D -TARGET_ENOSYS; +#endif + g_free(sops); + + return ret; +} +#endif =20 /* ??? Using host futex calls even when target atomic operations are not really atomic probably breaks things. However implementing @@ -9193,6 +9229,10 @@ static abi_long do_syscall1(void *cpu_env, int num, = abi_long arg1, case TARGET_NR_semop: return do_semop(arg1, arg2, arg3); #endif +#ifdef TARGET_NR_semtimedop + case TARGET_NR_semtimedop: + return do_semtimedop(arg1, arg2, arg3, arg4); +#endif #ifdef TARGET_NR_semctl case TARGET_NR_semctl: return do_semctl(arg1, arg2, arg3, arg4); --=20 2.7.4 From nobody Sun May 5 14:30:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1567603385; cv=none; d=zoho.com; s=zohoarc; b=O4hVuMnTmyMvUq4qhAX6fIbWIOSiA9BOTUsz+i51gjDK6/F1SbB3gSd/dmYGdkyyVeybCFdFVkVaofnAMqYZnMrMpp2CkXxztlb2qjCCPiRWX0PwdsXgdCUZr9mrqx5GXBigkqniOde+Uuqk56bP5+ev+5XHt+1km9xV5CN/f/U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567603385; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=ahCbLWZsdyE7zY6mFezP/Gjd009zNAhBgefEfV7n0do=; b=OBAbiadKtrImmW32+cZ4CWY1pRcgJrxwR6MXkMoEi0Z5Y6FD9ovpNogMrJ/exs0vNgwpTGe0/9hy96ay7iCSLuHE5KzeX8owFTJwkC0g67yaMPvHvEAbMOpqj7v0D6d3VTnoKNHfXKn4dTJJnro+tmye2Uo1v6mGXvptRVLVjTk= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 1567603385065741.8134493530492; Wed, 4 Sep 2019 06:23:05 -0700 (PDT) Received: from localhost ([::1]:57800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5VFU-0005Fl-I9 for importer@patchew.org; Wed, 04 Sep 2019 09:23:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54927) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5Utx-0001gh-7d for qemu-devel@nongnu.org; Wed, 04 Sep 2019 09:00:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5Utv-0008Be-W7 for qemu-devel@nongnu.org; Wed, 04 Sep 2019 09:00:45 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:44154 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i5Utv-0007RQ-Nc for qemu-devel@nongnu.org; Wed, 04 Sep 2019 09:00:43 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 5215E1A21D2; Wed, 4 Sep 2019 14:59:34 +0200 (CEST) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id 290651A203E; Wed, 4 Sep 2019 14:59:34 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Wed, 4 Sep 2019 14:59:22 +0200 Message-Id: <1567601968-26946-3-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1567601968-26946-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1567601968-26946-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PATCH v6 2/8] linux-user: Add support for RNDRESEEDCRNG ioctl 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: riku.voipio@iki.fi, laurent@vivier.eu, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Aleksandar Markovic RNDRESEEDCRNG is a newer ioctl (added in kernel 4.17), and an "ifdef" guard is used for that reason in this patch. Signed-off-by: Aleksandar Markovic Reviewed-by: Laurent Vivier --- linux-user/ioctls.h | 3 +++ linux-user/syscall_defs.h | 1 + 2 files changed, 4 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index 3281c97..cd9b6f9 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -246,6 +246,9 @@ IOCTL(RNDADDTOENTCNT, IOC_W, MK_PTR(TYPE_INT)) IOCTL(RNDZAPENTCNT, 0, TYPE_NULL) IOCTL(RNDCLEARPOOL, 0, TYPE_NULL) +#ifdef RNDRESEEDCRNG + IOCTL(RNDRESEEDCRNG, 0, TYPE_NULL) +#endif =20 IOCTL(CDROMPAUSE, 0, TYPE_NULL) IOCTL(CDROMSTART, 0, TYPE_NULL) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 0662270..19a1d39 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -850,6 +850,7 @@ struct target_pollfd { #define TARGET_RNDADDTOENTCNT TARGET_IOW('R', 0x01, int) #define TARGET_RNDZAPENTCNT TARGET_IO('R', 0x04) #define TARGET_RNDCLEARPOOL TARGET_IO('R', 0x06) +#define TARGET_RNDRESEEDCRNG TARGET_IO('R', 0x07) =20 /* From */ =20 --=20 2.7.4 From nobody Sun May 5 14:30:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1567603741; cv=none; d=zoho.com; s=zohoarc; b=iNKUeSHYykYgZ45pfXG7U+jt247eagUDOLC8pZ7x23uq5jwGv1UE8tRGWrTh+9EdUgA4lpOCCbEhJk896NfpvoBtTCHmyPHUZ1cyadcL8EEMQgcwfvIn2NEzpPrdXVmAaiymjm3z/K0q0m92OT6dIBuYt+aw9HvsB8NVVQNLk2Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567603741; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=/tceSD6wBJTk5QsH/df0xo4DoH0jbhx7e/jDNQIFRxU=; b=HpugrgWSLaa0VeXbA5VVR9er7V0BEVGVqqEg9ZqnUpXxdDc7KEqDHom/GD7yjDF9XZ+DpKaBadyvOwYOlRQpDkerHWlovcoYSTOfsbrvzgwP3q8X/ZmfCZdOh1rJzBm1XFDRr0OUSMRVt90pAKr7FeKe3on5zeJ6w0abvNPzdRg= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 1567603741083894.06993019304; Wed, 4 Sep 2019 06:29:01 -0700 (PDT) Received: from localhost ([::1]:57958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5VLE-0003lm-VM for importer@patchew.org; Wed, 04 Sep 2019 09:28:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54931) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5Utx-0001gv-FO for qemu-devel@nongnu.org; Wed, 04 Sep 2019 09:00:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5Uts-000885-4g for qemu-devel@nongnu.org; Wed, 04 Sep 2019 09:00:45 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:44152 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i5Utr-0007RO-M9 for qemu-devel@nongnu.org; Wed, 04 Sep 2019 09:00:39 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 5D9D71A1DCC; Wed, 4 Sep 2019 14:59:34 +0200 (CEST) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id 2EFAD1A20C7; Wed, 4 Sep 2019 14:59:34 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Wed, 4 Sep 2019 14:59:23 +0200 Message-Id: <1567601968-26946-4-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1567601968-26946-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1567601968-26946-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PATCH v6 3/8] linux-user: Add support for FIOGETOWN and FIOSETOWN ioctls 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: riku.voipio@iki.fi, laurent@vivier.eu, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Aleksandar Markovic FIOGETOWN and FIOSETOWN ioctls have platform-specific definitions, hence non-standard definition in QEMU too. Other than that, they both have a single integer argument, and their functionality is emulated in a straightforward way. Signed-off-by: Aleksandar Markovic Reviewed-by: Laurent Vivier --- linux-user/ioctls.h | 2 ++ linux-user/syscall_defs.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index cd9b6f9..1830de9 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -177,6 +177,8 @@ #endif #endif /* CONFIG_USBFS */ =20 + IOCTL(FIOGETOWN, IOC_R, MK_PTR(TYPE_INT)) + IOCTL(FIOSETOWN, IOC_W, MK_PTR(TYPE_INT)) IOCTL(SIOCATMARK, IOC_R, MK_PTR(TYPE_INT)) IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_int_ifreq))) IOCTL(SIOCGIFFLAGS, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_short_ifreq))) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 19a1d39..498223b 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -758,10 +758,14 @@ struct target_pollfd { =20 #if defined(TARGET_ALPHA) || defined(TARGET_MIPS) || defined(TARGET_SH4) |= | \ defined(TARGET_XTENSA) +#define TARGET_FIOGETOWN TARGET_IOR('f', 123, int) +#define TARGET_FIOSETOWN TARGET_IOW('f', 124, int) #define TARGET_SIOCATMARK TARGET_IOR('s', 7, int) #define TARGET_SIOCSPGRP TARGET_IOW('s', 8, pid_t) #define TARGET_SIOCGPGRP TARGET_IOR('s', 9, pid_t) #else +#define TARGET_FIOGETOWN 0x8903 +#define TARGET_FIOSETOWN 0x8901 #define TARGET_SIOCATMARK 0x8905 #define TARGET_SIOCSPGRP 0x8902 #define TARGET_SIOCGPGRP 0x8904 --=20 2.7.4 From nobody Sun May 5 14:30:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1567602880; cv=none; d=zoho.com; s=zohoarc; b=gkg8dqTSVtL/K6vSg3Jh2y710NxDZ+Eu9w4L8ba8GweZ3wM9XJnCphYu3VGttVfGi0Q7rg2mlOP6YHJqmGV/uM+aGqohnvacAMjiGzc4fPpHPMaA1XOgu7wE1vtRs7RvsYRKCCDTdu8A802bOvvfyNYNOC9b+TS8OQl43F8MFrw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567602880; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=JQhxeIE4bWJr+NGsh9XOXut5M5QISjpxlWuYcyNfisA=; b=QvtivYpjtAUS0B0y1BjUr+L+ZOYRiVxieiWOkTbcv40Mzrr5p7EsNSHhfJbHzmb53tVtywLs29Cv1QYiIReBt+6g9oIHKmMQQJiaWba/EWnEKj4NHopM4mngjs145U1UxhBBbbGx9CB+v6NrM5aMpEJEBxmcOTM3lGJYurAeQGc= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 1567602880946580.973999377723; Wed, 4 Sep 2019 06:14:40 -0700 (PDT) Received: from localhost ([::1]:57688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5V7P-0005vI-Gu for importer@patchew.org; Wed, 04 Sep 2019 09:14:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54928) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5Utx-0001gl-9A for qemu-devel@nongnu.org; Wed, 04 Sep 2019 09:00:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5Uts-000880-1h for qemu-devel@nongnu.org; Wed, 04 Sep 2019 09:00:45 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:44159 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i5Utr-0007RT-M7 for qemu-devel@nongnu.org; Wed, 04 Sep 2019 09:00:39 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 6698B1A203E; Wed, 4 Sep 2019 14:59:34 +0200 (CEST) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id 361611A2168; Wed, 4 Sep 2019 14:59:34 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Wed, 4 Sep 2019 14:59:24 +0200 Message-Id: <1567601968-26946-5-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1567601968-26946-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1567601968-26946-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PATCH v6 4/8] linux user: Add support for FDFLUSH ioctl 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: riku.voipio@iki.fi, laurent@vivier.eu, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Yunqiang Su FDFLUSH is used for flushing buffers of floppy drives. Support in QEMU is needed because some of Debian packages use this ioctl while running post-build tests. One such example is 'tar' package. Signed-off-by: Yunqiang Su Signed-off-by: Aleksandar Markovic Reviewed-by: Laurent Vivier --- linux-user/ioctls.h | 2 ++ linux-user/syscall.c | 1 + linux-user/syscall_defs.h | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index 1830de9..bc19448 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -112,6 +112,8 @@ IOCTL(BLKZEROOUT, IOC_W, MK_PTR(MK_ARRAY(TYPE_ULONGLONG, 2))) #endif =20 + IOCTL(FDFLUSH, 0, TYPE_NULL) + #ifdef FIBMAP IOCTL(FIBMAP, IOC_W | IOC_R, MK_PTR(TYPE_LONG)) #endif diff --git a/linux-user/syscall.c b/linux-user/syscall.c index b5bc6e4..6825458 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -87,6 +87,7 @@ #include #include #include +#include #if defined(CONFIG_FIEMAP) #include #endif diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 498223b..917202a 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -888,6 +888,10 @@ struct target_pollfd { #define TARGET_BLKROTATIONAL TARGET_IO(0x12, 126) #define TARGET_BLKZEROOUT TARGET_IO(0x12, 127) =20 +/* From */ + +#define TARGET_FDFLUSH TARGET_IO(2, 0x4b) + #define TARGET_FIBMAP TARGET_IO(0x00,1) /* bmap access */ #define TARGET_FIGETBSZ TARGET_IO(0x00,2) /* get the block size used fo= r bmap */ =20 --=20 2.7.4 From nobody Sun May 5 14:30:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1567603437; cv=none; d=zoho.com; s=zohoarc; b=TPZAq3xcjcQOq/FnR+YZ/9ev9lafD951oGM4dVjQo2aaj5tXgSKvnmJxWEJmdGTkNT4gZXhX+Ae3LM34vP/GUcyVAnUmWklM8tPzxXf0Ec2KXJuv7ilebEUprGrzE7hR+dY2M6/2nO414vAaEFZYbRY2DMVrBzFpux8Ow1G4zkw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567603437; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=qVTTCzIem+VlhPIBYQonW4/vM6cNYc+uBx0lr3VGVmA=; b=HI/RQWLOIEO5iE4qy9+60aWhWeEpTUCNNuIn1jatuJocdgDvm8E28Gnm+VPspN4iRiNAm7CEWGZ/TYORI7MndqttnUFm10tL3HVtNkcagH9uGJBxiz/2FtFNFVuu5zGwcbftl38BgbfeAzY7jhiGGDx7QNEpG6PLCov9YgryIEQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 1567603437571102.28523801206427; Wed, 4 Sep 2019 06:23:57 -0700 (PDT) Received: from localhost ([::1]:57812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5VGO-0006WD-FY for importer@patchew.org; Wed, 04 Sep 2019 09:23:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54890) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5Utv-0001eG-3F for qemu-devel@nongnu.org; Wed, 04 Sep 2019 09:00:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5Utt-00089Y-N1 for qemu-devel@nongnu.org; Wed, 04 Sep 2019 09:00:42 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:46863 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i5Utt-00088Z-Bn for qemu-devel@nongnu.org; Wed, 04 Sep 2019 09:00:41 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 75D8E1A219A; Wed, 4 Sep 2019 14:59:34 +0200 (CEST) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id 3C27E1A2179; Wed, 4 Sep 2019 14:59:34 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Wed, 4 Sep 2019 14:59:25 +0200 Message-Id: <1567601968-26946-6-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1567601968-26946-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1567601968-26946-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PATCH v6 5/8] linux-user: Add support for FDMSGON and FDMSGOFF ioctls 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: riku.voipio@iki.fi, laurent@vivier.eu, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Aleksandar Markovic FDMSGON and FDMSGOFF switch informational messages of floppy drives on and off. Signed-off-by: Aleksandar Markovic Reviewed-by: Laurent Vivier --- linux-user/ioctls.h | 2 ++ linux-user/syscall_defs.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index bc19448..b253469 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -112,6 +112,8 @@ IOCTL(BLKZEROOUT, IOC_W, MK_PTR(MK_ARRAY(TYPE_ULONGLONG, 2))) #endif =20 + IOCTL(FDMSGON, 0, TYPE_NULL) + IOCTL(FDMSGOFF, 0, TYPE_NULL) IOCTL(FDFLUSH, 0, TYPE_NULL) =20 #ifdef FIBMAP diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 917202a..4e33ef3 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -890,6 +890,8 @@ struct target_pollfd { =20 /* From */ =20 +#define TARGET_FDMSGON TARGET_IO(2, 0x45) +#define TARGET_FDMSGOFF TARGET_IO(2, 0x46) #define TARGET_FDFLUSH TARGET_IO(2, 0x4b) =20 #define TARGET_FIBMAP TARGET_IO(0x00,1) /* bmap access */ --=20 2.7.4 From nobody Sun May 5 14:30:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1567603221; cv=none; d=zoho.com; s=zohoarc; b=h6CdTD71fcWE/DlXkJSFMWrNqpSEzRyPSv2QeXGsN87IZVh8StJ3OsjnWZCEEgfpZF5d2psg8A5oUZcReuBhMTos8+NnTaLYf4NuWgF0sxMu9xJ3QOqgKqVQJCfpjbTJHvbt+4XCiZh061Yumg5Va5kLCSG4MlF9Qqps45+vqDA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567603221; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=sw3F2CWz2t6VyfdaveJXZzufST7AsWoVvkP/yemWTsI=; b=XhkkRb3F4Ry0kz0CuE4fE0mNLakGZKapJmMZNOZiEPpadeipsfB4bhbHnBeNJwdTa+IBjpJ223Ng3zutkrEjN5hA3smT9Du+0XQklZ4vmmsI3d3xUqhore3482zfib7mFt0Xz4tV/HqKjvMuf+UwZegaWyVx4i5cDWhg3tL8YVc= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 1567603221029529.2216966216475; Wed, 4 Sep 2019 06:20:21 -0700 (PDT) Received: from localhost ([::1]:57772 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5VCs-00020u-U6 for importer@patchew.org; Wed, 04 Sep 2019 09:20:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54888) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5Utv-0001eF-38 for qemu-devel@nongnu.org; Wed, 04 Sep 2019 09:00:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5Utt-00089e-NX for qemu-devel@nongnu.org; Wed, 04 Sep 2019 09:00:42 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:46842 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i5Utt-00088Q-Bz for qemu-devel@nongnu.org; Wed, 04 Sep 2019 09:00:41 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 711111A20C7; Wed, 4 Sep 2019 14:59:34 +0200 (CEST) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id 43A4D1A212E; Wed, 4 Sep 2019 14:59:34 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Wed, 4 Sep 2019 14:59:26 +0200 Message-Id: <1567601968-26946-7-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1567601968-26946-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1567601968-26946-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PATCH v6 6/8] linux-user: Add support for FDRESET, FDRAWCMD, FDTWADDLE, and FDEJECT ioctls 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: riku.voipio@iki.fi, laurent@vivier.eu, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Aleksandar Markovic FDRESET, FDRAWCMD, FDTWADDLE, and FDEJECT ioctls are misc commands for controlling a floppy drive. Signed-off-by: Aleksandar Markovic Reviewed-by: Laurent Vivier --- linux-user/ioctls.h | 4 ++++ linux-user/syscall_defs.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index b253469..c6b9d6a 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -115,6 +115,10 @@ IOCTL(FDMSGON, 0, TYPE_NULL) IOCTL(FDMSGOFF, 0, TYPE_NULL) IOCTL(FDFLUSH, 0, TYPE_NULL) + IOCTL(FDRESET, 0, TYPE_NULL) + IOCTL(FDRAWCMD, 0, TYPE_NULL) + IOCTL(FDTWADDLE, 0, TYPE_NULL) + IOCTL(FDEJECT, 0, TYPE_NULL) =20 #ifdef FIBMAP IOCTL(FIBMAP, IOC_W | IOC_R, MK_PTR(TYPE_LONG)) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 4e33ef3..fa69c6a 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -893,6 +893,10 @@ struct target_pollfd { #define TARGET_FDMSGON TARGET_IO(2, 0x45) #define TARGET_FDMSGOFF TARGET_IO(2, 0x46) #define TARGET_FDFLUSH TARGET_IO(2, 0x4b) +#define TARGET_FDRESET TARGET_IO(2, 0x54) +#define TARGET_FDRAWCMD TARGET_IO(2, 0x58) +#define TARGET_FDTWADDLE TARGET_IO(2, 0x59) +#define TARGET_FDEJECT TARGET_IO(2, 0x5a) =20 #define TARGET_FIBMAP TARGET_IO(0x00,1) /* bmap access */ #define TARGET_FIGETBSZ TARGET_IO(0x00,2) /* get the block size used fo= r bmap */ --=20 2.7.4 From nobody Sun May 5 14:30:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1567603931; cv=none; d=zoho.com; s=zohoarc; b=jkv+S0849uFB+yxKmt0bqVCPuy+YxpHTiirJY32b4bEsfFZiFhcp6N5HS11L8ZU0x1IlaFBAIETv08BAT8kr4sWAzGAubhzZcbQBIeetljFoZt1mi72o0aqRmO9LGlOCwvUDnDOs5XzM2/uHNMUp/L8p+uV+nl3M8poFkAU+MS8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567603931; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=IHPXdXVoV728/kS8j4Yn5oSsu8OLVisdiuMdQZsFA88=; b=aX1gyw+cJ2N1cz357weW4sFhIrxdyv+7z9kC3xO4g0jV4UIpNIdVYH7V5GXW+rZ0ARSeXZkh2+/4dRV96tqBF9rCPr2VzEL5d9ZZp5rvCKfeKzi+mnuAkGOgxmnoOMnHC9OG49IIDt0YMRdrev2rRABsLCSf/B1AfwJVx9v+MuM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 1567603931515809.4596156902619; Wed, 4 Sep 2019 06:32:11 -0700 (PDT) Received: from localhost ([::1]:58028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5VOM-0006bk-8w for importer@patchew.org; Wed, 04 Sep 2019 09:32:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54968) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5Uu1-0001kO-0v for qemu-devel@nongnu.org; Wed, 04 Sep 2019 09:00:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5Uty-0008D9-Rf for qemu-devel@nongnu.org; Wed, 04 Sep 2019 09:00:48 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:46978 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i5Uty-0008CJ-LA for qemu-devel@nongnu.org; Wed, 04 Sep 2019 09:00:46 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 818EE1A212E; Wed, 4 Sep 2019 14:59:34 +0200 (CEST) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id 499191A1D64; Wed, 4 Sep 2019 14:59:34 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Wed, 4 Sep 2019 14:59:27 +0200 Message-Id: <1567601968-26946-8-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1567601968-26946-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1567601968-26946-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PATCH v6 7/8] linux-user: Add support for FDFMTBEG, FDFMTTRK, and FDFMTEND ioctls 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: riku.voipio@iki.fi, laurent@vivier.eu, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Aleksandar Markovic FDFMTBEG, FDFMTTRK, and FDFMTEND ioctls provide means for controlling formatting of a floppy drive. Signed-off-by: Aleksandar Markovic Reviewed-by: Laurent Vivier --- linux-user/ioctls.h | 3 +++ linux-user/syscall_defs.h | 3 +++ linux-user/syscall_types.h | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index c6b9d6a..622874b 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -114,6 +114,9 @@ =20 IOCTL(FDMSGON, 0, TYPE_NULL) IOCTL(FDMSGOFF, 0, TYPE_NULL) + IOCTL(FDFMTBEG, 0, TYPE_NULL) + IOCTL(FDFMTTRK, IOC_W, MK_PTR(MK_STRUCT(STRUCT_format_descr))) + IOCTL(FDFMTEND, 0, TYPE_NULL) IOCTL(FDFLUSH, 0, TYPE_NULL) IOCTL(FDRESET, 0, TYPE_NULL) IOCTL(FDRAWCMD, 0, TYPE_NULL) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index fa69c6a..834a085 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -892,6 +892,9 @@ struct target_pollfd { =20 #define TARGET_FDMSGON TARGET_IO(2, 0x45) #define TARGET_FDMSGOFF TARGET_IO(2, 0x46) +#define TARGET_FDFMTBEG TARGET_IO(2, 0x47) +#define TARGET_FDFMTTRK TARGET_IOW(2, 0x48, struct target_format_desc= r) +#define TARGET_FDFMTEND TARGET_IO(2, 0x49) #define TARGET_FDFLUSH TARGET_IO(2, 0x4b) #define TARGET_FDRESET TARGET_IO(2, 0x54) #define TARGET_FDRAWCMD TARGET_IO(2, 0x58) diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h index 4e36983..d82d1a5 100644 --- a/linux-user/syscall_types.h +++ b/linux-user/syscall_types.h @@ -261,6 +261,11 @@ STRUCT(blkpg_ioctl_arg, TYPE_INT, /* datalen */ TYPE_PTRVOID) /* data */ =20 +STRUCT(format_descr, + TYPE_INT, /* device */ + TYPE_INT, /* head */ + TYPE_INT) /* track */ + #if defined(CONFIG_USBFS) /* usb device ioctls */ STRUCT(usbdevfs_ctrltransfer, --=20 2.7.4 From nobody Sun May 5 14:30:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1567603583; cv=none; d=zoho.com; s=zohoarc; b=ASdwU/hR8wpV+zpdPQZzdOyleaS1weEsSWBxoItYiQC+2aZwfPsqsCgo94nhgbwlJWFKJvDhkRE1rQNIHkarXdmpmfvVrwG3xlHn+RkiNdZOfVpQ1FXj8tVf/5ZmmvhGldJshHH9p+B5sZ3HMa12LkT7X+i2MeV0GWueNp3kCag= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567603583; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=0OzEaFkLaDM4BzYNzraIYN8g5uRfdtstgw5WY89ZzMA=; b=ipW3eeiG1DMjDSmc+Wfjaw69C6/hp0uimVlY4TAdy5VJwafOV7GGoZhaItfjspSiSNrpA2hYJ53FOsDKZKCbaxhLieDGWGCuULBm7qt/0Z1SRb/e4BXP/CTKIzJmxUEN+KYbD45u1ys3Qi6AJ29SbtxrbGa7t6BnHROVzMBN06U= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 1567603583626773.3775956200636; Wed, 4 Sep 2019 06:26:23 -0700 (PDT) Received: from localhost ([::1]:57884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5VIk-00010G-E9 for importer@patchew.org; Wed, 04 Sep 2019 09:26:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54902) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5Utv-0001el-GR for qemu-devel@nongnu.org; Wed, 04 Sep 2019 09:00:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5Utt-00089q-Py for qemu-devel@nongnu.org; Wed, 04 Sep 2019 09:00:43 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:46855 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i5Utt-00088U-D0 for qemu-devel@nongnu.org; Wed, 04 Sep 2019 09:00:41 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 7F4251A2168; Wed, 4 Sep 2019 14:59:34 +0200 (CEST) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id 52DBC1A21F1; Wed, 4 Sep 2019 14:59:34 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Wed, 4 Sep 2019 14:59:28 +0200 Message-Id: <1567601968-26946-9-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1567601968-26946-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1567601968-26946-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PATCH v6 8/8] linux-user: Add support for FDSETEMSGTRESH, FDSETMAXERRS, and FDGETMAXERRS ioctls 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: riku.voipio@iki.fi, laurent@vivier.eu, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Aleksandar Markovic FDSETEMSGTRESH, FDSETMAXERRS, and FDGETMAXERRS ioctls are commands for controlling error reporting of a floppy drive. Signed-off-by: Aleksandar Markovic --- linux-user/ioctls.h | 2 ++ linux-user/syscall_defs.h | 19 +++++++++++++++++++ linux-user/syscall_types.h | 7 +++++++ 3 files changed, 28 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index 622874b..0c75d03 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -118,6 +118,8 @@ IOCTL(FDFMTTRK, IOC_W, MK_PTR(MK_STRUCT(STRUCT_format_descr))) IOCTL(FDFMTEND, 0, TYPE_NULL) IOCTL(FDFLUSH, 0, TYPE_NULL) + IOCTL(FDSETMAXERRS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_floppy_max_errors)= )) + IOCTL(FDGETMAXERRS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_floppy_max_errors)= )) IOCTL(FDRESET, 0, TYPE_NULL) IOCTL(FDRAWCMD, 0, TYPE_NULL) IOCTL(FDTWADDLE, 0, TYPE_NULL) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 834a085..7c5b614 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -890,12 +890,31 @@ struct target_pollfd { =20 /* From */ =20 +struct target_floppy_max_errors { + abi_uint abort; + abi_uint read_track; + abi_uint reset; + abi_uint recal; + abi_uint reporting; +}; + +struct target_format_descr { + abi_uint device; + abi_uint head; + abi_uint track; +}; + #define TARGET_FDMSGON TARGET_IO(2, 0x45) #define TARGET_FDMSGOFF TARGET_IO(2, 0x46) #define TARGET_FDFMTBEG TARGET_IO(2, 0x47) #define TARGET_FDFMTTRK TARGET_IOW(2, 0x48, struct target_format_desc= r) #define TARGET_FDFMTEND TARGET_IO(2, 0x49) +#define TARGET_FDSETEMSGTRESH TARGET_IO(2, 0x4a) #define TARGET_FDFLUSH TARGET_IO(2, 0x4b) +#define TARGET_FDSETMAXERRS TARGET_IOW(2, 0x4c, = \ + struct target_floppy_max_errors) +#define TARGET_FDGETMAXERRS TARGET_IOR(2, 0x0e, = \ + struct target_floppy_max_errors) #define TARGET_FDRESET TARGET_IO(2, 0x54) #define TARGET_FDRAWCMD TARGET_IO(2, 0x58) #define TARGET_FDTWADDLE TARGET_IO(2, 0x59) diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h index d82d1a5..5ba7c34 100644 --- a/linux-user/syscall_types.h +++ b/linux-user/syscall_types.h @@ -261,6 +261,13 @@ STRUCT(blkpg_ioctl_arg, TYPE_INT, /* datalen */ TYPE_PTRVOID) /* data */ =20 +STRUCT(floppy_max_errors, + TYPE_INT, /* abort */ + TYPE_INT, /* read_track */ + TYPE_INT, /* reset */ + TYPE_INT, /* recal */ + TYPE_INT) /* reporting */ + STRUCT(format_descr, TYPE_INT, /* device */ TYPE_INT, /* head */ --=20 2.7.4