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

357786
From ec05305843e6fb1cf3a8bc1dfab7b7e3d9edce4e Mon Sep 17 00:00:00 2001
9bac43
From: Miroslav Rezanina <mrezanin@redhat.com>
9bac43
Date: Mon, 11 Sep 2017 07:11:00 +0200
9bac43
Subject: Initial redhat build
9bac43
9bac43
This patch introduces redhat build structure in redhat subdirectory. In addition,
9bac43
several issues are fixed in QEMU tree:
9bac43
9bac43
- Change of app name for sasl_server_init in VNC code from qemu to qemu-kvm
9bac43
 - As we use qemu-kvm as name in all places, this is updated to be consistent
9bac43
- Man page renamed from qemu to qemu-kvm
9bac43
 - man page is installed using make install so we have to fix it in qemu tree
9bac43
- Added live-block-migration configuration option support
9bac43
 - Downstream differentiation support
9bac43
- Use "/share/qemu-kvm" as SHARE_SUFFIX
9bac43
 - We reconfigured our share to qemu-kvm to be consistent with used name
9bac43
- Added .gitpublish configuration file
9bac43
 - Support for git publish has to be stored in repository root
9bac43
9bac43
--
357786
Rebase notes (2.12.0):
357786
- Not packaging hppa-firmware.img
357786
- Disable vxhs.o in block/Makefile.obj
357786
- Disable ppc64 builds
357786
- Removed acpi-dsdt.aml (upstream)
357786
357786
Rebase notes (2.11.0):
357786
- Removed --with-pixman configure option (upstream)
357786
- Disabled multipath for qemu-pr-helper (unsupported API)
357786
- null-co whitelisting moved to this patch
357786
- make check enabled
357786
- conditionaly disable query-block-jobs for qmp-test.c
357786
9bac43
Rebase notes (2.10.0):
9bac43
- live_block_migration option added upstream
9bac43
- moved qmp-spec.txt file (upstream)
9bac43
- added s390-netboot.img (added upstream)
9bac43
- removed qemu_vga.ndrv (added upstream)
9bac43
- switch to (rhevh-)rhel-7.5-candidate
9bac43
- switched differentiation defaults
9bac43
- moved binary files to separate commit
9bac43
9bac43
Rebase notes (2.9.0):
9bac43
- documentation files handling changes (upstrem)
9bac43
- removed --enable-colo option and --disable-archipelago (upstream)
9bac43
- bump BuildRequires versions
9bac43
- new mandatory argument for tracetool.py (upstream)
9bac43
- updated RHEL 6 roms
9bac43
- switch from sha1sum to sha256sum
9bac43
- Moved adding rhel6-e1000.rom from machine types commit
9bac43
- Moved adding pxe-e1000e.rom from device disable commit
9bac43
- Use rdma-core instead of librdmacm
9bac43
- Add upstream tarballs tar.xz to .gitignore
9bac43
- Updated git-backport-diff script
9bac43
9bac43
Rebase notes (2.8.0):
9bac43
- removed vhdx option (upstream)
9bac43
- qemu-tech.html merged to qemu-doc.html (upstream)
9bac43
- removed skiboot.lid firmware
9bac43
- Changed tracetool.py parameters
9bac43
- Added support for easy z-stream switch
9bac43
9bac43
Rebase notes (2.7.0):
9bac43
- removed kvm_stat
9bac43
- added efi-e1000e.rom
9bac43
- added efi-vmxnet.rom
9bac43
- added linuxboot_dma.bin
9bac43
- trace-events renamed to trace-events-all
9bac43
- reverted dependency to seccomp on aarch64
9bac43
- Add ipxe-qemu-roms ad build dependency to pass tests
9bac43
9bac43
Rebase notes (2.6.0):
9bac43
- removed q35-acpi-dsdt.aml
9bac43
- add enable-gcrypt option
9bac43
9bac43
Rebase notes (2.5.0):
9bac43
- New seccomp hadling in configure
9bac43
- New condition format  in migration/migration.c
9bac43
- libcacard extracted
9bac43
- vnc fixes
9bac43
- libsecomp for aarch64 requirements changed downstream
9bac43
9bac43
Rebase notes (2.4.0):
9bac43
- remove --enable-ws-vnc
9bac43
- use error_setg instead of error_set in migration/migration.c
9bac43
- remove target-x86_64.conf
9bac43
- create /etc/qemu-kvm on copying of bridge.conf
9bac43
- disabled opengl
9bac43
- rebased to version 2.3.0-30.el7
9bac43
357786
Merged patches (rebase 2.11.0)
357786
- ce6e8e5b8a redhat/qemu-kvm.spec.template: Enable seccomp on s390x, too
357786
- 8629f208c6 redhat: Remove qemu.binfmt from the downstream repository
357786
- b889ce1c40 Disable build of qemu-kvm-ma for x86_64
357786
- 4506913c42 redhat: add CONFIG_RHV flag
357786
- 21ecaec46f s390x: vm.allocate_pgste sysctl is no longer needed
357786
- 78a1864d99 Update build_configure for 2.10.0 options
357786
- decf881320 redhat: Provide s390x specific /etc/modprobe.d/kvm.conf
357786
- e0cd3138cc redhat/qemu-kvm.spec: Use the freshly built s390-ccw.img firmware image
357786
- 7af6b9a4fa redhat: install generic kvm.conf except for s390 and x86 architectures
357786
- c4290f50bb redhat: fix rh-srpm target
357786
- 8943f52e8b Package qemu-block-drivers manpage
357786
- 88b41044d6 update spec to build and install qemu-pr-helper
357786
- 34ca391 redhat: Fix permissions of /dev/kvm on a freshly booted s390x system
357786
9bac43
Merged patches (rebase 2.10.0)
9bac43
- feefd46 qemu-kvm.spec: Enable s390x build
9bac43
- 985051e Removing texi2html from build requirements
9bac43
- 7c64a2a Update ignore files for redhat usage
9bac43
- 8f9a95a Disable replication feature
9bac43
- 1b7bbc5 block/vxhs: modularize VXHS via g_module
9bac43
- 7511527 Remove the dependencies to seavgabios-bin and ipxe-roms-qemu on s390x
9bac43
- aa0891c Downstream: Don't disable SMT on POWER9 hosts
9bac43
- a13a0e9 Update configuration for qemu 2.9
9bac43
- bbf46dd disable pulseaudio and alsa
9bac43
- 9124839 redhat/Makefile: honor BREW_FLAGS like the kernel
9bac43
- 53c03bd copy SLIT test reference blobs into tests directory
9bac43
- c4c77e6 Differentiation support
9bac43
- f1ec0e8 configure: allow to disable VT-d emulation
9bac43
- b972023 Disable VT-d for rhel builds
9bac43
- 29a0414 RHEL Diff.: Add option in configure to disable live block ops
9bac43
- 1f33b29 RHEL Diff.: Unregister live block operations
9bac43
- c590551 RHEL Diff.: Disable live block operations in HMP monitor
9bac43
- c7e208f RHEL Diff.: Add rpm spec options for live block ops
9bac43
- 733af5c pegas: add rpm spec options for vhost-user
9bac43
- ff16138 Add support for local build
9bac43
- fb426d4 qemu-kvm.spec: Configure vm.allocate_pgste for s390x
9bac43
9bac43
Merged patches (rebase 2.9.0)
9bac43
- 9c7ab94 Enable seccomp for ppc64/ppc64le architecture
9bac43
- f6d7e9d Update qemu-kvm package Summary and Description
9bac43
- a9e55b6 Disable usbredir and libcacard for unsupported architectures
9bac43
- 0218220 Update configuration for 2.8.0 release
9bac43
9bac43
Merged patches (rebase 2.7.0)
9bac43
- 2be6077 Fix SLOF dependency
9bac43
- dc58590 spec: Remove dependency to ipxe-roms-qemu for aarch64
9bac43
- 357ef43 spec: link sgabios.bin only for x86_64
9bac43
- 08d82cc spec: Update rules before triggering for kvm device
9bac43
- 8980a76 spec: Do not package ivshmem-server and ivshmem-client
9bac43
- 027067c spec: add a sample kvm.conf to enable Nested Virtualization
9bac43
- ba2ba30 Adjust locked memory limits to allow unprivileged VMs on Power
9bac43
- e9740b0 Increase locked memory limit for all users, not just kvm group
9bac43
- 8c301be add vgabios-virtio.bin symlink
9bac43
- 4d03723 usb: enable streams support
9bac43
- 2a9363e Add install dependency required for usb streams
9bac43
- 9a54442 Add dump-guest-memory.py to all archs
9bac43
- 73fffc9 add e1000e ipxe rom symlink
9bac43
- aaaa2a9 Add 'luks' to block driver whitelist
9bac43
- c78c3a8 redhat: switch from gcrypt to nettle for crypto
9bac43
- bb51a69 redhat: include username and date in RPM N-E-V-R for scratch builds
357786
- 21ecaec s390x: vm.allocate_pgste sysctl is no longer needed
357786
- 78a1864 Update build_configure for 2.10.0 options
9bac43
9bac43
Merged patches (rebase 2.4.0)
9bac43
- 9201274 spec: Remove obsolete differentiation code
9bac43
- a938a8c spec: Use external configuration script
9bac43
- 5ca8d0e spec: Use configure options to prevent default resolution
9bac43
- 5dca391 spec: Ship complete QMP documentation files
9bac43
- 7899edd aarch64: allow --enable-seccomp
9bac43
- a56fb9c aarch64: redhat spec: enable seccomp
9bac43
- a9571e6 rhel: Update package version for SLOF dependency
9bac43
- 25c70c4 configure: Add support for tcmalloc
9bac43
- db72485 Change fsreeze-hook default location
9bac43
- 14b8a9e redhat: add kvm-unit-tests tarball to environment
9bac43
- 5ee4238 spec: Build tscdeadline_latency.flat from kvm-unit-tests
9bac43
- 6ba800b Downstream-only: Start kvm-setup service before libvirtd service
9bac43
- 59b43d6 Do not stop qemu-guest-agent service on target switch
9bac43
- 4d851fa provide vhost module config file with max_mem_regions set to 509
9bac43
- 0b18027 spec: Require proper version of SLOF
9bac43
- 3c436c7 Fix rh-brew-aarch64, rh-brew-ppc rh-brew-ga-ppc target
9bac43
357786
(cherry picked from commit ba7591ec4a0906121d15ffbf740580bd79ec5814)
357786
(cherry picked from commit c984102495c0cee355158ecc382ad5e44b23b16c)
357786
357786
Conflicts:
357786
	.gitpublish
357786
	configure
357786
	hw/i386/Makefile.objs
357786
357786
(cherry picked from commit bea8f0ccd9fb65aefe7f19b3c4cc849c9e4c1bff)
357786
(cherry picked from commit 7bb63d45c5ed63943718d60382c140fbbba270cb)
357786
(cherry picked from commit a451d845da0e2f872b07ae57fd328adb8116f6cc)
357786
(cherry picked from commit db5d48c968290ffc47ef8662d6ee1fece967acac)
9bac43
---
9bac43
 .gitignore                         |    1 +
357786
 .gitpublish                        |   65 +-
9bac43
 Makefile                           |    2 +-
357786
 block/Makefile.objs                |    2 +-
9bac43
 block/vxhs.c                       |  122 +-
357786
 configure                          |   65 +-
9bac43
 hmp-commands-info.hx               |    4 +
9bac43
 hmp-commands.hx                    |   12 +
9bac43
 hmp.c                              |   12 +
9bac43
 include/block/vxhs_shim.h          |  143 +
9bac43
 monitor.c                          |   16 +
9bac43
 os-posix.c                         |    2 +-
9bac43
 redhat/.gitignore                  |    5 +
9bac43
 redhat/80-kvm.rules                |    1 +
9bac43
 redhat/85-kvm.preset               |    5 +
9bac43
 redhat/95-kvm-memlock.conf         |   10 +
9bac43
 redhat/99-qemu-guest-agent.rules   |    2 +
357786
 redhat/Makefile                    |   95 +
357786
 redhat/Makefile.common             |   57 +
9bac43
 redhat/Makefile.local              |   76 +
9bac43
 redhat/README.rhel6-gpxe-source    |    9 +
9bac43
 redhat/bridge.conf                 |    1 +
357786
 redhat/build_configure.sh          |  167 +
9bac43
 redhat/ksm.service                 |   13 +
9bac43
 redhat/ksm.sysconfig               |    4 +
9bac43
 redhat/ksmctl.c                    |   77 +
9bac43
 redhat/ksmtuned                    |  138 +
9bac43
 redhat/ksmtuned.conf               |   21 +
9bac43
 redhat/ksmtuned.service            |   12 +
357786
 redhat/kvm-s390x.conf              |    7 +
9bac43
 redhat/kvm-setup                   |   40 +
9bac43
 redhat/kvm-setup.service           |   14 +
357786
 redhat/kvm-x86.conf                |   12 +
357786
 redhat/kvm.conf                    |    3 +
9bac43
 redhat/kvm.modules                 |   21 +
9bac43
 redhat/qemu-ga.sysconfig           |   19 +
357786
 redhat/qemu-guest-agent.service    |   20 +
357786
 redhat/qemu-kvm.spec.template      | 6903 ++++++++++++++++++++++++++++++++++++
357786
 redhat/qemu-pr-helper.service      |   15 +
357786
 redhat/qemu-pr-helper.socket       |    9 +
9bac43
 redhat/rpmbuild/BUILD/.gitignore   |    2 +
9bac43
 redhat/rpmbuild/RPMS/.gitignore    |    2 +
9bac43
 redhat/rpmbuild/SOURCES/.gitignore |    2 +
9bac43
 redhat/rpmbuild/SPECS/.gitignore   |    2 +
9bac43
 redhat/rpmbuild/SRPMS/.gitignore   |    2 +
357786
 redhat/scripts/frh.py              |   26 +
9bac43
 redhat/scripts/git-backport-diff   |  327 ++
9bac43
 redhat/scripts/git-compile-check   |  215 ++
9bac43
 redhat/scripts/process-patches.sh  |   81 +
9bac43
 redhat/scripts/tarball_checksum.sh |    3 +
9bac43
 redhat/vhost.conf                  |    3 +
357786
 tests/qmp-test.c                   |    3 +
9bac43
 ui/vnc.c                           |    2 +-
357786
 53 files changed, 8776 insertions(+), 96 deletions(-)
9bac43
 create mode 100644 include/block/vxhs_shim.h
9bac43
 create mode 100644 redhat/.gitignore
9bac43
 create mode 100644 redhat/80-kvm.rules
9bac43
 create mode 100644 redhat/85-kvm.preset
9bac43
 create mode 100644 redhat/95-kvm-memlock.conf
9bac43
 create mode 100644 redhat/99-qemu-guest-agent.rules
9bac43
 create mode 100644 redhat/Makefile
9bac43
 create mode 100644 redhat/Makefile.common
9bac43
 create mode 100644 redhat/Makefile.local
9bac43
 create mode 100644 redhat/README.rhel6-gpxe-source
9bac43
 create mode 100644 redhat/bridge.conf
9bac43
 create mode 100755 redhat/build_configure.sh
9bac43
 create mode 100644 redhat/ksm.service
9bac43
 create mode 100644 redhat/ksm.sysconfig
9bac43
 create mode 100644 redhat/ksmctl.c
9bac43
 create mode 100644 redhat/ksmtuned
9bac43
 create mode 100644 redhat/ksmtuned.conf
9bac43
 create mode 100644 redhat/ksmtuned.service
357786
 create mode 100644 redhat/kvm-s390x.conf
9bac43
 create mode 100644 redhat/kvm-setup
9bac43
 create mode 100644 redhat/kvm-setup.service
357786
 create mode 100644 redhat/kvm-x86.conf
9bac43
 create mode 100644 redhat/kvm.conf
9bac43
 create mode 100644 redhat/kvm.modules
9bac43
 create mode 100644 redhat/qemu-ga.sysconfig
9bac43
 create mode 100644 redhat/qemu-guest-agent.service
9bac43
 create mode 100644 redhat/qemu-kvm.spec.template
357786
 create mode 100644 redhat/qemu-pr-helper.service
357786
 create mode 100644 redhat/qemu-pr-helper.socket
9bac43
 create mode 100644 redhat/rpmbuild/BUILD/.gitignore
9bac43
 create mode 100644 redhat/rpmbuild/RPMS/.gitignore
9bac43
 create mode 100644 redhat/rpmbuild/SOURCES/.gitignore
9bac43
 create mode 100644 redhat/rpmbuild/SPECS/.gitignore
9bac43
 create mode 100644 redhat/rpmbuild/SRPMS/.gitignore
9bac43
 create mode 100755 redhat/scripts/frh.py
9bac43
 create mode 100755 redhat/scripts/git-backport-diff
9bac43
 create mode 100755 redhat/scripts/git-compile-check
9bac43
 create mode 100755 redhat/scripts/process-patches.sh
9bac43
 create mode 100755 redhat/scripts/tarball_checksum.sh
9bac43
 create mode 100644 redhat/vhost.conf
9bac43
9bac43
diff --git a/Makefile b/Makefile
357786
index d71dd5b..89ba4c5 100644
9bac43
--- a/Makefile
9bac43
+++ b/Makefile
357786
@@ -804,7 +804,7 @@ install-doc: $(DOCS)
9bac43
 	$(INSTALL_DATA) docs/interop/qemu-qmp-ref.txt "$(DESTDIR)$(qemu_docdir)"
9bac43
 ifdef CONFIG_POSIX
9bac43
 	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
9bac43
-	$(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1"
9bac43
+	$(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1/qemu-kvm.1"
9bac43
 	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man7"
9bac43
 	$(INSTALL_DATA) docs/interop/qemu-qmp-ref.7 "$(DESTDIR)$(mandir)/man7"
357786
 	$(INSTALL_DATA) docs/qemu-block-drivers.7 "$(DESTDIR)$(mandir)/man7"
357786
diff --git a/block/Makefile.objs b/block/Makefile.objs
357786
index d644bac..c0693fc 100644
357786
--- a/block/Makefile.objs
357786
+++ b/block/Makefile.objs
357786
@@ -20,7 +20,7 @@ block-obj-$(CONFIG_LIBNFS) += nfs.o
357786
 block-obj-$(CONFIG_CURL) += curl.o
357786
 block-obj-$(CONFIG_RBD) += rbd.o
357786
 block-obj-$(CONFIG_GLUSTERFS) += gluster.o
357786
-block-obj-$(CONFIG_VXHS) += vxhs.o
357786
+#block-obj-$(CONFIG_VXHS) += vxhs.o
357786
 block-obj-$(CONFIG_LIBSSH2) += ssh.o
357786
 block-obj-y += accounting.o dirty-bitmap.o
357786
 block-obj-y += write-threshold.o
9bac43
diff --git a/block/vxhs.c b/block/vxhs.c
9bac43
index 75cc6c8..a18154c 100644
9bac43
--- a/block/vxhs.c
9bac43
+++ b/block/vxhs.c
9bac43
@@ -9,7 +9,8 @@
9bac43
  */
9bac43
 
9bac43
 #include "qemu/osdep.h"
9bac43
-#include <qnio/qnio_api.h>
9bac43
+#include "block/vxhs_shim.h"
9bac43
+#include <gmodule.h>
9bac43
 #include <sys/param.h>
9bac43
 #include "block/block_int.h"
9bac43
 #include "qapi/qmp/qerror.h"
9bac43
@@ -58,6 +59,96 @@ typedef struct BDRVVXHSState {
9bac43
     char *tlscredsid; /* tlscredsid */
9bac43
 } BDRVVXHSState;
9bac43
 
9bac43
+#define LIBVXHS_FULL_PATHNAME "/usr/lib64/qemu/libvxhs.so.1"
9bac43
+static bool libvxhs_loaded;
9bac43
+static GModule *libvxhs_handle;
9bac43
+
9bac43
+static LibVXHSFuncs libvxhs;
9bac43
+
9bac43
+typedef struct LibVXHSSymbols {
9bac43
+    const char *name;
9bac43
+    gpointer *addr;
9bac43
+} LibVXHSSymbols;
9bac43
+
9bac43
+static LibVXHSSymbols libvxhs_symbols[] = {
9bac43
+    {"iio_init",        (gpointer *) &libvxhs.iio_init},
9bac43
+    {"iio_fini",        (gpointer *) &libvxhs.iio_fini},
9bac43
+    {"iio_min_version", (gpointer *) &libvxhs.iio_min_version},
9bac43
+    {"iio_max_version", (gpointer *) &libvxhs.iio_max_version},
9bac43
+    {"iio_open",        (gpointer *) &libvxhs.iio_open},
9bac43
+    {"iio_close",       (gpointer *) &libvxhs.iio_close},
9bac43
+    {"iio_writev",      (gpointer *) &libvxhs.iio_writev},
9bac43
+    {"iio_readv",       (gpointer *) &libvxhs.iio_readv},
9bac43
+    {"iio_ioctl",       (gpointer *) &libvxhs.iio_ioctl},
9bac43
+    {NULL}
9bac43
+};
9bac43
+
9bac43
+static void bdrv_vxhs_set_funcs(GModule *handle, Error **errp)
9bac43
+{
9bac43
+    int i = 0;
9bac43
+    while (libvxhs_symbols[i].name) {
9bac43
+        const char *name = libvxhs_symbols[i].name;
9bac43
+        if (!g_module_symbol(handle, name, libvxhs_symbols[i].addr)) {
9bac43
+            error_setg(errp, "%s could not be loaded from libvxhs: %s",
9bac43
+                       name, g_module_error());
9bac43
+            return;
9bac43
+        }
9bac43
+        ++i;
9bac43
+    }
9bac43
+}
9bac43
+
9bac43
+static void bdrv_vxhs_load_libs(Error **errp)
9bac43
+{
9bac43
+    Error *local_err = NULL;
9bac43
+    int32_t ver;
9bac43
+
9bac43
+    if (libvxhs_loaded) {
9bac43
+        return;
9bac43
+    }
9bac43
+
9bac43
+    if (!g_module_supported()) {
9bac43
+        error_setg(errp, "modules are not supported on this platform: %s",
9bac43
+                     g_module_error());
9bac43
+        return;
9bac43
+    }
9bac43
+
9bac43
+    libvxhs_handle = g_module_open(LIBVXHS_FULL_PATHNAME,
9bac43
+                                   G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
9bac43
+    if (!libvxhs_handle) {
9bac43
+        error_setg(errp, "error loading libvxhs: %s", g_module_error());
9bac43
+        return;
9bac43
+    }
9bac43
+
9bac43
+    g_module_make_resident(libvxhs_handle);
9bac43
+
9bac43
+    bdrv_vxhs_set_funcs(libvxhs_handle, &local_err);
9bac43
+    if (local_err) {
9bac43
+        error_propagate(errp, local_err);
9bac43
+        return;
9bac43
+    }
9bac43
+
9bac43
+    /* Now check to see if the libvxhs we are using here is supported
9bac43
+     * by the loaded version */
9bac43
+
9bac43
+    ver = (*libvxhs.iio_min_version)();
9bac43
+    if (ver > QNIO_VERSION) {
9bac43
+        error_setg(errp, "Trying to use libvxhs version %"PRId32" API, but "
9bac43
+                         "only %"PRId32" or newer is supported by %s",
9bac43
+                          QNIO_VERSION, ver, LIBVXHS_FULL_PATHNAME);
9bac43
+        return;
9bac43
+    }
9bac43
+
9bac43
+    ver = (*libvxhs.iio_max_version)();
9bac43
+    if (ver < QNIO_VERSION) {
9bac43
+        error_setg(errp, "Trying to use libvxhs version %"PRId32" API, but "
9bac43
+                         "only %"PRId32" or earlier is supported by %s",
9bac43
+                          QNIO_VERSION, ver, LIBVXHS_FULL_PATHNAME);
9bac43
+        return;
9bac43
+    }
9bac43
+
9bac43
+    libvxhs_loaded = true;
9bac43
+}
9bac43
+
9bac43
 static void vxhs_complete_aio_bh(void *opaque)
9bac43
 {
9bac43
     VXHSAIOCB *acb = opaque;
9bac43
@@ -219,7 +310,7 @@ static void vxhs_parse_filename(const char *filename, QDict *options,
9bac43
 static int vxhs_init_and_ref(void)
9bac43
 {
9bac43
     if (vxhs_ref++ == 0) {
9bac43
-        if (iio_init(QNIO_VERSION, vxhs_iio_callback)) {
9bac43
+        if ((*libvxhs.iio_init)(QNIO_VERSION, vxhs_iio_callback)) {
9bac43
             return -ENODEV;
9bac43
         }
9bac43
     }
9bac43
@@ -229,7 +320,7 @@ static int vxhs_init_and_ref(void)
9bac43
 static void vxhs_unref(void)
9bac43
 {
9bac43
     if (--vxhs_ref == 0) {
9bac43
-        iio_fini();
9bac43
+        (*libvxhs.iio_fini)();
9bac43
     }
9bac43
 }
9bac43
 
9bac43
@@ -299,8 +390,17 @@ static int vxhs_open(BlockDriverState *bs, QDict *options,
9bac43
     char *client_key = NULL;
9bac43
     char *client_cert = NULL;
9bac43
 
9bac43
+    bdrv_vxhs_load_libs(&local_err);
9bac43
+    if (local_err) {
9bac43
+        error_propagate(errp, local_err);
9bac43
+        /* on error, cannot cleanup because the iio_fini() function
9bac43
+         * is not loaded */
9bac43
+        return -EINVAL;
9bac43
+    }
9bac43
+
9bac43
     ret = vxhs_init_and_ref();
9bac43
     if (ret < 0) {
9bac43
+        error_setg(&local_err, "libvxhs iio_init() failed");
9bac43
         ret = -EINVAL;
9bac43
         goto out;
9bac43
     }
9bac43
@@ -385,8 +485,8 @@ static int vxhs_open(BlockDriverState *bs, QDict *options,
9bac43
     /*
9bac43
      * Open qnio channel to storage agent if not opened before
9bac43
      */
9bac43
-    dev_handlep = iio_open(of_vsa_addr, s->vdisk_guid, 0,
9bac43
-                           cacert, client_key, client_cert);
9bac43
+    dev_handlep = (*libvxhs.iio_open)(of_vsa_addr, s->vdisk_guid, 0,
9bac43
+                                      cacert, client_key, client_cert);
9bac43
     if (dev_handlep == NULL) {
9bac43
         trace_vxhs_open_iio_open(of_vsa_addr);
9bac43
         ret = -ENODEV;
9bac43
@@ -450,12 +550,12 @@ static BlockAIOCB *vxhs_aio_rw(BlockDriverState *bs, int64_t sector_num,
9bac43
 
9bac43
     switch (iodir) {
9bac43
     case VDISK_AIO_WRITE:
9bac43
-            ret = iio_writev(dev_handle, acb, qiov->iov, qiov->niov,
9bac43
-                             offset, (uint64_t)size, iio_flags);
9bac43
+            ret = (*libvxhs.iio_writev)(dev_handle, acb, qiov->iov, qiov->niov,
9bac43
+                                        offset, (uint64_t)size, iio_flags);
9bac43
             break;
9bac43
     case VDISK_AIO_READ:
9bac43
-            ret = iio_readv(dev_handle, acb, qiov->iov, qiov->niov,
9bac43
-                            offset, (uint64_t)size, iio_flags);
9bac43
+            ret = (*libvxhs.iio_readv)(dev_handle, acb, qiov->iov, qiov->niov,
9bac43
+                                       offset, (uint64_t)size, iio_flags);
9bac43
             break;
9bac43
     default:
9bac43
             trace_vxhs_aio_rw_invalid(iodir);
9bac43
@@ -505,7 +605,7 @@ static void vxhs_close(BlockDriverState *bs)
9bac43
      * Close vDisk device
9bac43
      */
9bac43
     if (s->vdisk_hostinfo.dev_handle) {
9bac43
-        iio_close(s->vdisk_hostinfo.dev_handle);
9bac43
+        (*libvxhs.iio_close)(s->vdisk_hostinfo.dev_handle);
9bac43
         s->vdisk_hostinfo.dev_handle = NULL;
9bac43
     }
9bac43
 
9bac43
@@ -527,7 +627,7 @@ static int64_t vxhs_get_vdisk_stat(BDRVVXHSState *s)
9bac43
     int ret = 0;
9bac43
     void *dev_handle = s->vdisk_hostinfo.dev_handle;
9bac43
 
9bac43
-    ret = iio_ioctl(dev_handle, IOR_VDISK_STAT, &vdisk_size, 0);
9bac43
+    ret = (*libvxhs.iio_ioctl)(dev_handle, IOR_VDISK_STAT, &vdisk_size, 0);
9bac43
     if (ret < 0) {
9bac43
         trace_vxhs_get_vdisk_stat_err(s->vdisk_guid, ret, errno);
9bac43
         return -EIO;
9bac43
diff --git a/configure b/configure
357786
index e9243f5..d2367f1 100755
9bac43
--- a/configure
9bac43
+++ b/configure
357786
@@ -445,12 +445,15 @@ virglrenderer=""
9bac43
 tpm="yes"
9bac43
 libssh2=""
9bac43
 live_block_migration="yes"
9bac43
+live_block_ops="yes"
9bac43
 numa=""
9bac43
 tcmalloc="no"
9bac43
 jemalloc="no"
9bac43
 replication="yes"
9bac43
 vxhs=""
357786
 libxml2=""
9bac43
+vtd="yes"
357786
+rhel_target="rhv"
9bac43
 
9bac43
 supported_cpu="no"
9bac43
 supported_os="no"
357786
@@ -1348,6 +1351,10 @@ for opt do
9bac43
   ;;
9bac43
   --enable-replication) replication="yes"
9bac43
   ;;
9bac43
+  --disable-live-block-ops) live_block_ops="no"
9bac43
+  ;;
9bac43
+  --enable-live-block-ops) live_block_ops="yes"
9bac43
+  ;;
9bac43
   --disable-vxhs) vxhs="no"
9bac43
   ;;
9bac43
   --enable-vxhs) vxhs="yes"
357786
@@ -1374,6 +1381,12 @@ for opt do
357786
   ;;
357786
   --disable-git-update) git_update=no
9bac43
   ;;
9bac43
+  --disable-vtd) vtd="no"
9bac43
+  ;;
9bac43
+  --enable-vtd) vtd="yes"
9bac43
+  ;;
357786
+  --rhel-target=*) rhel_target="$optarg"
357786
+  ;;
9bac43
   *)
9bac43
       echo "ERROR: unknown option $opt"
9bac43
       echo "Try '$0 --help' for more information"
357786
@@ -1547,6 +1560,7 @@ Advanced options (experts only):
357786
                            xen pv domain builder
357786
   --enable-debug-stack-usage
357786
                            track the maximum stack usage of stacks created by qemu_alloc_stack
357786
+  --rhel-target            set RHEL target (rhv or rhel)
357786
 
357786
 Optional features, enabled with --enable-FEATURE and
357786
 disabled with --disable-FEATURE, default is enabled if available:
357786
@@ -1616,6 +1630,8 @@ disabled with --disable-FEATURE, default is enabled if available:
9bac43
   glusterfs       GlusterFS backend
9bac43
   tpm             TPM support
9bac43
   libssh2         ssh block device support
9bac43
+  live-block-migration live block migration support
9bac43
+  live-block-ops  live block operations support
9bac43
   numa            libnuma support
357786
   libxml2         for Parallels image format
9bac43
   tcmalloc        tcmalloc support
357786
@@ -1628,6 +1644,7 @@ disabled with --disable-FEATURE, default is enabled if available:
9bac43
   qom-cast-debug  cast debugging support
9bac43
   tools           build qemu-io, qemu-nbd and qemu-image tools
9bac43
   vxhs            Veritas HyperScale vDisk backend support
9bac43
+  vtd             Emulated VT-d support (only affects x86 targets)
9bac43
   crypto-afalg    Linux AF_ALG crypto backend driver
9bac43
   vhost-user      vhost-user support
357786
   capstone        capstone disassembler support
357786
@@ -3369,7 +3386,7 @@ else
9bac43
     glib_req_ver=2.22
9bac43
 fi
9bac43
 glib_modules=gthread-2.0
9bac43
-if test "$modules" = yes; then
9bac43
+if test "$modules" = yes -o "$vxhs" = yes; then
357786
     glib_modules="$glib_modules gmodule-export-2.0"
9bac43
 fi
9bac43
 
357786
@@ -5306,33 +5323,6 @@ if compile_prog "" "" ; then
9bac43
 fi
9bac43
 
9bac43
 ##########################################
9bac43
-# Veritas HyperScale block driver VxHS
9bac43
-# Check if libvxhs is installed
9bac43
-
9bac43
-if test "$vxhs" != "no" ; then
9bac43
-  cat > $TMPC <
9bac43
-#include <stdint.h>
9bac43
-#include <qnio/qnio_api.h>
9bac43
-
9bac43
-void *vxhs_callback;
9bac43
-
9bac43
-int main(void) {
9bac43
-    iio_init(QNIO_VERSION, vxhs_callback);
9bac43
-    return 0;
9bac43
-}
9bac43
-EOF
9bac43
-  vxhs_libs="-lvxhs -lssl"
9bac43
-  if compile_prog "" "$vxhs_libs" ; then
9bac43
-    vxhs=yes
9bac43
-  else
9bac43
-    if test "$vxhs" = "yes" ; then
9bac43
-      feature_not_found "vxhs block device" "Install libvxhs See github"
9bac43
-    fi
9bac43
-    vxhs=no
9bac43
-  fi
9bac43
-fi
9bac43
-
9bac43
-##########################################
9bac43
 # check for _Static_assert()
9bac43
 
9bac43
 have_static_assert=no
357786
@@ -5855,6 +5845,7 @@ echo "TPM passthrough   $tpm_passthrough"
357786
 echo "TPM emulator      $tpm_emulator"
9bac43
 echo "QOM debugging     $qom_cast_debug"
9bac43
 echo "Live block migration $live_block_migration"
9bac43
+echo "Live block ops    $live_block_ops"
9bac43
 echo "lzo support       $lzo"
9bac43
 echo "snappy support    $snappy"
9bac43
 echo "bzip2 support     $bzip2"
357786
@@ -5866,6 +5857,8 @@ echo "avx2 optimization $avx2_opt"
9bac43
 echo "replication support $replication"
9bac43
 echo "VxHS block device $vxhs"
357786
 echo "capstone          $capstone"
9bac43
+echo "VT-d emulation    $vtd"
357786
+echo "RHEL target       $rhel_target"
9bac43
 
9bac43
 if test "$sdl_too_old" = "yes"; then
9bac43
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
357786
@@ -6504,6 +6497,10 @@ if test "$live_block_migration" = "yes" ; then
9bac43
   echo "CONFIG_LIVE_BLOCK_MIGRATION=y" >> $config_host_mak
9bac43
 fi
9bac43
 
9bac43
+if test "$live_block_ops" = "yes" ; then
9bac43
+  echo "CONFIG_LIVE_BLOCK_OPS=y" >> $config_host_mak
9bac43
+fi
9bac43
+
357786
 if test "$tpm" = "yes"; then
357786
   echo 'CONFIG_TPM=$(CONFIG_SOFTMMU)' >> $config_host_mak
357786
   # TPM passthrough support?
357786
@@ -6606,8 +6603,16 @@ if test "$pthread_setname_np" = "yes" ; then
9bac43
 fi
9bac43
 
9bac43
 if test "$vxhs" = "yes" ; then
9bac43
-  echo "CONFIG_VXHS=y" >> $config_host_mak
9bac43
-  echo "VXHS_LIBS=$vxhs_libs" >> $config_host_mak
9bac43
+  echo "CONFIG_VXHS=m" >> $config_host_mak
9bac43
+  echo "VXHS_LIBS= -lssl" >> $config_host_mak
9bac43
+fi
9bac43
+
9bac43
+if test "$vtd" = "yes" ; then
9bac43
+  echo "CONFIG_VTD=y" >> $config_host_mak
357786
+fi
357786
+
357786
+if test "$rhel_target" = "rhv" ; then
357786
+  echo "CONFIG_RHV=y" >> $config_host_mak
9bac43
 fi
9bac43
 
9bac43
 if test "$tcg_interpreter" = "yes"; then
9bac43
diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx
357786
index ddfcd5a..601fcb6 100644
9bac43
--- a/hmp-commands-info.hx
9bac43
+++ b/hmp-commands-info.hx
9bac43
@@ -84,6 +84,8 @@ STEXI
9bac43
 Show block device statistics.
9bac43
 ETEXI
9bac43
 
9bac43
+#ifdef CONFIG_LIVE_BLOCK_OPS
9bac43
+
9bac43
     {
9bac43
         .name       = "block-jobs",
9bac43
         .args_type  = "",
9bac43
@@ -98,6 +100,8 @@ STEXI
9bac43
 Show progress of ongoing block device operations.
9bac43
 ETEXI
9bac43
 
9bac43
+#endif /* CONFIG_LIVE_BLOCK_OPS */
9bac43
+
9bac43
     {
9bac43
         .name       = "registers",
9bac43
         .args_type  = "cpustate_all:-a",
9bac43
diff --git a/hmp-commands.hx b/hmp-commands.hx
357786
index 35d862a..3918831 100644
9bac43
--- a/hmp-commands.hx
9bac43
+++ b/hmp-commands.hx
9bac43
@@ -73,6 +73,8 @@ but should be used with extreme caution.  Note that this command only
9bac43
 resizes image files, it can not resize block devices like LVM volumes.
9bac43
 ETEXI
9bac43
 
9bac43
+#ifdef CONFIG_LIVE_BLOCK_OPS
9bac43
+
9bac43
     {
9bac43
         .name       = "block_stream",
9bac43
         .args_type  = "device:B,speed:o?,base:s?",
357786
@@ -160,6 +162,8 @@ STEXI
9bac43
 Resume a paused block streaming operation.
9bac43
 ETEXI
9bac43
 
9bac43
+#endif /* CONFIG_LIVE_BLOCK_OPS */
9bac43
+
9bac43
     {
9bac43
         .name       = "eject",
9bac43
         .args_type  = "force:-f,device:B",
357786
@@ -1151,6 +1155,8 @@ STEXI
9bac43
 Enables or disables migration mode.
9bac43
 ETEXI
9bac43
 
9bac43
+#ifdef CONFIG_LIVE_BLOCK_OPS
9bac43
+
9bac43
     {
9bac43
         .name       = "snapshot_blkdev",
9bac43
         .args_type  = "reuse:-n,device:B,snapshot-file:s?,format:s?",
357786
@@ -1172,6 +1178,8 @@ STEXI
9bac43
 Snapshot device, using snapshot file as target if provided
9bac43
 ETEXI
9bac43
 
9bac43
+#endif /* CONFIG_LIVE_BLOCK_OPS */
9bac43
+
9bac43
     {
9bac43
         .name       = "snapshot_blkdev_internal",
9bac43
         .args_type  = "device:B,name:s",
357786
@@ -1206,6 +1214,8 @@ STEXI
9bac43
 Delete an internal snapshot on device if it support
9bac43
 ETEXI
9bac43
 
9bac43
+#ifdef CONFIG_LIVE_BLOCK_OPS
9bac43
+
9bac43
     {
9bac43
         .name       = "drive_mirror",
9bac43
         .args_type  = "reuse:-n,full:-f,device:B,target:s,format:s?",
357786
@@ -1249,6 +1259,8 @@ STEXI
9bac43
 Start a point-in-time copy of a block device to a specificed target.
9bac43
 ETEXI
9bac43
 
9bac43
+#endif /* CONFIG_LIVE_BLOCK_OPS */
9bac43
+
9bac43
     {
9bac43
         .name       = "drive_add",
9bac43
         .args_type  = "node:-n,pci_addr:s,opts:s",
9bac43
diff --git a/hmp.c b/hmp.c
357786
index a25c7bd..6c92198 100644
9bac43
--- a/hmp.c
9bac43
+++ b/hmp.c
357786
@@ -942,6 +942,8 @@ void hmp_info_pci(Monitor *mon, const QDict *qdict)
9bac43
     qapi_free_PciInfoList(info_list);
9bac43
 }
9bac43
 
9bac43
+#ifdef CONFIG_LIVE_BLOCK_OPS
9bac43
+
9bac43
 void hmp_info_block_jobs(Monitor *mon, const QDict *qdict)
9bac43
 {
9bac43
     BlockJobInfoList *list;
357786
@@ -980,6 +982,8 @@ void hmp_info_block_jobs(Monitor *mon, const QDict *qdict)
9bac43
     qapi_free_BlockJobInfoList(list);
9bac43
 }
9bac43
 
9bac43
+#endif /* CONFIG_LIVE_BLOCK_OPS */
9bac43
+
9bac43
 void hmp_info_tpm(Monitor *mon, const QDict *qdict)
9bac43
 {
9bac43
     TPMInfoList *info_list, *info;
357786
@@ -1191,6 +1195,8 @@ void hmp_block_resize(Monitor *mon, const QDict *qdict)
9bac43
     hmp_handle_error(mon, &err;;
9bac43
 }
9bac43
 
9bac43
+#ifdef CONFIG_LIVE_BLOCK_OPS
9bac43
+
9bac43
 void hmp_drive_mirror(Monitor *mon, const QDict *qdict)
9bac43
 {
9bac43
     const char *filename = qdict_get_str(qdict, "target");
357786
@@ -1274,6 +1280,8 @@ void hmp_snapshot_blkdev(Monitor *mon, const QDict *qdict)
9bac43
     hmp_handle_error(mon, &err;;
9bac43
 }
9bac43
 
9bac43
+#endif /* CONFIG_LIVE_BLOCK_OPS */
9bac43
+
9bac43
 void hmp_snapshot_blkdev_internal(Monitor *mon, const QDict *qdict)
9bac43
 {
9bac43
     const char *device = qdict_get_str(qdict, "device");
357786
@@ -1789,6 +1797,8 @@ void hmp_block_set_io_throttle(Monitor *mon, const QDict *qdict)
9bac43
     hmp_handle_error(mon, &err;;
9bac43
 }
9bac43
 
9bac43
+#ifdef CONFIG_LIVE_BLOCK_OPS
9bac43
+
9bac43
 void hmp_block_stream(Monitor *mon, const QDict *qdict)
9bac43
 {
9bac43
     Error *error = NULL;
357786
@@ -1855,6 +1865,8 @@ void hmp_block_job_complete(Monitor *mon, const QDict *qdict)
9bac43
     hmp_handle_error(mon, &error);
9bac43
 }
9bac43
 
9bac43
+#endif /* CONFIG_LIVE_BLOCK_OPS */
9bac43
+
9bac43
 typedef struct HMPMigrationStatus
9bac43
 {
9bac43
     QEMUTimer *timer;
9bac43
diff --git a/include/block/vxhs_shim.h b/include/block/vxhs_shim.h
9bac43
new file mode 100644
9bac43
index 0000000..42519ae
9bac43
--- /dev/null
9bac43
+++ b/include/block/vxhs_shim.h
9bac43
@@ -0,0 +1,143 @@
9bac43
+/*
9bac43
+ * Network IO library for VxHS QEMU block driver (Veritas Technologies)
9bac43
+ *
9bac43
+ * This work is licensed under the terms of the GNU GPL, version 2.  See
9bac43
+ * the COPYING file in the top-level directory.
9bac43
+ *
9bac43
+ * Contributions after 2014-08-15 are licensed under the terms of the
9bac43
+ * GNU GPL, version 2 or (at your option) any later version.
9bac43
+ */
9bac43
+
9bac43
+#ifndef QNIO_API_H
9bac43
+#define QNIO_API_H
9bac43
+
9bac43
+#include <sys/uio.h>
9bac43
+
9bac43
+/*
9bac43
+ * Bump up the version everytime this file is modified
9bac43
+ */
9bac43
+#define QNIO_VERSION    34
9bac43
+
9bac43
+/*
9bac43
+ * These are the opcodes referenced by callback routine.
9bac43
+ */
9bac43
+#define IRP_READ_REQUEST                    0x1FFF
9bac43
+#define IRP_WRITE_REQUEST                   0x2FFF
9bac43
+#define IRP_VDISK_CHECK_IO_FAILOVER_READY   2020
9bac43
+
9bac43
+/*
9bac43
+ * opcodes for iio_ioctl.
9bac43
+ */
9bac43
+#define IOR_VDISK_STAT                      1005
9bac43
+
9bac43
+/*
9bac43
+ * Error values for iio_cb_t callback function.
9bac43
+ */
9bac43
+#define QNIOERROR_HUP                       901 /* Retriable error */
9bac43
+#define QNIOERROR_NOCONN                    902 /* Non-retriable error */
9bac43
+
9bac43
+
9bac43
+/* Operation Flags */
9bac43
+#define IIO_FLAG_ASYNC        0x0001   /* Do an async send */
9bac43
+
9bac43
+/*
9bac43
+ * INPUT:
9bac43
+ *     ctx - opaque context
9bac43
+ *     opcode - Operation
9bac43
+ *     error - 0 for sucess, non-zero for failure.
9bac43
+ * RETURNS:
9bac43
+ *     void
9bac43
+ * DESCRIPTION:
9bac43
+ *     This callback is called, after Async request completes.
9bac43
+ *
9bac43
+ * CONTEXT:
9bac43
+ *     The callback should be wait-free.
9bac43
+ */
9bac43
+typedef void (*iio_cb_t) (void *ctx, uint32_t opcode, uint32_t error);
9bac43
+
9bac43
+typedef struct LibVXHSFuncs {
9bac43
+/*
9bac43
+ * RETURNS:
9bac43
+ *     0 for sucess, non-zero for failure.
9bac43
+ * DESCRIPTION:
9bac43
+ *     Intilize the library state. This should be called at the
9bac43
+ *     begining before issuing any library call.
9bac43
+ */
9bac43
+    int     (*iio_init)(int32_t version, iio_cb_t cb);
9bac43
+/*
9bac43
+ * RETURNS:
9bac43
+ *     void
9bac43
+ * DESCRIPTION:
9bac43
+ *     Relinquish library resources. This should be called on the
9bac43
+ *     close of last open device.
9bac43
+ */
9bac43
+    void    (*iio_fini)(void);
9bac43
+/*
9bac43
+ * DESCRIPTION:
9bac43
+ *     Returns minimum QNIO API version supported by library.
9bac43
+ */
9bac43
+    int32_t (*iio_min_version)(void);
9bac43
+/*
9bac43
+ * DESCRIPTION:
9bac43
+ *     Returns maximum QNIO API version supported by library.
9bac43
+ */
9bac43
+    int32_t (*iio_max_version)(void);
9bac43
+/*
9bac43
+ * INPUT:
9bac43
+ *    uri - const string of the format of://<hostname|ip>:port
9bac43
+ *    devid - Device ID.
9bac43
+ *    flags - currently unused, this must be set to 0
9bac43
+ *    cacert - CA certificates file in PEM format
9bac43
+ *    client_key - Client private key file in PEM format
9bac43
+ *    client_cert - Client certificate file in PEM format
9bac43
+ * RETURNS:
9bac43
+ *    opeque device handle on success, NULL on failure.
9bac43
+ * DESCRIPTION:
9bac43
+ *    This call returns device handle on success. Returns NULL on
9bac43
+ *    failure with errno set
9bac43
+ *    errno can be one of:
9bac43
+ *        ENODEV - remote device not found
9bac43
+ *        EBADF  - Unable to open communication channel.
9bac43
+ *        EBUSY  - The call cannot be completed right now
9bac43
+ */
9bac43
+    void   *(*iio_open)(const char *uri, const char *devid, uint32_t flags,
9bac43
+                        const char *cacert, const char *client_key,
9bac43
+                        const char *client_cert);
9bac43
+/*
9bac43
+ * Close the device.
9bac43
+ *    For every matching iio_open() there should be a matching iio_close()
9bac43
+ *    The last close free all data structures associated with the device.
9bac43
+ */
9bac43
+    int32_t (*iio_close)(void *dev_handle);
9bac43
+/*
9bac43
+ * INPUT:
9bac43
+ *    dev_handle - device descriptor on which read/write needs to be performed
9bac43
+ *    ctx - an opaque context that is not interpreted This is set for
9bac43
+ *          async calls only. It can be NULL.
9bac43
+ *    iov    - an array of iovecs (This is a scatter gather operation)
9bac43
+ *    iovcnt  - the number of iovecs
9bac43
+ *    offset - an offset to perform the write
9bac43
+ *    size   - I/O size
9bac43
+ *    flags  - can be one of
9bac43
+ *        IIO_FLAG_ASYNC - indicating this is a aio call.
9bac43
+ * RETURNS:
9bac43
+ *        -1 on error, sets errno
9bac43
+ *        EBADF  - the remote fd is bad
9bac43
+ *        EBUSY  - The call cannot be completed right now
9bac43
+ *        EPIPE  - the channel got disconnected, call back would be called in
9bac43
+ *                 addition to this.
9bac43
+ */
9bac43
+    int32_t (*iio_writev)(void *dev_handle, void *ctx, struct iovec *iov,
9bac43
+                          int iovcnt, uint64_t offset, uint64_t size,
9bac43
+                          uint32_t flags);
9bac43
+
9bac43
+    int32_t (*iio_readv)(void *dev_handle, void *ctx, struct iovec *iov,
9bac43
+                         int iovcnt, uint64_t offset, uint64_t size,
9bac43
+                         uint32_t flags);
9bac43
+
9bac43
+    int32_t (*iio_ioctl)(void *dev_handle, uint32_t opcode, void *opaque,
9bac43
+                         uint32_t flags);
9bac43
+
9bac43
+} LibVXHSFuncs;
9bac43
+
9bac43
+#endif
9bac43
diff --git a/monitor.c b/monitor.c
357786
index 39f8ee1..1813d34 100644
9bac43
--- a/monitor.c
9bac43
+++ b/monitor.c
357786
@@ -1168,6 +1168,22 @@ static void qmp_unregister_commands_hack(void)
9bac43
     && !defined(TARGET_S390X)
9bac43
     qmp_unregister_command(&qmp_commands, "query-cpu-definitions");
9bac43
 #endif
9bac43
+#ifndef CONFIG_LIVE_BLOCK_OPS
9bac43
+    qmp_unregister_command(&qmp_commands, "block-stream");
9bac43
+    qmp_unregister_command(&qmp_commands, "block-commit");
9bac43
+    qmp_unregister_command(&qmp_commands, "drive-mirror");
9bac43
+    qmp_unregister_command(&qmp_commands, "blockdev-mirror");
9bac43
+    qmp_unregister_command(&qmp_commands, "drive-backup");
9bac43
+    qmp_unregister_command(&qmp_commands, "blockdev-backup");
9bac43
+    qmp_unregister_command(&qmp_commands, "blockdev-snapshot");
9bac43
+    qmp_unregister_command(&qmp_commands, "blockdev-snapshot-sync");
9bac43
+    qmp_unregister_command(&qmp_commands, "block-job-set-speed");
9bac43
+    qmp_unregister_command(&qmp_commands, "block-job-cancel");
9bac43
+    qmp_unregister_command(&qmp_commands, "block-job-pause");
9bac43
+    qmp_unregister_command(&qmp_commands, "block-job-resume");
9bac43
+    qmp_unregister_command(&qmp_commands, "block-job-complete");
9bac43
+    qmp_unregister_command(&qmp_commands, "query-block-jobs");
9bac43
+#endif
9bac43
 }
9bac43
 
357786
 static void monitor_init_qmp_commands(void)
9bac43
diff --git a/os-posix.c b/os-posix.c
357786
index b9c2343..05de8ee 100644
9bac43
--- a/os-posix.c
9bac43
+++ b/os-posix.c
357786
@@ -75,7 +75,7 @@ void os_setup_signal_handling(void)
9bac43
 /* Find a likely location for support files using the location of the binary.
9bac43
    For installed binaries this will be "$bindir/../share/qemu".  When
9bac43
    running from the build tree this will be "$bindir/../pc-bios".  */
9bac43
-#define SHARE_SUFFIX "/share/qemu"
9bac43
+#define SHARE_SUFFIX "/share/qemu-kvm"
9bac43
 #define BUILD_SUFFIX "/pc-bios"
9bac43
 char *os_find_datadir(void)
9bac43
 {
357786
diff --git a/tests/qmp-test.c b/tests/qmp-test.c
357786
index 772058f..f34428e 100644
357786
--- a/tests/qmp-test.c
357786
+++ b/tests/qmp-test.c
357786
@@ -238,6 +238,9 @@ static int query_error_class(const char *cmd)
357786
         { "query-balloon", ERROR_CLASS_DEVICE_NOT_ACTIVE },
357786
         { "query-hotpluggable-cpus", ERROR_CLASS_GENERIC_ERROR },
357786
         { "query-vm-generation-id", ERROR_CLASS_GENERIC_ERROR },
357786
+#ifndef CONFIG_RHV
357786
+        { "query-block-jobs", ERROR_CLASS_COMMAND_NOT_FOUND },
357786
+#endif
357786
         { NULL, -1 }
357786
     };
357786
     int i;
9bac43
diff --git a/ui/vnc.c b/ui/vnc.c
357786
index e164eb7..0c3011b 100644
9bac43
--- a/ui/vnc.c
9bac43
+++ b/ui/vnc.c
357786
@@ -4045,7 +4045,7 @@ void vnc_display_open(const char *id, Error **errp)
357786
     trace_vnc_auth_init(vd, 1, vd->ws_auth, vd->ws_subauth);
9bac43
 
9bac43
 #ifdef CONFIG_VNC_SASL
9bac43
-    if ((saslErr = sasl_server_init(NULL, "qemu")) != SASL_OK) {
9bac43
+    if ((saslErr = sasl_server_init(NULL, "qemu-kvm")) != SASL_OK) {
9bac43
         error_setg(errp, "Failed to initialize SASL auth: %s",
9bac43
                    sasl_errstring(saslErr, NULL, NULL));
9bac43
         goto fail;
9bac43
-- 
9bac43
1.8.3.1
9bac43