cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
76daa3
From a4e4a2f66d7a4efc873c5c1cafc502db480ff363 Mon Sep 17 00:00:00 2001
76daa3
From: Miroslav Rezanina <mrezanin@redhat.com>
76daa3
Date: Thu, 5 Nov 2015 10:38:15 +0100
76daa3
Subject: Initial redhat build
76daa3
76daa3
This patch introduces redhat build structure in redhat subdirectory. In addition,
76daa3
several issues are fixed in QEMU tree:
76daa3
76daa3
- Change of app name for sasl_server_init in VNC code from qemu to qemu-kvm
76daa3
 - As we use qemu-kvm as name in all places, this is updated to be consistent
76daa3
- Man page renamed from qemu to qemu-kvm
76daa3
 - man page is installed using make install so we have to fix it in qemu tree
76daa3
- Added live-block-migration configuration option support
76daa3
 - Downstream differentiation support
76daa3
- Use "/share/qemu-kvm" as SHARE_SUFFIX
76daa3
 - We reconfigured our share to qemu-kvm to be consistent with used name
76daa3
- Added .gitpbulish configuration file
76daa3
 - Support for git publish has to be stored in repository root
76daa3
76daa3
(cherry picked from commit 4a27bb33559ef5a702dc91dc02892ad255325c92)
76daa3
--
76daa3
Rebase notes (2.9.0):
76daa3
- documentation files handling changes (upstrem)
76daa3
- removed --enable-colo option and --disable-archipelago (upstream)
76daa3
- bump BuildRequires versions
76daa3
- new mandatory argument for tracetool.py (upstream)
76daa3
- updated RHEL 6 roms
76daa3
- switch from sha1sum to sha256sum
76daa3
- Moved adding rhel6-e1000.rom from machine types commit
76daa3
- Moved adding pxe-e1000e.rom from device disable commit
76daa3
- Use rdma-core instead of librdmacm
76daa3
- Add upstream tarballs tar.xz to .gitignore
76daa3
- Updated git-backport-diff script
76daa3
76daa3
Rebase notes (2.8.0):
76daa3
- removed vhdx option (upstream)
76daa3
- qemu-tech.html merged to qemu-doc.html (upstream)
76daa3
- removed skiboot.lid firmware
76daa3
- Changed tracetool.py parameters
76daa3
- Added support for easy z-stream switch
76daa3
76daa3
Rebase notes (2.7.0):
76daa3
- removed kvm_stat
76daa3
- added efi-e1000e.rom
76daa3
- added efi-vmxnet.rom
76daa3
- added linuxboot_dma.bin
76daa3
- trace-events renamed to trace-events-all
76daa3
- reverted dependency to seccomp on aarch64
76daa3
- Add ipxe-qemu-roms ad build dependency to pass tests
76daa3
76daa3
Rebase notes (2.6.0):
76daa3
- removed q35-acpi-dsdt.aml
76daa3
- add enable-gcrypt option
76daa3
76daa3
Rebase notes (2.5.0):
76daa3
- New seccomp hadling in configure
76daa3
- New condition format  in migration/migration.c
76daa3
- libcacard extracted
76daa3
- vnc fixes
76daa3
- libsecomp for aarch64 requirements changed downstream
76daa3
76daa3
Rebase notes (2.4.0):
76daa3
- remove --enable-ws-vnc
76daa3
- use error_setg instead of error_set in migration/migration.c
76daa3
- remove target-x86_64.conf
76daa3
- create /etc/qemu-kvm on copying of bridge.conf
76daa3
- disabled opengl
76daa3
- rebased to version 2.3.0-30.el7
76daa3
76daa3
Merged patches (rebase 2.9.0)
76daa3
- 9c7ab94 Enable seccomp for ppc64/ppc64le architecture
76daa3
- f6d7e9d Update qemu-kvm package Summary and Description
76daa3
- a9e55b6 Disable usbredir and libcacard for unsupported architectures
76daa3
- 0218220 Update configuration for 2.8.0 release
76daa3
76daa3
Merged patches (rebase 2.7.0)
76daa3
- 2be6077 Fix SLOF dependency
76daa3
- dc58590 spec: Remove dependency to ipxe-roms-qemu for aarch64
76daa3
- 357ef43 spec: link sgabios.bin only for x86_64
76daa3
- 08d82cc spec: Update rules before triggering for kvm device
76daa3
- 8980a76 spec: Do not package ivshmem-server and ivshmem-client
76daa3
- 027067c spec: add a sample kvm.conf to enable Nested Virtualization
76daa3
- ba2ba30 Adjust locked memory limits to allow unprivileged VMs on Power
76daa3
- e9740b0 Increase locked memory limit for all users, not just kvm group
76daa3
- 8c301be add vgabios-virtio.bin symlink
76daa3
- 4d03723 usb: enable streams support
76daa3
- 2a9363e Add install dependency required for usb streams
76daa3
- 9a54442 Add dump-guest-memory.py to all archs
76daa3
- 73fffc9 add e1000e ipxe rom symlink
76daa3
- aaaa2a9 Add 'luks' to block driver whitelist
76daa3
- c78c3a8 redhat: switch from gcrypt to nettle for crypto
76daa3
- bb51a69 redhat: include username and date in RPM N-E-V-R for scratch builds
76daa3
76daa3
Merged patches (rebase 2.4.0)
76daa3
- 9201274 spec: Remove obsolete differentiation code
76daa3
- a938a8c spec: Use external configuration script
76daa3
- 5ca8d0e spec: Use configure options to prevent default resolution
76daa3
- 5dca391 spec: Ship complete QMP documentation files
76daa3
- 7899edd aarch64: allow --enable-seccomp
76daa3
- a56fb9c aarch64: redhat spec: enable seccomp
76daa3
- a9571e6 rhel: Update package version for SLOF dependency
76daa3
- 25c70c4 configure: Add support for tcmalloc
76daa3
- db72485 Change fsreeze-hook default location
76daa3
- 14b8a9e redhat: add kvm-unit-tests tarball to environment
76daa3
- 5ee4238 spec: Build tscdeadline_latency.flat from kvm-unit-tests
76daa3
- 6ba800b Downstream-only: Start kvm-setup service before libvirtd service
76daa3
- 59b43d6 Do not stop qemu-guest-agent service on target switch
76daa3
- 4d851fa provide vhost module config file with max_mem_regions set to 509
76daa3
- 0b18027 spec: Require proper version of SLOF
76daa3
- 3c436c7 Fix rh-brew-aarch64, rh-brew-ppc rh-brew-ga-ppc target
76daa3
76daa3
(cherry picked from commit 7875d3bf6e3f2b0cf8b1a41cef685aac0ddfb42d)
76daa3
---
76daa3
 .gitpublish                               |    8 +
76daa3
 Makefile                                  |    2 +-
76daa3
 configure                                 |   11 +
76daa3
 migration/migration.c                     |    7 +
76daa3
 os-posix.c                                |    2 +-
76daa3
 redhat/.gitignore                         |    2 +
76daa3
 redhat/80-kvm.rules                       |    1 +
76daa3
 redhat/85-kvm.preset                      |    5 +
76daa3
 redhat/95-kvm-memlock.conf                |   10 +
76daa3
 redhat/99-qemu-guest-agent.rules          |    2 +
76daa3
 redhat/Makefile                           |   72 +
76daa3
 redhat/Makefile.common                    |   36 +
76daa3
 redhat/README.rhel6-gpxe-source           |    9 +
76daa3
 redhat/bios-256k.bin                      |  Bin 0 -> 262144 bytes
76daa3
 redhat/bridge.conf                        |    1 +
76daa3
 redhat/build_configure.sh                 |  138 +
76daa3
 redhat/ksm.service                        |   13 +
76daa3
 redhat/ksm.sysconfig                      |    4 +
76daa3
 redhat/ksmctl.c                           |   77 +
76daa3
 redhat/ksmtuned                           |  138 +
76daa3
 redhat/ksmtuned.conf                      |   21 +
76daa3
 redhat/ksmtuned.service                   |   12 +
76daa3
 redhat/kvm-setup                          |   31 +
76daa3
 redhat/kvm-setup.service                  |   14 +
76daa3
 redhat/kvm-unit-tests.git-4ea7633.tar.bz2 |  Bin 0 -> 148090 bytes
76daa3
 redhat/kvm.conf                           |   12 +
76daa3
 redhat/kvm.modules                        |   21 +
76daa3
 redhat/pxe-e1000e.rom                     |  Bin 0 -> 262144 bytes
76daa3
 redhat/qemu-ga.sysconfig                  |   19 +
76daa3
 redhat/qemu-guest-agent.service           |   21 +
76daa3
 redhat/qemu-kvm.spec.template             | 5654 +++++++++++++++++++++++++++++
76daa3
 redhat/qemu.binfmt                        |   17 +
76daa3
 redhat/rhel6-e1000.rom                    |  Bin 0 -> 69632 bytes
76daa3
 redhat/rhel6-ne2k_pci.rom                 |  Bin 0 -> 54272 bytes
76daa3
 redhat/rhel6-pcnet.rom                    |  Bin 0 -> 54784 bytes
76daa3
 redhat/rhel6-rtl8139.rom                  |  Bin 0 -> 54272 bytes
76daa3
 redhat/rhel6-virtio.rom                   |  Bin 0 -> 53760 bytes
76daa3
 redhat/rpmbuild/BUILD/.gitignore          |    2 +
76daa3
 redhat/rpmbuild/RPMS/.gitignore           |    2 +
76daa3
 redhat/rpmbuild/SOURCES/.gitignore        |    2 +
76daa3
 redhat/rpmbuild/SPECS/.gitignore          |    2 +
76daa3
 redhat/rpmbuild/SRPMS/.gitignore          |    2 +
76daa3
 redhat/scripts/frh.py                     |   27 +
76daa3
 redhat/scripts/git-backport-diff          |  327 ++
76daa3
 redhat/scripts/git-compile-check          |  215 ++
76daa3
 redhat/scripts/process-patches.sh         |   82 +
76daa3
 redhat/scripts/tarball_checksum.sh        |    3 +
76daa3
 redhat/vhost.conf                         |    3 +
76daa3
 ui/vnc.c                                  |    2 +-
76daa3
 49 files changed, 7026 insertions(+), 3 deletions(-)
76daa3
 create mode 100644 .gitpublish
76daa3
 create mode 100644 redhat/.gitignore
76daa3
 create mode 100644 redhat/80-kvm.rules
76daa3
 create mode 100644 redhat/85-kvm.preset
76daa3
 create mode 100644 redhat/95-kvm-memlock.conf
76daa3
 create mode 100644 redhat/99-qemu-guest-agent.rules
76daa3
 create mode 100644 redhat/Makefile
76daa3
 create mode 100644 redhat/Makefile.common
76daa3
 create mode 100644 redhat/README.rhel6-gpxe-source
76daa3
 create mode 100644 redhat/bios-256k.bin
76daa3
 create mode 100644 redhat/bridge.conf
76daa3
 create mode 100755 redhat/build_configure.sh
76daa3
 create mode 100644 redhat/ksm.service
76daa3
 create mode 100644 redhat/ksm.sysconfig
76daa3
 create mode 100644 redhat/ksmctl.c
76daa3
 create mode 100644 redhat/ksmtuned
76daa3
 create mode 100644 redhat/ksmtuned.conf
76daa3
 create mode 100644 redhat/ksmtuned.service
76daa3
 create mode 100644 redhat/kvm-setup
76daa3
 create mode 100644 redhat/kvm-setup.service
76daa3
 create mode 100644 redhat/kvm-unit-tests.git-4ea7633.tar.bz2
76daa3
 create mode 100644 redhat/kvm.conf
76daa3
 create mode 100755 redhat/kvm.modules
76daa3
 create mode 100644 redhat/pxe-e1000e.rom
76daa3
 create mode 100644 redhat/qemu-ga.sysconfig
76daa3
 create mode 100644 redhat/qemu-guest-agent.service
76daa3
 create mode 100644 redhat/qemu-kvm.spec.template
76daa3
 create mode 100644 redhat/qemu.binfmt
76daa3
 create mode 100644 redhat/rhel6-e1000.rom
76daa3
 create mode 100644 redhat/rhel6-ne2k_pci.rom
76daa3
 create mode 100644 redhat/rhel6-pcnet.rom
76daa3
 create mode 100644 redhat/rhel6-rtl8139.rom
76daa3
 create mode 100644 redhat/rhel6-virtio.rom
76daa3
 create mode 100644 redhat/rpmbuild/BUILD/.gitignore
76daa3
 create mode 100644 redhat/rpmbuild/RPMS/.gitignore
76daa3
 create mode 100644 redhat/rpmbuild/SOURCES/.gitignore
76daa3
 create mode 100644 redhat/rpmbuild/SPECS/.gitignore
76daa3
 create mode 100644 redhat/rpmbuild/SRPMS/.gitignore
76daa3
 create mode 100755 redhat/scripts/frh.py
76daa3
 create mode 100755 redhat/scripts/git-backport-diff
76daa3
 create mode 100755 redhat/scripts/git-compile-check
76daa3
 create mode 100755 redhat/scripts/process-patches.sh
76daa3
 create mode 100755 redhat/scripts/tarball_checksum.sh
76daa3
 create mode 100644 redhat/vhost.conf
76daa3
76daa3
diff --git a/Makefile b/Makefile
76daa3
index 6c359b2..4202ee5 100644
76daa3
--- a/Makefile
76daa3
+++ b/Makefile
76daa3
@@ -565,7 +565,7 @@ install-doc: $(DOCS)
76daa3
 	$(INSTALL_DATA) docs/qemu-qmp-ref.txt "$(DESTDIR)$(qemu_docdir)"
76daa3
 ifdef CONFIG_POSIX
76daa3
 	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
76daa3
-	$(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1"
76daa3
+	$(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1/qemu-kvm.1"
76daa3
 	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man7"
76daa3
 	$(INSTALL_DATA) docs/qemu-qmp-ref.7 "$(DESTDIR)$(mandir)/man7"
76daa3
 ifneq ($(TOOLS),)
76daa3
diff --git a/configure b/configure
76daa3
index be4d326..a1842a8 100755
76daa3
--- a/configure
76daa3
+++ b/configure
76daa3
@@ -316,6 +316,7 @@ vte=""
76daa3
 virglrenderer=""
76daa3
 tpm="yes"
76daa3
 libssh2=""
76daa3
+live_block_migration="no"
76daa3
 numa=""
76daa3
 tcmalloc="no"
76daa3
 jemalloc="no"
76daa3
@@ -1183,6 +1184,10 @@ for opt do
76daa3
   ;;
76daa3
   --enable-replication) replication="yes"
76daa3
   ;;
76daa3
+  --disable-live-block-migration) live_block_migration="no"
76daa3
+  ;;
76daa3
+  --enable-live-block-migration) live_block_migration="yes"
76daa3
+  ;;
76daa3
   *)
76daa3
       echo "ERROR: unknown option $opt"
76daa3
       echo "Try '$0 --help' for more information"
76daa3
@@ -1417,6 +1422,7 @@ disabled with --disable-FEATURE, default is enabled if available:
76daa3
   glusterfs       GlusterFS backend
76daa3
   tpm             TPM support
76daa3
   libssh2         ssh block device support
76daa3
+  live-block-migration live block migration support
76daa3
   numa            libnuma support
76daa3
   tcmalloc        tcmalloc support
76daa3
   jemalloc        jemalloc support
76daa3
@@ -5138,6 +5144,7 @@ echo "TPM support       $tpm"
76daa3
 echo "libssh2 support   $libssh2"
76daa3
 echo "TPM passthrough   $tpm_passthrough"
76daa3
 echo "QOM debugging     $qom_cast_debug"
76daa3
+echo "Live block migration $live_block_migration"
76daa3
 echo "lzo support       $lzo"
76daa3
 echo "snappy support    $snappy"
76daa3
 echo "bzip2 support     $bzip2"
76daa3
@@ -5703,6 +5710,10 @@ if test "$libssh2" = "yes" ; then
76daa3
   echo "LIBSSH2_LIBS=$libssh2_libs" >> $config_host_mak
76daa3
 fi
76daa3
 
76daa3
+if test "$live_block_migration" = "yes" ; then
76daa3
+  echo "CONFIG_LIVE_BLOCK_MIGRATION=y" >> $config_host_mak
76daa3
+fi
76daa3
+
76daa3
 # USB host support
76daa3
 if test "$libusb" = "yes"; then
76daa3
   echo "HOST_USB=libusb legacy" >> $config_host_mak
76daa3
diff --git a/migration/migration.c b/migration/migration.c
76daa3
index ad4036f..fb58f54 100644
76daa3
--- a/migration/migration.c
76daa3
+++ b/migration/migration.c
76daa3
@@ -1227,6 +1227,13 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
76daa3
     params.blk = has_blk && blk;
76daa3
     params.shared = has_inc && inc;
76daa3
 
76daa3
+#ifndef CONFIG_LIVE_BLOCK_MIGRATION
76daa3
+    if (params.blk || params.shared) {
76daa3
+        error_setg(errp, QERR_UNSUPPORTED);
76daa3
+        return;
76daa3
+    }
76daa3
+#endif
76daa3
+
76daa3
     if (migration_is_setup_or_active(s->state) ||
76daa3
         s->state == MIGRATION_STATUS_CANCELLING ||
76daa3
         s->state == MIGRATION_STATUS_COLO) {
76daa3
diff --git a/os-posix.c b/os-posix.c
76daa3
index c6ddb7d..84da202 100644
76daa3
--- a/os-posix.c
76daa3
+++ b/os-posix.c
76daa3
@@ -77,7 +77,7 @@ void os_setup_signal_handling(void)
76daa3
 /* Find a likely location for support files using the location of the binary.
76daa3
    For installed binaries this will be "$bindir/../share/qemu".  When
76daa3
    running from the build tree this will be "$bindir/../pc-bios".  */
76daa3
-#define SHARE_SUFFIX "/share/qemu"
76daa3
+#define SHARE_SUFFIX "/share/qemu-kvm"
76daa3
 #define BUILD_SUFFIX "/pc-bios"
76daa3
 char *os_find_datadir(void)
76daa3
 {
76daa3
diff --git a/ui/vnc.c b/ui/vnc.c
76daa3
index 349cfc9..8cf99d8 100644
76daa3
--- a/ui/vnc.c
76daa3
+++ b/ui/vnc.c
76daa3
@@ -3944,7 +3944,7 @@ void vnc_display_open(const char *id, Error **errp)
76daa3
     }
76daa3
 
76daa3
 #ifdef CONFIG_VNC_SASL
76daa3
-    if ((saslErr = sasl_server_init(NULL, "qemu")) != SASL_OK) {
76daa3
+    if ((saslErr = sasl_server_init(NULL, "qemu-kvm")) != SASL_OK) {
76daa3
         error_setg(errp, "Failed to initialize SASL auth: %s",
76daa3
                    sasl_errstring(saslErr, NULL, NULL));
76daa3
         goto fail;
76daa3
-- 
76daa3
1.8.3.1
76daa3