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

1bdc94
From ec05305843e6fb1cf3a8bc1dfab7b7e3d9edce4e 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
--
1bdc94
Rebase notes (2.12.0):
1bdc94
- Not packaging hppa-firmware.img
1bdc94
- Disable vxhs.o in block/Makefile.obj
1bdc94
- Disable ppc64 builds
1bdc94
- Removed acpi-dsdt.aml (upstream)
1bdc94
1bdc94
Rebase notes (2.11.0):
1bdc94
- Removed --with-pixman configure option (upstream)
1bdc94
- Disabled multipath for qemu-pr-helper (unsupported API)
1bdc94
- null-co whitelisting moved to this patch
1bdc94
- make check enabled
1bdc94
- conditionaly disable query-block-jobs for qmp-test.c
1bdc94
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
1bdc94
Merged patches (rebase 2.11.0)
1bdc94
- ce6e8e5b8a redhat/qemu-kvm.spec.template: Enable seccomp on s390x, too
1bdc94
- 8629f208c6 redhat: Remove qemu.binfmt from the downstream repository
1bdc94
- b889ce1c40 Disable build of qemu-kvm-ma for x86_64
1bdc94
- 4506913c42 redhat: add CONFIG_RHV flag
1bdc94
- 21ecaec46f s390x: vm.allocate_pgste sysctl is no longer needed
1bdc94
- 78a1864d99 Update build_configure for 2.10.0 options
1bdc94
- decf881320 redhat: Provide s390x specific /etc/modprobe.d/kvm.conf
1bdc94
- e0cd3138cc redhat/qemu-kvm.spec: Use the freshly built s390-ccw.img firmware image
1bdc94
- 7af6b9a4fa redhat: install generic kvm.conf except for s390 and x86 architectures
1bdc94
- c4290f50bb redhat: fix rh-srpm target
1bdc94
- 8943f52e8b Package qemu-block-drivers manpage
1bdc94
- 88b41044d6 update spec to build and install qemu-pr-helper
1bdc94
- 34ca391 redhat: Fix permissions of /dev/kvm on a freshly booted s390x system
1bdc94
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
1bdc94
- 21ecaec s390x: vm.allocate_pgste sysctl is no longer needed
1bdc94
- 78a1864 Update build_configure for 2.10.0 options
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
1bdc94
(cherry picked from commit ba7591ec4a0906121d15ffbf740580bd79ec5814)
1bdc94
(cherry picked from commit c984102495c0cee355158ecc382ad5e44b23b16c)
1bdc94
1bdc94
Conflicts:
1bdc94
	.gitpublish
1bdc94
	configure
1bdc94
	hw/i386/Makefile.objs
1bdc94
1bdc94
(cherry picked from commit bea8f0ccd9fb65aefe7f19b3c4cc849c9e4c1bff)
1bdc94
(cherry picked from commit 7bb63d45c5ed63943718d60382c140fbbba270cb)
1bdc94
(cherry picked from commit a451d845da0e2f872b07ae57fd328adb8116f6cc)
1bdc94
(cherry picked from commit db5d48c968290ffc47ef8662d6ee1fece967acac)
4a2fec
---
4a2fec
 .gitignore                         |    1 +
1bdc94
 .gitpublish                        |   65 +-
4a2fec
 Makefile                           |    2 +-
1bdc94
 block/Makefile.objs                |    2 +-
4a2fec
 block/vxhs.c                       |  122 +-
1bdc94
 configure                          |   65 +-
4a2fec
 hmp-commands-info.hx               |    4 +
4a2fec
 hmp-commands.hx                    |   12 +
4a2fec
 hmp.c                              |   12 +
4a2fec
 include/block/vxhs_shim.h          |  143 +
4a2fec
 monitor.c                          |   16 +
4a2fec
 os-posix.c                         |    2 +-
4a2fec
 redhat/.gitignore                  |    5 +
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 +
1bdc94
 redhat/Makefile                    |   95 +
1bdc94
 redhat/Makefile.common             |   57 +
4a2fec
 redhat/Makefile.local              |   76 +
4a2fec
 redhat/README.rhel6-gpxe-source    |    9 +
4a2fec
 redhat/bridge.conf                 |    1 +
1bdc94
 redhat/build_configure.sh          |  167 +
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 +
1bdc94
 redhat/kvm-s390x.conf              |    7 +
4a2fec
 redhat/kvm-setup                   |   40 +
4a2fec
 redhat/kvm-setup.service           |   14 +
1bdc94
 redhat/kvm-x86.conf                |   12 +
1bdc94
 redhat/kvm.conf                    |    3 +
4a2fec
 redhat/kvm.modules                 |   21 +
4a2fec
 redhat/qemu-ga.sysconfig           |   19 +
1bdc94
 redhat/qemu-guest-agent.service    |   20 +
1bdc94
 redhat/qemu-kvm.spec.template      | 6903 ++++++++++++++++++++++++++++++++++++
1bdc94
 redhat/qemu-pr-helper.service      |   15 +
1bdc94
 redhat/qemu-pr-helper.socket       |    9 +
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 +
1bdc94
 redhat/scripts/frh.py              |   26 +
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 +
1bdc94
 tests/qmp-test.c                   |    3 +
4a2fec
 ui/vnc.c                           |    2 +-
1bdc94
 53 files changed, 8776 insertions(+), 96 deletions(-)
4a2fec
 create mode 100644 include/block/vxhs_shim.h
4a2fec
 create mode 100644 redhat/.gitignore
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
1bdc94
 create mode 100644 redhat/kvm-s390x.conf
4a2fec
 create mode 100644 redhat/kvm-setup
4a2fec
 create mode 100644 redhat/kvm-setup.service
1bdc94
 create mode 100644 redhat/kvm-x86.conf
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
1bdc94
 create mode 100644 redhat/qemu-pr-helper.service
1bdc94
 create mode 100644 redhat/qemu-pr-helper.socket
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
1bdc94
index d71dd5b..89ba4c5 100644
4a2fec
--- a/Makefile
4a2fec
+++ b/Makefile
1bdc94
@@ -804,7 +804,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"
1bdc94
 	$(INSTALL_DATA) docs/qemu-block-drivers.7 "$(DESTDIR)$(mandir)/man7"
1bdc94
diff --git a/block/Makefile.objs b/block/Makefile.objs
1bdc94
index d644bac..c0693fc 100644
1bdc94
--- a/block/Makefile.objs
1bdc94
+++ b/block/Makefile.objs
1bdc94
@@ -20,7 +20,7 @@ block-obj-$(CONFIG_LIBNFS) += nfs.o
1bdc94
 block-obj-$(CONFIG_CURL) += curl.o
1bdc94
 block-obj-$(CONFIG_RBD) += rbd.o
1bdc94
 block-obj-$(CONFIG_GLUSTERFS) += gluster.o
1bdc94
-block-obj-$(CONFIG_VXHS) += vxhs.o
1bdc94
+#block-obj-$(CONFIG_VXHS) += vxhs.o
1bdc94
 block-obj-$(CONFIG_LIBSSH2) += ssh.o
1bdc94
 block-obj-y += accounting.o dirty-bitmap.o
1bdc94
 block-obj-y += write-threshold.o
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
1bdc94
index e9243f5..d2367f1 100755
4a2fec
--- a/configure
4a2fec
+++ b/configure
1bdc94
@@ -445,12 +445,15 @@ 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=""
1bdc94
 libxml2=""
4a2fec
+vtd="yes"
1bdc94
+rhel_target="rhv"
4a2fec
 
4a2fec
 supported_cpu="no"
4a2fec
 supported_os="no"
1bdc94
@@ -1348,6 +1351,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"
1bdc94
@@ -1374,6 +1381,12 @@ for opt do
1bdc94
   ;;
1bdc94
   --disable-git-update) git_update=no
4a2fec
   ;;
4a2fec
+  --disable-vtd) vtd="no"
4a2fec
+  ;;
4a2fec
+  --enable-vtd) vtd="yes"
4a2fec
+  ;;
1bdc94
+  --rhel-target=*) rhel_target="$optarg"
1bdc94
+  ;;
4a2fec
   *)
4a2fec
       echo "ERROR: unknown option $opt"
4a2fec
       echo "Try '$0 --help' for more information"
1bdc94
@@ -1547,6 +1560,7 @@ Advanced options (experts only):
1bdc94
                            xen pv domain builder
1bdc94
   --enable-debug-stack-usage
1bdc94
                            track the maximum stack usage of stacks created by qemu_alloc_stack
1bdc94
+  --rhel-target            set RHEL target (rhv or rhel)
1bdc94
 
1bdc94
 Optional features, enabled with --enable-FEATURE and
1bdc94
 disabled with --disable-FEATURE, default is enabled if available:
1bdc94
@@ -1616,6 +1630,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
1bdc94
   libxml2         for Parallels image format
4a2fec
   tcmalloc        tcmalloc support
1bdc94
@@ -1628,6 +1644,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
1bdc94
   capstone        capstone disassembler support
1bdc94
@@ -3369,7 +3386,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
1bdc94
     glib_modules="$glib_modules gmodule-export-2.0"
4a2fec
 fi
4a2fec
 
1bdc94
@@ -5306,33 +5323,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
1bdc94
@@ -5855,6 +5845,7 @@ echo "TPM passthrough   $tpm_passthrough"
1bdc94
 echo "TPM emulator      $tpm_emulator"
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"
1bdc94
@@ -5866,6 +5857,8 @@ echo "avx2 optimization $avx2_opt"
4a2fec
 echo "replication support $replication"
4a2fec
 echo "VxHS block device $vxhs"
1bdc94
 echo "capstone          $capstone"
4a2fec
+echo "VT-d emulation    $vtd"
1bdc94
+echo "RHEL target       $rhel_target"
4a2fec
 
4a2fec
 if test "$sdl_too_old" = "yes"; then
4a2fec
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
1bdc94
@@ -6504,6 +6497,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
+
1bdc94
 if test "$tpm" = "yes"; then
1bdc94
   echo 'CONFIG_TPM=$(CONFIG_SOFTMMU)' >> $config_host_mak
1bdc94
   # TPM passthrough support?
1bdc94
@@ -6606,8 +6603,16 @@ 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
1bdc94
+fi
1bdc94
+
1bdc94
+if test "$rhel_target" = "rhv" ; then
1bdc94
+  echo "CONFIG_RHV=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
1bdc94
index ddfcd5a..601fcb6 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
1bdc94
index 35d862a..3918831 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?",
1bdc94
@@ -160,6 +162,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",
1bdc94
@@ -1151,6 +1155,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?",
1bdc94
@@ -1172,6 +1178,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",
1bdc94
@@ -1206,6 +1214,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?",
1bdc94
@@ -1249,6 +1259,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
1bdc94
index a25c7bd..6c92198 100644
4a2fec
--- a/hmp.c
4a2fec
+++ b/hmp.c
1bdc94
@@ -942,6 +942,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;
1bdc94
@@ -980,6 +982,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;
1bdc94
@@ -1191,6 +1195,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");
1bdc94
@@ -1274,6 +1280,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");
1bdc94
@@ -1789,6 +1797,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;
1bdc94
@@ -1855,6 +1865,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/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
1bdc94
index 39f8ee1..1813d34 100644
4a2fec
--- a/monitor.c
4a2fec
+++ b/monitor.c
1bdc94
@@ -1168,6 +1168,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
 
1bdc94
 static void monitor_init_qmp_commands(void)
4a2fec
diff --git a/os-posix.c b/os-posix.c
1bdc94
index b9c2343..05de8ee 100644
4a2fec
--- a/os-posix.c
4a2fec
+++ b/os-posix.c
1bdc94
@@ -75,7 +75,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
 {
1bdc94
diff --git a/tests/qmp-test.c b/tests/qmp-test.c
1bdc94
index 772058f..f34428e 100644
1bdc94
--- a/tests/qmp-test.c
1bdc94
+++ b/tests/qmp-test.c
1bdc94
@@ -238,6 +238,9 @@ static int query_error_class(const char *cmd)
1bdc94
         { "query-balloon", ERROR_CLASS_DEVICE_NOT_ACTIVE },
1bdc94
         { "query-hotpluggable-cpus", ERROR_CLASS_GENERIC_ERROR },
1bdc94
         { "query-vm-generation-id", ERROR_CLASS_GENERIC_ERROR },
1bdc94
+#ifndef CONFIG_RHV
1bdc94
+        { "query-block-jobs", ERROR_CLASS_COMMAND_NOT_FOUND },
1bdc94
+#endif
1bdc94
         { NULL, -1 }
1bdc94
     };
1bdc94
     int i;
4a2fec
diff --git a/ui/vnc.c b/ui/vnc.c
1bdc94
index e164eb7..0c3011b 100644
4a2fec
--- a/ui/vnc.c
4a2fec
+++ b/ui/vnc.c
1bdc94
@@ -4045,7 +4045,7 @@ void vnc_display_open(const char *id, Error **errp)
1bdc94
     trace_vnc_auth_init(vd, 1, vd->ws_auth, vd->ws_subauth);
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