From patchwork Fri Jul 26 10:23:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11060745 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1A6841398 for ; Fri, 26 Jul 2019 10:28:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0ACA628A7A for ; Fri, 26 Jul 2019 10:28:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F395B28A7E; Fri, 26 Jul 2019 10:28:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A34F828A7A for ; Fri, 26 Jul 2019 10:28:08 +0000 (UTC) Received: from localhost ([::1]:38106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqxSI-0001k5-Ib for patchwork-qemu-devel@patchwork.kernel.org; Fri, 26 Jul 2019 06:28:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34476) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqxRt-0000FL-QL for qemu-devel@nongnu.org; Fri, 26 Jul 2019 06:27:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hqxRp-0005zt-O9 for qemu-devel@nongnu.org; Fri, 26 Jul 2019 06:27:39 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:34053 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 1hqxRp-0001Qx-Fj for qemu-devel@nongnu.org; Fri, 26 Jul 2019 06:27:37 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id CDC271A21A8; Fri, 26 Jul 2019 12:26:27 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id 63D791A2289; Fri, 26 Jul 2019 12:23:21 +0200 (CEST) From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Fri, 26 Jul 2019 12:23:09 +0200 Message-Id: <1564136594-23628-2-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564136594-23628-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1564136594-23628-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 for 4.2 v2 1/6] 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: laurent@vivier.eu, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 5e84dc7..3ade2d2 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 + 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 d2c9817..89e4651 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -86,6 +86,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 3175440..6696563 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -857,6 +857,10 @@ struct target_pollfd { #define TARGET_BLKROTATIONAL TARGET_IO(0x12, 126) #define TARGET_BLKZEROOUT TARGET_IO(0x12, 127) +/* 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 for bmap */ From patchwork Fri Jul 26 10:23:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11060743 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C902B14DB for ; Fri, 26 Jul 2019 10:28:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5AD928A7C for ; Fri, 26 Jul 2019 10:28:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA38528A80; Fri, 26 Jul 2019 10:28:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 303C028A7E for ; Fri, 26 Jul 2019 10:28:05 +0000 (UTC) Received: from localhost ([::1]:38102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqxSF-0001VV-TE for patchwork-qemu-devel@patchwork.kernel.org; Fri, 26 Jul 2019 06:28:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34471) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqxRu-0000FK-Nb for qemu-devel@nongnu.org; Fri, 26 Jul 2019 06:27:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hqxRp-00060A-PO for qemu-devel@nongnu.org; Fri, 26 Jul 2019 06:27:39 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:34170 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 1hqxRp-0001S8-HW for qemu-devel@nongnu.org; Fri, 26 Jul 2019 06:27:37 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id C14291A2200; Fri, 26 Jul 2019 12:26:28 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id 785361A2290; Fri, 26 Jul 2019 12:23:21 +0200 (CEST) From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Fri, 26 Jul 2019 12:23:10 +0200 Message-Id: <1564136594-23628-3-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564136594-23628-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1564136594-23628-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 for 4.2 v2 2/6] 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: laurent@vivier.eu, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 3ade2d2..7fac4fc 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 + IOCTL(FDMSGON, 0, TYPE_NULL) + IOCTL(FDMSGOFF, 0, TYPE_NULL) IOCTL(FDFLUSH, 0, TYPE_NULL) #ifdef FIBMAP diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 6696563..850e1ae 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -859,6 +859,8 @@ struct target_pollfd { /* From */ +#define TARGET_FDMSGON TARGET_IO(2, 0x45) +#define TARGET_FDMSGOFF TARGET_IO(2, 0x46) #define TARGET_FDFLUSH TARGET_IO(2, 0x4b) #define TARGET_FIBMAP TARGET_IO(0x00,1) /* bmap access */ From patchwork Fri Jul 26 10:23:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11060749 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CC8901398 for ; Fri, 26 Jul 2019 10:28:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB4E228A7A for ; Fri, 26 Jul 2019 10:28:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF55428A7E; Fri, 26 Jul 2019 10:28:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6326B28A7A for ; Fri, 26 Jul 2019 10:28:38 +0000 (UTC) Received: from localhost ([::1]:38120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqxSm-0003z6-Ta for patchwork-qemu-devel@patchwork.kernel.org; Fri, 26 Jul 2019 06:28:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34437) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqxRt-0000Eu-RG for qemu-devel@nongnu.org; Fri, 26 Jul 2019 06:27:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hqxRq-00064b-QT for qemu-devel@nongnu.org; Fri, 26 Jul 2019 06:27:39 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:34552 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 1hqxRq-0001Vl-Io for qemu-devel@nongnu.org; Fri, 26 Jul 2019 06:27:38 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 0F1D61A1186; Fri, 26 Jul 2019 12:26:31 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id 8287F1A2292; Fri, 26 Jul 2019 12:23:21 +0200 (CEST) From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Fri, 26 Jul 2019 12:23:11 +0200 Message-Id: <1564136594-23628-4-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564136594-23628-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1564136594-23628-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 for 4.2 v2 3/6] 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: laurent@vivier.eu, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Aleksandar Markovic FDRESET, FDRAWCMD, FDTWADDLE, and FDEJECT ioctls are misc commands for controlling a floppy drive. Signed-off-by: Aleksandar Markovic --- 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 7fac4fc..7c14b93 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) #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 850e1ae..4b9f159 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -862,6 +862,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) #define TARGET_FIBMAP TARGET_IO(0x00,1) /* bmap access */ #define TARGET_FIGETBSZ TARGET_IO(0x00,2) /* get the block size used for bmap */ From patchwork Fri Jul 26 10:23:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11060747 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 063221398 for ; Fri, 26 Jul 2019 10:28:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E8F3228A7A for ; Fri, 26 Jul 2019 10:28:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB68D28A7E; Fri, 26 Jul 2019 10:28:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8668128A7A for ; Fri, 26 Jul 2019 10:28:26 +0000 (UTC) Received: from localhost ([::1]:38114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqxSb-0003AT-BQ for patchwork-qemu-devel@patchwork.kernel.org; Fri, 26 Jul 2019 06:28:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35011) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqxS8-0000u3-GV for qemu-devel@nongnu.org; Fri, 26 Jul 2019 06:27:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hqxS4-0006zN-Ay for qemu-devel@nongnu.org; Fri, 26 Jul 2019 06:27:54 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:37684 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 1hqxS4-0001yz-2c for qemu-devel@nongnu.org; Fri, 26 Jul 2019 06:27:52 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id EDF581A1545; Fri, 26 Jul 2019 12:26:44 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id 8CA931A2294; Fri, 26 Jul 2019 12:23:21 +0200 (CEST) From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Fri, 26 Jul 2019 12:23:12 +0200 Message-Id: <1564136594-23628-5-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564136594-23628-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1564136594-23628-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 for 4.2 v2 4/6] 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: laurent@vivier.eu, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Aleksandar Markovic FDFMTBEG, FDFMTTRK, and FDFMTEND ioctls provide means for controlling formatting of a floppy drive. Signed-off-by: Aleksandar Markovic --- linux-user/ioctls.h | 3 +++ linux-user/syscall_defs.h | 9 +++++++++ linux-user/syscall_types.h | 5 +++++ 3 files changed, 17 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index 7c14b93..0e15fe1 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -114,6 +114,9 @@ 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 4b9f159..a8fc943 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -859,8 +859,17 @@ struct target_pollfd { /* From */ +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_descr) +#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 b98a23b..57cd9e5 100644 --- a/linux-user/syscall_types.h +++ b/linux-user/syscall_types.h @@ -267,6 +267,11 @@ STRUCT(blkpg_ioctl_arg, TYPE_INT, /* datalen */ TYPE_PTRVOID) /* data */ +STRUCT(format_descr, + TYPE_INT, /* device */ + TYPE_INT, /* head */ + TYPE_INT) /* track */ + #if defined(CONFIG_USBFS) /* usb device ioctls */ STRUCT(usbdevfs_ctrltransfer, From patchwork Fri Jul 26 10:23:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11060751 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7994B1398 for ; Fri, 26 Jul 2019 10:28:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65E0128A7A for ; Fri, 26 Jul 2019 10:28:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 56D0428A7E; Fri, 26 Jul 2019 10:28:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0214C28A7A for ; Fri, 26 Jul 2019 10:28:49 +0000 (UTC) Received: from localhost ([::1]:38124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqxSy-0004hn-D6 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 26 Jul 2019 06:28:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34419) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqxRs-0000Ep-Cd for qemu-devel@nongnu.org; Fri, 26 Jul 2019 06:27:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hqxRn-0005rJ-Mx for qemu-devel@nongnu.org; Fri, 26 Jul 2019 06:27:37 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:46873 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 1hqxRn-0005g2-Dz for qemu-devel@nongnu.org; Fri, 26 Jul 2019 06:27:35 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 1BBF01A21DE; Fri, 26 Jul 2019 12:26:46 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id 96A801A2297; Fri, 26 Jul 2019 12:23:21 +0200 (CEST) From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Fri, 26 Jul 2019 12:23:13 +0200 Message-Id: <1564136594-23628-6-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564136594-23628-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1564136594-23628-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 for 4.2 v2 5/6] 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: laurent@vivier.eu, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 | 11 +++++++++++ linux-user/syscall_types.h | 7 +++++++ 3 files changed, 20 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index 0e15fe1..5a5dbdb 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 a8fc943..741c260 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -859,6 +859,14 @@ struct target_pollfd { /* From */ +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; @@ -870,7 +878,10 @@ struct target_format_descr { #define TARGET_FDFMTBEG TARGET_IO(2, 0x47) #define TARGET_FDFMTTRK TARGET_IOW(2, 0x48, struct target_format_descr) #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 57cd9e5..902ff34 100644 --- a/linux-user/syscall_types.h +++ b/linux-user/syscall_types.h @@ -267,6 +267,13 @@ STRUCT(blkpg_ioctl_arg, TYPE_INT, /* datalen */ TYPE_PTRVOID) /* data */ +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 */ From patchwork Fri Jul 26 10:23:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11060753 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E81B21398 for ; Fri, 26 Jul 2019 10:29:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D720428A7C for ; Fri, 26 Jul 2019 10:29:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB61328A80; Fri, 26 Jul 2019 10:29:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5792028A7E for ; Fri, 26 Jul 2019 10:29:10 +0000 (UTC) Received: from localhost ([::1]:38132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqxTH-0005j5-EM for patchwork-qemu-devel@patchwork.kernel.org; Fri, 26 Jul 2019 06:29:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34436) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqxRt-0000Et-PL for qemu-devel@nongnu.org; Fri, 26 Jul 2019 06:27:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hqxRp-00060b-S0 for qemu-devel@nongnu.org; Fri, 26 Jul 2019 06:27:38 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:46840 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 1hqxRp-0005fT-K3 for qemu-devel@nongnu.org; Fri, 26 Jul 2019 06:27:37 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id CFD5C1A216D; Fri, 26 Jul 2019 12:26:45 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id AB7151A229A; Fri, 26 Jul 2019 12:23:21 +0200 (CEST) From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Fri, 26 Jul 2019 12:23:14 +0200 Message-Id: <1564136594-23628-7-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564136594-23628-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1564136594-23628-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 for 4.2 v2 6/6] 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: laurent@vivier.eu, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 5a5dbdb..f5f875d 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -242,6 +242,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 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 741c260..60ab71c 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -824,6 +824,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) /* From */