From 90ea47ce78b58d2f4bbbb83629d4dad0cbe46b215b5fd219606236aab4747835 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Tue, 21 Aug 2012 08:26:43 +0000 Subject: [PATCH] - add support for FS_IOC_[G|S]ETFLAG ioctls OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=101 --- ...-Handle-CPU-interrupts-by-inline-che.patch | 2 +- ...-XXX-work-around-SA_RESTART-race-wit.patch | 2 +- ...-block-vmdk-Support-creation-of-SCSI.patch | 2 +- ...-configure-Enable-mipsn32-linux-user.patch | 2 +- ...-linux-user-add-binfmt-wrapper-for-a.patch | 2 +- ...-use-libexecdir-instead-of-ignoring-.patch | 5 ++- ...-linux-user-fix-segmentation-fault-p.patch | 2 +- ...-linux-user-implement-FS_IOC_GETFLAG.patch | 36 +++++++++++++++++++ ...-linux-user-implement-FS_IOC_SETFLAG.patch | 35 ++++++++++++++++++ qemu.changes | 5 +++ qemu.spec | 4 +++ 11 files changed, 88 insertions(+), 9 deletions(-) create mode 100644 0028-linux-user-implement-FS_IOC_GETFLAG.patch create mode 100644 0029-linux-user-implement-FS_IOC_SETFLAG.patch diff --git a/0001-Handle-CPU-interrupts-by-inline-che.patch b/0001-Handle-CPU-interrupts-by-inline-che.patch index 80c3f452..dafc7ea3 100644 --- a/0001-Handle-CPU-interrupts-by-inline-che.patch +++ b/0001-Handle-CPU-interrupts-by-inline-che.patch @@ -134,7 +134,7 @@ index 430cb44..65a75d9 100644 *icount_arg = num_insns; gen_set_label(icount_label); diff --git a/linux-user/main.c b/linux-user/main.c -index 7dea084..d9814bc4 100644 +index 7dea084..d9814bc 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -64,6 +64,7 @@ unsigned long reserved_va; diff --git a/0003-XXX-work-around-SA_RESTART-race-wit.patch b/0003-XXX-work-around-SA_RESTART-race-wit.patch index 68327238..089f73ac 100644 --- a/0003-XXX-work-around-SA_RESTART-race-wit.patch +++ b/0003-XXX-work-around-SA_RESTART-race-wit.patch @@ -12,7 +12,7 @@ Subject: [PATCH] XXX work around SA_RESTART race with boehm-gc (ARM only) 4 files changed, 130 insertions(+), 10 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c -index d9814bc4..587f421 100644 +index d9814bc..587f421 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -847,15 +847,22 @@ void cpu_loop(CPUARMState *env) diff --git a/0011-block-vmdk-Support-creation-of-SCSI.patch b/0011-block-vmdk-Support-creation-of-SCSI.patch index c2d17490..2fcd3aeb 100644 --- a/0011-block-vmdk-Support-creation-of-SCSI.patch +++ b/0011-block-vmdk-Support-creation-of-SCSI.patch @@ -3,7 +3,7 @@ From: Ulrich Hecht Date: Tue, 14 Apr 2009 16:37:42 +0200 Subject: [PATCH] block/vmdk: Support creation of SCSI VMDK images in qemu-img MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 +Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ulrich Hecht diff --git a/0012-configure-Enable-mipsn32-linux-user.patch b/0012-configure-Enable-mipsn32-linux-user.patch index d48e7027..7de567e5 100644 --- a/0012-configure-Enable-mipsn32-linux-user.patch +++ b/0012-configure-Enable-mipsn32-linux-user.patch @@ -3,7 +3,7 @@ From: Ulrich Hecht Date: Wed, 25 Aug 2010 14:23:43 +0200 Subject: [PATCH] configure: Enable mipsn32*-linux-user builds MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 +Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ulrich Hecht diff --git a/0013-linux-user-add-binfmt-wrapper-for-a.patch b/0013-linux-user-add-binfmt-wrapper-for-a.patch index 73d6ed23..50dd6650 100644 --- a/0013-linux-user-add-binfmt-wrapper-for-a.patch +++ b/0013-linux-user-add-binfmt-wrapper-for-a.patch @@ -3,7 +3,7 @@ From: Alexander Graf Date: Fri, 30 Sep 2011 19:40:36 +0200 Subject: [PATCH] linux-user: add binfmt wrapper for argv[0] handling MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 +Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit When using qemu's linux-user binaries through binfmt, argv[0] gets lost diff --git a/0021-use-libexecdir-instead-of-ignoring-.patch b/0021-use-libexecdir-instead-of-ignoring-.patch index 9e0cbfc7..e1a251d2 100644 --- a/0021-use-libexecdir-instead-of-ignoring-.patch +++ b/0021-use-libexecdir-instead-of-ignoring-.patch @@ -1,10 +1,9 @@ From f2fc46bfbd9a0393e29f45c7470a96074227a911 Mon Sep 17 00:00:00 2001 From: Michael Tokarev Date: Thu, 7 Jun 2012 01:11:00 +0400 -Subject: [PATCH] use --libexecdir instead of ignoring it first and - reinventing it later +Subject: [PATCH] use --libexecdir instead of ignoring it first and reinventing it later MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 +Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Commit 7b93fadf3a38d1ed65ea5536a52efc2772c6e3b8 "Add basic version diff --git a/0023-linux-user-fix-segmentation-fault-p.patch b/0023-linux-user-fix-segmentation-fault-p.patch index befc2ad5..545ab9e8 100644 --- a/0023-linux-user-fix-segmentation-fault-p.patch +++ b/0023-linux-user-fix-segmentation-fault-p.patch @@ -3,7 +3,7 @@ From: Alexander Graf Date: Mon, 25 Jun 2012 19:02:32 +0200 Subject: [PATCH] linux-user: fix segmentation fault passing with g2h(x) != x MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 +Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit When forwarding a segmentation fault into the guest process, we were passing diff --git a/0028-linux-user-implement-FS_IOC_GETFLAG.patch b/0028-linux-user-implement-FS_IOC_GETFLAG.patch new file mode 100644 index 00000000..9bf0df3a --- /dev/null +++ b/0028-linux-user-implement-FS_IOC_GETFLAG.patch @@ -0,0 +1,36 @@ +From a3b2002cfb9846a721ab51793c8342ab03e7c593 Mon Sep 17 00:00:00 2001 +From: Alexander Graf +Date: Mon, 20 Aug 2012 00:02:52 +0200 +Subject: [PATCH] linux-user: implement FS_IOC_GETFLAGS ioctl + +Signed-off-by: Alexander Graf +--- + linux-user/ioctls.h | 1 + + linux-user/syscall_defs.h | 2 ++ + 2 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h +index bb76c56..1b798b3 100644 +--- a/linux-user/ioctls.h ++++ b/linux-user/ioctls.h +@@ -86,6 +86,7 @@ + IOCTL_SPECIAL(FS_IOC_FIEMAP, IOC_W | IOC_R, do_ioctl_fs_ioc_fiemap, + MK_PTR(MK_STRUCT(STRUCT_fiemap))) + #endif ++ IOCTL(FS_IOC_GETFLAGS, IOC_R, MK_PTR(TYPE_INT)) + + IOCTL(SIOCATMARK, 0, TYPE_NULL) + IOCTL(SIOCADDRT, IOC_W, MK_PTR(MK_STRUCT(STRUCT_rtentry))) +diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h +index 3b7b1c3..67fbcab 100644 +--- a/linux-user/syscall_defs.h ++++ b/linux-user/syscall_defs.h +@@ -2344,6 +2344,8 @@ struct target_eabi_flock64 { + #define TARGET_MTIOCGET TARGET_IOR('m', 2, struct mtget) + #define TARGET_MTIOCPOS TARGET_IOR('m', 3, struct mtpos) + ++#define TARGET_FS_IOC_GETFLAGS TARGET_IORU('f', 1) ++ + struct target_sysinfo { + abi_long uptime; /* Seconds since boot */ + abi_ulong loads[3]; /* 1, 5, and 15 minute load averages */ diff --git a/0029-linux-user-implement-FS_IOC_SETFLAG.patch b/0029-linux-user-implement-FS_IOC_SETFLAG.patch new file mode 100644 index 00000000..fae46d69 --- /dev/null +++ b/0029-linux-user-implement-FS_IOC_SETFLAG.patch @@ -0,0 +1,35 @@ +From 13b665ad3c77d380fdea162870a55bf79d807525 Mon Sep 17 00:00:00 2001 +From: Alexander Graf +Date: Mon, 20 Aug 2012 00:07:13 +0200 +Subject: [PATCH] linux-user: implement FS_IOC_SETFLAGS ioctl + +Signed-off-by: Alexander Graf +--- + linux-user/ioctls.h | 1 + + linux-user/syscall_defs.h | 1 + + 2 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h +index 1b798b3..5027c74 100644 +--- a/linux-user/ioctls.h ++++ b/linux-user/ioctls.h +@@ -87,6 +87,7 @@ + MK_PTR(MK_STRUCT(STRUCT_fiemap))) + #endif + IOCTL(FS_IOC_GETFLAGS, IOC_R, MK_PTR(TYPE_INT)) ++ IOCTL(FS_IOC_SETFLAGS, IOC_W, MK_PTR(TYPE_INT)) + + IOCTL(SIOCATMARK, 0, TYPE_NULL) + IOCTL(SIOCADDRT, IOC_W, MK_PTR(MK_STRUCT(STRUCT_rtentry))) +diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h +index 67fbcab..349229d 100644 +--- a/linux-user/syscall_defs.h ++++ b/linux-user/syscall_defs.h +@@ -2345,6 +2345,7 @@ struct target_eabi_flock64 { + #define TARGET_MTIOCPOS TARGET_IOR('m', 3, struct mtpos) + + #define TARGET_FS_IOC_GETFLAGS TARGET_IORU('f', 1) ++#define TARGET_FS_IOC_SETFLAGS TARGET_IOWU('f', 2) + + struct target_sysinfo { + abi_long uptime; /* Seconds since boot */ diff --git a/qemu.changes b/qemu.changes index ccdb7d60..09b81f39 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Aug 21 08:21:20 UTC 2012 - agraf@suse.com + +- add support for FS_IOC_[G|S]ETFLAG ioctls + ------------------------------------------------------------------- Fri Aug 17 14:30:28 UTC 2012 - afaerber@suse.de diff --git a/qemu.spec b/qemu.spec index 2751f5f8..f9778b26 100644 --- a/qemu.spec +++ b/qemu.spec @@ -51,6 +51,8 @@ Patch0024: 0024-linux-user-lock-tcg.patch.patch Patch0025: 0025-linux-user-Run-multi-threaded-code-.patch Patch0026: 0026-linux-user-lock-tb-flushing-too.pat.patch Patch0027: 0027-linux-user-Fake-proc-cpuinfo.patch.patch +Patch0028: 0028-linux-user-implement-FS_IOC_GETFLAG.patch +Patch0029: 0029-linux-user-implement-FS_IOC_SETFLAG.patch # this is to make lint happy Source300: rpmlintrc Source302: bridge.conf @@ -189,6 +191,8 @@ run cross-architecture builds. %patch0025 -p1 %patch0026 -p1 %patch0027 -p1 +%patch0028 -p1 +%patch0029 -p1 %build # build QEMU