|
|
9bac43 |
From ba7591ec4a0906121d15ffbf740580bd79ec5814 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 |
--
|
|
|
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 |
|
|
|
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
|
|
|
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 |
|
|
|
9bac43 |
(cherry picked from commit a4e4a2f66d7a4efc873c5c1cafc502db480ff363)
|
|
|
9bac43 |
---
|
|
|
9bac43 |
.gitignore | 1 +
|
|
|
9bac43 |
.gitpublish | 8 +
|
|
|
9bac43 |
Makefile | 2 +-
|
|
|
9bac43 |
block/vxhs.c | 122 +-
|
|
|
9bac43 |
configure | 56 +-
|
|
|
9bac43 |
hmp-commands-info.hx | 4 +
|
|
|
9bac43 |
hmp-commands.hx | 12 +
|
|
|
9bac43 |
hmp.c | 12 +
|
|
|
9bac43 |
hw/i386/Makefile.objs | 3 +-
|
|
|
9bac43 |
include/block/vxhs_shim.h | 143 +
|
|
|
9bac43 |
monitor.c | 16 +
|
|
|
9bac43 |
os-posix.c | 2 +-
|
|
|
9bac43 |
redhat/.gitignore | 5 +
|
|
|
9bac43 |
redhat/50-kvm-pgste.conf | 3 +
|
|
|
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 +
|
|
|
9bac43 |
redhat/Makefile | 90 +
|
|
|
9bac43 |
redhat/Makefile.common | 26 +
|
|
|
9bac43 |
redhat/Makefile.local | 76 +
|
|
|
9bac43 |
redhat/README.rhel6-gpxe-source | 9 +
|
|
|
9bac43 |
redhat/bridge.conf | 1 +
|
|
|
9bac43 |
redhat/build_configure.sh | 156 +
|
|
|
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 +
|
|
|
9bac43 |
redhat/kvm-setup | 40 +
|
|
|
9bac43 |
redhat/kvm-setup.service | 14 +
|
|
|
9bac43 |
redhat/kvm.conf | 12 +
|
|
|
9bac43 |
redhat/kvm.modules | 21 +
|
|
|
9bac43 |
redhat/qemu-ga.sysconfig | 19 +
|
|
|
9bac43 |
redhat/qemu-guest-agent.service | 21 +
|
|
|
9bac43 |
redhat/qemu-kvm.spec.template | 6143 ++++++++++++++++++++++++++++++++++++
|
|
|
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 +
|
|
|
9bac43 |
redhat/scripts/frh.py | 27 +
|
|
|
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 +
|
|
|
9bac43 |
ui/vnc.c | 2 +-
|
|
|
9bac43 |
49 files changed, 7923 insertions(+), 45 deletions(-)
|
|
|
9bac43 |
create mode 100644 .gitpublish
|
|
|
9bac43 |
create mode 100644 include/block/vxhs_shim.h
|
|
|
9bac43 |
create mode 100644 redhat/.gitignore
|
|
|
9bac43 |
create mode 100644 redhat/50-kvm-pgste.conf
|
|
|
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
|
|
|
9bac43 |
create mode 100644 redhat/kvm-setup
|
|
|
9bac43 |
create mode 100644 redhat/kvm-setup.service
|
|
|
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
|
|
|
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
|
|
|
9bac43 |
index 81447b1..2cb2442 100644
|
|
|
9bac43 |
--- a/Makefile
|
|
|
9bac43 |
+++ b/Makefile
|
|
|
9bac43 |
@@ -570,7 +570,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"
|
|
|
9bac43 |
ifneq ($(TOOLS),)
|
|
|
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
|
|
|
9bac43 |
index dd73cce..355c364 100755
|
|
|
9bac43 |
--- a/configure
|
|
|
9bac43 |
+++ b/configure
|
|
|
9bac43 |
@@ -400,11 +400,13 @@ 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=""
|
|
|
9bac43 |
+vtd="yes"
|
|
|
9bac43 |
|
|
|
9bac43 |
supported_cpu="no"
|
|
|
9bac43 |
supported_os="no"
|
|
|
9bac43 |
@@ -1279,6 +1281,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"
|
|
|
9bac43 |
@@ -1291,6 +1297,10 @@ for opt do
|
|
|
9bac43 |
error_exit "vhost-user isn't available on win32"
|
|
|
9bac43 |
fi
|
|
|
9bac43 |
;;
|
|
|
9bac43 |
+ --disable-vtd) vtd="no"
|
|
|
9bac43 |
+ ;;
|
|
|
9bac43 |
+ --enable-vtd) vtd="yes"
|
|
|
9bac43 |
+ ;;
|
|
|
9bac43 |
*)
|
|
|
9bac43 |
echo "ERROR: unknown option $opt"
|
|
|
9bac43 |
echo "Try '$0 --help' for more information"
|
|
|
9bac43 |
@@ -1523,6 +1533,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
|
|
|
9bac43 |
tcmalloc tcmalloc support
|
|
|
9bac43 |
jemalloc jemalloc support
|
|
|
9bac43 |
@@ -1534,6 +1546,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
|
|
|
9bac43 |
|
|
|
9bac43 |
@@ -3217,7 +3230,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
|
|
|
9bac43 |
glib_modules="$glib_modules gmodule-2.0"
|
|
|
9bac43 |
fi
|
|
|
9bac43 |
|
|
|
9bac43 |
@@ -4940,33 +4953,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
|
|
|
9bac43 |
@@ -5398,6 +5384,7 @@ echo "libssh2 support $libssh2"
|
|
|
9bac43 |
echo "TPM passthrough $tpm_passthrough"
|
|
|
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"
|
|
|
9bac43 |
@@ -5407,6 +5394,7 @@ echo "jemalloc support $jemalloc"
|
|
|
9bac43 |
echo "avx2 optimization $avx2_opt"
|
|
|
9bac43 |
echo "replication support $replication"
|
|
|
9bac43 |
echo "VxHS block device $vxhs"
|
|
|
9bac43 |
+echo "VT-d emulation $vtd"
|
|
|
9bac43 |
|
|
|
9bac43 |
if test "$sdl_too_old" = "yes"; then
|
|
|
9bac43 |
echo "-> Your SDL version is too old - please upgrade to have SDL support"
|
|
|
9bac43 |
@@ -5976,6 +5964,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 |
+
|
|
|
9bac43 |
# USB host support
|
|
|
9bac43 |
if test "$libusb" = "yes"; then
|
|
|
9bac43 |
echo "HOST_USB=libusb legacy" >> $config_host_mak
|
|
|
9bac43 |
@@ -6071,8 +6063,12 @@ 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
|
|
|
9bac43 |
fi
|
|
|
9bac43 |
|
|
|
9bac43 |
if test "$tcg_interpreter" = "yes"; then
|
|
|
9bac43 |
diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx
|
|
|
9bac43 |
index d9df238..0967e41 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
|
|
|
9bac43 |
index 1941e19..2d137a1 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?",
|
|
|
9bac43 |
@@ -159,6 +161,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",
|
|
|
9bac43 |
@@ -1169,6 +1173,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?",
|
|
|
9bac43 |
@@ -1190,6 +1196,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",
|
|
|
9bac43 |
@@ -1224,6 +1232,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?",
|
|
|
9bac43 |
@@ -1267,6 +1277,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
|
|
|
9bac43 |
index fd80dce..ab985c6 100644
|
|
|
9bac43 |
--- a/hmp.c
|
|
|
9bac43 |
+++ b/hmp.c
|
|
|
9bac43 |
@@ -951,6 +951,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;
|
|
|
9bac43 |
@@ -989,6 +991,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;
|
|
|
9bac43 |
@@ -1197,6 +1201,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");
|
|
|
9bac43 |
@@ -1280,6 +1286,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");
|
|
|
9bac43 |
@@ -1776,6 +1784,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;
|
|
|
9bac43 |
@@ -1842,6 +1852,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/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
|
|
|
9bac43 |
index 909ead6..c14559b 100644
|
|
|
9bac43 |
--- a/hw/i386/Makefile.objs
|
|
|
9bac43 |
+++ b/hw/i386/Makefile.objs
|
|
|
9bac43 |
@@ -2,7 +2,8 @@ obj-$(CONFIG_KVM) += kvm/
|
|
|
9bac43 |
obj-y += multiboot.o
|
|
|
9bac43 |
obj-y += pc.o pc_piix.o pc_q35.o
|
|
|
9bac43 |
obj-y += pc_sysfw.o
|
|
|
9bac43 |
-obj-y += x86-iommu.o intel_iommu.o
|
|
|
9bac43 |
+obj-y += x86-iommu.o
|
|
|
9bac43 |
+obj-$(CONFIG_VTD) += intel_iommu.o
|
|
|
9bac43 |
obj-y += amd_iommu.o
|
|
|
9bac43 |
obj-$(CONFIG_XEN) += ../xenpv/ xen/
|
|
|
9bac43 |
|
|
|
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
|
|
|
9bac43 |
index e0f8801..de0a70e 100644
|
|
|
9bac43 |
--- a/monitor.c
|
|
|
9bac43 |
+++ b/monitor.c
|
|
|
9bac43 |
@@ -998,6 +998,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 |
|
|
|
9bac43 |
void monitor_init_qmp_commands(void)
|
|
|
9bac43 |
diff --git a/os-posix.c b/os-posix.c
|
|
|
9bac43 |
index 92e9d85..9625679 100644
|
|
|
9bac43 |
--- a/os-posix.c
|
|
|
9bac43 |
+++ b/os-posix.c
|
|
|
9bac43 |
@@ -76,7 +76,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 |
{
|
|
|
9bac43 |
diff --git a/ui/vnc.c b/ui/vnc.c
|
|
|
9bac43 |
index 651cbb8..5b1e264 100644
|
|
|
9bac43 |
--- a/ui/vnc.c
|
|
|
9bac43 |
+++ b/ui/vnc.c
|
|
|
9bac43 |
@@ -3945,7 +3945,7 @@ void vnc_display_open(const char *id, Error **errp)
|
|
|
9bac43 |
}
|
|
|
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 |
|