Blame SOURCES/0002-Initial-redhat-build.patch

4a2fec
From ba7591ec4a0906121d15ffbf740580bd79ec5814 Mon Sep 17 00:00:00 2001
4a2fec
From: Miroslav Rezanina <mrezanin@redhat.com>
4a2fec
Date: Mon, 11 Sep 2017 07:11:00 +0200
4a2fec
Subject: Initial redhat build
4a2fec
4a2fec
This patch introduces redhat build structure in redhat subdirectory. In addition,
4a2fec
several issues are fixed in QEMU tree:
4a2fec
4a2fec
- Change of app name for sasl_server_init in VNC code from qemu to qemu-kvm
4a2fec
 - As we use qemu-kvm as name in all places, this is updated to be consistent
4a2fec
- Man page renamed from qemu to qemu-kvm
4a2fec
 - man page is installed using make install so we have to fix it in qemu tree
4a2fec
- Added live-block-migration configuration option support
4a2fec
 - Downstream differentiation support
4a2fec
- Use "/share/qemu-kvm" as SHARE_SUFFIX
4a2fec
 - We reconfigured our share to qemu-kvm to be consistent with used name
4a2fec
- Added .gitpublish configuration file
4a2fec
 - Support for git publish has to be stored in repository root
4a2fec
4a2fec
--
4a2fec
Rebase notes (2.10.0):
4a2fec
- live_block_migration option added upstream
4a2fec
- moved qmp-spec.txt file (upstream)
4a2fec
- added s390-netboot.img (added upstream)
4a2fec
- removed qemu_vga.ndrv (added upstream)
4a2fec
- switch to (rhevh-)rhel-7.5-candidate
4a2fec
- switched differentiation defaults
4a2fec
- moved binary files to separate commit
4a2fec
4a2fec
Rebase notes (2.9.0):
4a2fec
- documentation files handling changes (upstrem)
4a2fec
- removed --enable-colo option and --disable-archipelago (upstream)
4a2fec
- bump BuildRequires versions
4a2fec
- new mandatory argument for tracetool.py (upstream)
4a2fec
- updated RHEL 6 roms
4a2fec
- switch from sha1sum to sha256sum
4a2fec
- Moved adding rhel6-e1000.rom from machine types commit
4a2fec
- Moved adding pxe-e1000e.rom from device disable commit
4a2fec
- Use rdma-core instead of librdmacm
4a2fec
- Add upstream tarballs tar.xz to .gitignore
4a2fec
- Updated git-backport-diff script
4a2fec
4a2fec
Rebase notes (2.8.0):
4a2fec
- removed vhdx option (upstream)
4a2fec
- qemu-tech.html merged to qemu-doc.html (upstream)
4a2fec
- removed skiboot.lid firmware
4a2fec
- Changed tracetool.py parameters
4a2fec
- Added support for easy z-stream switch
4a2fec
4a2fec
Rebase notes (2.7.0):
4a2fec
- removed kvm_stat
4a2fec
- added efi-e1000e.rom
4a2fec
- added efi-vmxnet.rom
4a2fec
- added linuxboot_dma.bin
4a2fec
- trace-events renamed to trace-events-all
4a2fec
- reverted dependency to seccomp on aarch64
4a2fec
- Add ipxe-qemu-roms ad build dependency to pass tests
4a2fec
4a2fec
Rebase notes (2.6.0):
4a2fec
- removed q35-acpi-dsdt.aml
4a2fec
- add enable-gcrypt option
4a2fec
4a2fec
Rebase notes (2.5.0):
4a2fec
- New seccomp hadling in configure
4a2fec
- New condition format  in migration/migration.c
4a2fec
- libcacard extracted
4a2fec
- vnc fixes
4a2fec
- libsecomp for aarch64 requirements changed downstream
4a2fec
4a2fec
Rebase notes (2.4.0):
4a2fec
- remove --enable-ws-vnc
4a2fec
- use error_setg instead of error_set in migration/migration.c
4a2fec
- remove target-x86_64.conf
4a2fec
- create /etc/qemu-kvm on copying of bridge.conf
4a2fec
- disabled opengl
4a2fec
- rebased to version 2.3.0-30.el7
4a2fec
4a2fec
Merged patches (rebase 2.10.0)
4a2fec
- feefd46 qemu-kvm.spec: Enable s390x build
4a2fec
- 985051e Removing texi2html from build requirements
4a2fec
- 7c64a2a Update ignore files for redhat usage
4a2fec
- 8f9a95a Disable replication feature
4a2fec
- 1b7bbc5 block/vxhs: modularize VXHS via g_module
4a2fec
- 7511527 Remove the dependencies to seavgabios-bin and ipxe-roms-qemu on s390x
4a2fec
- aa0891c Downstream: Don't disable SMT on POWER9 hosts
4a2fec
- a13a0e9 Update configuration for qemu 2.9
4a2fec
- bbf46dd disable pulseaudio and alsa
4a2fec
- 9124839 redhat/Makefile: honor BREW_FLAGS like the kernel
4a2fec
- 53c03bd copy SLIT test reference blobs into tests directory
4a2fec
- c4c77e6 Differentiation support
4a2fec
- f1ec0e8 configure: allow to disable VT-d emulation
4a2fec
- b972023 Disable VT-d for rhel builds
4a2fec
- 29a0414 RHEL Diff.: Add option in configure to disable live block ops
4a2fec
- 1f33b29 RHEL Diff.: Unregister live block operations
4a2fec
- c590551 RHEL Diff.: Disable live block operations in HMP monitor
4a2fec
- c7e208f RHEL Diff.: Add rpm spec options for live block ops
4a2fec
- 733af5c pegas: add rpm spec options for vhost-user
4a2fec
- ff16138 Add support for local build
4a2fec
- fb426d4 qemu-kvm.spec: Configure vm.allocate_pgste for s390x
4a2fec
4a2fec
Merged patches (rebase 2.9.0)
4a2fec
- 9c7ab94 Enable seccomp for ppc64/ppc64le architecture
4a2fec
- f6d7e9d Update qemu-kvm package Summary and Description
4a2fec
- a9e55b6 Disable usbredir and libcacard for unsupported architectures
4a2fec
- 0218220 Update configuration for 2.8.0 release
4a2fec
4a2fec
Merged patches (rebase 2.7.0)
4a2fec
- 2be6077 Fix SLOF dependency
4a2fec
- dc58590 spec: Remove dependency to ipxe-roms-qemu for aarch64
4a2fec
- 357ef43 spec: link sgabios.bin only for x86_64
4a2fec
- 08d82cc spec: Update rules before triggering for kvm device
4a2fec
- 8980a76 spec: Do not package ivshmem-server and ivshmem-client
4a2fec
- 027067c spec: add a sample kvm.conf to enable Nested Virtualization
4a2fec
- ba2ba30 Adjust locked memory limits to allow unprivileged VMs on Power
4a2fec
- e9740b0 Increase locked memory limit for all users, not just kvm group
4a2fec
- 8c301be add vgabios-virtio.bin symlink
4a2fec
- 4d03723 usb: enable streams support
4a2fec
- 2a9363e Add install dependency required for usb streams
4a2fec
- 9a54442 Add dump-guest-memory.py to all archs
4a2fec
- 73fffc9 add e1000e ipxe rom symlink
4a2fec
- aaaa2a9 Add 'luks' to block driver whitelist
4a2fec
- c78c3a8 redhat: switch from gcrypt to nettle for crypto
4a2fec
- bb51a69 redhat: include username and date in RPM N-E-V-R for scratch builds
4a2fec
4a2fec
Merged patches (rebase 2.4.0)
4a2fec
- 9201274 spec: Remove obsolete differentiation code
4a2fec
- a938a8c spec: Use external configuration script
4a2fec
- 5ca8d0e spec: Use configure options to prevent default resolution
4a2fec
- 5dca391 spec: Ship complete QMP documentation files
4a2fec
- 7899edd aarch64: allow --enable-seccomp
4a2fec
- a56fb9c aarch64: redhat spec: enable seccomp
4a2fec
- a9571e6 rhel: Update package version for SLOF dependency
4a2fec
- 25c70c4 configure: Add support for tcmalloc
4a2fec
- db72485 Change fsreeze-hook default location
4a2fec
- 14b8a9e redhat: add kvm-unit-tests tarball to environment
4a2fec
- 5ee4238 spec: Build tscdeadline_latency.flat from kvm-unit-tests
4a2fec
- 6ba800b Downstream-only: Start kvm-setup service before libvirtd service
4a2fec
- 59b43d6 Do not stop qemu-guest-agent service on target switch
4a2fec
- 4d851fa provide vhost module config file with max_mem_regions set to 509
4a2fec
- 0b18027 spec: Require proper version of SLOF
4a2fec
- 3c436c7 Fix rh-brew-aarch64, rh-brew-ppc rh-brew-ga-ppc target
4a2fec
4a2fec
(cherry picked from commit a4e4a2f66d7a4efc873c5c1cafc502db480ff363)
4a2fec
---
4a2fec
 .gitignore                         |    1 +
4a2fec
 .gitpublish                        |    8 +
4a2fec
 Makefile                           |    2 +-
4a2fec
 block/vxhs.c                       |  122 +-
4a2fec
 configure                          |   56 +-
4a2fec
 hmp-commands-info.hx               |    4 +
4a2fec
 hmp-commands.hx                    |   12 +
4a2fec
 hmp.c                              |   12 +
4a2fec
 hw/i386/Makefile.objs              |    3 +-
4a2fec
 include/block/vxhs_shim.h          |  143 +
4a2fec
 monitor.c                          |   16 +
4a2fec
 os-posix.c                         |    2 +-
4a2fec
 redhat/.gitignore                  |    5 +
4a2fec
 redhat/50-kvm-pgste.conf           |    3 +
4a2fec
 redhat/80-kvm.rules                |    1 +
4a2fec
 redhat/85-kvm.preset               |    5 +
4a2fec
 redhat/95-kvm-memlock.conf         |   10 +
4a2fec
 redhat/99-qemu-guest-agent.rules   |    2 +
4a2fec
 redhat/Makefile                    |   90 +
4a2fec
 redhat/Makefile.common             |   26 +
4a2fec
 redhat/Makefile.local              |   76 +
4a2fec
 redhat/README.rhel6-gpxe-source    |    9 +
4a2fec
 redhat/bridge.conf                 |    1 +
4a2fec
 redhat/build_configure.sh          |  156 +
4a2fec
 redhat/ksm.service                 |   13 +
4a2fec
 redhat/ksm.sysconfig               |    4 +
4a2fec
 redhat/ksmctl.c                    |   77 +
4a2fec
 redhat/ksmtuned                    |  138 +
4a2fec
 redhat/ksmtuned.conf               |   21 +
4a2fec
 redhat/ksmtuned.service            |   12 +
4a2fec
 redhat/kvm-setup                   |   40 +
4a2fec
 redhat/kvm-setup.service           |   14 +
4a2fec
 redhat/kvm.conf                    |   12 +
4a2fec
 redhat/kvm.modules                 |   21 +
4a2fec
 redhat/qemu-ga.sysconfig           |   19 +
4a2fec
 redhat/qemu-guest-agent.service    |   21 +
4a2fec
 redhat/qemu-kvm.spec.template      | 6143 ++++++++++++++++++++++++++++++++++++
4a2fec
 redhat/rpmbuild/BUILD/.gitignore   |    2 +
4a2fec
 redhat/rpmbuild/RPMS/.gitignore    |    2 +
4a2fec
 redhat/rpmbuild/SOURCES/.gitignore |    2 +
4a2fec
 redhat/rpmbuild/SPECS/.gitignore   |    2 +
4a2fec
 redhat/rpmbuild/SRPMS/.gitignore   |    2 +
4a2fec
 redhat/scripts/frh.py              |   27 +
4a2fec
 redhat/scripts/git-backport-diff   |  327 ++
4a2fec
 redhat/scripts/git-compile-check   |  215 ++
4a2fec
 redhat/scripts/process-patches.sh  |   81 +
4a2fec
 redhat/scripts/tarball_checksum.sh |    3 +
4a2fec
 redhat/vhost.conf                  |    3 +
4a2fec
 ui/vnc.c                           |    2 +-
4a2fec
 49 files changed, 7923 insertions(+), 45 deletions(-)
4a2fec
 create mode 100644 .gitpublish
4a2fec
 create mode 100644 include/block/vxhs_shim.h
4a2fec
 create mode 100644 redhat/.gitignore
4a2fec
 create mode 100644 redhat/50-kvm-pgste.conf
4a2fec
 create mode 100644 redhat/80-kvm.rules
4a2fec
 create mode 100644 redhat/85-kvm.preset
4a2fec
 create mode 100644 redhat/95-kvm-memlock.conf
4a2fec
 create mode 100644 redhat/99-qemu-guest-agent.rules
4a2fec
 create mode 100644 redhat/Makefile
4a2fec
 create mode 100644 redhat/Makefile.common
4a2fec
 create mode 100644 redhat/Makefile.local
4a2fec
 create mode 100644 redhat/README.rhel6-gpxe-source
4a2fec
 create mode 100644 redhat/bridge.conf
4a2fec
 create mode 100755 redhat/build_configure.sh
4a2fec
 create mode 100644 redhat/ksm.service
4a2fec
 create mode 100644 redhat/ksm.sysconfig
4a2fec
 create mode 100644 redhat/ksmctl.c
4a2fec
 create mode 100644 redhat/ksmtuned
4a2fec
 create mode 100644 redhat/ksmtuned.conf
4a2fec
 create mode 100644 redhat/ksmtuned.service
4a2fec
 create mode 100644 redhat/kvm-setup
4a2fec
 create mode 100644 redhat/kvm-setup.service
4a2fec
 create mode 100644 redhat/kvm.conf
4a2fec
 create mode 100644 redhat/kvm.modules
4a2fec
 create mode 100644 redhat/qemu-ga.sysconfig
4a2fec
 create mode 100644 redhat/qemu-guest-agent.service
4a2fec
 create mode 100644 redhat/qemu-kvm.spec.template
4a2fec
 create mode 100644 redhat/rpmbuild/BUILD/.gitignore
4a2fec
 create mode 100644 redhat/rpmbuild/RPMS/.gitignore
4a2fec
 create mode 100644 redhat/rpmbuild/SOURCES/.gitignore
4a2fec
 create mode 100644 redhat/rpmbuild/SPECS/.gitignore
4a2fec
 create mode 100644 redhat/rpmbuild/SRPMS/.gitignore
4a2fec
 create mode 100755 redhat/scripts/frh.py
4a2fec
 create mode 100755 redhat/scripts/git-backport-diff
4a2fec
 create mode 100755 redhat/scripts/git-compile-check
4a2fec
 create mode 100755 redhat/scripts/process-patches.sh
4a2fec
 create mode 100755 redhat/scripts/tarball_checksum.sh
4a2fec
 create mode 100644 redhat/vhost.conf
4a2fec
4a2fec
diff --git a/Makefile b/Makefile
4a2fec
index 81447b1..2cb2442 100644
4a2fec
--- a/Makefile
4a2fec
+++ b/Makefile
4a2fec
@@ -570,7 +570,7 @@ install-doc: $(DOCS)
4a2fec
 	$(INSTALL_DATA) docs/interop/qemu-qmp-ref.txt "$(DESTDIR)$(qemu_docdir)"
4a2fec
 ifdef CONFIG_POSIX
4a2fec
 	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
4a2fec
-	$(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1"
4a2fec
+	$(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1/qemu-kvm.1"
4a2fec
 	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man7"
4a2fec
 	$(INSTALL_DATA) docs/interop/qemu-qmp-ref.7 "$(DESTDIR)$(mandir)/man7"
4a2fec
 ifneq ($(TOOLS),)
4a2fec
diff --git a/block/vxhs.c b/block/vxhs.c
4a2fec
index 75cc6c8..a18154c 100644
4a2fec
--- a/block/vxhs.c
4a2fec
+++ b/block/vxhs.c
4a2fec
@@ -9,7 +9,8 @@
4a2fec
  */
4a2fec
 
4a2fec
 #include "qemu/osdep.h"
4a2fec
-#include <qnio/qnio_api.h>
4a2fec
+#include "block/vxhs_shim.h"
4a2fec
+#include <gmodule.h>
4a2fec
 #include <sys/param.h>
4a2fec
 #include "block/block_int.h"
4a2fec
 #include "qapi/qmp/qerror.h"
4a2fec
@@ -58,6 +59,96 @@ typedef struct BDRVVXHSState {
4a2fec
     char *tlscredsid; /* tlscredsid */
4a2fec
 } BDRVVXHSState;
4a2fec
 
4a2fec
+#define LIBVXHS_FULL_PATHNAME "/usr/lib64/qemu/libvxhs.so.1"
4a2fec
+static bool libvxhs_loaded;
4a2fec
+static GModule *libvxhs_handle;
4a2fec
+
4a2fec
+static LibVXHSFuncs libvxhs;
4a2fec
+
4a2fec
+typedef struct LibVXHSSymbols {
4a2fec
+    const char *name;
4a2fec
+    gpointer *addr;
4a2fec
+} LibVXHSSymbols;
4a2fec
+
4a2fec
+static LibVXHSSymbols libvxhs_symbols[] = {
4a2fec
+    {"iio_init",        (gpointer *) &libvxhs.iio_init},
4a2fec
+    {"iio_fini",        (gpointer *) &libvxhs.iio_fini},
4a2fec
+    {"iio_min_version", (gpointer *) &libvxhs.iio_min_version},
4a2fec
+    {"iio_max_version", (gpointer *) &libvxhs.iio_max_version},
4a2fec
+    {"iio_open",        (gpointer *) &libvxhs.iio_open},
4a2fec
+    {"iio_close",       (gpointer *) &libvxhs.iio_close},
4a2fec
+    {"iio_writev",      (gpointer *) &libvxhs.iio_writev},
4a2fec
+    {"iio_readv",       (gpointer *) &libvxhs.iio_readv},
4a2fec
+    {"iio_ioctl",       (gpointer *) &libvxhs.iio_ioctl},
4a2fec
+    {NULL}
4a2fec
+};
4a2fec
+
4a2fec
+static void bdrv_vxhs_set_funcs(GModule *handle, Error **errp)
4a2fec
+{
4a2fec
+    int i = 0;
4a2fec
+    while (libvxhs_symbols[i].name) {
4a2fec
+        const char *name = libvxhs_symbols[i].name;
4a2fec
+        if (!g_module_symbol(handle, name, libvxhs_symbols[i].addr)) {
4a2fec
+            error_setg(errp, "%s could not be loaded from libvxhs: %s",
4a2fec
+                       name, g_module_error());
4a2fec
+            return;
4a2fec
+        }
4a2fec
+        ++i;
4a2fec
+    }
4a2fec
+}
4a2fec
+
4a2fec
+static void bdrv_vxhs_load_libs(Error **errp)
4a2fec
+{
4a2fec
+    Error *local_err = NULL;
4a2fec
+    int32_t ver;
4a2fec
+
4a2fec
+    if (libvxhs_loaded) {
4a2fec
+        return;
4a2fec
+    }
4a2fec
+
4a2fec
+    if (!g_module_supported()) {
4a2fec
+        error_setg(errp, "modules are not supported on this platform: %s",
4a2fec
+                     g_module_error());
4a2fec
+        return;
4a2fec
+    }
4a2fec
+
4a2fec
+    libvxhs_handle = g_module_open(LIBVXHS_FULL_PATHNAME,
4a2fec
+                                   G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
4a2fec
+    if (!libvxhs_handle) {
4a2fec
+        error_setg(errp, "error loading libvxhs: %s", g_module_error());
4a2fec
+        return;
4a2fec
+    }
4a2fec
+
4a2fec
+    g_module_make_resident(libvxhs_handle);
4a2fec
+
4a2fec
+    bdrv_vxhs_set_funcs(libvxhs_handle, &local_err);
4a2fec
+    if (local_err) {
4a2fec
+        error_propagate(errp, local_err);
4a2fec
+        return;
4a2fec
+    }
4a2fec
+
4a2fec
+    /* Now check to see if the libvxhs we are using here is supported
4a2fec
+     * by the loaded version */
4a2fec
+
4a2fec
+    ver = (*libvxhs.iio_min_version)();
4a2fec
+    if (ver > QNIO_VERSION) {
4a2fec
+        error_setg(errp, "Trying to use libvxhs version %"PRId32" API, but "
4a2fec
+                         "only %"PRId32" or newer is supported by %s",
4a2fec
+                          QNIO_VERSION, ver, LIBVXHS_FULL_PATHNAME);
4a2fec
+        return;
4a2fec
+    }
4a2fec
+
4a2fec
+    ver = (*libvxhs.iio_max_version)();
4a2fec
+    if (ver < QNIO_VERSION) {
4a2fec
+        error_setg(errp, "Trying to use libvxhs version %"PRId32" API, but "
4a2fec
+                         "only %"PRId32" or earlier is supported by %s",
4a2fec
+                          QNIO_VERSION, ver, LIBVXHS_FULL_PATHNAME);
4a2fec
+        return;
4a2fec
+    }
4a2fec
+
4a2fec
+    libvxhs_loaded = true;
4a2fec
+}
4a2fec
+
4a2fec
 static void vxhs_complete_aio_bh(void *opaque)
4a2fec
 {
4a2fec
     VXHSAIOCB *acb = opaque;
4a2fec
@@ -219,7 +310,7 @@ static void vxhs_parse_filename(const char *filename, QDict *options,
4a2fec
 static int vxhs_init_and_ref(void)
4a2fec
 {
4a2fec
     if (vxhs_ref++ == 0) {
4a2fec
-        if (iio_init(QNIO_VERSION, vxhs_iio_callback)) {
4a2fec
+        if ((*libvxhs.iio_init)(QNIO_VERSION, vxhs_iio_callback)) {
4a2fec
             return -ENODEV;
4a2fec
         }
4a2fec
     }
4a2fec
@@ -229,7 +320,7 @@ static int vxhs_init_and_ref(void)
4a2fec
 static void vxhs_unref(void)
4a2fec
 {
4a2fec
     if (--vxhs_ref == 0) {
4a2fec
-        iio_fini();
4a2fec
+        (*libvxhs.iio_fini)();
4a2fec
     }
4a2fec
 }
4a2fec
 
4a2fec
@@ -299,8 +390,17 @@ static int vxhs_open(BlockDriverState *bs, QDict *options,
4a2fec
     char *client_key = NULL;
4a2fec
     char *client_cert = NULL;
4a2fec
 
4a2fec
+    bdrv_vxhs_load_libs(&local_err);
4a2fec
+    if (local_err) {
4a2fec
+        error_propagate(errp, local_err);
4a2fec
+        /* on error, cannot cleanup because the iio_fini() function
4a2fec
+         * is not loaded */
4a2fec
+        return -EINVAL;
4a2fec
+    }
4a2fec
+
4a2fec
     ret = vxhs_init_and_ref();
4a2fec
     if (ret < 0) {
4a2fec
+        error_setg(&local_err, "libvxhs iio_init() failed");
4a2fec
         ret = -EINVAL;
4a2fec
         goto out;
4a2fec
     }
4a2fec
@@ -385,8 +485,8 @@ static int vxhs_open(BlockDriverState *bs, QDict *options,
4a2fec
     /*
4a2fec
      * Open qnio channel to storage agent if not opened before
4a2fec
      */
4a2fec
-    dev_handlep = iio_open(of_vsa_addr, s->vdisk_guid, 0,
4a2fec
-                           cacert, client_key, client_cert);
4a2fec
+    dev_handlep = (*libvxhs.iio_open)(of_vsa_addr, s->vdisk_guid, 0,
4a2fec
+                                      cacert, client_key, client_cert);
4a2fec
     if (dev_handlep == NULL) {
4a2fec
         trace_vxhs_open_iio_open(of_vsa_addr);
4a2fec
         ret = -ENODEV;
4a2fec
@@ -450,12 +550,12 @@ static BlockAIOCB *vxhs_aio_rw(BlockDriverState *bs, int64_t sector_num,
4a2fec
 
4a2fec
     switch (iodir) {
4a2fec
     case VDISK_AIO_WRITE:
4a2fec
-            ret = iio_writev(dev_handle, acb, qiov->iov, qiov->niov,
4a2fec
-                             offset, (uint64_t)size, iio_flags);
4a2fec
+            ret = (*libvxhs.iio_writev)(dev_handle, acb, qiov->iov, qiov->niov,
4a2fec
+                                        offset, (uint64_t)size, iio_flags);
4a2fec
             break;
4a2fec
     case VDISK_AIO_READ:
4a2fec
-            ret = iio_readv(dev_handle, acb, qiov->iov, qiov->niov,
4a2fec
-                            offset, (uint64_t)size, iio_flags);
4a2fec
+            ret = (*libvxhs.iio_readv)(dev_handle, acb, qiov->iov, qiov->niov,
4a2fec
+                                       offset, (uint64_t)size, iio_flags);
4a2fec
             break;
4a2fec
     default:
4a2fec
             trace_vxhs_aio_rw_invalid(iodir);
4a2fec
@@ -505,7 +605,7 @@ static void vxhs_close(BlockDriverState *bs)
4a2fec
      * Close vDisk device
4a2fec
      */
4a2fec
     if (s->vdisk_hostinfo.dev_handle) {
4a2fec
-        iio_close(s->vdisk_hostinfo.dev_handle);
4a2fec
+        (*libvxhs.iio_close)(s->vdisk_hostinfo.dev_handle);
4a2fec
         s->vdisk_hostinfo.dev_handle = NULL;
4a2fec
     }
4a2fec
 
4a2fec
@@ -527,7 +627,7 @@ static int64_t vxhs_get_vdisk_stat(BDRVVXHSState *s)
4a2fec
     int ret = 0;
4a2fec
     void *dev_handle = s->vdisk_hostinfo.dev_handle;
4a2fec
 
4a2fec
-    ret = iio_ioctl(dev_handle, IOR_VDISK_STAT, &vdisk_size, 0);
4a2fec
+    ret = (*libvxhs.iio_ioctl)(dev_handle, IOR_VDISK_STAT, &vdisk_size, 0);
4a2fec
     if (ret < 0) {
4a2fec
         trace_vxhs_get_vdisk_stat_err(s->vdisk_guid, ret, errno);
4a2fec
         return -EIO;
4a2fec
diff --git a/configure b/configure
4a2fec
index dd73cce..355c364 100755
4a2fec
--- a/configure
4a2fec
+++ b/configure
4a2fec
@@ -400,11 +400,13 @@ virglrenderer=""
4a2fec
 tpm="yes"
4a2fec
 libssh2=""
4a2fec
 live_block_migration="yes"
4a2fec
+live_block_ops="yes"
4a2fec
 numa=""
4a2fec
 tcmalloc="no"
4a2fec
 jemalloc="no"
4a2fec
 replication="yes"
4a2fec
 vxhs=""
4a2fec
+vtd="yes"
4a2fec
 
4a2fec
 supported_cpu="no"
4a2fec
 supported_os="no"
4a2fec
@@ -1279,6 +1281,10 @@ for opt do
4a2fec
   ;;
4a2fec
   --enable-replication) replication="yes"
4a2fec
   ;;
4a2fec
+  --disable-live-block-ops) live_block_ops="no"
4a2fec
+  ;;
4a2fec
+  --enable-live-block-ops) live_block_ops="yes"
4a2fec
+  ;;
4a2fec
   --disable-vxhs) vxhs="no"
4a2fec
   ;;
4a2fec
   --enable-vxhs) vxhs="yes"
4a2fec
@@ -1291,6 +1297,10 @@ for opt do
4a2fec
           error_exit "vhost-user isn't available on win32"
4a2fec
       fi
4a2fec
   ;;
4a2fec
+  --disable-vtd) vtd="no"
4a2fec
+  ;;
4a2fec
+  --enable-vtd) vtd="yes"
4a2fec
+  ;;
4a2fec
   *)
4a2fec
       echo "ERROR: unknown option $opt"
4a2fec
       echo "Try '$0 --help' for more information"
4a2fec
@@ -1523,6 +1533,8 @@ disabled with --disable-FEATURE, default is enabled if available:
4a2fec
   glusterfs       GlusterFS backend
4a2fec
   tpm             TPM support
4a2fec
   libssh2         ssh block device support
4a2fec
+  live-block-migration live block migration support
4a2fec
+  live-block-ops  live block operations support
4a2fec
   numa            libnuma support
4a2fec
   tcmalloc        tcmalloc support
4a2fec
   jemalloc        jemalloc support
4a2fec
@@ -1534,6 +1546,7 @@ disabled with --disable-FEATURE, default is enabled if available:
4a2fec
   qom-cast-debug  cast debugging support
4a2fec
   tools           build qemu-io, qemu-nbd and qemu-image tools
4a2fec
   vxhs            Veritas HyperScale vDisk backend support
4a2fec
+  vtd             Emulated VT-d support (only affects x86 targets)
4a2fec
   crypto-afalg    Linux AF_ALG crypto backend driver
4a2fec
   vhost-user      vhost-user support
4a2fec
 
4a2fec
@@ -3217,7 +3230,7 @@ else
4a2fec
     glib_req_ver=2.22
4a2fec
 fi
4a2fec
 glib_modules=gthread-2.0
4a2fec
-if test "$modules" = yes; then
4a2fec
+if test "$modules" = yes -o "$vxhs" = yes; then
4a2fec
     glib_modules="$glib_modules gmodule-2.0"
4a2fec
 fi
4a2fec
 
4a2fec
@@ -4940,33 +4953,6 @@ if compile_prog "" "" ; then
4a2fec
 fi
4a2fec
 
4a2fec
 ##########################################
4a2fec
-# Veritas HyperScale block driver VxHS
4a2fec
-# Check if libvxhs is installed
4a2fec
-
4a2fec
-if test "$vxhs" != "no" ; then
4a2fec
-  cat > $TMPC <
4a2fec
-#include <stdint.h>
4a2fec
-#include <qnio/qnio_api.h>
4a2fec
-
4a2fec
-void *vxhs_callback;
4a2fec
-
4a2fec
-int main(void) {
4a2fec
-    iio_init(QNIO_VERSION, vxhs_callback);
4a2fec
-    return 0;
4a2fec
-}
4a2fec
-EOF
4a2fec
-  vxhs_libs="-lvxhs -lssl"
4a2fec
-  if compile_prog "" "$vxhs_libs" ; then
4a2fec
-    vxhs=yes
4a2fec
-  else
4a2fec
-    if test "$vxhs" = "yes" ; then
4a2fec
-      feature_not_found "vxhs block device" "Install libvxhs See github"
4a2fec
-    fi
4a2fec
-    vxhs=no
4a2fec
-  fi
4a2fec
-fi
4a2fec
-
4a2fec
-##########################################
4a2fec
 # check for _Static_assert()
4a2fec
 
4a2fec
 have_static_assert=no
4a2fec
@@ -5398,6 +5384,7 @@ echo "libssh2 support   $libssh2"
4a2fec
 echo "TPM passthrough   $tpm_passthrough"
4a2fec
 echo "QOM debugging     $qom_cast_debug"
4a2fec
 echo "Live block migration $live_block_migration"
4a2fec
+echo "Live block ops    $live_block_ops"
4a2fec
 echo "lzo support       $lzo"
4a2fec
 echo "snappy support    $snappy"
4a2fec
 echo "bzip2 support     $bzip2"
4a2fec
@@ -5407,6 +5394,7 @@ echo "jemalloc support  $jemalloc"
4a2fec
 echo "avx2 optimization $avx2_opt"
4a2fec
 echo "replication support $replication"
4a2fec
 echo "VxHS block device $vxhs"
4a2fec
+echo "VT-d emulation    $vtd"
4a2fec
 
4a2fec
 if test "$sdl_too_old" = "yes"; then
4a2fec
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
4a2fec
@@ -5976,6 +5964,10 @@ if test "$live_block_migration" = "yes" ; then
4a2fec
   echo "CONFIG_LIVE_BLOCK_MIGRATION=y" >> $config_host_mak
4a2fec
 fi
4a2fec
 
4a2fec
+if test "$live_block_ops" = "yes" ; then
4a2fec
+  echo "CONFIG_LIVE_BLOCK_OPS=y" >> $config_host_mak
4a2fec
+fi
4a2fec
+
4a2fec
 # USB host support
4a2fec
 if test "$libusb" = "yes"; then
4a2fec
   echo "HOST_USB=libusb legacy" >> $config_host_mak
4a2fec
@@ -6071,8 +6063,12 @@ if test "$pthread_setname_np" = "yes" ; then
4a2fec
 fi
4a2fec
 
4a2fec
 if test "$vxhs" = "yes" ; then
4a2fec
-  echo "CONFIG_VXHS=y" >> $config_host_mak
4a2fec
-  echo "VXHS_LIBS=$vxhs_libs" >> $config_host_mak
4a2fec
+  echo "CONFIG_VXHS=m" >> $config_host_mak
4a2fec
+  echo "VXHS_LIBS= -lssl" >> $config_host_mak
4a2fec
+fi
4a2fec
+
4a2fec
+if test "$vtd" = "yes" ; then
4a2fec
+  echo "CONFIG_VTD=y" >> $config_host_mak
4a2fec
 fi
4a2fec
 
4a2fec
 if test "$tcg_interpreter" = "yes"; then
4a2fec
diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx
4a2fec
index d9df238..0967e41 100644
4a2fec
--- a/hmp-commands-info.hx
4a2fec
+++ b/hmp-commands-info.hx
4a2fec
@@ -84,6 +84,8 @@ STEXI
4a2fec
 Show block device statistics.
4a2fec
 ETEXI
4a2fec
 
4a2fec
+#ifdef CONFIG_LIVE_BLOCK_OPS
4a2fec
+
4a2fec
     {
4a2fec
         .name       = "block-jobs",
4a2fec
         .args_type  = "",
4a2fec
@@ -98,6 +100,8 @@ STEXI
4a2fec
 Show progress of ongoing block device operations.
4a2fec
 ETEXI
4a2fec
 
4a2fec
+#endif /* CONFIG_LIVE_BLOCK_OPS */
4a2fec
+
4a2fec
     {
4a2fec
         .name       = "registers",
4a2fec
         .args_type  = "cpustate_all:-a",
4a2fec
diff --git a/hmp-commands.hx b/hmp-commands.hx
4a2fec
index 1941e19..2d137a1 100644
4a2fec
--- a/hmp-commands.hx
4a2fec
+++ b/hmp-commands.hx
4a2fec
@@ -73,6 +73,8 @@ but should be used with extreme caution.  Note that this command only
4a2fec
 resizes image files, it can not resize block devices like LVM volumes.
4a2fec
 ETEXI
4a2fec
 
4a2fec
+#ifdef CONFIG_LIVE_BLOCK_OPS
4a2fec
+
4a2fec
     {
4a2fec
         .name       = "block_stream",
4a2fec
         .args_type  = "device:B,speed:o?,base:s?",
4a2fec
@@ -159,6 +161,8 @@ STEXI
4a2fec
 Resume a paused block streaming operation.
4a2fec
 ETEXI
4a2fec
 
4a2fec
+#endif /* CONFIG_LIVE_BLOCK_OPS */
4a2fec
+
4a2fec
     {
4a2fec
         .name       = "eject",
4a2fec
         .args_type  = "force:-f,device:B",
4a2fec
@@ -1169,6 +1173,8 @@ STEXI
4a2fec
 Enables or disables migration mode.
4a2fec
 ETEXI
4a2fec
 
4a2fec
+#ifdef CONFIG_LIVE_BLOCK_OPS
4a2fec
+
4a2fec
     {
4a2fec
         .name       = "snapshot_blkdev",
4a2fec
         .args_type  = "reuse:-n,device:B,snapshot-file:s?,format:s?",
4a2fec
@@ -1190,6 +1196,8 @@ STEXI
4a2fec
 Snapshot device, using snapshot file as target if provided
4a2fec
 ETEXI
4a2fec
 
4a2fec
+#endif /* CONFIG_LIVE_BLOCK_OPS */
4a2fec
+
4a2fec
     {
4a2fec
         .name       = "snapshot_blkdev_internal",
4a2fec
         .args_type  = "device:B,name:s",
4a2fec
@@ -1224,6 +1232,8 @@ STEXI
4a2fec
 Delete an internal snapshot on device if it support
4a2fec
 ETEXI
4a2fec
 
4a2fec
+#ifdef CONFIG_LIVE_BLOCK_OPS
4a2fec
+
4a2fec
     {
4a2fec
         .name       = "drive_mirror",
4a2fec
         .args_type  = "reuse:-n,full:-f,device:B,target:s,format:s?",
4a2fec
@@ -1267,6 +1277,8 @@ STEXI
4a2fec
 Start a point-in-time copy of a block device to a specificed target.
4a2fec
 ETEXI
4a2fec
 
4a2fec
+#endif /* CONFIG_LIVE_BLOCK_OPS */
4a2fec
+
4a2fec
     {
4a2fec
         .name       = "drive_add",
4a2fec
         .args_type  = "node:-n,pci_addr:s,opts:s",
4a2fec
diff --git a/hmp.c b/hmp.c
4a2fec
index fd80dce..ab985c6 100644
4a2fec
--- a/hmp.c
4a2fec
+++ b/hmp.c
4a2fec
@@ -951,6 +951,8 @@ void hmp_info_pci(Monitor *mon, const QDict *qdict)
4a2fec
     qapi_free_PciInfoList(info_list);
4a2fec
 }
4a2fec
 
4a2fec
+#ifdef CONFIG_LIVE_BLOCK_OPS
4a2fec
+
4a2fec
 void hmp_info_block_jobs(Monitor *mon, const QDict *qdict)
4a2fec
 {
4a2fec
     BlockJobInfoList *list;
4a2fec
@@ -989,6 +991,8 @@ void hmp_info_block_jobs(Monitor *mon, const QDict *qdict)
4a2fec
     qapi_free_BlockJobInfoList(list);
4a2fec
 }
4a2fec
 
4a2fec
+#endif /* CONFIG_LIVE_BLOCK_OPS */
4a2fec
+
4a2fec
 void hmp_info_tpm(Monitor *mon, const QDict *qdict)
4a2fec
 {
4a2fec
     TPMInfoList *info_list, *info;
4a2fec
@@ -1197,6 +1201,8 @@ void hmp_block_resize(Monitor *mon, const QDict *qdict)
4a2fec
     hmp_handle_error(mon, &err;;
4a2fec
 }
4a2fec
 
4a2fec
+#ifdef CONFIG_LIVE_BLOCK_OPS
4a2fec
+
4a2fec
 void hmp_drive_mirror(Monitor *mon, const QDict *qdict)
4a2fec
 {
4a2fec
     const char *filename = qdict_get_str(qdict, "target");
4a2fec
@@ -1280,6 +1286,8 @@ void hmp_snapshot_blkdev(Monitor *mon, const QDict *qdict)
4a2fec
     hmp_handle_error(mon, &err;;
4a2fec
 }
4a2fec
 
4a2fec
+#endif /* CONFIG_LIVE_BLOCK_OPS */
4a2fec
+
4a2fec
 void hmp_snapshot_blkdev_internal(Monitor *mon, const QDict *qdict)
4a2fec
 {
4a2fec
     const char *device = qdict_get_str(qdict, "device");
4a2fec
@@ -1776,6 +1784,8 @@ void hmp_block_set_io_throttle(Monitor *mon, const QDict *qdict)
4a2fec
     hmp_handle_error(mon, &err;;
4a2fec
 }
4a2fec
 
4a2fec
+#ifdef CONFIG_LIVE_BLOCK_OPS
4a2fec
+
4a2fec
 void hmp_block_stream(Monitor *mon, const QDict *qdict)
4a2fec
 {
4a2fec
     Error *error = NULL;
4a2fec
@@ -1842,6 +1852,8 @@ void hmp_block_job_complete(Monitor *mon, const QDict *qdict)
4a2fec
     hmp_handle_error(mon, &error);
4a2fec
 }
4a2fec
 
4a2fec
+#endif /* CONFIG_LIVE_BLOCK_OPS */
4a2fec
+
4a2fec
 typedef struct HMPMigrationStatus
4a2fec
 {
4a2fec
     QEMUTimer *timer;
4a2fec
diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
4a2fec
index 909ead6..c14559b 100644
4a2fec
--- a/hw/i386/Makefile.objs
4a2fec
+++ b/hw/i386/Makefile.objs
4a2fec
@@ -2,7 +2,8 @@ obj-$(CONFIG_KVM) += kvm/
4a2fec
 obj-y += multiboot.o
4a2fec
 obj-y += pc.o pc_piix.o pc_q35.o
4a2fec
 obj-y += pc_sysfw.o
4a2fec
-obj-y += x86-iommu.o intel_iommu.o
4a2fec
+obj-y += x86-iommu.o
4a2fec
+obj-$(CONFIG_VTD) += intel_iommu.o
4a2fec
 obj-y += amd_iommu.o
4a2fec
 obj-$(CONFIG_XEN) += ../xenpv/ xen/
4a2fec
 
4a2fec
diff --git a/include/block/vxhs_shim.h b/include/block/vxhs_shim.h
4a2fec
new file mode 100644
4a2fec
index 0000000..42519ae
4a2fec
--- /dev/null
4a2fec
+++ b/include/block/vxhs_shim.h
4a2fec
@@ -0,0 +1,143 @@
4a2fec
+/*
4a2fec
+ * Network IO library for VxHS QEMU block driver (Veritas Technologies)
4a2fec
+ *
4a2fec
+ * This work is licensed under the terms of the GNU GPL, version 2.  See
4a2fec
+ * the COPYING file in the top-level directory.
4a2fec
+ *
4a2fec
+ * Contributions after 2014-08-15 are licensed under the terms of the
4a2fec
+ * GNU GPL, version 2 or (at your option) any later version.
4a2fec
+ */
4a2fec
+
4a2fec
+#ifndef QNIO_API_H
4a2fec
+#define QNIO_API_H
4a2fec
+
4a2fec
+#include <sys/uio.h>
4a2fec
+
4a2fec
+/*
4a2fec
+ * Bump up the version everytime this file is modified
4a2fec
+ */
4a2fec
+#define QNIO_VERSION    34
4a2fec
+
4a2fec
+/*
4a2fec
+ * These are the opcodes referenced by callback routine.
4a2fec
+ */
4a2fec
+#define IRP_READ_REQUEST                    0x1FFF
4a2fec
+#define IRP_WRITE_REQUEST                   0x2FFF
4a2fec
+#define IRP_VDISK_CHECK_IO_FAILOVER_READY   2020
4a2fec
+
4a2fec
+/*
4a2fec
+ * opcodes for iio_ioctl.
4a2fec
+ */
4a2fec
+#define IOR_VDISK_STAT                      1005
4a2fec
+
4a2fec
+/*
4a2fec
+ * Error values for iio_cb_t callback function.
4a2fec
+ */
4a2fec
+#define QNIOERROR_HUP                       901 /* Retriable error */
4a2fec
+#define QNIOERROR_NOCONN                    902 /* Non-retriable error */
4a2fec
+
4a2fec
+
4a2fec
+/* Operation Flags */
4a2fec
+#define IIO_FLAG_ASYNC        0x0001   /* Do an async send */
4a2fec
+
4a2fec
+/*
4a2fec
+ * INPUT:
4a2fec
+ *     ctx - opaque context
4a2fec
+ *     opcode - Operation
4a2fec
+ *     error - 0 for sucess, non-zero for failure.
4a2fec
+ * RETURNS:
4a2fec
+ *     void
4a2fec
+ * DESCRIPTION:
4a2fec
+ *     This callback is called, after Async request completes.
4a2fec
+ *
4a2fec
+ * CONTEXT:
4a2fec
+ *     The callback should be wait-free.
4a2fec
+ */
4a2fec
+typedef void (*iio_cb_t) (void *ctx, uint32_t opcode, uint32_t error);
4a2fec
+
4a2fec
+typedef struct LibVXHSFuncs {
4a2fec
+/*
4a2fec
+ * RETURNS:
4a2fec
+ *     0 for sucess, non-zero for failure.
4a2fec
+ * DESCRIPTION:
4a2fec
+ *     Intilize the library state. This should be called at the
4a2fec
+ *     begining before issuing any library call.
4a2fec
+ */
4a2fec
+    int     (*iio_init)(int32_t version, iio_cb_t cb);
4a2fec
+/*
4a2fec
+ * RETURNS:
4a2fec
+ *     void
4a2fec
+ * DESCRIPTION:
4a2fec
+ *     Relinquish library resources. This should be called on the
4a2fec
+ *     close of last open device.
4a2fec
+ */
4a2fec
+    void    (*iio_fini)(void);
4a2fec
+/*
4a2fec
+ * DESCRIPTION:
4a2fec
+ *     Returns minimum QNIO API version supported by library.
4a2fec
+ */
4a2fec
+    int32_t (*iio_min_version)(void);
4a2fec
+/*
4a2fec
+ * DESCRIPTION:
4a2fec
+ *     Returns maximum QNIO API version supported by library.
4a2fec
+ */
4a2fec
+    int32_t (*iio_max_version)(void);
4a2fec
+/*
4a2fec
+ * INPUT:
4a2fec
+ *    uri - const string of the format of://<hostname|ip>:port
4a2fec
+ *    devid - Device ID.
4a2fec
+ *    flags - currently unused, this must be set to 0
4a2fec
+ *    cacert - CA certificates file in PEM format
4a2fec
+ *    client_key - Client private key file in PEM format
4a2fec
+ *    client_cert - Client certificate file in PEM format
4a2fec
+ * RETURNS:
4a2fec
+ *    opeque device handle on success, NULL on failure.
4a2fec
+ * DESCRIPTION:
4a2fec
+ *    This call returns device handle on success. Returns NULL on
4a2fec
+ *    failure with errno set
4a2fec
+ *    errno can be one of:
4a2fec
+ *        ENODEV - remote device not found
4a2fec
+ *        EBADF  - Unable to open communication channel.
4a2fec
+ *        EBUSY  - The call cannot be completed right now
4a2fec
+ */
4a2fec
+    void   *(*iio_open)(const char *uri, const char *devid, uint32_t flags,
4a2fec
+                        const char *cacert, const char *client_key,
4a2fec
+                        const char *client_cert);
4a2fec
+/*
4a2fec
+ * Close the device.
4a2fec
+ *    For every matching iio_open() there should be a matching iio_close()
4a2fec
+ *    The last close free all data structures associated with the device.
4a2fec
+ */
4a2fec
+    int32_t (*iio_close)(void *dev_handle);
4a2fec
+/*
4a2fec
+ * INPUT:
4a2fec
+ *    dev_handle - device descriptor on which read/write needs to be performed
4a2fec
+ *    ctx - an opaque context that is not interpreted This is set for
4a2fec
+ *          async calls only. It can be NULL.
4a2fec
+ *    iov    - an array of iovecs (This is a scatter gather operation)
4a2fec
+ *    iovcnt  - the number of iovecs
4a2fec
+ *    offset - an offset to perform the write
4a2fec
+ *    size   - I/O size
4a2fec
+ *    flags  - can be one of
4a2fec
+ *        IIO_FLAG_ASYNC - indicating this is a aio call.
4a2fec
+ * RETURNS:
4a2fec
+ *        -1 on error, sets errno
4a2fec
+ *        EBADF  - the remote fd is bad
4a2fec
+ *        EBUSY  - The call cannot be completed right now
4a2fec
+ *        EPIPE  - the channel got disconnected, call back would be called in
4a2fec
+ *                 addition to this.
4a2fec
+ */
4a2fec
+    int32_t (*iio_writev)(void *dev_handle, void *ctx, struct iovec *iov,
4a2fec
+                          int iovcnt, uint64_t offset, uint64_t size,
4a2fec
+                          uint32_t flags);
4a2fec
+
4a2fec
+    int32_t (*iio_readv)(void *dev_handle, void *ctx, struct iovec *iov,
4a2fec
+                         int iovcnt, uint64_t offset, uint64_t size,
4a2fec
+                         uint32_t flags);
4a2fec
+
4a2fec
+    int32_t (*iio_ioctl)(void *dev_handle, uint32_t opcode, void *opaque,
4a2fec
+                         uint32_t flags);
4a2fec
+
4a2fec
+} LibVXHSFuncs;
4a2fec
+
4a2fec
+#endif
4a2fec
diff --git a/monitor.c b/monitor.c
4a2fec
index e0f8801..de0a70e 100644
4a2fec
--- a/monitor.c
4a2fec
+++ b/monitor.c
4a2fec
@@ -998,6 +998,22 @@ static void qmp_unregister_commands_hack(void)
4a2fec
     && !defined(TARGET_S390X)
4a2fec
     qmp_unregister_command(&qmp_commands, "query-cpu-definitions");
4a2fec
 #endif
4a2fec
+#ifndef CONFIG_LIVE_BLOCK_OPS
4a2fec
+    qmp_unregister_command(&qmp_commands, "block-stream");
4a2fec
+    qmp_unregister_command(&qmp_commands, "block-commit");
4a2fec
+    qmp_unregister_command(&qmp_commands, "drive-mirror");
4a2fec
+    qmp_unregister_command(&qmp_commands, "blockdev-mirror");
4a2fec
+    qmp_unregister_command(&qmp_commands, "drive-backup");
4a2fec
+    qmp_unregister_command(&qmp_commands, "blockdev-backup");
4a2fec
+    qmp_unregister_command(&qmp_commands, "blockdev-snapshot");
4a2fec
+    qmp_unregister_command(&qmp_commands, "blockdev-snapshot-sync");
4a2fec
+    qmp_unregister_command(&qmp_commands, "block-job-set-speed");
4a2fec
+    qmp_unregister_command(&qmp_commands, "block-job-cancel");
4a2fec
+    qmp_unregister_command(&qmp_commands, "block-job-pause");
4a2fec
+    qmp_unregister_command(&qmp_commands, "block-job-resume");
4a2fec
+    qmp_unregister_command(&qmp_commands, "block-job-complete");
4a2fec
+    qmp_unregister_command(&qmp_commands, "query-block-jobs");
4a2fec
+#endif
4a2fec
 }
4a2fec
 
4a2fec
 void monitor_init_qmp_commands(void)
4a2fec
diff --git a/os-posix.c b/os-posix.c
4a2fec
index 92e9d85..9625679 100644
4a2fec
--- a/os-posix.c
4a2fec
+++ b/os-posix.c
4a2fec
@@ -76,7 +76,7 @@ void os_setup_signal_handling(void)
4a2fec
 /* Find a likely location for support files using the location of the binary.
4a2fec
    For installed binaries this will be "$bindir/../share/qemu".  When
4a2fec
    running from the build tree this will be "$bindir/../pc-bios".  */
4a2fec
-#define SHARE_SUFFIX "/share/qemu"
4a2fec
+#define SHARE_SUFFIX "/share/qemu-kvm"
4a2fec
 #define BUILD_SUFFIX "/pc-bios"
4a2fec
 char *os_find_datadir(void)
4a2fec
 {
4a2fec
diff --git a/ui/vnc.c b/ui/vnc.c
4a2fec
index 651cbb8..5b1e264 100644
4a2fec
--- a/ui/vnc.c
4a2fec
+++ b/ui/vnc.c
4a2fec
@@ -3945,7 +3945,7 @@ void vnc_display_open(const char *id, Error **errp)
4a2fec
     }
4a2fec
 
4a2fec
 #ifdef CONFIG_VNC_SASL
4a2fec
-    if ((saslErr = sasl_server_init(NULL, "qemu")) != SASL_OK) {
4a2fec
+    if ((saslErr = sasl_server_init(NULL, "qemu-kvm")) != SASL_OK) {
4a2fec
         error_setg(errp, "Failed to initialize SASL auth: %s",
4a2fec
                    sasl_errstring(saslErr, NULL, NULL));
4a2fec
         goto fail;
4a2fec
-- 
4a2fec
1.8.3.1
4a2fec