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