From 2b1fec26365f2715698c24fa6fc301cec7f22be73f81cf70cae202dfee75634d Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Wed, 10 Oct 2012 17:32:24 +0000 Subject: [PATCH] - Add more block ioctl handlers for kiwi OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=116 --- ...-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 +- 0032-slirp-nooutgoing.patch.patch | 2 +- ...-vnc-password-file-and-incoming-conn.patch | 2 +- ...-linux-user-add-more-blk-ioctls.patc.patch | 74 +++++++++++++++++++ qemu.changes | 5 ++ qemu.spec | 2 + 10 files changed, 89 insertions(+), 9 deletions(-) create mode 100644 0034-linux-user-add-more-blk-ioctls.patc.patch diff --git a/0011-block-vmdk-Support-creation-of-SCSI.patch b/0011-block-vmdk-Support-creation-of-SCSI.patch index b11675dd..ed16de6a 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 0d501669..64e5ebc3 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 6be4233d..ee0cc5f7 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 b82c13c9..c3b5919a 100644 --- a/0021-use-libexecdir-instead-of-ignoring-.patch +++ b/0021-use-libexecdir-instead-of-ignoring-.patch @@ -1,10 +1,9 @@ From 50cab0124e30c58c786c181b8b1909c659a7d458 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 c8735931..9f69cc7d 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/0032-slirp-nooutgoing.patch.patch b/0032-slirp-nooutgoing.patch.patch index 4abe3fd0..542b2a5a 100644 --- a/0032-slirp-nooutgoing.patch.patch +++ b/0032-slirp-nooutgoing.patch.patch @@ -1,5 +1,5 @@ From 512ceb1779ce40a1f2a91fad147210bfa5996512 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20F=C3=A4rber?= +From: =?utf-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 29 Aug 2012 18:42:56 +0200 Subject: [PATCH] slirp: -nooutgoing diff --git a/0033-vnc-password-file-and-incoming-conn.patch b/0033-vnc-password-file-and-incoming-conn.patch index 5af64175..67c93903 100644 --- a/0033-vnc-password-file-and-incoming-conn.patch +++ b/0033-vnc-password-file-and-incoming-conn.patch @@ -1,5 +1,5 @@ From 25c622437e7c59a99e35fe9318cb5ec11c7cff4a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20F=C3=A4rber?= +From: =?utf-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 29 Aug 2012 20:06:01 +0200 Subject: [PATCH] vnc: password-file= and incoming-connections= diff --git a/0034-linux-user-add-more-blk-ioctls.patc.patch b/0034-linux-user-add-more-blk-ioctls.patc.patch new file mode 100644 index 00000000..ffbb7592 --- /dev/null +++ b/0034-linux-user-add-more-blk-ioctls.patc.patch @@ -0,0 +1,74 @@ +From 23f4e9a5b32491e772cf130786a561dff4afdbf3 Mon Sep 17 00:00:00 2001 +From: Alexander Graf +Date: Wed, 10 Oct 2012 10:21:20 +0200 +Subject: [PATCH] linux-user: add more blk ioctls + +Implement a few more ioctls that operate on block devices. + +Signed-off-by: Alexander Graf +--- + linux-user/ioctls.h | 18 ++++++++++++++++++ + linux-user/syscall_defs.h | 6 ++++++ + linux-user/syscall_types.h | 3 +++ + 3 files changed, 27 insertions(+), 0 deletions(-) + +diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h +index 5027c74..4522c14 100644 +--- a/linux-user/ioctls.h ++++ b/linux-user/ioctls.h +@@ -71,6 +71,24 @@ + #ifdef BLKGETSIZE64 + IOCTL(BLKGETSIZE64, IOC_R, MK_PTR(TYPE_ULONGLONG)) + #endif ++#ifdef BLKDISCARD ++ IOCTL(BLKDISCARD, IOC_W, MK_PTR(MK_STRUCT(STRUCT_blkdiscard))) ++#endif ++#ifdef BLKIOMIN ++ IOCTL(BLKIOMIN, IOC_R, MK_PTR(TYPE_INT)) ++#endif ++#ifdef BLKIOOPT ++ IOCTL(BLKIOOPT, IOC_R, MK_PTR(TYPE_INT)) ++#endif ++#ifdef BLKALIGNOFF ++ IOCTL(BLKALIGNOFF, IOC_R, MK_PTR(TYPE_INT)) ++#endif ++#ifdef BLKPBSZGET ++ IOCTL(BLKPBSZGET, IOC_R, MK_PTR(TYPE_INT)) ++#endif ++#ifdef BLKDISCARDZEROES ++ IOCTL(BLKDISCARDZEROES, IOC_R, MK_PTR(TYPE_INT)) ++#endif + IOCTL(BLKFLSBUF, 0, TYPE_NULL) + IOCTL(BLKRASET, 0, TYPE_INT) + IOCTL(BLKRAGET, IOC_R, MK_PTR(TYPE_LONG)) +diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h +index d618414..2583dfb 100644 +--- a/linux-user/syscall_defs.h ++++ b/linux-user/syscall_defs.h +@@ -885,6 +885,12 @@ struct target_pollfd { + #define TARGET_BLKGETSIZE64 TARGET_IOR(0x12,114,abi_ulong) + /* return device size in bytes + (u64 *arg) */ ++#define TARGET_BLKDISCARD TARGET_IO(0x12,119) ++#define TARGET_BLKIOMIN TARGET_IO(0x12,120) ++#define TARGET_BLKIOOPT TARGET_IO(0x12,121) ++#define TARGET_BLKALIGNOFF TARGET_IO(0x12,122) ++#define TARGET_BLKPBSZGET TARGET_IO(0x12,123) ++#define TARGET_BLKDISCARDZEROES TARGET_IO(0x12,124) + #define TARGET_FIBMAP TARGET_IO(0x00,1) /* bmap access */ + #define TARGET_FIGETBSZ TARGET_IO(0x00,2) /* get the block size used for bmap */ + #define TARGET_FS_IOC_FIEMAP TARGET_IOWR('f',11,struct fiemap) +diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h +index 7897e37..dd78619 100644 +--- a/linux-user/syscall_types.h ++++ b/linux-user/syscall_types.h +@@ -71,6 +71,9 @@ STRUCT(kbentry, + STRUCT(kbsentry, + TYPE_CHAR, MK_ARRAY(TYPE_CHAR, 512)) + ++STRUCT(blkdiscard, ++ MK_ARRAY(TYPE_LONGLONG, 2)) ++ + STRUCT(audio_buf_info, + TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT) + diff --git a/qemu.changes b/qemu.changes index d37c3962..f2e8eadf 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Oct 10 17:16:20 UTC 2012 - agraf@suse.com + +- Add more block ioctl handlers for kiwi + ------------------------------------------------------------------- Tue Oct 9 19:55:32 UTC 2012 - afaerber@suse.de diff --git a/qemu.spec b/qemu.spec index 465d894f..7d34164a 100644 --- a/qemu.spec +++ b/qemu.spec @@ -57,6 +57,7 @@ Patch0030: 0030-linux-user-fix-statfs.patch.patch Patch0031: 0031-linux-user-XXX-disable-fiemap.patch.patch Patch0032: 0032-slirp-nooutgoing.patch.patch Patch0033: 0033-vnc-password-file-and-incoming-conn.patch +Patch0034: 0034-linux-user-add-more-blk-ioctls.patc.patch # this is to make lint happy Source300: rpmlintrc Source302: bridge.conf @@ -208,6 +209,7 @@ run cross-architecture builds. %patch0031 -p1 %patch0032 -p1 %patch0033 -p1 +%patch0034 -p1 %build # build QEMU