Hello community,

here is the log from the commit of package qemu for openSUSE:Factory checked in 
at 2014-02-11 10:45:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qemu (Old)
 and      /work/SRC/openSUSE:Factory/.qemu.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "qemu"

Changes:
--------
--- /work/SRC/openSUSE:Factory/qemu/qemu-linux-user.changes     2014-01-23 
15:55:24.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/qemu-linux-user.changes        
2014-02-11 10:45:15.000000000 +0100
@@ -1,0 +2,6 @@
+Fri Jan 24 11:20:52 UTC 2014 - [email protected]
+
+- Synchronize syscall numbers from Linux v3.13
+  0041-linux-user-sync-syscall-numbers-upt.patch
+
+-------------------------------------------------------------------
--- /work/SRC/openSUSE:Factory/qemu/qemu.changes        2014-01-23 
15:55:24.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/qemu.changes   2014-02-11 
10:45:15.000000000 +0100
@@ -1,0 +2,12 @@
+Mon Feb  3 15:54:06 UTC 2014 - [email protected]
+
+- Implement discard support for xen_disk (olh) (fate#316071)
+  0042-xen_disk-add-discard-support.patch.patch
+
+-------------------------------------------------------------------
+Fri Jan 24 11:03:58 UTC 2014 - [email protected]
+
+- Simplified VMDK SCSI support handling (backport from 13.1/v1.6.2)
+* Increases the number of heads for SCSI from 16 to 255
+
+-------------------------------------------------------------------

New:
----
  0041-linux-user-sync-syscall-numbers-upt.patch
  0042-xen_disk-add-discard-support.patch.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ qemu-linux-user.spec ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:16.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:16.000000000 +0100
@@ -65,6 +65,8 @@
 Patch0038:      0038-roms-Build-vgabios.bin.patch.patch
 Patch0039:      0039-configure-Enable-PIE-for-ppc-and-pp.patch
 Patch0040:      0040-linux-user-Implement-BLKPG-ioctl.pa.patch
+Patch0041:      0041-linux-user-sync-syscall-numbers-upt.patch
+Patch0042:      0042-xen_disk-add-discard-support.patch.patch
 # Please do not add patches manually here, run update_git.sh.
 # this is to make lint happy
 Source300:      rpmlintrc
@@ -157,6 +159,8 @@
 %patch0038 -p1
 %patch0039 -p1
 %patch0040 -p1
+%patch0041 -p1
+%patch0042 -p1
 
 %build
 ./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \

++++++ qemu.spec ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:16.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:16.000000000 +0100
@@ -72,6 +72,8 @@
 Patch0038:      0038-roms-Build-vgabios.bin.patch.patch
 Patch0039:      0039-configure-Enable-PIE-for-ppc-and-pp.patch
 Patch0040:      0040-linux-user-Implement-BLKPG-ioctl.pa.patch
+Patch0041:      0041-linux-user-sync-syscall-numbers-upt.patch
+Patch0042:      0042-xen_disk-add-discard-support.patch.patch
 # Please do not add patches manually here, run update_git.sh.
 
 # roms/ipxe patches
@@ -305,6 +307,8 @@
 %patch0038 -p1
 %patch0039 -p1
 %patch0040 -p1
+%patch0041 -p1
+%patch0042 -p1
 
 %patch1000 -p1
 %patch1001 -p1

++++++ 0010-block-vmdk-Support-creation-of-SCSI.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:16.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:16.000000000 +0100
@@ -1,4 +1,4 @@
-From d45da9e89458d0641e80fac80699f847a18714b5 Mon Sep 17 00:00:00 2001
+From d281dbef7cffee850d5445357affb5e0420ceffe Mon Sep 17 00:00:00 2001
 From: Ulrich Hecht <[email protected]>
 Date: Tue, 14 Apr 2009 16:37:42 +0200
 Subject: [PATCH] block/vmdk: Support creation of SCSI VMDK images in qemu-img
@@ -10,6 +10,7 @@
 [AF: Changed BLOCK_FLAG_SCSI from 8 to 16 for v1.2]
 [AF: Rebased onto upstream VMDK SCSI support]
 [AF: Rebased onto skipping of image creation in v1.7]
+[AF: Simplified in preparation for v1.7.1/v2.0]
 Signed-off-by: Andreas Färber <[email protected]>
 ---
  block.c                   | 6 +++++-
@@ -43,10 +44,10 @@
      }
      ret = bdrv_create(drv, filename, param, &local_err);
 diff --git a/block/vmdk.c b/block/vmdk.c
-index a7ebd0f..c047a52 100644
+index a7ebd0f..818f7a0 100644
 --- a/block/vmdk.c
 +++ b/block/vmdk.c
-@@ -1641,6 +1641,8 @@ static int vmdk_create(const char *filename, 
QEMUOptionParameter *options,
+@@ -1641,11 +1641,13 @@ static int vmdk_create(const char *filename, 
QEMUOptionParameter *options,
              fmt = options->value.s;
          } else if (!strcmp(options->name, BLOCK_OPT_ZEROED_GRAIN)) {
              zeroed_grain |= options->value.n;
@@ -55,15 +56,12 @@
          }
          options++;
      }
-@@ -1748,7 +1750,7 @@ static int vmdk_create(const char *filename, 
QEMUOptionParameter *options,
-             ext_desc_lines,
-             (flags & BLOCK_FLAG_COMPAT6 ? 6 : 4),
-             total_size / (int64_t)(63 * number_heads * 512), number_heads,
--                adapter_type);
-+            flags & BLOCK_FLAG_SCSI ? "lsilogic" : adapter_type);
-     if (split || flat) {
-         fd = qemu_open(filename,
-                        O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_LARGEFILE,
+     if (!adapter_type) {
+-        adapter_type = "ide";
++        adapter_type = flags & BLOCK_FLAG_SCSI ? "lsilogic" : "ide";
+     } else if (strcmp(adapter_type, "ide") &&
+                strcmp(adapter_type, "buslogic") &&
+                strcmp(adapter_type, "lsilogic") &&
 @@ -1926,6 +1928,11 @@ static QEMUOptionParameter vmdk_create_options[] = {
          .type = OPT_FLAG,
          .help = "Enable efficient zero writes using the zeroed-grain GTE 
feature"

++++++ 0011-linux-user-add-binfmt-wrapper-for-a.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:16.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:16.000000000 +0100
@@ -1,4 +1,4 @@
-From 2f5b7655408db4b0f03795589591d44f64d5f270 Mon Sep 17 00:00:00 2001
+From 34c50725ae7409428ce51b32ad0b699b7aee9192 Mon Sep 17 00:00:00 2001
 From: Alexander Graf <[email protected]>
 Date: Fri, 30 Sep 2011 19:40:36 +0200
 Subject: [PATCH] linux-user: add binfmt wrapper for argv[0] handling

++++++ 0012-linux-user-Ignore-timer_create-sysc.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:16.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:16.000000000 +0100
@@ -1,4 +1,4 @@
-From 5bfa8a31057be27c9e618cb3c11628c8d64f7d0a Mon Sep 17 00:00:00 2001
+From 089db6c88f5edc0e363a47ccaf97f217f34090c7 Mon Sep 17 00:00:00 2001
 From: Alexander Graf <[email protected]>
 Date: Sun, 11 Dec 2011 01:19:24 +0100
 Subject: [PATCH] linux-user: Ignore timer_create syscall

++++++ 0013-linux-user-be-silent-about-capget-f.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:16.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:16.000000000 +0100
@@ -1,4 +1,4 @@
-From dc88ad73d02655728ed1be588881c7e2868a5430 Mon Sep 17 00:00:00 2001
+From b0817614daa8594bcc10dff88b384027d00deb1f Mon Sep 17 00:00:00 2001
 From: Alexander Graf <[email protected]>
 Date: Sun, 11 Dec 2011 01:21:51 +0100
 Subject: [PATCH] linux-user: be silent about capget failures

++++++ 0014-PPC-KVM-Disable-mmu-notifier-check..patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From f4b962121f2af60b6daa1c45b0be9ac271833e61 Mon Sep 17 00:00:00 2001
+From 5d39d4ae6288aababdbf8c3da29342d587eb17f5 Mon Sep 17 00:00:00 2001
 From: Alexander Graf <[email protected]>
 Date: Fri, 6 Jan 2012 01:05:55 +0100
 Subject: [PATCH] PPC: KVM: Disable mmu notifier check

++++++ 0015-linux-user-fix-segfault-deadlock.pa.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From f2ba1170c16c7ed49ad3978ad2c6e0d459aef5b5 Mon Sep 17 00:00:00 2001
+From a49f495d192db43703e5e5f567673c27d96a720e Mon Sep 17 00:00:00 2001
 From: Alexander Graf <[email protected]>
 Date: Fri, 13 Jan 2012 17:05:41 +0100
 Subject: [PATCH] linux-user: fix segfault deadlock

++++++ 0016-linux-user-binfmt-support-host-bina.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From d72ea666ac421fe62ce7ab7f8b404a4b5ad4e8e6 Mon Sep 17 00:00:00 2001
+From ffc3de462248cc6eb1c79ca0ad001b3c4135fa72 Mon Sep 17 00:00:00 2001
 From: Alexander Graf <[email protected]>
 Date: Thu, 2 Feb 2012 18:02:33 +0100
 Subject: [PATCH] linux-user: binfmt: support host binaries

++++++ 0017-linux-user-arm-no-tb_flush-on-reset.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From 1f7a819e8553dce0bf9c5ab6280b012483cd7b6d Mon Sep 17 00:00:00 2001
+From 1abee77b09c8dc3e64bc1357a3f73c0e79f62ce5 Mon Sep 17 00:00:00 2001
 From: Alexander Graf <[email protected]>
 Date: Tue, 29 May 2012 15:30:01 +0200
 Subject: [PATCH] linux-user: arm: no tb_flush on reset

++++++ 0018-linux-user-Ignore-broken-loop-ioctl.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From 342a8d782336d637da2e22f378684400d8459604 Mon Sep 17 00:00:00 2001
+From a7f0cbeed23b5ff6c4a3334e36f165ec8db7d9d3 Mon Sep 17 00:00:00 2001
 From: Alexander Graf <[email protected]>
 Date: Tue, 12 Jun 2012 04:41:10 +0200
 Subject: [PATCH] linux-user: Ignore broken loop ioctl

++++++ 0019-linux-user-lock-tcg.patch.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From 7b37ca7330058615efd4da075e39f482099edb5b Mon Sep 17 00:00:00 2001
+From e98cc65bb2fd095cc261352e052cbb4b41c50e60 Mon Sep 17 00:00:00 2001
 From: Alexander Graf <[email protected]>
 Date: Thu, 5 Jul 2012 17:31:39 +0200
 Subject: [PATCH] linux-user: lock tcg

++++++ 0020-linux-user-Run-multi-threaded-code-.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From 5a24d8e40ae04bbc4cb20472e16c86f5b587d1cb Mon Sep 17 00:00:00 2001
+From 3a04f59b72a44bf044da642999ed16c340647809 Mon Sep 17 00:00:00 2001
 From: Alexander Graf <[email protected]>
 Date: Tue, 10 Jul 2012 20:40:55 +0200
 Subject: [PATCH] linux-user: Run multi-threaded code on a single core

++++++ 0021-linux-user-lock-tb-flushing-too.pat.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From 8066265b8a179b791443faa55f79533086a7531c Mon Sep 17 00:00:00 2001
+From 2574d5848c03ef1a5c2ef28f698642924d6c7172 Mon Sep 17 00:00:00 2001
 From: Alexander Graf <[email protected]>
 Date: Wed, 11 Jul 2012 16:47:42 +0200
 Subject: [PATCH] linux-user: lock tb flushing too

++++++ 0022-linux-user-Fake-proc-cpuinfo.patch.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From c34029edc401e149283f86f6a14c41cc5d24d737 Mon Sep 17 00:00:00 2001
+From 634861f528d7eee037567dac6704702424a234a7 Mon Sep 17 00:00:00 2001
 From: Alexander Graf <[email protected]>
 Date: Mon, 23 Jul 2012 10:24:14 +0200
 Subject: [PATCH] linux-user: Fake /proc/cpuinfo

++++++ 0023-linux-user-implement-FS_IOC_GETFLAG.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From e5a126a039903adc1be28c3860378d21cd1e69ec Mon Sep 17 00:00:00 2001
+From 8eac49f9fffe9f5f4567a9a19e933ac3bbcb7c0f Mon Sep 17 00:00:00 2001
 From: Alexander Graf <[email protected]>
 Date: Mon, 20 Aug 2012 00:02:52 +0200
 Subject: [PATCH] linux-user: implement FS_IOC_GETFLAGS ioctl

++++++ 0024-linux-user-implement-FS_IOC_SETFLAG.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From 15305b991f0b484b1fef9fcdb0859bb784fc8d94 Mon Sep 17 00:00:00 2001
+From f2de24a0abc52e44a362fe1c57fbd4e8807466e3 Mon Sep 17 00:00:00 2001
 From: Alexander Graf <[email protected]>
 Date: Mon, 20 Aug 2012 00:07:13 +0200
 Subject: [PATCH] linux-user: implement FS_IOC_SETFLAGS ioctl

++++++ 0025-linux-user-XXX-disable-fiemap.patch.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From e903c77c77f6c01a73de3f0df4668c692ad409a1 Mon Sep 17 00:00:00 2001
+From 3a9bbda4348e60a7d0c51c228153c259464d2e55 Mon Sep 17 00:00:00 2001
 From: Alexander Graf <[email protected]>
 Date: Tue, 21 Aug 2012 14:20:40 +0200
 Subject: [PATCH] linux-user: XXX disable fiemap

++++++ 0026-slirp-nooutgoing.patch.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From 34064f187f0bf84ae3388cda80e5a693023e5746 Mon Sep 17 00:00:00 2001
+From 408d0bbac3eecf8983a9a0277f630f63e0c1cdfb Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <[email protected]>
 Date: Wed, 29 Aug 2012 18:42:56 +0200
 Subject: [PATCH] slirp: -nooutgoing

++++++ 0027-vnc-password-file-and-incoming-conn.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From f364cea24a3cbacd003ea048a20e6e6aea639221 Mon Sep 17 00:00:00 2001
+From 7dd40e737a6fa4ba0af545912bacbc2a2a4a9e46 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <[email protected]>
 Date: Wed, 29 Aug 2012 20:06:01 +0200
 Subject: [PATCH] vnc: password-file= and incoming-connections=

++++++ 0028-linux-user-add-more-blk-ioctls.patc.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From bb1e4498e57e320011c87f203fab45e01be84b99 Mon Sep 17 00:00:00 2001
+From 5863b28fbb5f165cac031abca0eb9ba5c0877f7c Mon Sep 17 00:00:00 2001
 From: Alexander Graf <[email protected]>
 Date: Wed, 10 Oct 2012 10:21:20 +0200
 Subject: [PATCH] linux-user: add more blk ioctls

++++++ 0029-linux-user-use-target_ulong.patch.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From 29aa5e72e8344cb0357a07c92f9603eeebfe3fb6 Mon Sep 17 00:00:00 2001
+From f585148dc73b9998031d37d37e397ae2a1642960 Mon Sep 17 00:00:00 2001
 From: Alexander Graf <[email protected]>
 Date: Tue, 9 Oct 2012 09:06:49 +0200
 Subject: [PATCH] linux-user: use target_ulong

++++++ 0030-block-Add-support-for-DictZip-enabl.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From 59e80cf171a9fc9d381af5d94c9db38612486a05 Mon Sep 17 00:00:00 2001
+From bf5dfef75e13bb80e84fea15471a890f247e65fe Mon Sep 17 00:00:00 2001
 From: Alexander Graf <[email protected]>
 Date: Wed, 5 Aug 2009 09:49:37 +0200
 Subject: [PATCH] block: Add support for DictZip enabled gzip files

++++++ 0031-block-Add-tar-container-format.patc.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From 87eb7dec88d00f4196fabbc5162cebb1ff6c4278 Mon Sep 17 00:00:00 2001
+From 3c619a2d181b564570e0931c67806ed0206db9da Mon Sep 17 00:00:00 2001
 From: Alexander Graf <[email protected]>
 Date: Wed, 5 Aug 2009 17:28:38 +0200
 Subject: [PATCH] block: Add tar container format

++++++ 0032-Legacy-Patch-kvm-qemu-preXX-dictzip.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From 07c245de0ee18627f5ba0bd91f53e581868a09fa Mon Sep 17 00:00:00 2001
+From 352ccb463225f5028de8aeb9a12379800bef30e6 Mon Sep 17 00:00:00 2001
 From: Alexander Graf <[email protected]>
 Date: Wed, 12 Dec 2012 19:11:30 +0100
 Subject: [PATCH] Legacy Patch kvm-qemu-preXX-dictzip3.patch

++++++ 0033-Legacy-Patch-kvm-qemu-preXX-report-.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From 8e742d4b086acbff8285675935ba439b598de5a8 Mon Sep 17 00:00:00 2001
+From 94aa4d55aca4798f31f17bc3acc60dfe60473ea9 Mon Sep 17 00:00:00 2001
 From: Alexander Graf <[email protected]>
 Date: Wed, 12 Dec 2012 19:11:31 +0100
 Subject: [PATCH] Legacy Patch kvm-qemu-preXX-report-default-mac-used.patch

++++++ 0034-console-add-question-mark-escape-op.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From 1c20cbb2976e61d615682fe28dd8de87b573fab5 Mon Sep 17 00:00:00 2001
+From 10e80abede069e92b8cf66c8ee63f28a0ccc36db Mon Sep 17 00:00:00 2001
 From: Alexander Graf <[email protected]>
 Date: Mon, 6 Jun 2011 06:53:52 +0200
 Subject: [PATCH] console: add question-mark escape operator

++++++ 0035-Make-char-muxer-more-robust-wrt-sma.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From c9c835120d3b24d813374a58bd0aaa4ce0dc398b Mon Sep 17 00:00:00 2001
+From 91da61532e47c3dde792d1dfdfc63379a7118e18 Mon Sep 17 00:00:00 2001
 From: Alexander Graf <[email protected]>
 Date: Thu, 1 Apr 2010 17:36:23 +0200
 Subject: [PATCH] Make char muxer more robust wrt small FIFOs

++++++ 0036-linux-user-lseek-explicitly-cast-no.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From 2a97fe64cb1a621b99dcb4f5f37f30264e63bbbd Mon Sep 17 00:00:00 2001
+From f66a19e466bdb8121073b20e73818a7d5491551f Mon Sep 17 00:00:00 2001
 From: Alexander Graf <[email protected]>
 Date: Thu, 13 Dec 2012 14:29:22 +0100
 Subject: [PATCH] linux-user: lseek: explicitly cast non-set offsets to signed

++++++ 0037-virtfs-proxy-helper-Provide-__u64-f.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From d56b7f021794a2c7ea33506b089152e6bd98e19c Mon Sep 17 00:00:00 2001
+From 22ff512113b5021ee14bb7dd32ef220cdfe0d159 Mon Sep 17 00:00:00 2001
 From: Bruce Rogers <[email protected]>
 Date: Thu, 16 May 2013 12:39:10 +0200
 Subject: [PATCH] virtfs-proxy-helper: Provide __u64 for broken

++++++ 0038-roms-Build-vgabios.bin.patch.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From 752e7f8fd399dd18f0eb59e63588cdf877c76d42 Mon Sep 17 00:00:00 2001
+From 3f9ea0b67bffcf0022d8a3cb42277d90caac3a7c Mon Sep 17 00:00:00 2001
 From: Bruce Rogers <[email protected]>
 Date: Wed, 2 Oct 2013 17:51:46 +0200
 Subject: [PATCH] roms: Build vgabios.bin

++++++ 0039-configure-Enable-PIE-for-ppc-and-pp.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From 26cd29bf6bce044ae2eb852e4ac135f5930f6ce8 Mon Sep 17 00:00:00 2001
+From aa492137e5195f3340447be4be63f4ac9337d2df Mon Sep 17 00:00:00 2001
 From: Dinar Valeev <[email protected]>
 Date: Wed, 2 Oct 2013 17:56:03 +0200
 Subject: [PATCH] configure: Enable PIE for ppc and ppc64 hosts

++++++ 0040-linux-user-Implement-BLKPG-ioctl.pa.patch ++++++
--- /var/tmp/diff_new_pack.8AZZlD/_old  2014-02-11 10:45:17.000000000 +0100
+++ /var/tmp/diff_new_pack.8AZZlD/_new  2014-02-11 10:45:17.000000000 +0100
@@ -1,4 +1,4 @@
-From bcbf3e6efa6b8fd95f2eee2194f40781c952f7b9 Mon Sep 17 00:00:00 2001
+From b7e5d07c5a7f73cd199e76366fb715ddee2b17a3 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <[email protected]>
 Date: Sat, 18 Jan 2014 02:15:05 +0100
 Subject: [PATCH] linux-user: Implement BLKPG ioctl

++++++ 0041-linux-user-sync-syscall-numbers-upt.patch ++++++
>From 5fe572d851613a77b3d8eae66981df585ee46fad Mon Sep 17 00:00:00 2001
From: Riku Voipio <[email protected]>
Date: Mon, 13 Jan 2014 14:33:22 +0200
Subject: [PATCH] linux-user: sync syscall numbers upto 3.13
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

All others updated except unicore, which doesn't look right to
begin with.

Signed-off-by: Riku Voipio <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
---
 linux-user/alpha/syscall_nr.h      |  7 +++++++
 linux-user/arm/syscall_nr.h        |  6 ++++++
 linux-user/cris/syscall_nr.h       |  1 +
 linux-user/i386/syscall_nr.h       |  6 ++++++
 linux-user/m68k/syscall_nr.h       |  5 +++++
 linux-user/microblaze/syscall_nr.h |  7 ++++++-
 linux-user/mips/syscall_nr.h       |  6 ++++++
 linux-user/mips64/syscall_nr.h     | 13 +++++++++++++
 linux-user/openrisc/syscall_nr.h   |  6 +++++-
 linux-user/ppc/syscall_nr.h        |  6 ++++++
 linux-user/s390x/syscall_nr.h      |  7 ++++++-
 linux-user/sh4/syscall_nr.h        |  6 ++++++
 linux-user/sparc/syscall_nr.h      |  7 +++++++
 linux-user/sparc64/syscall_nr.h    |  7 +++++++
 linux-user/x86_64/syscall_nr.h     |  7 +++++++
 15 files changed, 94 insertions(+), 3 deletions(-)

diff --git a/linux-user/alpha/syscall_nr.h b/linux-user/alpha/syscall_nr.h
index d52d76e..625f301 100644
--- a/linux-user/alpha/syscall_nr.h
+++ b/linux-user/alpha/syscall_nr.h
@@ -433,3 +433,10 @@
 #define TARGET_NR_open_by_handle_at             498
 #define TARGET_NR_clock_adjtime                 499
 #define TARGET_NR_syncfs                        500
+#define TARGET_NR_setns                         501
+#define TARGET_NR_accept4                       502
+#define TARGET_NR_sendmmsg                      503
+#define TARGET_NR_process_vm_readv              504
+#define TARGET_NR_process_vm_writev             505
+#define TARGET_NR_kcmp                          506
+#define TARGET_NR_finit_module                  507
diff --git a/linux-user/arm/syscall_nr.h b/linux-user/arm/syscall_nr.h
index 42d6855..bef847c 100644
--- a/linux-user/arm/syscall_nr.h
+++ b/linux-user/arm/syscall_nr.h
@@ -378,3 +378,9 @@
 #define TARGET_NR_open_by_handle_at            (371)
 #define TARGET_NR_clock_adjtime                (372)
 #define TARGET_NR_syncfs                       (373)
+#define TARGET_NR_sendmmsg                     (374)
+#define TARGET_NR_setns                        (375)
+#define TARGET_NR_process_vm_readv             (376)
+#define TARGET_NR_process_vm_writev            (377)
+#define TARGET_NR_kcmp                         (378)
+#define TARGET_NR_finit_module                 (379)
diff --git a/linux-user/cris/syscall_nr.h b/linux-user/cris/syscall_nr.h
index 98f1a0b..694bd02 100644
--- a/linux-user/cris/syscall_nr.h
+++ b/linux-user/cris/syscall_nr.h
@@ -335,3 +335,4 @@
 #define TARGET_NR_inotify_init1      332
 #define TARGET_NR_preadv             333
 #define TARGET_NR_pwritev            334
+#define TARGET_NR_setns              335
diff --git a/linux-user/i386/syscall_nr.h b/linux-user/i386/syscall_nr.h
index f080305..c8f7302 100644
--- a/linux-user/i386/syscall_nr.h
+++ b/linux-user/i386/syscall_nr.h
@@ -347,3 +347,9 @@
 #define TARGET_NR_open_by_handle_at     342
 #define TARGET_NR_clock_adjtime         343
 #define TARGET_NR_syncfs                344
+#define TARGET_NR_sendmmsg              345
+#define TARGET_NR_setns                 346
+#define TARGET_NR_process_vm_readv      347
+#define TARGET_NR_process_vm_writev     348
+#define TARGET_NR_kcmp                  349
+#define TARGET_NR_finit_module          350
diff --git a/linux-user/m68k/syscall_nr.h b/linux-user/m68k/syscall_nr.h
index 4d0937e..25f8521 100644
--- a/linux-user/m68k/syscall_nr.h
+++ b/linux-user/m68k/syscall_nr.h
@@ -344,3 +344,8 @@
 #define TARGET_NR_open_by_handle_at     341
 #define TARGET_NR_clock_adjtime         342
 #define TARGET_NR_syncfs                343
+#define TARGET_NR_setns                 344
+#define TARGET_NR_process_vm_readv      345
+#define TARGET_NR_process_vm_writev     346
+#define TARGET_NR_kcmp                  347
+#define TARGET_NR_finit_module          348
diff --git a/linux-user/microblaze/syscall_nr.h 
b/linux-user/microblaze/syscall_nr.h
index f1fe0e7..6f530f9 100644
--- a/linux-user/microblaze/syscall_nr.h
+++ b/linux-user/microblaze/syscall_nr.h
@@ -376,4 +376,9 @@
 #define TARGET_NR_open_by_handle_at     372
 #define TARGET_NR_clock_adjtime         373
 #define TARGET_NR_syncfs                374
-
+#define TARGET_NR_setns                 375
+#define TARGET_NR_sendmmsg              376
+#define TARGET_NR_process_vm_readv      377
+#define TARGET_NR_process_vm_writev     378
+#define TARGET_NR_kcmp                  379
+#define TARGET_NR_finit_module          380
diff --git a/linux-user/mips/syscall_nr.h b/linux-user/mips/syscall_nr.h
index fbdc348..2d1a13e 100644
--- a/linux-user/mips/syscall_nr.h
+++ b/linux-user/mips/syscall_nr.h
@@ -345,3 +345,9 @@
 #define TARGET_NR_open_by_handle_at     (TARGET_NR_Linux + 340)
 #define TARGET_NR_clock_adjtime         (TARGET_NR_Linux + 341)
 #define TARGET_NR_syncfs                (TARGET_NR_Linux + 342)
+#define TARGET_NR_sendmmsg              (TARGET_NR_Linux + 343)
+#define TARGET_NR_setns                 (TARGET_NR_Linux + 344)
+#define TARGET_NR_process_vm_readv      (TARGET_NR_Linux + 345)
+#define TARGET_NR_process_vm_writev     (TARGET_NR_Linux + 346)
+#define TARGET_NR_kcmp                  (TARGET_NR_Linux + 347)
+#define TARGET_NR_finit_module          (TARGET_NR_Linux + 348)
diff --git a/linux-user/mips64/syscall_nr.h b/linux-user/mips64/syscall_nr.h
index 0f4a6b1..004232a 100644
--- a/linux-user/mips64/syscall_nr.h
+++ b/linux-user/mips64/syscall_nr.h
@@ -310,6 +310,12 @@
 #define TARGET_NR_open_by_handle_at     (TARGET_NR_Linux + 304)
 #define TARGET_NR_clock_adjtime         (TARGET_NR_Linux + 305)
 #define TARGET_NR_syncfs                (TARGET_NR_Linux + 306)
+#define TARGET_NR_sendmmsg              (TARGET_NR_Linux + 307)
+#define TARGET_NR_setns                 (TARGET_NR_Linux + 308)
+#define TARGET_NR_process_vm_readv      (TARGET_NR_Linux + 309)
+#define TARGET_NR_process_vm_writev     (TARGET_NR_Linux + 310)
+#define TARGET_NR_kcmp                  (TARGET_NR_Linux + 311)
+#define TARGET_NR_finit_module          (TARGET_NR_Linux + 312)
 #else
 /*
  * Linux 64-bit syscalls are in the range from 5000 to 5999.
@@ -617,4 +623,11 @@
 #define TARGET_NR_open_by_handle_at     (TARGET_NR_Linux + 299)
 #define TARGET_NR_clock_adjtime         (TARGET_NR_Linux + 300)
 #define TARGET_NR_syncfs                (TARGET_NR_Linux + 301)
+#define TARGET_NR_sendmmsg              (TARGET_NR_Linux + 302)
+#define TARGET_NR_setns                 (TARGET_NR_Linux + 303)
+#define TARGET_NR_process_vm_readv      (TARGET_NR_Linux + 304)
+#define TARGET_NR_process_vm_writev     (TARGET_NR_Linux + 305)
+#define TARGET_NR_kcmp                  (TARGET_NR_Linux + 306)
+#define TARGET_NR_finit_module          (TARGET_NR_Linux + 307)
+#define TARGET_NR_getdents64            (TARGET_NR_Linux + 308)
 #endif
diff --git a/linux-user/openrisc/syscall_nr.h b/linux-user/openrisc/syscall_nr.h
index f4ac91e..4c386ea 100644
--- a/linux-user/openrisc/syscall_nr.h
+++ b/linux-user/openrisc/syscall_nr.h
@@ -378,9 +378,13 @@
 #define TARGET_NR_syncfs 267
 #define TARGET_NR_setns 268
 #define TARGET_NR_sendmmsg 269
+#define TARGET_NR_process_vm_readv 270
+#define TARGET_NR_process_vm_writev 271
+#define TARGET_NR_kcmp 272
+#define TARGET_NR_finit_module 273
 
 #undef TARGET_NR_syscalls
-#define TARGET_NR_syscalls 270
+#define TARGET_NR_syscalls 274
 
 /*
  * All syscalls below here should go away really,
diff --git a/linux-user/ppc/syscall_nr.h b/linux-user/ppc/syscall_nr.h
index 0673b7d..1e1736e 100644
--- a/linux-user/ppc/syscall_nr.h
+++ b/linux-user/ppc/syscall_nr.h
@@ -362,3 +362,9 @@
 #define TARGET_NR_open_by_handle_at     346
 #define TARGET_NR_clock_adjtime         347
 #define TARGET_NR_syncfs                348
+#define TARGET_NR_sendmmsg              349
+#define TARGET_NR_setns                 350
+#define TARGET_NR_process_vm_readv      351
+#define TARGET_NR_process_vm_writev     352
+#define TARGET_NR_finit_module          353
+#define TARGET_NR_kcmp                  354
diff --git a/linux-user/s390x/syscall_nr.h b/linux-user/s390x/syscall_nr.h
index d4529ac..7c0b8b2 100644
--- a/linux-user/s390x/syscall_nr.h
+++ b/linux-user/s390x/syscall_nr.h
@@ -265,6 +265,12 @@
 #define TARGET_NR_open_by_handle_at     336
 #define TARGET_NR_clock_adjtime         337
 #define TARGET_NR_syncfs                338
+#define TARGET_NR_setns                 339
+#define TARGET_NR_process_vm_readv      340
+#define TARGET_NR_process_vm_writev     341
+#define TARGET_NR_s390_runtime_instr    342
+#define TARGET_NR_kcmp                  343
+#define TARGET_NR_finit_module          344
 
 /*
  * There are some system calls that are not present on 64 bit, some
@@ -355,4 +361,3 @@
 #define TARGET_NR_newfstatat           293
 
 #endif
-
diff --git a/linux-user/sh4/syscall_nr.h b/linux-user/sh4/syscall_nr.h
index 365db58..bdf8742 100644
--- a/linux-user/sh4/syscall_nr.h
+++ b/linux-user/sh4/syscall_nr.h
@@ -366,3 +366,9 @@
 #define TARGET_NR_open_by_handle_at     360
 #define TARGET_NR_clock_adjtime         361
 #define TARGET_NR_syncfs                362
+#define TARGET_NR_sendmmsg              363
+#define TARGET_NR_setns                 364
+#define TARGET_NR_process_vm_readv      365
+#define TARGET_NR_process_vm_writev     366
+#define TARGET_NR_kcmp                  367
+#define TARGET_NR_finit_module          368
diff --git a/linux-user/sparc/syscall_nr.h b/linux-user/sparc/syscall_nr.h
index 534e6e9..181cd32 100644
--- a/linux-user/sparc/syscall_nr.h
+++ b/linux-user/sparc/syscall_nr.h
@@ -302,3 +302,10 @@
 #define TARGET_NR_open_by_handle_at     333
 #define TARGET_NR_clock_adjtime         334
 #define TARGET_NR_syncfs                335
+#define TARGET_NR_sendmmsg              336
+#define TARGET_NR_setns                 337
+#define TARGET_NR_process_vm_readv      338
+#define TARGET_NR_process_vm_writev     339
+#define TARGET_NR_kern_features         340
+#define TARGET_NR_kcmp                  341
+#define TARGET_NR_finit_module          342
diff --git a/linux-user/sparc64/syscall_nr.h b/linux-user/sparc64/syscall_nr.h
index 70988b2..34a984c 100644
--- a/linux-user/sparc64/syscall_nr.h
+++ b/linux-user/sparc64/syscall_nr.h
@@ -334,3 +334,10 @@
 #define TARGET_NR_open_by_handle_at     333
 #define TARGET_NR_clock_adjtime         334
 #define TARGET_NR_syncfs                335
+#define TARGET_NR_sendmmsg              336
+#define TARGET_NR_setns                 337
+#define TARGET_NR_process_vm_readv      338
+#define TARGET_NR_process_vm_writev     339
+#define TARGET_NR_kern_features         340
+#define TARGET_NR_kcmp                  341
+#define TARGET_NR_finit_module          342
diff --git a/linux-user/x86_64/syscall_nr.h b/linux-user/x86_64/syscall_nr.h
index 947e961..7c59e3a 100644
--- a/linux-user/x86_64/syscall_nr.h
+++ b/linux-user/x86_64/syscall_nr.h
@@ -305,3 +305,10 @@
 #define TARGET_NR_open_by_handle_at     304
 #define TARGET_NR_clock_adjtime         305
 #define TARGET_NR_syncfs                306
+#define TARGET_NR_sendmmsg              307
+#define TARGET_NR_setns                 308
+#define TARGET_NR_getcpu                309
+#define TARGET_NR_process_vm_readv      310
+#define TARGET_NR_process_vm_writev     311
+#define TARGET_NR_kcmp                  312
+#define TARGET_NR_finit_module          313
++++++ 0042-xen_disk-add-discard-support.patch.patch ++++++
>From fd18d5fdf502fe777c110e8cb6ccf62c67dc4eaa Mon Sep 17 00:00:00 2001
From: Olaf Hering <[email protected]>
Date: Thu, 30 Jan 2014 16:02:18 +0100
Subject: [PATCH] xen_disk: add discard support
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Implement discard support for xen_disk. It makes use of the existing
discard code in qemu.

The discard support is enabled unconditionally. The tool stack may provide a
property "discard-enable" in the backend node to optionally disable discard
support.  This is helpful in case the backing file was intentionally created
non-sparse to avoid fragmentation.

Signed-off-by: Olaf Hering <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
---
 hw/block/xen_blkif.h | 12 ++++++++++++
 hw/block/xen_disk.c  | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+)

diff --git a/hw/block/xen_blkif.h b/hw/block/xen_blkif.h
index c0f4136..711b692 100644
--- a/hw/block/xen_blkif.h
+++ b/hw/block/xen_blkif.h
@@ -79,6 +79,12 @@ static inline void blkif_get_x86_32_req(blkif_request_t 
*dst, blkif_x86_32_reque
        dst->handle = src->handle;
        dst->id = src->id;
        dst->sector_number = src->sector_number;
+       if (src->operation == BLKIF_OP_DISCARD) {
+               struct blkif_request_discard *s = (void *)src;
+               struct blkif_request_discard *d = (void *)dst;
+               d->nr_sectors = s->nr_sectors;
+               return;
+       }
        if (n > src->nr_segments)
                n = src->nr_segments;
        for (i = 0; i < n; i++)
@@ -94,6 +100,12 @@ static inline void blkif_get_x86_64_req(blkif_request_t 
*dst, blkif_x86_64_reque
        dst->handle = src->handle;
        dst->id = src->id;
        dst->sector_number = src->sector_number;
+       if (src->operation == BLKIF_OP_DISCARD) {
+               struct blkif_request_discard *s = (void *)src;
+               struct blkif_request_discard *d = (void *)dst;
+               d->nr_sectors = s->nr_sectors;
+               return;
+       }
        if (n > src->nr_segments)
                n = src->nr_segments;
        for (i = 0; i < n; i++)
diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
index 098f6c6..e74efc7 100644
--- a/hw/block/xen_disk.c
+++ b/hw/block/xen_disk.c
@@ -114,6 +114,7 @@ struct XenBlkDev {
     int                 requests_finished;
 
     /* Persistent grants extension */
+    gboolean            feature_discard;
     gboolean            feature_persistent;
     GTree               *persistent_gnts;
     unsigned int        persistent_gnt_count;
@@ -253,6 +254,8 @@ static int ioreq_parse(struct ioreq *ioreq)
     case BLKIF_OP_WRITE:
         ioreq->prot = PROT_READ; /* from memory */
         break;
+    case BLKIF_OP_DISCARD:
+        return 0;
     default:
         xen_be_printf(&blkdev->xendev, 0, "error: unknown operation (%d)\n",
                       ioreq->req.operation);
@@ -521,6 +524,17 @@ static int ioreq_runio_qemu_aio(struct ioreq *ioreq)
                         &ioreq->v, ioreq->v.size / BLOCK_SIZE,
                         qemu_aio_complete, ioreq);
         break;
+    case BLKIF_OP_DISCARD:
+    {
+        struct blkif_request_discard *discard_req = (void *)&ioreq->req;
+        bdrv_acct_start(blkdev->bs, &ioreq->acct,
+                        discard_req->nr_sectors * BLOCK_SIZE, BDRV_ACCT_WRITE);
+        ioreq->aio_inflight++;
+        bdrv_aio_discard(blkdev->bs,
+                        discard_req->sector_number, discard_req->nr_sectors,
+                        qemu_aio_complete, ioreq);
+        break;
+    }
     default:
         /* unknown operation (shouldn't happen -- parse catches this) */
         goto err;
@@ -699,6 +713,21 @@ static void blk_alloc(struct XenDevice *xendev)
     }
 }
 
+static void blk_parse_discard(struct XenBlkDev *blkdev)
+{
+    int enable;
+
+    blkdev->feature_discard = true;
+
+    if (xenstore_read_be_int(&blkdev->xendev, "discard-enable", &enable) == 0) 
{
+        blkdev->feature_discard = !!enable;
+    }
+
+    if (blkdev->feature_discard) {
+        xenstore_write_be_int(&blkdev->xendev, "feature-discard", 1);
+    }
+}
+
 static int blk_init(struct XenDevice *xendev)
 {
     struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev);
@@ -766,6 +795,8 @@ static int blk_init(struct XenDevice *xendev)
     xenstore_write_be_int(&blkdev->xendev, "feature-persistent", 1);
     xenstore_write_be_int(&blkdev->xendev, "info", info);
 
+    blk_parse_discard(blkdev);
+
     g_free(directiosafe);
     return 0;
 
@@ -801,6 +832,9 @@ static int blk_connect(struct XenDevice *xendev)
         qflags |= BDRV_O_RDWR;
         readonly = false;
     }
+    if (blkdev->feature_discard) {
+        qflags |= BDRV_O_UNMAP;
+    }
 
     /* init qemu block driver */
     index = (blkdev->xendev.dev - 202 * 256) / 16;
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to