* [Qemu-devel] [PATCH for 4.2 0/3] linux-user: Misc patches
@ 2019-07-24 14:12 Aleksandar Markovic
2019-07-24 14:12 ` [Qemu-devel] [PATCH for 4.2 1/3] linux user: Add support for FDFLUSH ioctl Aleksandar Markovic
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Aleksandar Markovic @ 2019-07-24 14:12 UTC (permalink / raw)
To: qemu-devel; +Cc: laurent, amarkovic
From: Aleksandar Markovic <amarkovic@wavecomp.com>
A set of misc linux user patches for 4.2.
Aleksandar Markovic (2):
linux-user: Add support for FDMSGON and FDMSGOFF ioctls
linux-user: Add support for RNDRESEEDCRNG ioctl
Yunqiang Su (1):
linux user: Add support for FDFLUSH ioctl
linux-user/ioctls.h | 7 +++++++
linux-user/syscall.c | 1 +
linux-user/syscall_defs.h | 7 +++++++
3 files changed, 15 insertions(+)
--
2.7.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH for 4.2 1/3] linux user: Add support for FDFLUSH ioctl
2019-07-24 14:12 [Qemu-devel] [PATCH for 4.2 0/3] linux-user: Misc patches Aleksandar Markovic
@ 2019-07-24 14:12 ` Aleksandar Markovic
2019-07-25 9:33 ` Laurent Vivier
2019-07-24 14:12 ` [Qemu-devel] [PATCH for 4.2 2/3] linux-user: Add support for FDMSGON and FDMSGOFF ioctls Aleksandar Markovic
2019-07-24 14:12 ` [Qemu-devel] [PATCH for 4.2 3/3] linux-user: Add support for RNDRESEEDCRNG ioctl Aleksandar Markovic
2 siblings, 1 reply; 7+ messages in thread
From: Aleksandar Markovic @ 2019-07-24 14:12 UTC (permalink / raw)
To: qemu-devel; +Cc: Yunqiang Su, laurent, amarkovic
From: Yunqiang Su <ysu@wavecomp.com>
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.
Signed-off-by: Yunqiang Su <ysu@wavecomp.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
---
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 <linux/kd.h>
#include <linux/mtio.h>
#include <linux/fs.h>
+#include <linux/fd.h>
#if defined(CONFIG_FIEMAP)
#include <linux/fiemap.h>
#endif
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 3175440..7e22ed7 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 <linux/fd.h> */
+
+#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 */
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH for 4.2 2/3] linux-user: Add support for FDMSGON and FDMSGOFF ioctls
2019-07-24 14:12 [Qemu-devel] [PATCH for 4.2 0/3] linux-user: Misc patches Aleksandar Markovic
2019-07-24 14:12 ` [Qemu-devel] [PATCH for 4.2 1/3] linux user: Add support for FDFLUSH ioctl Aleksandar Markovic
@ 2019-07-24 14:12 ` Aleksandar Markovic
2019-07-25 9:35 ` Laurent Vivier
2019-07-24 14:12 ` [Qemu-devel] [PATCH for 4.2 3/3] linux-user: Add support for RNDRESEEDCRNG ioctl Aleksandar Markovic
2 siblings, 1 reply; 7+ messages in thread
From: Aleksandar Markovic @ 2019-07-24 14:12 UTC (permalink / raw)
To: qemu-devel; +Cc: laurent, amarkovic
From: Aleksandar Markovic <amarkovic@wavecomp.com>
FDMSGON and FDMSGOFF switch informational messages of floppy drives
on and off.
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
---
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 7e22ed7..61c2f3c 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -859,6 +859,8 @@ struct target_pollfd {
/* From <linux/fd.h> */
+#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 */
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH for 4.2 3/3] linux-user: Add support for RNDRESEEDCRNG ioctl
2019-07-24 14:12 [Qemu-devel] [PATCH for 4.2 0/3] linux-user: Misc patches Aleksandar Markovic
2019-07-24 14:12 ` [Qemu-devel] [PATCH for 4.2 1/3] linux user: Add support for FDFLUSH ioctl Aleksandar Markovic
2019-07-24 14:12 ` [Qemu-devel] [PATCH for 4.2 2/3] linux-user: Add support for FDMSGON and FDMSGOFF ioctls Aleksandar Markovic
@ 2019-07-24 14:12 ` Aleksandar Markovic
2019-07-25 9:40 ` Laurent Vivier
2 siblings, 1 reply; 7+ messages in thread
From: Aleksandar Markovic @ 2019-07-24 14:12 UTC (permalink / raw)
To: qemu-devel; +Cc: laurent, amarkovic
From: Aleksandar Markovic <amarkovic@wavecomp.com>
RNDRESEEDCRNG is a newer ioctl (added in mid-2018 in kernel), and
"ifdef" guard is used for that reason in this patch.
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
---
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 7fac4fc..4264ff5 100644
--- a/linux-user/ioctls.h
+++ b/linux-user/ioctls.h
@@ -233,6 +233,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 61c2f3c..bc3f52b 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 <linux/fs.h> */
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH for 4.2 1/3] linux user: Add support for FDFLUSH ioctl
2019-07-24 14:12 ` [Qemu-devel] [PATCH for 4.2 1/3] linux user: Add support for FDFLUSH ioctl Aleksandar Markovic
@ 2019-07-25 9:33 ` Laurent Vivier
0 siblings, 0 replies; 7+ messages in thread
From: Laurent Vivier @ 2019-07-25 9:33 UTC (permalink / raw)
To: Aleksandar Markovic, qemu-devel; +Cc: Yunqiang Su, amarkovic
Le 24/07/2019 à 16:12, Aleksandar Markovic a écrit :
> From: Yunqiang Su <ysu@wavecomp.com>
>
> 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.
It's strange, because some floppy drivers like swim and swim3 don't
support it.
> Signed-off-by: Yunqiang Su <ysu@wavecomp.com>
> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
> ---
> 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 <linux/kd.h>
> #include <linux/mtio.h>
> #include <linux/fs.h>
> +#include <linux/fd.h>
> #if defined(CONFIG_FIEMAP)
> #include <linux/fiemap.h>
> #endif
> diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
> index 3175440..7e22ed7 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 <linux/fd.h> */
> +
> +#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 */
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH for 4.2 2/3] linux-user: Add support for FDMSGON and FDMSGOFF ioctls
2019-07-24 14:12 ` [Qemu-devel] [PATCH for 4.2 2/3] linux-user: Add support for FDMSGON and FDMSGOFF ioctls Aleksandar Markovic
@ 2019-07-25 9:35 ` Laurent Vivier
0 siblings, 0 replies; 7+ messages in thread
From: Laurent Vivier @ 2019-07-25 9:35 UTC (permalink / raw)
To: Aleksandar Markovic, qemu-devel; +Cc: amarkovic
Le 24/07/2019 à 16:12, Aleksandar Markovic a écrit :
> From: Aleksandar Markovic <amarkovic@wavecomp.com>
>
> FDMSGON and FDMSGOFF switch informational messages of floppy drives
> on and off.
>
> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
> ---
> 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 7e22ed7..61c2f3c 100644
> --- a/linux-user/syscall_defs.h
> +++ b/linux-user/syscall_defs.h
> @@ -859,6 +859,8 @@ struct target_pollfd {
>
> /* From <linux/fd.h> */
>
> +#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 */
>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH for 4.2 3/3] linux-user: Add support for RNDRESEEDCRNG ioctl
2019-07-24 14:12 ` [Qemu-devel] [PATCH for 4.2 3/3] linux-user: Add support for RNDRESEEDCRNG ioctl Aleksandar Markovic
@ 2019-07-25 9:40 ` Laurent Vivier
0 siblings, 0 replies; 7+ messages in thread
From: Laurent Vivier @ 2019-07-25 9:40 UTC (permalink / raw)
To: Aleksandar Markovic, qemu-devel; +Cc: amarkovic
Le 24/07/2019 à 16:12, Aleksandar Markovic a écrit :
> From: Aleksandar Markovic <amarkovic@wavecomp.com>
>
> RNDRESEEDCRNG is a newer ioctl (added in mid-2018 in kernel), and
> "ifdef" guard is used for that reason in this patch.
since kernel 4.17
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
>
> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
> ---
> 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 7fac4fc..4264ff5 100644
> --- a/linux-user/ioctls.h
> +++ b/linux-user/ioctls.h
> @@ -233,6 +233,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 61c2f3c..bc3f52b 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 <linux/fs.h> */
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-07-25 9:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-24 14:12 [Qemu-devel] [PATCH for 4.2 0/3] linux-user: Misc patches Aleksandar Markovic
2019-07-24 14:12 ` [Qemu-devel] [PATCH for 4.2 1/3] linux user: Add support for FDFLUSH ioctl Aleksandar Markovic
2019-07-25 9:33 ` Laurent Vivier
2019-07-24 14:12 ` [Qemu-devel] [PATCH for 4.2 2/3] linux-user: Add support for FDMSGON and FDMSGOFF ioctls Aleksandar Markovic
2019-07-25 9:35 ` Laurent Vivier
2019-07-24 14:12 ` [Qemu-devel] [PATCH for 4.2 3/3] linux-user: Add support for RNDRESEEDCRNG ioctl Aleksandar Markovic
2019-07-25 9:40 ` Laurent Vivier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).