diff --git a/.gitignore b/.gitignore index 678d910..f08ebba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /qemu-3.1.0.tar.xz /qemu-4.0.0.tar.xz +/qemu-4.1.0-rc4.tar.xz diff --git a/0004-Initial-redhat-build.patch b/0004-Initial-redhat-build.patch index 75b88d3..882f7ef 100644 --- a/0004-Initial-redhat-build.patch +++ b/0004-Initial-redhat-build.patch @@ -1,4 +1,4 @@ -From 223a694c9878013afa2ae9024cb35fbc3a334174 Mon Sep 17 00:00:00 2001 +From d7ed59eb82b87992582d05933bbf68107962ba43 Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Fri, 12 Oct 2018 07:31:11 +0200 Subject: Initial redhat build @@ -13,7 +13,7 @@ several issues are fixed in QEMU tree: - Use "/share/qemu-kvm" as SHARE_SUFFIX - We reconfigured our share to qemu-kvm to be consistent with used name -This rebase includes changes up to qemu-kvm-3.1.0-23.el8 +This rebase includes changes up to qemu-kvm-4.0.0-6.el8 Rebase notes (3.1.0): - added new configure options @@ -30,6 +30,20 @@ Rebase notes (4.0.0): - Added interop documentation files - Use python module instead of qemu.py (upstream) +Rebase notes (4.1.0-rc0): +- Remove edk2 files generated by build +- Switch to rhel-8.1-candidate build target +- Remove specs documentation +- Switched from libssh2 to libssh +- Add rc0 tarball usage hacks + +Rebase notes (4.1.0-rc1): +- Added BuildRequires for wget, rpm-build and python3-sphinx + +Rebase notes (4.1.0-rc2): +- Removed new unpacked files +- Update configure line to use new options + Merged patches (3.1.0): - 01f0c9f RHEL8: Add disable configure options to qemu spec file - Spec file cleanups @@ -40,38 +54,45 @@ Merged patches (4.0.0): - eb204b5 Introduce the qemu-kvm-tests rpm - 223cf0c Load kvm module during boot (partial) -Signed-off-by: Danilo C. L. de Paula +Merged patches (4.1.0-rc0): +- ebb6e97 redhat: Fix LOCALVERSION creation +- b0ab0cc redhat: enable tpmdev passthrough (not disabling tests) +- 7cb3c4a Enable libpmem to support nvdimm +- 8943607 qemu-kvm.spec: bump libseccomp >= 2.4.0 +- 27b7c44 rh: set CONFIG_BOCHS_DISPLAY=y for x86 (partial) + +Merged patches (4.1.0-rc3): +- e1fe9fe x86_64-rh-devices: enable TPM emulation (partial) --- + .gitignore | 1 + Makefile | 3 +- - block/Makefile.objs | 2 +- - block/vxhs.c | 119 +- - configure | 33 +- + configure | 1 + os-posix.c | 2 +- redhat/Makefile | 82 ++ redhat/Makefile.common | 51 + redhat/README.tests | 39 + - redhat/qemu-kvm.spec.template | 2082 +++++++++++++++++++++++++++++ + redhat/qemu-kvm.spec.template | 2202 +++++++++++++++++++++++++++++++++++++ redhat/scripts/process-patches.sh | 7 +- ui/vnc.c | 2 +- - 11 files changed, 2374 insertions(+), 48 deletions(-) + 10 files changed, 2382 insertions(+), 8 deletions(-) create mode 100644 redhat/Makefile create mode 100644 redhat/Makefile.common create mode 100644 redhat/README.tests create mode 100644 redhat/qemu-kvm.spec.template diff --git a/Makefile b/Makefile -index 04a0d45050..05f62eab3c 100644 +index 85862fb..288a5ac 100644 --- a/Makefile +++ b/Makefile -@@ -470,6 +470,7 @@ CAP_CFLAGS += -DCAPSTONE_HAS_ARM +@@ -493,6 +493,7 @@ CAP_CFLAGS += -DCAPSTONE_HAS_ARM CAP_CFLAGS += -DCAPSTONE_HAS_ARM64 CAP_CFLAGS += -DCAPSTONE_HAS_POWERPC CAP_CFLAGS += -DCAPSTONE_HAS_X86 +CAP_CFLAGS += -Wp,-D_GLIBCXX_ASSERTIONS - subdir-capstone: .git-submodule-status - $(call quiet-command,$(MAKE) -C $(SRC_PATH)/capstone CAPSTONE_SHARED=no BUILDDIR="$(BUILD_DIR)/capstone" CC="$(CC)" AR="$(AR)" LD="$(LD)" RANLIB="$(RANLIB)" CFLAGS="$(CAP_CFLAGS)" $(SUBDIR_MAKEFLAGS) $(BUILD_DIR)/capstone/$(LIBCAPSTONE)) -@@ -749,7 +750,7 @@ install-doc: $(DOCS) install-sphinxdocs + .PHONY: capstone/all + capstone/all: .git-submodule-status +@@ -804,7 +805,7 @@ install-doc: $(DOCS) install-sphinxdocs $(INSTALL_DATA) docs/interop/qemu-qmp-ref.txt "$(DESTDIR)$(qemu_docdir)" ifdef CONFIG_POSIX $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1" @@ -80,273 +101,23 @@ index 04a0d45050..05f62eab3c 100644 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man7" $(INSTALL_DATA) docs/interop/qemu-qmp-ref.7 "$(DESTDIR)$(mandir)/man7" $(INSTALL_DATA) docs/qemu-block-drivers.7 "$(DESTDIR)$(mandir)/man7" -diff --git a/block/Makefile.objs b/block/Makefile.objs -index 7a81892a52..f4cf03bed9 100644 ---- a/block/Makefile.objs -+++ b/block/Makefile.objs -@@ -30,7 +30,7 @@ block-obj-$(CONFIG_LIBNFS) += nfs.o - block-obj-$(CONFIG_CURL) += curl.o - block-obj-$(CONFIG_RBD) += rbd.o - block-obj-$(CONFIG_GLUSTERFS) += gluster.o --block-obj-$(CONFIG_VXHS) += vxhs.o -+#block-obj-$(CONFIG_VXHS) += vxhs.o - block-obj-$(CONFIG_LIBSSH2) += ssh.o - block-obj-y += accounting.o dirty-bitmap.o - block-obj-y += write-threshold.o -diff --git a/block/vxhs.c b/block/vxhs.c -index 2e18229ba4..3dbb9544bc 100644 ---- a/block/vxhs.c -+++ b/block/vxhs.c -@@ -9,7 +9,8 @@ - */ - - #include "qemu/osdep.h" --#include -+#include "block/vxhs_shim.h" -+#include - #include - #include "block/block_int.h" - #include "block/qdict.h" -@@ -59,6 +60,97 @@ typedef struct BDRVVXHSState { - char *tlscredsid; /* tlscredsid */ - } BDRVVXHSState; - -+#define LIBVXHS_FULL_PATHNAME "/usr/lib64/qemu/libvxhs.so.1" -+static bool libvxhs_loaded; -+static GModule *libvxhs_handle; -+ -+static LibVXHSFuncs libvxhs; -+ -+typedef struct LibVXHSSymbols { -+ const char *name; -+ gpointer *addr; -+} LibVXHSSymbols; -+ -+static LibVXHSSymbols libvxhs_symbols[] = { -+ {"iio_init", (gpointer *) &libvxhs.iio_init}, -+ {"iio_fini", (gpointer *) &libvxhs.iio_fini}, -+ {"iio_min_version", (gpointer *) &libvxhs.iio_min_version}, -+ {"iio_max_version", (gpointer *) &libvxhs.iio_max_version}, -+ {"iio_open", (gpointer *) &libvxhs.iio_open}, -+ {"iio_close", (gpointer *) &libvxhs.iio_close}, -+ {"iio_writev", (gpointer *) &libvxhs.iio_writev}, -+ {"iio_readv", (gpointer *) &libvxhs.iio_readv}, -+ {"iio_ioctl", (gpointer *) &libvxhs.iio_ioctl}, -+ {NULL} -+}; -+ -+static void bdrv_vxhs_set_funcs(GModule *handle, Error **errp) -+{ -+ int i = 0; -+ while (libvxhs_symbols[i].name) { -+ const char *name = libvxhs_symbols[i].name; -+ if (!g_module_symbol(handle, name, libvxhs_symbols[i].addr)) { -+ error_setg(errp, "%s could not be loaded from libvxhs: %s", -+ name, g_module_error()); -+ return; -+ } -+ ++i; -+ } -+} -+ -+static void bdrv_vxhs_load_libs(Error **errp) -+{ -+ Error *local_err = NULL; -+ int32_t ver; -+ -+ if (libvxhs_loaded) { -+ return; -+ } -+ -+ if (!g_module_supported()) { -+ error_setg(errp, "modules are not supported on this platform: %s", -+ g_module_error()); -+ return; -+ } -+ -+ libvxhs_handle = g_module_open(LIBVXHS_FULL_PATHNAME, -+ G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL); -+ if (!libvxhs_handle) { -+ error_setg(errp, "The VXHS library from Veritas might not be installed " -+ "correctly (%s)", g_module_error()); -+ return; -+ } -+ -+ g_module_make_resident(libvxhs_handle); -+ -+ bdrv_vxhs_set_funcs(libvxhs_handle, &local_err); -+ if (local_err) { -+ error_propagate(errp, local_err); -+ return; -+ } -+ -+ /* Now check to see if the libvxhs we are using here is supported -+ * by the loaded version */ -+ -+ ver = (*libvxhs.iio_min_version)(); -+ if (ver > QNIO_VERSION) { -+ error_setg(errp, "Trying to use libvxhs version %"PRId32" API, but " -+ "only %"PRId32" or newer is supported by %s", -+ QNIO_VERSION, ver, LIBVXHS_FULL_PATHNAME); -+ return; -+ } -+ -+ ver = (*libvxhs.iio_max_version)(); -+ if (ver < QNIO_VERSION) { -+ error_setg(errp, "Trying to use libvxhs version %"PRId32" API, but " -+ "only %"PRId32" or earlier is supported by %s", -+ QNIO_VERSION, ver, LIBVXHS_FULL_PATHNAME); -+ return; -+ } -+ -+ libvxhs_loaded = true; -+} -+ - static void vxhs_complete_aio_bh(void *opaque) - { - VXHSAIOCB *acb = opaque; -@@ -226,7 +318,7 @@ static void vxhs_refresh_limits(BlockDriverState *bs, Error **errp) - static int vxhs_init_and_ref(void) - { - if (vxhs_ref++ == 0) { -- if (iio_init(QNIO_VERSION, vxhs_iio_callback)) { -+ if ((*libvxhs.iio_init)(QNIO_VERSION, vxhs_iio_callback)) { - return -ENODEV; - } - } -@@ -236,7 +328,7 @@ static int vxhs_init_and_ref(void) - static void vxhs_unref(void) - { - if (--vxhs_ref == 0) { -- iio_fini(); -+ (*libvxhs.iio_fini)(); - } - } - -@@ -306,8 +398,17 @@ static int vxhs_open(BlockDriverState *bs, QDict *options, - char *client_key = NULL; - char *client_cert = NULL; - -+ bdrv_vxhs_load_libs(&local_err); -+ if (local_err) { -+ error_propagate(errp, local_err); -+ /* on error, cannot cleanup because the iio_fini() function -+ * is not loaded */ -+ return -EINVAL; -+ } -+ - ret = vxhs_init_and_ref(); - if (ret < 0) { -+ error_setg(&local_err, "libvxhs iio_init() failed"); - ret = -EINVAL; - goto out; - } -@@ -392,8 +493,8 @@ static int vxhs_open(BlockDriverState *bs, QDict *options, - /* - * Open qnio channel to storage agent if not opened before - */ -- dev_handlep = iio_open(of_vsa_addr, s->vdisk_guid, 0, -- cacert, client_key, client_cert); -+ dev_handlep = (*libvxhs.iio_open)(of_vsa_addr, s->vdisk_guid, 0, -+ cacert, client_key, client_cert); - if (dev_handlep == NULL) { - trace_vxhs_open_iio_open(of_vsa_addr); - ret = -ENODEV; -@@ -453,11 +554,11 @@ static BlockAIOCB *vxhs_aio_rw(BlockDriverState *bs, uint64_t offset, - - switch (iodir) { - case VDISK_AIO_WRITE: -- ret = iio_writev(dev_handle, acb, qiov->iov, qiov->niov, -+ ret = (*libvxhs.iio_writev)(dev_handle, acb, qiov->iov, qiov->niov, - offset, size, iio_flags); - break; - case VDISK_AIO_READ: -- ret = iio_readv(dev_handle, acb, qiov->iov, qiov->niov, -+ ret = (*libvxhs.iio_writev)(dev_handle, acb, qiov->iov, qiov->niov, - offset, size, iio_flags); - break; - default: -@@ -506,7 +607,7 @@ static void vxhs_close(BlockDriverState *bs) - * Close vDisk device - */ - if (s->vdisk_hostinfo.dev_handle) { -- iio_close(s->vdisk_hostinfo.dev_handle); -+ (*libvxhs.iio_close)(s->vdisk_hostinfo.dev_handle); - s->vdisk_hostinfo.dev_handle = NULL; - } - -@@ -528,7 +629,7 @@ static int64_t vxhs_get_vdisk_stat(BDRVVXHSState *s) - int ret = 0; - void *dev_handle = s->vdisk_hostinfo.dev_handle; - -- ret = iio_ioctl(dev_handle, IOR_VDISK_STAT, &vdisk_size, 0); -+ ret = (*libvxhs.iio_ioctl)(dev_handle, IOR_VDISK_STAT, &vdisk_size, 0); - if (ret < 0) { - trace_vxhs_get_vdisk_stat_err(s->vdisk_guid, ret, errno); - return -EIO; diff --git a/configure b/configure -index 1c563a7027..eb0a0dde86 100755 +index 714e7fb..4ecc861 100755 --- a/configure +++ b/configure -@@ -3612,7 +3612,7 @@ fi - - glib_req_ver=2.40 - glib_modules=gthread-2.0 --if test "$modules" = yes; then -+if test "$modules" = yes -o "$vxhs" = yes; then - glib_modules="$glib_modules gmodule-export-2.0" - fi - -@@ -5755,33 +5755,6 @@ if compile_prog "" "" ; then - have_sysmacros=yes +@@ -2424,6 +2424,7 @@ if test "$seccomp" != "no" ; then + seccomp="no" + fi fi - --########################################## --# Veritas HyperScale block driver VxHS --# Check if libvxhs is installed -- --if test "$vxhs" != "no" ; then -- cat > $TMPC < --#include -- --void *vxhs_callback; -- --int main(void) { -- iio_init(QNIO_VERSION, vxhs_callback); -- return 0; --} --EOF -- vxhs_libs="-lvxhs -lssl" -- if compile_prog "" "$vxhs_libs" ; then -- vxhs=yes -- else -- if test "$vxhs" = "yes" ; then -- feature_not_found "vxhs block device" "Install libvxhs See github" -- fi -- vxhs=no -- fi --fi -- ++ ########################################## - # check for _Static_assert() - -@@ -7218,8 +7191,8 @@ elif test "$pthread_setname_np_wo_tid" = "yes" ; then - fi - - if test "$vxhs" = "yes" ; then -- echo "CONFIG_VXHS=y" >> $config_host_mak -- echo "VXHS_LIBS=$vxhs_libs" >> $config_host_mak -+ echo "CONFIG_VXHS=m" >> $config_host_mak -+ echo "VXHS_LIBS= -lssl" >> $config_host_mak - fi + # xen probe - if test "$libpmem" = "yes" ; then diff --git a/os-posix.c b/os-posix.c -index 4bd80e44e6..ca13206b31 100644 +index 3ba7df8..ff26068 100644 --- a/os-posix.c +++ b/os-posix.c -@@ -82,7 +82,7 @@ void os_setup_signal_handling(void) +@@ -83,7 +83,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". */ @@ -356,10 +127,10 @@ index 4bd80e44e6..ca13206b31 100644 char *os_find_datadir(void) { diff --git a/ui/vnc.c b/ui/vnc.c -index 1871422e1d..8226524c16 100644 +index 38f92bf..933dc36 100644 --- a/ui/vnc.c +++ b/ui/vnc.c -@@ -3982,7 +3982,7 @@ void vnc_display_open(const char *id, Error **errp) +@@ -3976,7 +3976,7 @@ void vnc_display_open(const char *id, Error **errp) #ifdef CONFIG_VNC_SASL if (sasl) { @@ -369,5 +140,5 @@ index 1871422e1d..8226524c16 100644 if (saslErr != SASL_OK) { error_setg(errp, "Failed to initialize SASL auth: %s", -- -2.20.1 +1.8.3.1 diff --git a/0005-Enable-disable-devices-for-RHEL.patch b/0005-Enable-disable-devices-for-RHEL.patch index d5b0ae8..6ae6fc7 100644 --- a/0005-Enable-disable-devices-for-RHEL.patch +++ b/0005-Enable-disable-devices-for-RHEL.patch @@ -1,4 +1,4 @@ -From 8ee745d1dc16e5cd0f9eb18ed0671ad00e789501 Mon Sep 17 00:00:00 2001 +From 1421c61010f1de5e7381c107963839e17ea5b43a Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Mon, 11 Jan 2016 11:53:33 +0100 Subject: Enable/disable devices for RHEL @@ -21,6 +21,22 @@ Rebase notes (4.0.0): - Switch to KConfig (upstream) - Using device whitelist + without-defualt-devices option +Rebase notes (4.1.0-rc0): +- Added CONFIG_USB_OHCI_PCI for ppc64 +- Added CONFIG_XIVE_KVM for ppc64 +- Added CONFIG_ACPI_PCI for x86_64 +- Added CONFIG_SEMIHOSTING for aarch64 + +Rebase notes (4.1.0-rc1): +- Cleanup aarch64 devices +- Do not build a15mpcore.c + +Rebase notes (4.1.0-rc2): +- Removed ide-isa.c stub file + +Rebase notes (4.1.0-rc3): +- Use CONFIG_USB_EHCI_PCI on x86_64 (new upstream) + Merged patches (qemu 3.1.0): - d51e082 Re-enable CONFIG_HYPERV_TESTDEV - 4b889f3 Declare cirrus-vga as deprecated @@ -28,64 +44,64 @@ Merged patches (qemu 3.1.0): - 3eef52a Disable CONFIG_IPMI and CONFIG_I2C for ppc64 - 9caf292 Disable CONFIG_CAN_BUS and CONFIG_CAN_SJA1000 -Merged patches (weekly-190301): +Merged patches (4.1.0-rc0): - 20a51f6 fdc: Revert downstream disablement of device "floppy" - f869cc0 fdc: Restrict floppy controllers to RHEL-7 machine types +- 5909721 aarch64: Compile out IOH3420 +- 27b7c44 rh: set CONFIG_BOCHS_DISPLAY=y for x86 (partial) -Signed-off-by: Danilo C. L. de Paula +Merged patches (4.1.0-rc3): +- 495a27d x86_64-rh-devices: add missing TPM passthrough +- e1fe9fe x86_64-rh-devices: enable TPM emulation (partial) --- - Makefile.objs | 4 +- - default-configs/aarch64-rh-devices.mak | 40 +++++++++++ - default-configs/aarch64-softmmu.mak | 17 ++--- - default-configs/ppc64-rh-devices.mak | 30 +++++++++ - default-configs/ppc64-softmmu.mak | 8 ++- - default-configs/rh-virtio.mak | 10 +++ - default-configs/s390x-rh-devices.mak | 15 +++++ - default-configs/s390x-softmmu.mak | 4 +- - default-configs/x86_64-rh-devices.mak | 93 ++++++++++++++++++++++++++ - default-configs/x86_64-softmmu.mak | 4 +- - hw/acpi/ich9.c | 4 +- - hw/arm/Makefile.objs | 2 +- - hw/block/fdc.c | 10 +++ - hw/bt/Makefile.objs | 4 +- - hw/char/serial-pci.c | 4 ++ - hw/core/Makefile.objs | 9 +-- - hw/cpu/Makefile.objs | 3 +- - hw/display/Makefile.objs | 5 +- - hw/display/cirrus_vga.c | 3 + - hw/ide/piix.c | 5 +- - hw/input/pckbd.c | 2 + - hw/isa/Makefile.objs | 2 +- - hw/misc/Makefile.objs | 2 +- - hw/net/e1000.c | 2 + - hw/pci-host/piix.c | 4 ++ - hw/ppc/spapr_cpu_core.c | 2 + - hw/usb/ccid-card-emulated.c | 2 + - hw/vfio/pci-quirks.c | 5 ++ - hw/vfio/pci.c | 5 ++ - qemu-options.hx | 7 +- - redhat/qemu-kvm.spec.template | 6 +- - stubs/Makefile.objs | 1 + - stubs/ide-isa.c | 13 ++++ - target/arm/cpu.c | 4 +- - target/i386/cpu.c | 35 +++++++--- - target/ppc/cpu-models.c | 12 ++++ - target/s390x/cpu_models.c | 3 + - target/s390x/kvm.c | 8 +++ - vl.c | 8 ++- - 39 files changed, 348 insertions(+), 49 deletions(-) + Makefile.objs | 4 +- + default-configs/aarch64-rh-devices.mak | 20 +++++++ + default-configs/aarch64-softmmu.mak | 10 ++-- + default-configs/ppc64-rh-devices.mak | 32 +++++++++++ + default-configs/ppc64-softmmu.mak | 8 ++- + default-configs/rh-virtio.mak | 10 ++++ + default-configs/s390x-rh-devices.mak | 15 +++++ + default-configs/s390x-softmmu.mak | 4 +- + default-configs/x86_64-rh-devices.mak | 100 +++++++++++++++++++++++++++++++++ + default-configs/x86_64-softmmu.mak | 4 +- + hw/acpi/ich9.c | 4 +- + hw/arm/Makefile.objs | 2 +- + hw/block/fdc.c | 10 ++++ + hw/bt/Makefile.objs | 4 +- + hw/core/Makefile.objs | 9 +-- + hw/cpu/Makefile.objs | 5 +- + hw/display/Makefile.objs | 5 +- + hw/display/cirrus_vga.c | 3 + + hw/ide/piix.c | 5 +- + hw/input/pckbd.c | 2 + + hw/isa/Makefile.objs | 2 +- + hw/misc/Makefile.objs | 2 +- + hw/net/e1000.c | 2 + + hw/pci-host/piix.c | 4 ++ + hw/ppc/spapr_cpu_core.c | 2 + + hw/usb/ccid-card-emulated.c | 2 + + hw/vfio/pci-quirks.c | 5 ++ + hw/vfio/pci.c | 5 ++ + qemu-options.hx | 7 +-- + redhat/qemu-kvm.spec.template | 5 +- + target/arm/cpu.c | 4 +- + target/i386/cpu.c | 35 +++++++++--- + target/ppc/cpu-models.c | 10 ++++ + target/s390x/cpu_models.c | 3 + + target/s390x/kvm.c | 8 +++ + vl.c | 8 ++- + 36 files changed, 316 insertions(+), 44 deletions(-) create mode 100644 default-configs/aarch64-rh-devices.mak create mode 100644 default-configs/ppc64-rh-devices.mak create mode 100644 default-configs/rh-virtio.mak create mode 100644 default-configs/s390x-rh-devices.mak create mode 100644 default-configs/x86_64-rh-devices.mak - create mode 100644 stubs/ide-isa.c diff --git a/Makefile.objs b/Makefile.objs -index cf065de5ed..0b78970763 100644 +index 6a143dc..8e96af1 100644 --- a/Makefile.objs +++ b/Makefile.objs -@@ -63,8 +63,8 @@ common-obj-y += replay/ +@@ -65,8 +65,8 @@ common-obj-y += replay/ common-obj-y += ui/ common-obj-m += ui/ @@ -98,80 +114,55 @@ index cf065de5ed..0b78970763 100644 common-obj-y += vl.o diff --git a/default-configs/aarch64-rh-devices.mak b/default-configs/aarch64-rh-devices.mak new file mode 100644 -index 0000000000..13ce7c7987 +index 0000000..a1ed641 --- /dev/null +++ b/default-configs/aarch64-rh-devices.mak -@@ -0,0 +1,40 @@ +@@ -0,0 +1,20 @@ +include rh-virtio.mak + -+CONFIG_ACPI=y -+CONFIG_ARM_GIC=y +CONFIG_ARM_GIC_KVM=y +CONFIG_ARM_SMMUV3=y +CONFIG_ARM_V7M=y +CONFIG_ARM_VIRT=y -+CONFIG_CAN_BUS=y -+CONFIG_CAN_SJA1000=y +CONFIG_EDID=y -+CONFIG_FW_CFG_DMA=y -+CONFIG_GPIO_KEY=y -+CONFIG_I2C=y -+CONFIG_IOH3420=y -+CONFIG_IVSHMEM=y -+CONFIG_KVM=y -+CONFIG_LINUX=y -+CONFIG_PCI=y +CONFIG_PCIE_PORT=y +CONFIG_PCI_DEVICES=y -+CONFIG_PCI_EXPRESS=y -+CONFIG_PCI_EXPRESS_GENERIC_BRIDGE=y +CONFIG_PCI_TESTDEV=y +CONFIG_PFLASH_CFI01=y -+CONFIG_PL011=y -+CONFIG_PL031=y -+CONFIG_PL061=y -+CONFIG_PLATFORM_BUS=y +CONFIG_SCSI=y -+CONFIG_SMBIOS=y -+CONFIG_SMBUS_EEPROM=y ++CONFIG_SEMIHOSTING=y +CONFIG_USB=y +CONFIG_USB_XHCI=y +CONFIG_VFIO=y +CONFIG_VFIO_PCI=y -+CONFIG_VHOST_USER=y +CONFIG_VIRTIO_MMIO=y +CONFIG_VIRTIO_PCI=y +CONFIG_XIO3130=y diff --git a/default-configs/aarch64-softmmu.mak b/default-configs/aarch64-softmmu.mak -index 4ea9add003..cfff806b50 100644 +index 958b1e0..8f6867d 100644 --- a/default-configs/aarch64-softmmu.mak +++ b/default-configs/aarch64-softmmu.mak -@@ -1,12 +1,9 @@ +@@ -1,8 +1,10 @@ # Default configuration for aarch64-softmmu -+# CONFIG_AUX=y -+# CONFIG_DDC=y -+# CONFIG_DPCD=y -+# CONFIG_XLNX_ZYNQMP=y -+# CONFIG_XLNX_ZYNQMP_ARM=y -+# CONFIG_XLNX_VERSAL=y - --# We support all the 32 bit boards so need all their config + + # We support all the 32 bit boards so need all their config -include arm-softmmu.mak -- --CONFIG_AUX=y --CONFIG_DDC=y --CONFIG_DPCD=y --CONFIG_XLNX_ZYNQMP=y ++#include arm-softmmu.mak + -CONFIG_XLNX_ZYNQMP_ARM=y -CONFIG_XLNX_VERSAL=y --CONFIG_ARM_SMMUV3=y +-CONFIG_SBSA_REF=y ++#CONFIG_XLNX_ZYNQMP_ARM=y ++#CONFIG_XLNX_VERSAL=y ++#CONFIG_SBSA_REF=y ++ +include aarch64-rh-devices.mak diff --git a/default-configs/ppc64-rh-devices.mak b/default-configs/ppc64-rh-devices.mak new file mode 100644 -index 0000000000..3be1750736 +index 0000000..35f2106 --- /dev/null +++ b/default-configs/ppc64-rh-devices.mak -@@ -0,0 +1,30 @@ +@@ -0,0 +1,32 @@ +include rh-virtio.mak + +CONFIG_DIMM=y @@ -185,6 +176,7 @@ index 0000000000..3be1750736 +CONFIG_TEST_DEVICES=y +CONFIG_USB=y +CONFIG_USB_OHCI=y ++CONFIG_USB_OHCI_PCI=y +CONFIG_USB_SMARTCARD=y +CONFIG_USB_STORAGE_BOT=y +CONFIG_USB_XHCI=y @@ -202,8 +194,9 @@ index 0000000000..3be1750736 +CONFIG_XICS_SPAPR=y +CONFIG_XIVE=y +CONFIG_XIVE_SPAPR=y ++CONFIG_XIVE_KVM=y diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64-softmmu.mak -index cca52665d9..fec354f327 100644 +index cca5266..fec354f 100644 --- a/default-configs/ppc64-softmmu.mak +++ b/default-configs/ppc64-softmmu.mak @@ -1,10 +1,12 @@ @@ -224,7 +217,7 @@ index cca52665d9..fec354f327 100644 +include ppc64-rh-devices.mak diff --git a/default-configs/rh-virtio.mak b/default-configs/rh-virtio.mak new file mode 100644 -index 0000000000..94ede1b5f6 +index 0000000..94ede1b --- /dev/null +++ b/default-configs/rh-virtio.mak @@ -0,0 +1,10 @@ @@ -240,7 +233,7 @@ index 0000000000..94ede1b5f6 +CONFIG_VIRTIO_SERIAL=y diff --git a/default-configs/s390x-rh-devices.mak b/default-configs/s390x-rh-devices.mak new file mode 100644 -index 0000000000..c3c73fe752 +index 0000000..c3c73fe --- /dev/null +++ b/default-configs/s390x-rh-devices.mak @@ -0,0 +1,15 @@ @@ -260,7 +253,7 @@ index 0000000000..c3c73fe752 +CONFIG_VIRTIO_CCW=y +CONFIG_WDT_DIAG288=y diff --git a/default-configs/s390x-softmmu.mak b/default-configs/s390x-softmmu.mak -index f2287a133f..3e2e388e91 100644 +index f2287a1..3e2e388 100644 --- a/default-configs/s390x-softmmu.mak +++ b/default-configs/s390x-softmmu.mak @@ -10,4 +10,6 @@ @@ -273,14 +266,15 @@ index f2287a133f..3e2e388e91 100644 +include s390x-rh-devices.mak diff --git a/default-configs/x86_64-rh-devices.mak b/default-configs/x86_64-rh-devices.mak new file mode 100644 -index 0000000000..01b5363c79 +index 0000000..6b5d68e --- /dev/null +++ b/default-configs/x86_64-rh-devices.mak -@@ -0,0 +1,93 @@ +@@ -0,0 +1,100 @@ +include rh-virtio.mak + +CONFIG_AC97=y +CONFIG_ACPI=y ++CONFIG_ACPI_PCI=y +CONFIG_ACPI_CPU_HOTPLUG=y +CONFIG_ACPI_MEMORY_HOTPLUG=y +CONFIG_ACPI_NVDIMM=y @@ -291,6 +285,7 @@ index 0000000000..01b5363c79 +CONFIG_AHCI=y +CONFIG_APIC=y +CONFIG_APM=y ++CONFIG_BOCHS_DISPLAY=y +CONFIG_DIMM=y +CONFIG_E1000E_PCI_EXPRESS=y +CONFIG_E1000_PCI=y @@ -351,6 +346,7 @@ index 0000000000..01b5363c79 +CONFIG_TEST_DEVICES=y +CONFIG_USB=y +CONFIG_USB_EHCI=y ++CONFIG_USB_EHCI_PCI=y +CONFIG_USB_SMARTCARD=y +CONFIG_USB_STORAGE_BOT=y +CONFIG_USB_UHCI=y @@ -370,8 +366,12 @@ index 0000000000..01b5363c79 +CONFIG_WDT_IB6300ESB=y +CONFIG_WDT_IB700=y +CONFIG_XIO3130=y ++CONFIG_TPM_CRB=y ++CONFIG_TPM_TIS=y ++CONFIG_TPM_EMULATOR=y ++CONFIG_TPM_PASSTHROUGH=y diff --git a/default-configs/x86_64-softmmu.mak b/default-configs/x86_64-softmmu.mak -index 64b2ee2960..b5de7e5279 100644 +index 64b2ee2..b5de7e5 100644 --- a/default-configs/x86_64-softmmu.mak +++ b/default-configs/x86_64-softmmu.mak @@ -1,3 +1,5 @@ @@ -382,7 +382,7 @@ index 64b2ee2960..b5de7e5279 100644 + +include x86_64-rh-devices.mak diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c -index e53dfe1ee3..168a713eff 100644 +index e53dfe1..168a713 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -446,8 +446,8 @@ void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm, Error **errp) @@ -397,12 +397,12 @@ index e53dfe1ee3..168a713eff 100644 object_property_add_uint32_ptr(obj, ACPI_PM_PROP_PM_IO_BASE, diff --git a/hw/arm/Makefile.objs b/hw/arm/Makefile.objs -index fa57c7c770..75cf31650c 100644 +index 43ce8d5..13fc950 100644 --- a/hw/arm/Makefile.objs +++ b/hw/arm/Makefile.objs -@@ -17,7 +17,7 @@ obj-$(CONFIG_STRONGARM) += collie.o - obj-$(CONFIG_VERSATILE) += vexpress.o versatilepb.o +@@ -27,7 +27,7 @@ obj-$(CONFIG_VEXPRESS) += vexpress.o obj-$(CONFIG_ZYNQ) += xilinx_zynq.o + obj-$(CONFIG_SABRELITE) += sabrelite.o -obj-$(CONFIG_ARM_V7M) += armv7m.o +#obj-$(CONFIG_ARM_V7M) += armv7m.o @@ -410,11 +410,11 @@ index fa57c7c770..75cf31650c 100644 obj-$(CONFIG_PXA2XX) += pxa2xx.o pxa2xx_gpio.o pxa2xx_pic.o obj-$(CONFIG_DIGIC) += digic.o diff --git a/hw/block/fdc.c b/hw/block/fdc.c -index 6f19f127a5..9ece2dbbd2 100644 +index 9b24cb9..440b53b 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c -@@ -42,6 +42,8 @@ - #include "qemu/log.h" +@@ -43,6 +43,8 @@ + #include "qemu/module.h" #include "trace.h" +#include "hw/boards.h" @@ -422,7 +422,7 @@ index 6f19f127a5..9ece2dbbd2 100644 /********************************************************/ /* debug Floppy devices */ -@@ -2629,6 +2631,14 @@ static void fdctrl_realize_common(DeviceState *dev, FDCtrl *fdctrl, +@@ -2635,6 +2637,14 @@ static void fdctrl_realize_common(DeviceState *dev, FDCtrl *fdctrl, int i, j; static int command_tables_inited = 0; @@ -438,7 +438,7 @@ index 6f19f127a5..9ece2dbbd2 100644 error_setg(errp, "Cannot choose a fallback FDrive type of 'auto'"); } diff --git a/hw/bt/Makefile.objs b/hw/bt/Makefile.objs -index 867a7d2e8a..e678e9ee3c 100644 +index 867a7d2..e678e9e 100644 --- a/hw/bt/Makefile.objs +++ b/hw/bt/Makefile.objs @@ -1,3 +1,3 @@ @@ -447,33 +447,11 @@ index 867a7d2e8a..e678e9ee3c 100644 +#common-obj-y += core.o l2cap.o sdp.o hci.o hid.o +#common-obj-y += hci-csr.o -diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c -index cb0d04c1d9..d426982df7 100644 ---- a/hw/char/serial-pci.c -+++ b/hw/char/serial-pci.c -@@ -228,6 +228,8 @@ static void multi_2x_serial_pci_class_initfn(ObjectClass *klass, void *data) - dc->vmsd = &vmstate_pci_multi_serial; - dc->props = multi_2x_serial_pci_properties; - set_bit(DEVICE_CATEGORY_INPUT, dc->categories); -+ /* Disabled for Red Hat Enterprise Linux: */ -+ dc->user_creatable = false; - } - - static void multi_4x_serial_pci_class_initfn(ObjectClass *klass, void *data) -@@ -243,6 +245,8 @@ static void multi_4x_serial_pci_class_initfn(ObjectClass *klass, void *data) - dc->vmsd = &vmstate_pci_multi_serial; - dc->props = multi_4x_serial_pci_properties; - set_bit(DEVICE_CATEGORY_INPUT, dc->categories); -+ /* Disabled for Red Hat Enterprise Linux: */ -+ dc->user_creatable = false; - } - - static const TypeInfo serial_pci_info = { diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs -index a799c83815..0bcb4d50d0 100644 +index f8481d9..bab9c2d 100644 --- a/hw/core/Makefile.objs +++ b/hw/core/Makefile.objs -@@ -16,9 +16,10 @@ common-obj-$(CONFIG_SOFTMMU) += machine.o +@@ -17,11 +17,12 @@ common-obj-$(CONFIG_SOFTMMU) += machine.o common-obj-$(CONFIG_SOFTMMU) += loader.o common-obj-$(CONFIG_FITLOADER) += loader-fit.o common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o @@ -488,22 +466,27 @@ index a799c83815..0bcb4d50d0 100644 -common-obj-$(CONFIG_SOFTMMU) += generic-loader.o +#common-obj-$(CONFIG_SOFTMMU) += generic-loader.o common-obj-$(CONFIG_SOFTMMU) += null-machine.o + + obj-$(CONFIG_SOFTMMU) += machine-qmp-cmds.o diff --git a/hw/cpu/Makefile.objs b/hw/cpu/Makefile.objs -index 8db9e8a7b3..87d4bdc27d 100644 +index 8db9e8a..1601ea9 100644 --- a/hw/cpu/Makefile.objs +++ b/hw/cpu/Makefile.objs -@@ -2,4 +2,5 @@ obj-$(CONFIG_ARM11MPCORE) += arm11mpcore.o +@@ -1,5 +1,6 @@ + obj-$(CONFIG_ARM11MPCORE) += arm11mpcore.o obj-$(CONFIG_REALVIEW) += realview_mpcore.o obj-$(CONFIG_A9MPCORE) += a9mpcore.o - obj-$(CONFIG_A15MPCORE) += a15mpcore.o +-obj-$(CONFIG_A15MPCORE) += a15mpcore.o -common-obj-y += core.o cluster.o ++#obj-$(CONFIG_A15MPCORE) += a15mpcore.o +common-obj-y += core.o +# cluster.o diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs -index dbd453ab1b..c3cefab578 100644 +index a64998f..88a60b3 100644 --- a/hw/display/Makefile.objs +++ b/hw/display/Makefile.objs -@@ -1,7 +1,8 @@ +@@ -1,8 +1,9 @@ + common-obj-$(CONFIG_DDC) += i2c-ddc.o common-obj-$(CONFIG_EDID) += edid-generate.o edid-region.o -common-obj-$(CONFIG_FW_CFG_DMA) += ramfb.o @@ -515,10 +498,10 @@ index dbd453ab1b..c3cefab578 100644 common-obj-$(CONFIG_ADS7846) += ads7846.o common-obj-$(CONFIG_VGA_CIRRUS) += cirrus_vga.o diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c -index a0e71469f4..058a8e0f4a 100644 +index 2e4911a..49c16c8 100644 --- a/hw/display/cirrus_vga.c +++ b/hw/display/cirrus_vga.c -@@ -2967,6 +2967,9 @@ static void pci_cirrus_vga_realize(PCIDevice *dev, Error **errp) +@@ -2973,6 +2973,9 @@ static void pci_cirrus_vga_realize(PCIDevice *dev, Error **errp) PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(dev); int16_t device_id = pc->device_id; @@ -529,10 +512,10 @@ index a0e71469f4..058a8e0f4a 100644 Also accept 8 MB/16 MB for backward compatibility. */ if (s->vga.vram_size_mb != 4 && s->vga.vram_size_mb != 8 && diff --git a/hw/ide/piix.c b/hw/ide/piix.c -index 885c16e938..d19c107f1e 100644 +index b97e555..55b30e6 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c -@@ -252,7 +252,8 @@ static void piix3_ide_class_init(ObjectClass *klass, void *data) +@@ -253,7 +253,8 @@ static void piix3_ide_class_init(ObjectClass *klass, void *data) k->device_id = PCI_DEVICE_ID_INTEL_82371SB_1; k->class_id = PCI_CLASS_STORAGE_IDE; set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); @@ -542,7 +525,7 @@ index 885c16e938..d19c107f1e 100644 } static const TypeInfo piix3_ide_info = { -@@ -279,6 +280,8 @@ static void piix4_ide_class_init(ObjectClass *klass, void *data) +@@ -280,6 +281,8 @@ static void piix4_ide_class_init(ObjectClass *klass, void *data) k->class_id = PCI_CLASS_STORAGE_IDE; set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); dc->hotpluggable = false; @@ -552,7 +535,7 @@ index 885c16e938..d19c107f1e 100644 static const TypeInfo piix4_ide_info = { diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c -index 47a606f5e3..562a9bc0a6 100644 +index 47a606f..562a9bc 100644 --- a/hw/input/pckbd.c +++ b/hw/input/pckbd.c @@ -568,6 +568,8 @@ static void i8042_class_initfn(ObjectClass *klass, void *data) @@ -565,7 +548,7 @@ index 47a606f5e3..562a9bc0a6 100644 static const TypeInfo i8042_info = { diff --git a/hw/isa/Makefile.objs b/hw/isa/Makefile.objs -index 9e106df186..0828964014 100644 +index 9e106df..0828964 100644 --- a/hw/isa/Makefile.objs +++ b/hw/isa/Makefile.objs @@ -1,5 +1,5 @@ @@ -576,7 +559,7 @@ index 9e106df186..0828964014 100644 common-obj-$(CONFIG_I82378) += i82378.o common-obj-$(CONFIG_PC87312) += pc87312.o diff --git a/hw/misc/Makefile.objs b/hw/misc/Makefile.objs -index c71e07ae35..a5c3ff8617 100644 +index e9aab51..17f9422 100644 --- a/hw/misc/Makefile.objs +++ b/hw/misc/Makefile.objs @@ -9,7 +9,7 @@ common-obj-$(CONFIG_PCI_TESTDEV) += pci-testdev.o @@ -589,10 +572,10 @@ index c71e07ae35..a5c3ff8617 100644 # ARM devices diff --git a/hw/net/e1000.c b/hw/net/e1000.c -index 9b39bccfb2..6ac19216df 100644 +index a023ceb..15d6c7d 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c -@@ -1798,6 +1798,7 @@ static const E1000Info e1000_devices[] = { +@@ -1794,6 +1794,7 @@ static const E1000Info e1000_devices[] = { .revision = 0x03, .phy_id2 = E1000_PHY_ID2_8254xx_DEFAULT, }, @@ -600,7 +583,7 @@ index 9b39bccfb2..6ac19216df 100644 { .name = "e1000-82544gc", .device_id = E1000_DEV_ID_82544GC_COPPER, -@@ -1810,6 +1811,7 @@ static const E1000Info e1000_devices[] = { +@@ -1806,6 +1807,7 @@ static const E1000Info e1000_devices[] = { .revision = 0x03, .phy_id2 = E1000_PHY_ID2_8254xx_DEFAULT, }, @@ -609,7 +592,7 @@ index 9b39bccfb2..6ac19216df 100644 static void e1000_register_types(void) diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c -index d9c70f7ce6..f294fbce6a 100644 +index d9c70f7..f294fbc 100644 --- a/hw/pci-host/piix.c +++ b/hw/pci-host/piix.c @@ -801,6 +801,7 @@ static const TypeInfo i440fx_info = { @@ -639,10 +622,10 @@ index d9c70f7ce6..f294fbce6a 100644 type_register_static(&piix3_info); type_register_static(&piix3_xen_info); diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c -index f04e06cdf6..c664969b5b 100644 +index 5621fb9..b91a106 100644 --- a/hw/ppc/spapr_cpu_core.c +++ b/hw/ppc/spapr_cpu_core.c -@@ -385,10 +385,12 @@ static const TypeInfo spapr_cpu_core_type_infos[] = { +@@ -387,10 +387,12 @@ static const TypeInfo spapr_cpu_core_type_infos[] = { .instance_size = sizeof(SpaprCpuCore), .class_size = sizeof(SpaprCpuCoreClass), }, @@ -656,10 +639,10 @@ index f04e06cdf6..c664969b5b 100644 DEFINE_SPAPR_CPU_CORE_TYPE("power7+_v2.1"), DEFINE_SPAPR_CPU_CORE_TYPE("power8_v2.0"), diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c -index 963373ba95..6771930154 100644 +index e20f8ed..0ddc26c 100644 --- a/hw/usb/ccid-card-emulated.c +++ b/hw/usb/ccid-card-emulated.c -@@ -602,6 +602,8 @@ static void emulated_class_initfn(ObjectClass *klass, void *data) +@@ -603,6 +603,8 @@ static void emulated_class_initfn(ObjectClass *klass, void *data) set_bit(DEVICE_CATEGORY_INPUT, dc->categories); dc->desc = "emulated smartcard"; dc->props = emulated_card_properties; @@ -669,10 +652,10 @@ index 963373ba95..6771930154 100644 static const TypeInfo emulated_card_info = { diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c -index 40a12001f5..921d694e2f 100644 +index b35a640..e8e7480 100644 --- a/hw/vfio/pci-quirks.c +++ b/hw/vfio/pci-quirks.c -@@ -1385,6 +1385,8 @@ static void vfio_pci_igd_lpc_bridge_class_init(ObjectClass *klass, void *data) +@@ -1386,6 +1386,8 @@ static void vfio_pci_igd_lpc_bridge_class_init(ObjectClass *klass, void *data) set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories); dc->desc = "VFIO dummy ISA/LPC bridge for IGD assignment"; dc->hotpluggable = false; @@ -681,7 +664,7 @@ index 40a12001f5..921d694e2f 100644 k->realize = vfio_pci_igd_lpc_bridge_realize; k->class_id = PCI_CLASS_BRIDGE_ISA; } -@@ -1578,6 +1580,9 @@ static void vfio_probe_igd_bar4_quirk(VFIOPCIDevice *vdev, int nr) +@@ -1579,6 +1581,9 @@ static void vfio_probe_igd_bar4_quirk(VFIOPCIDevice *vdev, int nr) 0, PCI_DEVFN(0x2, 0))) { return; } @@ -692,10 +675,10 @@ index 40a12001f5..921d694e2f 100644 /* * We need to create an LPC/ISA bridge at PCI bus address 00:1f.0 that we diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c -index 504019c458..13badcd6ed 100644 +index d7a4e18..7c474a9 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c -@@ -3269,6 +3269,7 @@ static const TypeInfo vfio_pci_dev_info = { +@@ -3180,6 +3180,7 @@ static const TypeInfo vfio_pci_dev_info = { }, }; @@ -703,7 +686,7 @@ index 504019c458..13badcd6ed 100644 static Property vfio_pci_dev_nohotplug_properties[] = { DEFINE_PROP_BOOL("ramfb", VFIOPCIDevice, enable_ramfb, false), DEFINE_PROP_END_OF_LIST(), -@@ -3288,11 +3289,15 @@ static const TypeInfo vfio_pci_nohotplug_dev_info = { +@@ -3199,11 +3200,15 @@ static const TypeInfo vfio_pci_nohotplug_dev_info = { .instance_size = sizeof(VFIOPCIDevice), .class_init = vfio_pci_nohotplug_dev_class_init, }; @@ -720,10 +703,10 @@ index 504019c458..13badcd6ed 100644 type_init(register_vfio_pci_dev_type) diff --git a/qemu-options.hx b/qemu-options.hx -index 08749a3391..0f55062546 100644 +index 9621e93..6873f9e 100644 --- a/qemu-options.hx +++ b/qemu-options.hx -@@ -1983,11 +1983,6 @@ ETEXI +@@ -2024,11 +2024,6 @@ ETEXI DEF("no-hpet", 0, QEMU_OPTION_no_hpet, "-no-hpet disable HPET\n", QEMU_ARCH_I386) @@ -735,7 +718,7 @@ index 08749a3391..0f55062546 100644 DEF("acpitable", HAS_ARG, QEMU_OPTION_acpitable, "-acpitable [sig=str][,rev=n][,oem_id=str][,oem_table_id=str][,oem_rev=n][,asl_compiler_id=str][,asl_compiler_rev=n][,{data|file}=file1[:file2]...]\n" -@@ -2997,6 +2992,7 @@ STEXI +@@ -3038,6 +3033,7 @@ STEXI ETEXI DEFHEADING() @@ -743,7 +726,7 @@ index 08749a3391..0f55062546 100644 DEFHEADING(Bluetooth(R) options:) STEXI @table @option -@@ -3075,6 +3071,7 @@ STEXI +@@ -3116,6 +3112,7 @@ STEXI @end table ETEXI DEFHEADING() @@ -751,39 +734,11 @@ index 08749a3391..0f55062546 100644 #ifdef CONFIG_TPM DEFHEADING(TPM device options:) -diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs -index 269dfa5832..205ebe21db 100644 ---- a/stubs/Makefile.objs -+++ b/stubs/Makefile.objs -@@ -39,3 +39,4 @@ stub-obj-y += xen-hvm.o - stub-obj-y += pci-host-piix.o - stub-obj-y += ram-block.o - stub-obj-y += ramfb.o -+stub-obj-y += ide-isa.o -diff --git a/stubs/ide-isa.c b/stubs/ide-isa.c -new file mode 100644 -index 0000000000..9fd50ef691 ---- /dev/null -+++ b/stubs/ide-isa.c -@@ -0,0 +1,13 @@ -+#include "qemu/osdep.h" -+#include "hw/ide.h" -+#include -+ -+ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq, -+ DriveInfo *hd0, DriveInfo *hd1) -+{ -+ /* -+ * In theory the real isa_ide_init() function can return NULL, but no -+ * caller actually checks for that. Make sure we go out with a clear bang. -+ */ -+ abort(); -+} diff --git a/target/arm/cpu.c b/target/arm/cpu.c -index 4155782197..2a19b96a92 100644 +index ec2ab95..7e7ccee 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c -@@ -2270,7 +2270,9 @@ static void arm_cpu_register_types(void) +@@ -2702,7 +2702,9 @@ static void arm_cpu_register_types(void) type_register_static(&idau_interface_type_info); while (info->name) { @@ -795,10 +750,10 @@ index 4155782197..2a19b96a92 100644 } diff --git a/target/i386/cpu.c b/target/i386/cpu.c -index d6bb57d210..6616303782 100644 +index 19751e3..47a1236 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c -@@ -1480,14 +1480,14 @@ static X86CPUDefinition builtin_x86_defs[] = { +@@ -1554,14 +1554,14 @@ static X86CPUDefinition builtin_x86_defs[] = { .family = 6, .model = 6, .stepping = 3, @@ -821,11 +776,10 @@ index d6bb57d210..6616303782 100644 .features[FEAT_8000_0001_ECX] = CPUID_EXT3_LAHF_LM | CPUID_EXT3_SVM, .xlevel = 0x8000000A, -@@ -1716,6 +1716,25 @@ static X86CPUDefinition builtin_x86_defs[] = { - .xlevel = 0x80000008, +@@ -1791,6 +1791,25 @@ static X86CPUDefinition builtin_x86_defs[] = { .model_id = "Intel(R) Atom(TM) CPU N270 @ 1.60GHz", }, -+ { + { + .name = "cpu64-rhel6", + .level = 4, + .vendor = CPUID_VENDOR_AMD, @@ -844,14 +798,15 @@ index d6bb57d210..6616303782 100644 + .xlevel = 0x8000000A, + .model_id = "QEMU Virtual CPU version (cpu64-rhel6)", + }, - { ++ { .name = "Conroe", .level = 10, + .vendor = CPUID_VENDOR_INTEL, diff --git a/target/ppc/cpu-models.c b/target/ppc/cpu-models.c -index 7c75963e3c..7f179ff65e 100644 +index 086548e..1bbf378 100644 --- a/target/ppc/cpu-models.c +++ b/target/ppc/cpu-models.c -@@ -65,6 +65,7 @@ +@@ -66,6 +66,7 @@ #define POWERPC_DEF(_name, _pvr, _type, _desc) \ POWERPC_DEF_SVR(_name, _desc, _pvr, POWERPC_SVR_NONE, _type) @@ -859,30 +814,26 @@ index 7c75963e3c..7f179ff65e 100644 /* Embedded PowerPC */ /* PowerPC 401 family */ POWERPC_DEF("401", CPU_POWERPC_401, 401, -@@ -739,8 +740,10 @@ +@@ -740,8 +741,10 @@ "PowerPC 7447A v1.2 (G4)") POWERPC_DEF("7457a_v1.2", CPU_POWERPC_74x7A_v12, 7455, "PowerPC 7457A v1.2 (G4)") +#endif /* 64 bits PowerPC */ - #if defined (TARGET_PPC64) + #if defined(TARGET_PPC64) +#if 0 /* Disabled for Red Hat Enterprise Linux */ POWERPC_DEF("970_v2.2", CPU_POWERPC_970_v22, 970, "PowerPC 970 v2.2") POWERPC_DEF("970fx_v1.0", CPU_POWERPC_970FX_v10, 970, -@@ -757,8 +760,11 @@ - "PowerPC 970MP v1.0") - POWERPC_DEF("970mp_v1.1", CPU_POWERPC_970MP_v11, 970, +@@ -760,6 +763,7 @@ "PowerPC 970MP v1.1") -+#endif -+#if 0 /* Disabled for Red Hat Enterprise Linux */ POWERPC_DEF("power5+_v2.1", CPU_POWERPC_POWER5P_v21, POWER5P, "POWER5+ v2.1") +#endif POWERPC_DEF("power7_v2.3", CPU_POWERPC_POWER7_v23, POWER7, "POWER7 v2.3") POWERPC_DEF("power7+_v2.1", CPU_POWERPC_POWER7P_v21, POWER7, -@@ -779,6 +785,7 @@ +@@ -780,6 +784,7 @@ /* PowerPC CPU aliases */ PowerPCCPUAlias ppc_cpu_aliases[] = { @@ -890,7 +841,7 @@ index 7c75963e3c..7f179ff65e 100644 { "403", "403gc" }, { "405", "405d4" }, { "405cr", "405crc" }, -@@ -937,12 +944,15 @@ PowerPCCPUAlias ppc_cpu_aliases[] = { +@@ -938,12 +943,15 @@ PowerPCCPUAlias ppc_cpu_aliases[] = { { "7447a", "7447a_v1.2" }, { "7457a", "7457a_v1.2" }, { "apollo7pm", "7457a_v1.0" }, @@ -906,7 +857,7 @@ index 7c75963e3c..7f179ff65e 100644 { "power7", "power7_v2.3" }, { "power7+", "power7+_v2.1" }, { "power8e", "power8e_v2.1" }, -@@ -951,6 +961,7 @@ PowerPCCPUAlias ppc_cpu_aliases[] = { +@@ -952,6 +960,7 @@ PowerPCCPUAlias ppc_cpu_aliases[] = { { "power9", "power9_v2.0" }, #endif @@ -914,7 +865,7 @@ index 7c75963e3c..7f179ff65e 100644 /* Generic PowerPCs */ #if defined(TARGET_PPC64) { "ppc64", "970fx_v3.1" }, -@@ -958,5 +969,6 @@ PowerPCCPUAlias ppc_cpu_aliases[] = { +@@ -959,5 +968,6 @@ PowerPCCPUAlias ppc_cpu_aliases[] = { { "ppc32", "604" }, { "ppc", "604" }, { "default", "604" }, @@ -922,10 +873,10 @@ index 7c75963e3c..7f179ff65e 100644 { NULL, NULL } }; diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c -index eb125d4d0d..2ed9c1bd2c 100644 +index 1d16d7d..47188ed 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c -@@ -406,6 +406,9 @@ static void check_unavailable_features(const S390CPUModel *max_model, +@@ -404,6 +404,9 @@ static void check_unavailable_features(const S390CPUModel *max_model, (max_model->def->gen == model->def->gen && max_model->def->ec_ga < model->def->ec_ga)) { list_add_feat("type", unavailable); @@ -936,10 +887,10 @@ index eb125d4d0d..2ed9c1bd2c 100644 /* detect missing features if any to properly report them */ diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c -index 19530fb94e..57e15404ff 100644 +index 6e814c2..153d092 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c -@@ -2340,6 +2340,14 @@ void kvm_s390_apply_cpu_model(const S390CPUModel *model, Error **errp) +@@ -2363,6 +2363,14 @@ void kvm_s390_apply_cpu_model(const S390CPUModel *model, Error **errp) error_setg(errp, "KVM doesn't support CPU models"); return; } @@ -955,19 +906,19 @@ index 19530fb94e..57e15404ff 100644 prop.ibc = s390_ibc_from_cpu_model(model); /* configure cpu features indicated via STFL(e) */ diff --git a/vl.c b/vl.c -index c696ad2a13..3ada215270 100644 +index b426b32..f9166f5 100644 --- a/vl.c +++ b/vl.c -@@ -167,7 +167,7 @@ unsigned int max_cpus; - int smp_cores = 1; - int smp_threads = 1; +@@ -164,7 +164,7 @@ Chardev *parallel_hds[MAX_PARALLEL_PORTS]; + int win2k_install_hack = 0; + int singlestep = 0; int acpi_enabled = 1; -int no_hpet = 0; +int no_hpet = 1; /* Always disabled for Red Hat Enterprise Linux */ int fd_bootchk = 1; static int no_reboot; int no_shutdown = 0; -@@ -933,6 +933,7 @@ static void configure_rtc(QemuOpts *opts) +@@ -912,6 +912,7 @@ static void configure_rtc(QemuOpts *opts) } } @@ -975,7 +926,7 @@ index c696ad2a13..3ada215270 100644 /***********************************************************/ /* Bluetooth support */ static int nb_hcis; -@@ -1054,6 +1055,7 @@ static int bt_parse(const char *opt) +@@ -1033,6 +1034,7 @@ static int bt_parse(const char *opt) error_report("bad bluetooth parameter '%s'", opt); return 1; } @@ -983,7 +934,7 @@ index c696ad2a13..3ada215270 100644 static int parse_name(void *opaque, QemuOpts *opts, Error **errp) { -@@ -3279,6 +3281,7 @@ int main(int argc, char **argv, char **envp) +@@ -3149,6 +3151,7 @@ int main(int argc, char **argv, char **envp) } break; #endif @@ -991,7 +942,7 @@ index c696ad2a13..3ada215270 100644 case QEMU_OPTION_bt: warn_report("The bluetooth subsystem is deprecated and will " "be removed soon. If the bluetooth subsystem is " -@@ -3286,6 +3289,7 @@ int main(int argc, char **argv, char **envp) +@@ -3156,6 +3159,7 @@ int main(int argc, char **argv, char **envp) "qemu-devel@nongnu.org with your usecase."); add_device_config(DEV_BT, optarg); break; @@ -999,7 +950,7 @@ index c696ad2a13..3ada215270 100644 case QEMU_OPTION_audio_help: audio_legacy_help(); exit (0); -@@ -4409,9 +4413,11 @@ int main(int argc, char **argv, char **envp) +@@ -4284,9 +4288,11 @@ int main(int argc, char **argv, char **envp) tpm_init(); @@ -1012,5 +963,5 @@ index c696ad2a13..3ada215270 100644 if (!xen_enabled()) { /* On 32-bit hosts, QEMU is limited by virtual address space */ -- -2.20.1 +1.8.3.1 diff --git a/0006-Machine-type-related-general-changes.patch b/0006-Machine-type-related-general-changes.patch index 18e5181..42f26fa 100644 --- a/0006-Machine-type-related-general-changes.patch +++ b/0006-Machine-type-related-general-changes.patch @@ -1,4 +1,4 @@ -From 4f20f7503073886c51e82fbbdfe78d6c79ea5df7 Mon Sep 17 00:00:00 2001 +From 3d84e663576b363fc4cb808752cebd7d9766cdce Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Fri, 11 Jan 2019 09:54:45 +0100 Subject: Machine type related general changes @@ -13,35 +13,49 @@ Rebase changes (4.0.0): - Remove e1000 device duplication changes to reflect upstream solution - Rewrite machine compat properties to upstream solution +Rebase changes (4.1.0-rc0): +- Removed optional flag for machine compat properties (upstream) + +Rebase changes (4.1.0-rc1): +- Remove c3e002cb chunk from hw/net/e1000.c + +Rebase changes (4.1.0-rc2): +- Reorder compat structures +- Use one format for compat scructures + +Rebase changes (4.1.0-rc4): +- Added compat for virtio-balloon-pci.any_layout for rhel71 + Merged patches (4.0.0): - d4c0957 compat: Generic HW_COMPAT_RHEL7_6 - cbac773 virtio: Make disable-legacy/disable-modern compat properties optional -Signed-off-by: Danilo C. L. de Paula +Merged patches (4.0.0-rc0): +- 479ad30 redhat: fix cut'n'paste garbage in hw_compat comments +- f19738e compat: Generic hw_compat_rhel_8_0 --- - hw/acpi/ich9.c | 16 +++ + hw/acpi/ich9.c | 16 ++++++ hw/acpi/piix4.c | 6 +- - hw/char/serial.c | 16 +++ - hw/core/machine.c | 268 ++++++++++++++++++++++++++++++++++++++++ + hw/char/serial.c | 16 ++++++ + hw/core/machine.c | 146 ++++++++++++++++++++++++++++++++++++++++++++++++ hw/display/vga-isa.c | 2 +- - hw/net/e1000.c | 10 ++ - hw/net/e1000e.c | 21 ++++ + hw/net/e1000e.c | 21 +++++++ hw/net/rtl8139.c | 4 +- hw/smbios/smbios.c | 1 + hw/timer/i8254_common.c | 2 +- - hw/timer/mc146818rtc.c | 6 + + hw/timer/mc146818rtc.c | 6 ++ hw/usb/hcd-uhci.c | 4 +- - hw/usb/hcd-xhci.c | 20 +++ + hw/usb/hcd-xhci.c | 20 +++++++ hw/usb/hcd-xhci.h | 2 + include/hw/acpi/ich9.h | 3 + - include/hw/boards.h | 18 +++ - include/hw/usb.h | 4 + + include/hw/boards.h | 21 +++++++ + include/hw/usb.h | 4 ++ migration/migration.c | 2 + - migration/migration.h | 5 + - 19 files changed, 403 insertions(+), 7 deletions(-) + migration/migration.h | 5 ++ + 18 files changed, 274 insertions(+), 7 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c -index 168a713eff..0a6346f1cf 100644 +index 168a713..0a6346f 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -441,6 +441,18 @@ static void ich9_pm_set_enable_tco(Object *obj, bool value, Error **errp) @@ -75,10 +89,10 @@ index 168a713eff..0a6346f1cf 100644 ich9_pm_get_disable_s3, ich9_pm_set_disable_s3, diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c -index 9c079d6834..d742777134 100644 +index ec4e186..0d2c8e4 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c -@@ -315,7 +315,7 @@ static bool piix4_vmstate_need_smbus(void *opaque, int version_id) +@@ -306,7 +306,7 @@ static bool piix4_vmstate_need_smbus(void *opaque, int version_id) static const VMStateDescription vmstate_acpi = { .name = "piix4_pm", .version_id = 3, @@ -87,7 +101,7 @@ index 9c079d6834..d742777134 100644 .minimum_version_id_old = 1, .load_state_old = acpi_load_old, .post_load = vmstate_acpi_post_load, -@@ -684,8 +684,8 @@ static void piix4_send_gpe(AcpiDeviceIf *adev, AcpiEventStatusBits ev) +@@ -663,8 +663,8 @@ static void piix4_send_gpe(AcpiDeviceIf *adev, AcpiEventStatusBits ev) static Property piix4_pm_properties[] = { DEFINE_PROP_UINT32("smb_io_base", PIIX4PMState, smb_io_base, 0), @@ -99,7 +113,7 @@ index 9c079d6834..d742777134 100644 DEFINE_PROP_BOOL("acpi-pci-hotplug-with-bridge-support", PIIX4PMState, use_acpi_pci_hotplug, true), diff --git a/hw/char/serial.c b/hw/char/serial.c -index 7c42a2abfc..ae63cc0104 100644 +index 7c42a2a..ae63cc0 100644 --- a/hw/char/serial.c +++ b/hw/char/serial.c @@ -30,6 +30,7 @@ @@ -154,289 +168,167 @@ index 7c42a2abfc..ae63cc0104 100644 } diff --git a/hw/core/machine.c b/hw/core/machine.c -index 743fef2898..fd1594d1ad 100644 +index 32d1ca9..f30afe0 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c -@@ -24,6 +24,274 @@ +@@ -27,6 +27,152 @@ #include "hw/pci/pci.h" #include "hw/mem/nvdimm.h" -+/* Mostly like hw_compat_2_1 but: -+ * * we don't need virtio-scsi-pci since 7.0 already had that on -+ * * -+ * * RH: Note, qemu-extended-regs should have been enabled in the 7.1 -+ * * machine type, but was accidentally turned off in 7.2 onwards. -+ * * -+ * */ -+GlobalProperty hw_compat_rhel_7_1[] = { -+ { /* COMPAT_RHEL7.1 */ -+ .driver = "intel-hda-generic", -+ .property = "old_msi_addr", -+ .value = "on", -+ },{ -+ .driver = "VGA", -+ .property = "qemu-extended-regs", -+ .value = "off", -+ },{ -+ .driver = "secondary-vga", -+ .property = "qemu-extended-regs", -+ .value = "off", -+ },{ -+ .driver = "usb-mouse", -+ .property = "usb_version", -+ .value = stringify(1), -+ },{ -+ .driver = "usb-kbd", -+ .property = "usb_version", -+ .value = stringify(1), -+ },{ -+ .driver = "virtio-pci", -+ .property = "virtio-pci-bus-master-bug-migration", -+ .value = "on", -+ },{ -+ .driver = "virtio-blk-pci", -+ .property = "any_layout", -+ .value = "off", -+ },{ -+ .driver = "virtio-serial-pci", -+ .property = "any_layout", -+ .value = "off", -+ },{ -+ .driver = "virtio-9p-pci", -+ .property = "any_layout", -+ .value = "off", -+ },{ -+ .driver = "virtio-rng-pci", -+ .property = "any_layout", -+ .value = "off", -+ },{ /* HW_COMPAT_RHEL7_1 - introduced with 2.10.0 */ -+ .driver = "migration", -+ .property = "send-configuration", -+ .value = "off", -+ }, ++/* The same as hw_compat_3_1 ++ * format of array has been changed by: ++ * 6c36bddf5340 ("machine: Use shorter format for GlobalProperty arrays") ++ */ ++GlobalProperty hw_compat_rhel_8_0[] = { ++ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ ++ { "pcie-root-port", "x-speed", "2_5" }, ++ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ ++ { "pcie-root-port", "x-width", "1" }, ++ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ ++ { "memory-backend-file", "x-use-canonical-path-for-ramblock-id", "true" }, ++ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ ++ { "memory-backend-memfd", "x-use-canonical-path-for-ramblock-id", "true" }, ++ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ ++ { "tpm-crb", "ppi", "false" }, ++ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ ++ { "tpm-tis", "ppi", "false" }, ++ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ ++ { "usb-kbd", "serial", "42" }, ++ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ ++ { "usb-mouse", "serial", "42" }, ++ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ ++ { "usb-tablet", "serial", "42" }, ++ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ ++ { "virtio-blk-device", "discard", "false" }, ++ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ ++ { "virtio-blk-device", "write-zeroes", "false" }, +}; -+const size_t hw_compat_rhel_7_1_len = G_N_ELEMENTS(hw_compat_rhel_7_1); -+ -+/* Mostly like hw_compat_2_4 + 2_3 but: -+ * * we don't need "any_layout" as it has been backported to 7.2 -+ * */ ++const size_t hw_compat_rhel_8_0_len = G_N_ELEMENTS(hw_compat_rhel_8_0); + -+GlobalProperty hw_compat_rhel_7_2[] = { -+ { -+ .driver = "virtio-blk-device", -+ .property = "scsi", -+ .value = "true", -+ },{ -+ .driver = "e1000-82540em", -+ .property = "extra_mac_registers", -+ .value = "off", -+ },{ -+ .driver = "virtio-pci", -+ .property = "x-disable-pcie", -+ .value = "on", -+ },{ -+ .driver = "virtio-pci", -+ .property = "migrate-extra", -+ .value = "off", -+ },{ /* HW_COMPAT_RHEL7_2 */ -+ .driver = "fw_cfg_mem", -+ .property = "dma_enabled", -+ .value = "off", -+ },{ /* HW_COMPAT_RHEL7_2 */ -+ .driver = "fw_cfg_io", -+ .property = "dma_enabled", -+ .value = "off", -+ },{ /* HW_COMPAT_RHEL7_2 */ -+ .driver = "isa-fdc", -+ .property = "fallback", -+ .value = "144", -+ },{ /* HW_COMPAT_RHEL7_2 */ -+ .driver = "virtio-pci", -+ .property = "disable-modern", -+ .value = "on", -+ .optional = true, -+ },{ /* HW_COMPAT_RHEL7_2 */ -+ .driver = "virtio-pci", -+ .property = "disable-legacy", -+ .value = "off", -+ .optional = true, -+ },{ /* HW_COMPAT_RHEL7_2 */ -+ .driver = TYPE_PCI_DEVICE, -+ .property = "x-pcie-lnksta-dllla", -+ .value = "off", -+ },{ /* HW_COMPAT_RHEL7_2 */ -+ .driver = "virtio-pci", -+ .property = "page-per-vq", -+ .value = "on", -+ },{ /* HW_COMPAT_RHEL7_2 - introduced with 2.10.0 */ -+ .driver = "migration", -+ .property = "send-section-footer", -+ .value = "off", -+ },{ /* HW_COMPAT_RHEL7_2 - introduced with 2.10.0 */ -+ .driver = "migration", -+ .property = "store-global-state", -+ .value = "off", -+ }, ++/* The same as hw_compat_3_0 + hw_compat_2_12 ++ * except that ++ * there's nothing in 3_0 ++ * migration.decompress-error-check=off was in 7.5 from bz 1584139 ++ */ ++GlobalProperty hw_compat_rhel_7_6[] = { ++ /* hw_compat_rhel_7_6 from hw_compat_2_12 */ ++ { "hda-audio", "use-timer", "false" }, ++ /* hw_compat_rhel_7_6 from hw_compat_2_12 */ ++ { "cirrus-vga", "global-vmstate", "true" }, ++ /* hw_compat_rhel_7_6 from hw_compat_2_12 */ ++ { "VGA", "global-vmstate", "true" }, ++ /* hw_compat_rhel_7_6 from hw_compat_2_12 */ ++ { "vmware-svga", "global-vmstate", "true" }, ++ /* hw_compat_rhel_7_6 from hw_compat_2_12 */ ++ { "qxl-vga", "global-vmstate", "true" }, +}; -+const size_t hw_compat_rhel_7_2_len = G_N_ELEMENTS(hw_compat_rhel_7_2); ++const size_t hw_compat_rhel_7_6_len = G_N_ELEMENTS(hw_compat_rhel_7_6); + -+/* Mostly like HW_COMPAT_2_6 + HW_COMPAT_2_7 + HW_COMPAT_2_8 except -+ * * disable-modern, disable-legacy, page-per-vq have already been -+ * * backported to RHEL7.3 -+ * */ -+GlobalProperty hw_compat_rhel_7_3[] = { -+ { /* HW_COMPAT_RHEL7_3 */ -+ .driver = "virtio-mmio", -+ .property = "format_transport_address", -+ .value = "off", -+ },{ /* HW_COMPAT_RHEL7_3 */ -+ .driver = "virtio-serial-device", -+ .property = "emergency-write", -+ .value = "off", -+ },{ /* HW_COMPAT_RHEL7_3 */ -+ .driver = "ioapic", -+ .property = "version", -+ .value = "0x11", -+ },{ /* HW_COMPAT_RHEL7_3 */ -+ .driver = "intel-iommu", -+ .property = "x-buggy-eim", -+ .value = "true", -+ },{ /* HW_COMPAT_RHEL7_3 */ -+ .driver = "virtio-pci", -+ .property = "x-ignore-backend-features", -+ .value = "on", -+ },{ /* HW_COMPAT_RHEL7_3 */ -+ .driver = "fw_cfg_mem", -+ .property = "x-file-slots", -+ .value = stringify(0x10), -+ },{ /* HW_COMPAT_RHEL7_3 */ -+ .driver = "fw_cfg_io", -+ .property = "x-file-slots", -+ .value = stringify(0x10), -+ },{ /* HW_COMPAT_RHEL7_3 */ -+ .driver = "pflash_cfi01", -+ .property = "old-multiple-chip-handling", -+ .value = "on", -+ },{ /* HW_COMPAT_RHEL7_3 */ -+ .driver = TYPE_PCI_DEVICE, -+ .property = "x-pcie-extcap-init", -+ .value = "off", -+ },{ /* HW_COMPAT_RHEL7_3 */ -+ .driver = "virtio-pci", -+ .property = "x-pcie-deverr-init", -+ .value = "off", -+ },{ /* HW_COMPAT_RHEL7_3 */ -+ .driver = "virtio-pci", -+ .property = "x-pcie-lnkctl-init", -+ .value = "off", -+ },{ /* HW_COMPAT_RHEL7_3 */ -+ .driver = "virtio-pci", -+ .property = "x-pcie-pm-init", -+ .value = "off", -+ },{ /* HW_COMPAT_RHEL7_3 */ -+ .driver = "virtio-net-device", -+ .property = "x-mtu-bypass-backend", -+ .value = "off", -+ },{ /* HW_COMPAT_RHEL7_3 */ -+ .driver = "e1000e", -+ .property = "__redhat_e1000e_7_3_intr_state", -+ .value = "on", -+ }, ++/* The same as hw_compat_2_11 + hw_compat_2_10 */ ++GlobalProperty hw_compat_rhel_7_5[] = { ++ /* hw_compat_rhel_7_5 from hw_compat_2_11 */ ++ { "hpet", "hpet-offset-saved", "false" }, ++ /* hw_compat_rhel_7_5 from hw_compat_2_11 */ ++ { "virtio-blk-pci", "vectors", "2" }, ++ /* hw_compat_rhel_7_5 from hw_compat_2_11 */ ++ { "vhost-user-blk-pci", "vectors", "2" }, ++ /* hw_compat_rhel_7_5 from hw_compat_2_11 ++ bz 1608778 modified for our naming */ ++ { "e1000-82540em", "migrate_tso_props", "off" }, ++ /* hw_compat_rhel_7_5 from hw_compat_2_10 */ ++ { "virtio-mouse-device", "wheel-axis", "false" }, ++ /* hw_compat_rhel_7_5 from hw_compat_2_10 */ ++ { "virtio-tablet-device", "wheel-axis", "false" }, ++ { "cirrus-vga", "vgamem_mb", "16" }, ++ { "migration", "decompress-error-check", "off" }, +}; -+const size_t hw_compat_rhel_7_3_len = G_N_ELEMENTS(hw_compat_rhel_7_3); ++const size_t hw_compat_rhel_7_5_len = G_N_ELEMENTS(hw_compat_rhel_7_5); + +/* Mostly like hw_compat_2_9 except -+ * * x-mtu-bypass-backend, x-migrate-msix has already been -+ * * backported to RHEL7.4. shpc was already on in 7.4. -+ * */ ++ * x-mtu-bypass-backend, x-migrate-msix has already been ++ * backported to RHEL7.4. shpc was already on in 7.4. ++ */ +GlobalProperty hw_compat_rhel_7_4[] = { -+ { /* HW_COMPAT_RHEL7_4 */ -+ .driver = "intel-iommu", -+ .property = "pt", -+ .value = "off", -+ }, ++ { "intel-iommu", "pt", "off" }, +}; -+const size_t hw_compat_rhel_7_4_len = G_N_ELEMENTS(hw_compat_rhel_7_4); + -+/* The same as hw_compat_2_11 + hw_compat_2_10 */ -+GlobalProperty hw_compat_rhel_7_5[] = { -+ { /* HW_COMPAT_RHEL7_5 from HW_COMPAT_2_11 */ -+ .driver = "hpet", -+ .property = "hpet-offset-saved", -+ .value = "false", -+ },{ /* HW_COMPAT_RHEL7_5 from HW_COMPAT_2_11 */ -+ .driver = "virtio-blk-pci", -+ .property = "vectors", -+ .value = "2", -+ },{ /* HW_COMPAT_RHEL7_5 from HW_COMPAT_2_11 */ -+ .driver = "vhost-user-blk-pci", -+ .property = "vectors", -+ .value = "2", -+ },{ /* HW_COMPAT_RHEL7_5 from HW_COMPAT_2_11 but -+ bz 1608778 modified for our naming */ -+ .driver = "e1000-82540em", -+ .property = "migrate_tso_props", -+ .value = "off", -+ },{ /* HW_COMPAT_RHEL7_5 from HW_COMPAT_2_10 */ -+ .driver = "virtio-mouse-device", -+ .property = "wheel-axis", -+ .value = "false", -+ },{ /* HW_COMPAT_RHEL7_5 from HW_COMPAT_2_10 */ -+ .driver = "virtio-tablet-device", -+ .property = "wheel-axis", -+ .value = "false", -+ },{ /* HW_COMPAT_RHEL7_5 */ -+ .driver = "cirrus-vga", -+ .property = "vgamem_mb", -+ .value = "16", -+ },{ /* HW_COMPAT_RHEL7_5 */ -+ .driver = "migration", -+ .property = "decompress-error-check", -+ .value = "off", -+ }, ++const size_t hw_compat_rhel_7_4_len = G_N_ELEMENTS(hw_compat_rhel_7_4); ++/* Mostly like HW_COMPAT_2_6 + HW_COMPAT_2_7 + HW_COMPAT_2_8 except ++ * disable-modern, disable-legacy, page-per-vq have already been ++ * backported to RHEL7.3 ++ */ ++GlobalProperty hw_compat_rhel_7_3[] = { ++ { "virtio-mmio", "format_transport_address", "off" }, ++ { "virtio-serial-device", "emergency-write", "off" }, ++ { "ioapic", "version", "0x11" }, ++ { "intel-iommu", "x-buggy-eim", "true" }, ++ { "virtio-pci", "x-ignore-backend-features", "on" }, ++ { "fw_cfg_mem", "x-file-slots", stringify(0x10) }, ++ { "fw_cfg_io", "x-file-slots", stringify(0x10) }, ++ { "pflash_cfi01", "old-multiple-chip-handling", "on" }, ++ { TYPE_PCI_DEVICE, "x-pcie-extcap-init", "off" }, ++ { "virtio-pci", "x-pcie-deverr-init", "off" }, ++ { "virtio-pci", "x-pcie-lnkctl-init", "off" }, ++ { "virtio-pci", "x-pcie-pm-init", "off" }, ++ { "virtio-net-device", "x-mtu-bypass-backend", "off" }, ++ { "e1000e", "__redhat_e1000e_7_3_intr_state", "on" }, +}; -+const size_t hw_compat_rhel_7_5_len = G_N_ELEMENTS(hw_compat_rhel_7_5); ++const size_t hw_compat_rhel_7_3_len = G_N_ELEMENTS(hw_compat_rhel_7_3); + -+/* The same as hw_compat_3_0 + hw_compat_2_12 -+ * * except that -+ * * there's nothing in 3_0 -+ * * migration.decompress-error-check=off was in 7.5 from bz 1584139 -+ * * -+ * */ -+GlobalProperty hw_compat_rhel_7_6[] = { -+ { /* HW_COMPAT_RHEL7_6 from HW_COMPAT_2_12 */ -+ .driver = "hda-audio", -+ .property = "use-timer", -+ .value = "false", -+ },{ /* HW_COMPAT_RHEL7_6 from HW_COMPAT_2_12 */ -+ .driver = "cirrus-vga", -+ .property = "global-vmstate", -+ .value = "true", -+ },{ /* HW_COMPAT_RHEL7_6 from HW_COMPAT_2_12 */ -+ .driver = "VGA", -+ .property = "global-vmstate", -+ .value = "true", -+ },{ /* HW_COMPAT_RHEL7_6 from HW_COMPAT_2_12 */ -+ .driver = "vmware-svga", -+ .property = "global-vmstate", -+ .value = "true", -+ },{ /* HW_COMPAT_RHEL7_6 from HW_COMPAT_2_12 */ -+ .driver = "qxl-vga", -+ .property = "global-vmstate", -+ .value = "true", -+ }, ++/* Mostly like hw_compat_2_4 + 2_3 but: ++ * we don't need "any_layout" as it has been backported to 7.2 ++ */ ++GlobalProperty hw_compat_rhel_7_2[] = { ++ { "virtio-blk-device", "scsi", "true" }, ++ { "e1000-82540em", "extra_mac_registers", "off" }, ++ { "virtio-pci", "x-disable-pcie", "on" }, ++ { "virtio-pci", "migrate-extra", "off" }, ++ { "fw_cfg_mem", "dma_enabled", "off" }, ++ { "fw_cfg_io", "dma_enabled", "off" }, ++ { "isa-fdc", "fallback", "144" }, ++ { "virtio-pci", "disable-modern", "on" }, ++ { "virtio-pci", "disable-legacy", "off" }, ++ { TYPE_PCI_DEVICE, "x-pcie-lnksta-dllla", "off" }, ++ { "virtio-pci", "page-per-vq", "on" }, ++ /* hw_compat_rhel_7_2 - introduced with 2.10.0 */ ++ { "migration", "send-section-footer", "off" }, ++ /* hw_compat_rhel_7_2 - introduced with 2.10.0 */ ++ { "migration", "store-global-state", "off", ++ }, +}; -+const size_t hw_compat_rhel_7_6_len = G_N_ELEMENTS(hw_compat_rhel_7_6); ++const size_t hw_compat_rhel_7_2_len = G_N_ELEMENTS(hw_compat_rhel_7_2); + ++/* Mostly like hw_compat_2_1 but: ++ * we don't need virtio-scsi-pci since 7.0 already had that on ++ * ++ * RH: Note, qemu-extended-regs should have been enabled in the 7.1 ++ * machine type, but was accidentally turned off in 7.2 onwards. ++ */ ++GlobalProperty hw_compat_rhel_7_1[] = { ++ { "intel-hda-generic", "old_msi_addr", "on" }, ++ { "VGA", "qemu-extended-regs", "off" }, ++ { "secondary-vga", "qemu-extended-regs", "off" }, ++ { "usb-mouse", "usb_version", stringify(1) }, ++ { "usb-kbd", "usb_version", stringify(1) }, ++ { "virtio-pci", "virtio-pci-bus-master-bug-migration", "on" }, ++ { "virtio-blk-pci", "any_layout", "off" }, ++ { "virtio-balloon-pci", "any_layout", "off" }, ++ { "virtio-serial-pci", "any_layout", "off" }, ++ { "virtio-9p-pci", "any_layout", "off" }, ++ { "virtio-rng-pci", "any_layout", "off" }, ++ /* HW_COMPAT_RHEL7_1 - introduced with 2.10.0 */ ++ { "migration", "send-configuration", "off" }, ++}; ++const size_t hw_compat_rhel_7_1_len = G_N_ELEMENTS(hw_compat_rhel_7_1); + - GlobalProperty hw_compat_3_1[] = { - { "pcie-root-port", "x-speed", "2_5" }, - { "pcie-root-port", "x-width", "1" }, + GlobalProperty hw_compat_4_0[] = { + { "VGA", "edid", "false" }, + { "secondary-vga", "edid", "false" }, diff --git a/hw/display/vga-isa.c b/hw/display/vga-isa.c -index fa44242e0d..7835c8380a 100644 +index 945952a..db0681e 100644 --- a/hw/display/vga-isa.c +++ b/hw/display/vga-isa.c -@@ -80,7 +80,7 @@ static void vga_isa_realizefn(DeviceState *dev, Error **errp) +@@ -82,7 +82,7 @@ static void vga_isa_realizefn(DeviceState *dev, Error **errp) } static Property vga_isa_properties[] = { @@ -445,32 +337,11 @@ index fa44242e0d..7835c8380a 100644 DEFINE_PROP_END_OF_LIST(), }; -diff --git a/hw/net/e1000.c b/hw/net/e1000.c -index 6ac19216df..a4de04ab89 100644 ---- a/hw/net/e1000.c -+++ b/hw/net/e1000.c -@@ -1691,6 +1691,16 @@ static void pci_e1000_realize(PCIDevice *pci_dev, Error **errp) - - pci_conf = pci_dev->config; - -+ if (!(d->compat_flags & E1000_FLAG_AUTONEG)) { -+ /* -+ * We have no capabilities, so capability list bit should normally be 0. -+ * Keep it on for compat machine types to avoid breaking migration. -+ * HACK: abuse E1000_FLAG_AUTONEG, which is off exactly for -+ * the machine types that need this. -+ */ -+ pci_set_word(pci_conf + PCI_STATUS, PCI_STATUS_CAP_LIST); -+ } -+ - /* TODO: RST# value should be 0, PCI spec 6.2.4 */ - pci_conf[PCI_CACHE_LINE_SIZE] = 0x10; - diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c -index 510ddb3897..f1de9e5058 100644 +index 581f7d0..9a8b1ed 100644 --- a/hw/net/e1000e.c +++ b/hw/net/e1000e.c -@@ -75,6 +75,11 @@ typedef struct E1000EState { +@@ -76,6 +76,11 @@ typedef struct E1000EState { E1000ECore core; @@ -482,7 +353,7 @@ index 510ddb3897..f1de9e5058 100644 } E1000EState; #define E1000E_MMIO_IDX 0 -@@ -90,6 +95,10 @@ typedef struct E1000EState { +@@ -91,6 +96,10 @@ typedef struct E1000EState { #define E1000E_MSIX_TABLE (0x0000) #define E1000E_MSIX_PBA (0x2000) @@ -493,7 +364,7 @@ index 510ddb3897..f1de9e5058 100644 static uint64_t e1000e_mmio_read(void *opaque, hwaddr addr, unsigned size) { -@@ -301,6 +310,8 @@ e1000e_init_msix(E1000EState *s) +@@ -302,6 +311,8 @@ e1000e_init_msix(E1000EState *s) } else { if (!e1000e_use_msix_vectors(s, E1000E_MSIX_VEC_NUM)) { msix_uninit(d, &s->msix, &s->msix); @@ -502,7 +373,7 @@ index 510ddb3897..f1de9e5058 100644 } } } -@@ -472,6 +483,8 @@ static void e1000e_pci_realize(PCIDevice *pci_dev, Error **errp) +@@ -473,6 +484,8 @@ static void e1000e_pci_realize(PCIDevice *pci_dev, Error **errp) ret = msi_init(PCI_DEVICE(s), 0xD0, 1, true, false, NULL); if (ret) { trace_e1000e_msi_init_fail(ret); @@ -511,7 +382,7 @@ index 510ddb3897..f1de9e5058 100644 } if (e1000e_add_pm_capability(pci_dev, e1000e_pmrb_offset, -@@ -595,6 +608,11 @@ static const VMStateDescription e1000e_vmstate_intr_timer = { +@@ -596,6 +609,11 @@ static const VMStateDescription e1000e_vmstate_intr_timer = { VMSTATE_STRUCT_ARRAY(_f, _s, _num, 0, \ e1000e_vmstate_intr_timer, E1000IntrDelayTimer) @@ -523,7 +394,7 @@ index 510ddb3897..f1de9e5058 100644 static const VMStateDescription e1000e_vmstate = { .name = "e1000e", .version_id = 1, -@@ -606,6 +624,7 @@ static const VMStateDescription e1000e_vmstate = { +@@ -607,6 +625,7 @@ static const VMStateDescription e1000e_vmstate = { VMSTATE_MSIX(parent_obj, E1000EState), VMSTATE_UINT32(ioaddr, E1000EState), @@ -531,7 +402,7 @@ index 510ddb3897..f1de9e5058 100644 VMSTATE_UINT32(core.rxbuf_min_shift, E1000EState), VMSTATE_UINT8(core.rx_desc_len, E1000EState), VMSTATE_UINT32_ARRAY(core.rxbuf_sizes, E1000EState, -@@ -654,6 +673,8 @@ static PropertyInfo e1000e_prop_disable_vnet, +@@ -655,6 +674,8 @@ static PropertyInfo e1000e_prop_disable_vnet, static Property e1000e_properties[] = { DEFINE_NIC_PROPERTIES(E1000EState, conf), @@ -541,10 +412,10 @@ index 510ddb3897..f1de9e5058 100644 e1000e_prop_disable_vnet, bool), DEFINE_PROP_SIGNED("subsys_ven", E1000EState, subsys_ven, diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c -index 2342a095e3..0c916b7a21 100644 +index 0927317..0cead11 100644 --- a/hw/net/rtl8139.c +++ b/hw/net/rtl8139.c -@@ -3174,7 +3174,7 @@ static int rtl8139_pre_save(void *opaque) +@@ -3176,7 +3176,7 @@ static int rtl8139_pre_save(void *opaque) static const VMStateDescription vmstate_rtl8139 = { .name = "rtl8139", @@ -553,7 +424,7 @@ index 2342a095e3..0c916b7a21 100644 .minimum_version_id = 3, .post_load = rtl8139_post_load, .pre_save = rtl8139_pre_save, -@@ -3255,7 +3255,9 @@ static const VMStateDescription vmstate_rtl8139 = { +@@ -3257,7 +3257,9 @@ static const VMStateDescription vmstate_rtl8139 = { VMSTATE_UINT32(tally_counters.TxMCol, RTL8139State), VMSTATE_UINT64(tally_counters.RxOkPhy, RTL8139State), VMSTATE_UINT64(tally_counters.RxOkBrd, RTL8139State), @@ -564,10 +435,10 @@ index 2342a095e3..0c916b7a21 100644 VMSTATE_UINT16(tally_counters.TxUndrn, RTL8139State), diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c -index 47be9071fa..3ea04e621e 100644 +index 7bcd67b..dd0bc2b 100644 --- a/hw/smbios/smbios.c +++ b/hw/smbios/smbios.c -@@ -775,6 +775,7 @@ void smbios_set_defaults(const char *manufacturer, const char *product, +@@ -778,6 +778,7 @@ void smbios_set_defaults(const char *manufacturer, const char *product, SMBIOS_SET_DEFAULT(type1.manufacturer, manufacturer); SMBIOS_SET_DEFAULT(type1.product, product); SMBIOS_SET_DEFAULT(type1.version, version); @@ -576,10 +447,10 @@ index 47be9071fa..3ea04e621e 100644 SMBIOS_SET_DEFAULT(type2.product, product); SMBIOS_SET_DEFAULT(type2.version, version); diff --git a/hw/timer/i8254_common.c b/hw/timer/i8254_common.c -index 6190b6fc5d..ad2ad2d09f 100644 +index 76ca6ec..e7c87a9 100644 --- a/hw/timer/i8254_common.c +++ b/hw/timer/i8254_common.c -@@ -268,7 +268,7 @@ static const VMStateDescription vmstate_pit_common = { +@@ -270,7 +270,7 @@ static const VMStateDescription vmstate_pit_common = { .pre_save = pit_dispatch_pre_save, .post_load = pit_dispatch_post_load, .fields = (VMStateField[]) { @@ -589,18 +460,18 @@ index 6190b6fc5d..ad2ad2d09f 100644 vmstate_pit_channel, PITChannelState), VMSTATE_INT64(channels[0].next_transition_time, diff --git a/hw/timer/mc146818rtc.c b/hw/timer/mc146818rtc.c -index 513f105e62..10a3d44be1 100644 +index ce4550b..777efe9 100644 --- a/hw/timer/mc146818rtc.c +++ b/hw/timer/mc146818rtc.c -@@ -35,6 +35,7 @@ - #include "qapi/qapi-events-target.h" +@@ -37,6 +37,7 @@ + #include "qapi/qapi-events-misc-target.h" #include "qapi/visitor.h" #include "exec/address-spaces.h" +#include "migration/migration.h" #ifdef TARGET_I386 #include "hw/i386/apic.h" -@@ -841,6 +842,11 @@ static int rtc_post_load(void *opaque, int version_id) +@@ -843,6 +844,11 @@ static int rtc_post_load(void *opaque, int version_id) static bool rtc_irq_reinject_on_ack_count_needed(void *opaque) { RTCState *s = (RTCState *)opaque; @@ -613,10 +484,10 @@ index 513f105e62..10a3d44be1 100644 } diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c -index 09df29ff9c..95542290ff 100644 +index 98bd5cf..2fd2a9b 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c -@@ -1216,12 +1216,14 @@ static void usb_uhci_common_realize(PCIDevice *dev, Error **errp) +@@ -1218,12 +1218,14 @@ static void usb_uhci_common_realize(PCIDevice *dev, Error **errp) UHCIState *s = UHCI(dev); uint8_t *pci_conf = s->dev.config; int i; @@ -633,10 +504,10 @@ index 09df29ff9c..95542290ff 100644 if (s->masterbus) { USBPort *ports[NB_PORTS]; diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c -index ec28bee319..ad351a7b6d 100644 +index 5894a18..9854fae 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c -@@ -3580,9 +3580,27 @@ static const VMStateDescription vmstate_xhci_slot = { +@@ -3584,9 +3584,27 @@ static const VMStateDescription vmstate_xhci_slot = { } }; @@ -664,7 +535,7 @@ index ec28bee319..ad351a7b6d 100644 .fields = (VMStateField[]) { VMSTATE_UINT32(type, XHCIEvent), VMSTATE_UINT32(ccode, XHCIEvent), -@@ -3591,6 +3609,8 @@ static const VMStateDescription vmstate_xhci_event = { +@@ -3595,6 +3613,8 @@ static const VMStateDescription vmstate_xhci_event = { VMSTATE_UINT32(flags, XHCIEvent), VMSTATE_UINT8(slotid, XHCIEvent), VMSTATE_UINT8(epid, XHCIEvent), @@ -674,10 +545,10 @@ index ec28bee319..ad351a7b6d 100644 } }; diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h -index 240caa4e51..11bd05dfd5 100644 +index 2fad4df..f554b67 100644 --- a/hw/usb/hcd-xhci.h +++ b/hw/usb/hcd-xhci.h -@@ -154,6 +154,8 @@ typedef struct XHCIEvent { +@@ -157,6 +157,8 @@ typedef struct XHCIEvent { uint32_t flags; uint8_t slotid; uint8_t epid; @@ -687,7 +558,7 @@ index 240caa4e51..11bd05dfd5 100644 typedef struct XHCIInterrupter { diff --git a/include/hw/acpi/ich9.h b/include/hw/acpi/ich9.h -index 41568d1837..1a23ccc412 100644 +index 41568d1..1a23ccc 100644 --- a/include/hw/acpi/ich9.h +++ b/include/hw/acpi/ich9.h @@ -61,6 +61,9 @@ typedef struct ICH9LPCPMRegs { @@ -701,13 +572,16 @@ index 41568d1837..1a23ccc412 100644 #define ACPI_PM_PROP_TCO_ENABLED "enable_tco" diff --git a/include/hw/boards.h b/include/hw/boards.h -index e231860666..456e4a944c 100644 +index a71d1a5..521c625 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h -@@ -335,4 +335,22 @@ extern const size_t hw_compat_2_2_len; +@@ -362,4 +362,25 @@ extern const size_t hw_compat_2_2_len; extern GlobalProperty hw_compat_2_1[]; extern const size_t hw_compat_2_1_len; ++extern GlobalProperty hw_compat_rhel_8_0[]; ++extern const size_t hw_compat_rhel_8_0_len; ++ +extern GlobalProperty hw_compat_rhel_7_6[]; +extern const size_t hw_compat_rhel_7_6_len; + @@ -728,7 +602,7 @@ index e231860666..456e4a944c 100644 + #endif diff --git a/include/hw/usb.h b/include/hw/usb.h -index c21f41c8a9..71502b0bad 100644 +index c21f41c..71502b0 100644 --- a/include/hw/usb.h +++ b/include/hw/usb.h @@ -604,4 +604,8 @@ int usb_get_quirks(uint16_t vendor_id, uint16_t product_id, @@ -741,7 +615,7 @@ index c21f41c8a9..71502b0bad 100644 + #endif diff --git a/migration/migration.c b/migration/migration.c -index 609e0df5d0..a160172a0c 100644 +index 8a607fe..beffbfd 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -116,6 +116,8 @@ enum mig_rp_message_type { @@ -754,10 +628,10 @@ index 609e0df5d0..a160172a0c 100644 migrations at once. For now we don't need to add dynamic creation of migration */ diff --git a/migration/migration.h b/migration/migration.h -index 438f17edad..c793dcc50b 100644 +index 1fdd7b2..b89e901 100644 --- a/migration/migration.h +++ b/migration/migration.h -@@ -307,6 +307,11 @@ void init_dirty_bitmap_incoming_migration(void); +@@ -332,6 +332,11 @@ void init_dirty_bitmap_incoming_migration(void); void migrate_add_address(SocketAddress *address); int foreach_not_ignored_block(RAMBlockIterFunc func, void *opaque); @@ -770,5 +644,5 @@ index 438f17edad..c793dcc50b 100644 #define qemu_ram_foreach_block \ #warning "Use foreach_not_ignored_block in migration code" -- -2.20.1 +1.8.3.1 diff --git a/0007-Add-aarch64-machine-types.patch b/0007-Add-aarch64-machine-types.patch index 374c94c..4195926 100644 --- a/0007-Add-aarch64-machine-types.patch +++ b/0007-Add-aarch64-machine-types.patch @@ -1,4 +1,4 @@ -From b2c73bd35f8c0fa536004d18275ffcfe63096622 Mon Sep 17 00:00:00 2001 +From 47a1c8ecb7b0b3846fe5fcefcbb912cd31d291c7 Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Fri, 19 Oct 2018 12:53:31 +0200 Subject: Add aarch64 machine types @@ -7,28 +7,31 @@ Adding changes to add RHEL machine types for aarch64 architecture. Signed-off-by: Miroslav Rezanina -Rebase changes (weekly-190111): +Rebase changes (4.0.0): - Use upstream compat handling -Rebase changes (weekly-190308): +Rebase changes (4.1.0-rc0): - Removed a15memmap (upstream) +- Use virt_flash_create in rhel800_virt_instance_init -Merged patches (weekly-190125): +Merged patches (4.0.0): - 7bfdb4c aarch64: Add virt-rhel8.0.0 machine type for ARM - 3433e69 aarch64: Set virt-rhel8.0.0 max_cpus to 512 - 4d20863 aarch64: Use 256MB ECAM region by default -Signed-off-by: Danilo C. L. de Paula +Merged patches (4.1.0-rc0): +- c3e39ef aarch64: Add virt-rhel8.1.0 machine type for ARM +- 59a46d1 aarch64: Allow ARM VIRT iommu option in RHEL8.1 machine --- - hw/arm/virt.c | 140 +++++++++++++++++++++++++++++++++++++++++- + hw/arm/virt.c | 144 +++++++++++++++++++++++++++++++++++++++++++++++++- include/hw/arm/virt.h | 11 ++++ - 2 files changed, 150 insertions(+), 1 deletion(-) + 2 files changed, 154 insertions(+), 1 deletion(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c -index ce2664a30b..5602d9f6b0 100644 +index d9496c9..51fb5f8 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c -@@ -62,6 +62,7 @@ +@@ -65,6 +65,7 @@ #include "hw/acpi/acpi.h" #include "target/arm/internals.h" @@ -36,7 +39,7 @@ index ce2664a30b..5602d9f6b0 100644 #define DEFINE_VIRT_MACHINE_LATEST(major, minor, latest) \ static void virt_##major##_##minor##_class_init(ObjectClass *oc, \ void *data) \ -@@ -88,7 +89,49 @@ +@@ -91,7 +92,49 @@ DEFINE_VIRT_MACHINE_LATEST(major, minor, true) #define DEFINE_VIRT_MACHINE(major, minor) \ DEFINE_VIRT_MACHINE_LATEST(major, minor, false) @@ -87,7 +90,7 @@ index ce2664a30b..5602d9f6b0 100644 /* Number of external interrupt lines to configure the GIC with */ #define NUM_IRQS 256 -@@ -1658,6 +1701,7 @@ static void machvirt_init(MachineState *machine) +@@ -1722,6 +1765,7 @@ static void machvirt_init(MachineState *machine) qemu_add_machine_init_done_notifier(&vms->machine_done); } @@ -95,7 +98,7 @@ index ce2664a30b..5602d9f6b0 100644 static bool virt_get_secure(Object *obj, Error **errp) { VirtMachineState *vms = VIRT_MACHINE(obj); -@@ -1686,6 +1730,7 @@ static void virt_set_virt(Object *obj, bool value, Error **errp) +@@ -1750,6 +1794,7 @@ static void virt_set_virt(Object *obj, bool value, Error **errp) vms->virt = value; } @@ -103,23 +106,7 @@ index ce2664a30b..5602d9f6b0 100644 static bool virt_get_highmem(Object *obj, Error **errp) { VirtMachineState *vms = VIRT_MACHINE(obj); -@@ -1740,6 +1785,7 @@ static void virt_set_gic_version(Object *obj, const char *value, Error **errp) - } - } - -+#if 0 /* Disabled for Red Hat Enterprise Linux */ - static char *virt_get_iommu(Object *obj, Error **errp) - { - VirtMachineState *vms = VIRT_MACHINE(obj); -@@ -1767,6 +1813,7 @@ static void virt_set_iommu(Object *obj, const char *value, Error **errp) - error_append_hint(errp, "Valid values are none, smmuv3.\n"); - } - } -+#endif /* disabled for RHEL */ - - static CpuInstanceProperties - virt_cpu_index_to_props(MachineState *ms, unsigned cpu_index) -@@ -1806,6 +1853,7 @@ static const CPUArchIdList *virt_possible_cpu_arch_ids(MachineState *ms) +@@ -1871,6 +1916,7 @@ static const CPUArchIdList *virt_possible_cpu_arch_ids(MachineState *ms) return ms->possible_cpus; } @@ -127,7 +114,7 @@ index ce2664a30b..5602d9f6b0 100644 static void virt_machine_device_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) { -@@ -2071,3 +2119,93 @@ static void virt_machine_2_6_options(MachineClass *mc) +@@ -2146,3 +2192,99 @@ static void virt_machine_2_6_options(MachineClass *mc) vmc->no_pmu = true; } DEFINE_VIRT_MACHINE(2, 6) @@ -170,7 +157,7 @@ index ce2664a30b..5602d9f6b0 100644 +} +type_init(rhel_machine_init); + -+static void rhel800_virt_instance_init(Object *obj) ++static void rhel810_virt_instance_init(Object *obj) +{ + VirtMachineState *vms = VIRT_MACHINE(obj); + VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms); @@ -210,22 +197,28 @@ index ce2664a30b..5602d9f6b0 100644 + NULL); + } + -+ /* IOMMU is disabled by default and non-configurable for RHEL */ ++ /* Default disallows iommu instantiation */ + vms->iommu = VIRT_IOMMU_NONE; ++ object_property_add_str(obj, "iommu", virt_get_iommu, virt_set_iommu, NULL); ++ object_property_set_description(obj, "iommu", ++ "Set the IOMMU type. " ++ "Valid values are none and smmuv3", ++ NULL); + + vms->irqmap=a15irqmap; ++ virt_flash_create(vms); +} + -+static void rhel800_virt_options(MachineClass *mc) ++static void rhel810_virt_options(MachineClass *mc) +{ + compat_props_add(mc->compat_props, arm_rhel_compat, arm_rhel_compat_len); +} -+DEFINE_RHEL_MACHINE_AS_LATEST(8, 0, 0) ++DEFINE_RHEL_MACHINE_AS_LATEST(8, 1, 0) diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h -index 507517c603..e49f872b1c 100644 +index a720942..1baa48d 100644 --- a/include/hw/arm/virt.h +++ b/include/hw/arm/virt.h -@@ -136,6 +136,7 @@ typedef struct { +@@ -137,6 +137,7 @@ typedef struct { #define VIRT_ECAM_ID(high) (high ? VIRT_HIGH_PCIE_ECAM : VIRT_PCIE_ECAM) @@ -233,7 +226,7 @@ index 507517c603..e49f872b1c 100644 #define TYPE_VIRT_MACHINE MACHINE_TYPE_NAME("virt") #define VIRT_MACHINE(obj) \ OBJECT_CHECK(VirtMachineState, (obj), TYPE_VIRT_MACHINE) -@@ -144,6 +145,16 @@ typedef struct { +@@ -145,6 +146,16 @@ typedef struct { #define VIRT_MACHINE_CLASS(klass) \ OBJECT_CLASS_CHECK(VirtMachineClass, klass, TYPE_VIRT_MACHINE) @@ -251,5 +244,5 @@ index 507517c603..e49f872b1c 100644 /* Return the number of used redistributor regions */ -- -2.20.1 +1.8.3.1 diff --git a/0008-Add-ppc64-machine-types.patch b/0008-Add-ppc64-machine-types.patch index 3463404..be2cde0 100644 --- a/0008-Add-ppc64-machine-types.patch +++ b/0008-Add-ppc64-machine-types.patch @@ -1,4 +1,4 @@ -From 373a3f8f11227ba6bce10dab17ddfb6caffc75cf Mon Sep 17 00:00:00 2001 +From 9c73e7109477fecb0477bd6d53e94080eca30e64 Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Fri, 19 Oct 2018 13:27:13 +0200 Subject: Add ppc64 machine types @@ -7,51 +7,53 @@ Adding changes to add RHEL machine types for ppc64 architecture. Signed-off-by: Miroslav Rezanina -Rebase changes (weekly-190111): +Rebase changes (4.0.0): - remove instance options and use upstream solution - Use upstream compat handling - Replace SPAPR_PCI_2_7_MMIO_WIN_SIZE with value (changed upstream) - -Rebase changes (weekly-190104): - re-add handling of instance_options (removed upstream) - Use p8 as default for rhel machine types (p9 default upstream) - -Rebase changes (weekly-190315): - sPAPRMachineClass renamed to SpaprMachineClass (upstream) -Merged patches (weekly-190104): +Rebase changes (4.1.0-rc2): +- Update format for compat structures + +Merged patches (4.0.0): - 467d59a redhat: define pseries-rhel8.0.0 machine type -Signed-off-by: Danilo C. L. de Paula +Merged patches (4.1.0-rc0): +- f21757edc target/ppc/spapr: Enable mitigations by default for pseries-4.0 machine type +- 2511c63 redhat: sync pseries-rhel7.6.0 with rhel-av-8.0.1 +- 89f01da redhat: define pseries-rhel8.1.0 machine type --- - hw/ppc/spapr.c | 252 ++++++++++++++++++++++++++++++++++++++++ + hw/ppc/spapr.c | 243 ++++++++++++++++++++++++++++++++++++++++++++++++ hw/ppc/spapr_cpu_core.c | 13 +++ include/hw/ppc/spapr.h | 1 + target/ppc/compat.c | 13 ++- target/ppc/cpu.h | 1 + - 5 files changed, 279 insertions(+), 1 deletion(-) + 5 files changed, 270 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c -index b52b82d298..daa59203ea 100644 +index 821f0d4..ab64d43 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c -@@ -4300,6 +4300,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data) +@@ -4382,6 +4382,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data) spapr_caps_add_properties(smc, &error_abort); - smc->irq = &spapr_irq_xics; + smc->irq = &spapr_irq_dual; smc->dr_phb_enabled = true; + smc->has_power9_support = true; } static const TypeInfo spapr_machine_info = { -@@ -4344,6 +4345,7 @@ static const TypeInfo spapr_machine_info = { +@@ -4426,6 +4427,7 @@ static const TypeInfo spapr_machine_info = { } \ type_init(spapr_machine_register_##suffix) +#if 0 /* Disabled for Red Hat Enterprise Linux */ /* - * pseries-4.0 + * pseries-4.1 */ -@@ -4499,6 +4501,7 @@ DEFINE_SPAPR_MACHINE(2_8, "2.8", false); +@@ -4609,6 +4611,7 @@ DEFINE_SPAPR_MACHINE(2_8, "2.8", false); /* * pseries-2.7 */ @@ -59,30 +61,54 @@ index b52b82d298..daa59203ea 100644 static void phb_placement_2_7(SpaprMachineState *spapr, uint32_t index, uint64_t *buid, hwaddr *pio, -@@ -4549,6 +4552,7 @@ static void phb_placement_2_7(SpaprMachineState *spapr, uint32_t index, - */ +@@ -4663,6 +4666,7 @@ static void phb_placement_2_7(SpaprMachineState *spapr, uint32_t index, + *nv2atsd = 0; } +#if 0 /* Disabled for Red Hat Enterprise Linux */ static void spapr_machine_2_7_class_options(MachineClass *mc) { SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc); -@@ -4663,6 +4667,254 @@ static void spapr_machine_2_1_class_options(MachineClass *mc) +@@ -4777,6 +4781,245 @@ static void spapr_machine_2_1_class_options(MachineClass *mc) compat_props_add(mc->compat_props, hw_compat_2_1, hw_compat_2_1_len); } DEFINE_SPAPR_MACHINE(2_1, "2.1", false); +#endif + +/* ++ * pseries-rhel8.1.0 ++ */ ++ ++static void spapr_machine_rhel810_class_options(MachineClass *mc) ++{ ++ /* Defaults for the latest behaviour inherited from the base class */ ++} ++ ++DEFINE_SPAPR_MACHINE(rhel810, "rhel8.1.0", true); ++ ++/* + * pseries-rhel8.0.0 ++ * like spapr_compat_3_1 ++ * except SPAPR_CAP_CFPC, SPAPR_CAP_SBBC and SPAPR_CAP_IBS ++ * that have been backported to pseries-rhel8.0.0 + */ + +static void spapr_machine_rhel800_class_options(MachineClass *mc) +{ -+ /* Defaults for the latest behaviour inherited from the base class */ ++ SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc); ++ ++ spapr_machine_rhel810_class_options(mc); ++ compat_props_add(mc->compat_props, hw_compat_rhel_8_0, ++ hw_compat_rhel_8_0_len); ++ ++ mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power8_v2.0"); ++ smc->update_dt_enabled = false; ++ smc->dr_phb_enabled = false; ++ smc->broken_host_serial_model = true; ++ smc->default_caps.caps[SPAPR_CAP_LARGE_DECREMENTER] = SPAPR_CAP_OFF; +} + -+DEFINE_SPAPR_MACHINE(rhel800, "rhel8.0.0", true); ++DEFINE_SPAPR_MACHINE(rhel800, "rhel8.0.0", false); + +/* + * pseries-rhel7.6.0 @@ -90,16 +116,8 @@ index b52b82d298..daa59203ea 100644 + * spapr_compat_0 is empty + */ +GlobalProperty spapr_compat_rhel7_6[] = { -+ { -+ .driver = TYPE_POWERPC_CPU, -+ .property = "pre-3.0-migration", -+ .value = "on", -+ }, -+ { -+ .driver = TYPE_SPAPR_CPU_CORE, -+ .property = "pre-3.0-migration", -+ .value = "on", -+ }, ++ { TYPE_POWERPC_CPU, "pre-3.0-migration", "on" }, ++ { TYPE_SPAPR_CPU_CORE, "pre-3.0-migration", "on" }, +}; +const size_t spapr_compat_rhel7_6_len = G_N_ELEMENTS(spapr_compat_rhel7_6); + @@ -123,8 +141,14 @@ index b52b82d298..daa59203ea 100644 + * yet. Postpone this to machine init (see default_caps_with_cpu()). + */ + smc->default_caps.caps[SPAPR_CAP_HPT_MAXPAGESIZE] = 0; -+ /* Defaults for the latest behaviour inherited from the base class */ -+ mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power8_v2.0"); ++ ++ /* SPAPR_CAP_WORKAROUND enabled in pseries-rhel800 by ++ * f21757edc554 ++ * "Enable mitigations by default for pseries-4.0 machine type") ++ */ ++ smc->default_caps.caps[SPAPR_CAP_CFPC] = SPAPR_CAP_BROKEN; ++ smc->default_caps.caps[SPAPR_CAP_SBBC] = SPAPR_CAP_BROKEN; ++ smc->default_caps.caps[SPAPR_CAP_IBS] = SPAPR_CAP_BROKEN; +} + +DEFINE_SPAPR_MACHINE(rhel760, "rhel7.6.0", false); @@ -179,11 +203,7 @@ index b52b82d298..daa59203ea 100644 + * like spapr_compat_2_9 + */ +GlobalProperty spapr_compat_rhel7_4[] = { -+ { -+ .driver = TYPE_POWERPC_CPU, -+ .property = "pre-2.10-migration", -+ .value = "on", -+ }, ++ { TYPE_POWERPC_CPU, "pre-2.10-migration", "on" }, +}; +const size_t spapr_compat_rhel7_4_len = G_N_ELEMENTS(spapr_compat_rhel7_4); + @@ -226,31 +246,11 @@ index b52b82d298..daa59203ea 100644 + * like spapr_compat_2_6/_2_7/_2_8 but "ddw" has been backported to RHEL7_3 + */ +GlobalProperty spapr_compat_rhel7_3[] = { -+ { -+ .driver = TYPE_SPAPR_PCI_HOST_BRIDGE, -+ .property = "mem_win_size", -+ .value = "0xf80000000", -+ }, -+ { -+ .driver = TYPE_SPAPR_PCI_HOST_BRIDGE, -+ .property = "mem64_win_size", -+ .value = "0", -+ }, -+ { -+ .driver = TYPE_POWERPC_CPU, -+ .property = "pre-2.8-migration", -+ .value = "on", -+ }, -+ { -+ .driver = TYPE_SPAPR_PCI_HOST_BRIDGE, -+ .property = "pre-2.8-migration", -+ .value = "on", -+ }, -+ { -+ .driver = TYPE_SPAPR_PCI_HOST_BRIDGE, -+ .property = "pcie-extended-configuration-space", -+ .value = "off", -+ }, ++ { TYPE_SPAPR_PCI_HOST_BRIDGE, "mem_win_size", "0xf80000000" }, ++ { TYPE_SPAPR_PCI_HOST_BRIDGE, "mem64_win_size", "0" }, ++ { TYPE_POWERPC_CPU, "pre-2.8-migration", "on" }, ++ { TYPE_SPAPR_PCI_HOST_BRIDGE, "pre-2.8-migration", "on" }, ++ { TYPE_SPAPR_PCI_HOST_BRIDGE, "pcie-extended-configuration-space", "off" }, +}; +const size_t spapr_compat_rhel7_3_len = G_N_ELEMENTS(spapr_compat_rhel7_3); + @@ -295,15 +295,8 @@ index b52b82d298..daa59203ea 100644 + */ + +GlobalProperty spapr_compat_rhel7_2[] = { -+ { -+ .driver = "spapr-vlan", -+ .property = "use-rx-buffer-pools", -+ .value = "off", -+ },{ -+ .driver = TYPE_SPAPR_PCI_HOST_BRIDGE, -+ .property = "ddw", -+ .value = "off", -+ }, ++ { "spapr-vlan", "use-rx-buffer-pools", "off" }, ++ { TYPE_SPAPR_PCI_HOST_BRIDGE, "ddw", "off" }, +}; +const size_t spapr_compat_rhel7_2_len = G_N_ELEMENTS(spapr_compat_rhel7_2); + @@ -323,7 +316,7 @@ index b52b82d298..daa59203ea 100644 static void spapr_machine_register_types(void) { diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c -index c664969b5b..7556debbef 100644 +index b91a106..29a3c7d 100644 --- a/hw/ppc/spapr_cpu_core.c +++ b/hw/ppc/spapr_cpu_core.c @@ -21,6 +21,7 @@ @@ -334,7 +327,7 @@ index c664969b5b..7556debbef 100644 static void spapr_cpu_reset(void *opaque) { -@@ -222,6 +223,7 @@ static void spapr_realize_vcpu(PowerPCCPU *cpu, SpaprMachineState *spapr, +@@ -224,6 +225,7 @@ static void spapr_realize_vcpu(PowerPCCPU *cpu, SpaprMachineState *spapr, CPUPPCState *env = &cpu->env; CPUState *cs = CPU(cpu); Error *local_err = NULL; @@ -342,7 +335,7 @@ index c664969b5b..7556debbef 100644 object_property_set_bool(OBJECT(cpu), true, "realized", &local_err); if (local_err) { -@@ -234,6 +236,17 @@ static void spapr_realize_vcpu(PowerPCCPU *cpu, SpaprMachineState *spapr, +@@ -236,6 +238,17 @@ static void spapr_realize_vcpu(PowerPCCPU *cpu, SpaprMachineState *spapr, cpu_ppc_set_vhyp(cpu, PPC_VIRTUAL_HYPERVISOR(spapr)); kvmppc_set_papr(cpu); @@ -361,19 +354,19 @@ index c664969b5b..7556debbef 100644 spapr_cpu_reset(cpu); diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h -index 5ea8081041..8737516ada 100644 +index 60553d3..b0ba32e 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h -@@ -120,6 +120,7 @@ struct SpaprMachineClass { - bool legacy_irq_allocation; +@@ -121,6 +121,7 @@ struct SpaprMachineClass { bool broken_host_serial_model; /* present real host info to the guest */ + bool pre_4_1_migration; /* don't migrate hpt-max-page-size */ + bool has_power9_support; void (*phb_placement)(SpaprMachineState *spapr, uint32_t index, uint64_t *buid, hwaddr *pio, hwaddr *mmio32, hwaddr *mmio64, diff --git a/target/ppc/compat.c b/target/ppc/compat.c -index 7de4bf3122..3e2e35342d 100644 +index 7de4bf3..3e2e353 100644 --- a/target/ppc/compat.c +++ b/target/ppc/compat.c @@ -105,8 +105,19 @@ static const CompatInfo *compat_by_pvr(uint32_t pvr) @@ -398,10 +391,10 @@ index 7de4bf3122..3e2e35342d 100644 const CompatInfo *compat = compat_by_pvr(compat_pvr); const CompatInfo *min = compat_by_pvr(min_compat_pvr); diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h -index 0707177584..60cc41fd53 100644 +index c9beba2..76cb7c2 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h -@@ -1381,6 +1381,7 @@ static inline int cpu_mmu_index (CPUPPCState *env, bool ifetch) +@@ -1350,6 +1350,7 @@ static inline int cpu_mmu_index(CPUPPCState *env, bool ifetch) /* Compatibility modes */ #if defined(TARGET_PPC64) @@ -410,5 +403,5 @@ index 0707177584..60cc41fd53 100644 uint32_t min_compat_pvr, uint32_t max_compat_pvr); bool ppc_type_check_compat(const char *cputype, uint32_t compat_pvr, -- -2.20.1 +1.8.3.1 diff --git a/0009-Add-s390x-machine-types.patch b/0009-Add-s390x-machine-types.patch index 206c29b..767272b 100644 --- a/0009-Add-s390x-machine-types.patch +++ b/0009-Add-s390x-machine-types.patch @@ -1,4 +1,4 @@ -From 4f7991558861584776c7c61dd56f339ed453372d Mon Sep 17 00:00:00 2001 +From e9de3d4a98a79e820be14e2a752e2ebb20e341d4 Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Fri, 19 Oct 2018 13:47:32 +0200 Subject: Add s390x machine types @@ -13,19 +13,17 @@ Rebase changes (weekly-190111): Merged patches (3.1.0): - 29df663 s390x/cpumodel: default enable bpb and ppa15 for z196 and later -Merged patches (weekly-190118): +Merged patches (4.1.0-rc0): - 6c200d665b hw/s390x/s390-virtio-ccw: Add machine types for RHEL8.0.0 - -Signed-off-by: Danilo C. L. de Paula --- - hw/s390x/s390-virtio-ccw.c | 73 +++++++++++++++++++++++++++++++++++++- - 1 file changed, 72 insertions(+), 1 deletion(-) + hw/s390x/s390-virtio-ccw.c | 67 +++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c -index d11069b860..8c672dfd02 100644 +index 5b6a9a4..4d8c2ec 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c -@@ -622,7 +622,7 @@ bool css_migration_enabled(void) +@@ -636,7 +636,7 @@ bool css_migration_enabled(void) { \ MachineClass *mc = MACHINE_CLASS(oc); \ ccw_machine_##suffix##_class_options(mc); \ @@ -34,22 +32,19 @@ index d11069b860..8c672dfd02 100644 if (latest) { \ mc->alias = "s390-ccw-virtio"; \ mc->is_default = 1; \ -@@ -646,6 +646,9 @@ bool css_migration_enabled(void) +@@ -660,6 +660,7 @@ bool css_migration_enabled(void) } \ type_init(ccw_machine_register_##suffix) -+ +#if 0 /* Disabled for Red Hat Enterprise Linux */ -+ - static void ccw_machine_4_0_instance_options(MachineState *machine) + static void ccw_machine_4_1_instance_options(MachineState *machine) { } -@@ -846,6 +849,74 @@ static void ccw_machine_2_4_class_options(MachineClass *mc) +@@ -873,6 +874,70 @@ static void ccw_machine_2_4_class_options(MachineClass *mc) + compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat)); } DEFINE_CCW_MACHINE(2_4, "2.4", false); - -+#else -+ ++#endif +/* + * like CCW_COMPAT_2_12 + CCW_COMPAT_3_0 (which are empty), but includes + * HW_COMPAT_RHEL7_6 instead of HW_COMPAT_2_11 and HW_COMPAT_3_0 @@ -113,12 +108,9 @@ index d11069b860..8c672dfd02 100644 + S390_MACHINE_CLASS(mc)->hpage_1m_allowed = false; +} +DEFINE_CCW_MACHINE(rhel750, "rhel7.5.0", false); -+ -+#endif -+ + static void ccw_machine_register_types(void) { - type_register_static(&ccw_machine_info); -- -2.20.1 +1.8.3.1 diff --git a/0010-Add-x86_64-machine-types.patch b/0010-Add-x86_64-machine-types.patch index 92d8384..0a6f333 100644 --- a/0010-Add-x86_64-machine-types.patch +++ b/0010-Add-x86_64-machine-types.patch @@ -1,4 +1,4 @@ -From 3c0a8f41da22fe3b88b6f4811b58b0fec6d09d8e Mon Sep 17 00:00:00 2001 +From 83831de11704d0f48ab56fec1f434ae9396e9cc1 Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Fri, 19 Oct 2018 13:10:31 +0200 Subject: Add x86_64 machine types @@ -7,40 +7,40 @@ Adding changes to add RHEL machine types for x86_64 architecture. Signed-off-by: Miroslav Rezanina -Rebase changes (weekly-190111): +Rebase changes (qemu-4.0.0): - Use upstream compat handling Rebase notes (3.1.0): - Removed xsave changes -Merged patches (weekly-190104): +Rebase notes (4.1.0-rc2): +- Updated format for compat structures + +Merged patches (4.1.0-rc0): - f4dc802 pc: 7.5 compat entries - 456ed3e pc: PC_RHEL7_6_COMPAT - 04119ee pc: Add compat for pc-i440fx-rhel7.6.0 machine type - b3b3687 pc: Add pc-q35-8.0.0 machine type - 8d46fc6 pc: Add x-migrate-smi-count=off to PC_RHEL7_6_COMPAT - 1de7949 kvm: clear out KVM_ASYNC_PF_DELIVERY_AS_PF_VMEXIT for older machine types - -Merged patches (weekly-190301): - 18cf0d7 target/i386: Disable MPX support on named CPU models (partialy) - -Signed-off-by: Danilo C. L. de Paula +- 2660667 rhel: Set host-phys-bits-limit=48 on rhel machine-types --- hw/i386/acpi-build.c | 3 + - hw/i386/pc.c | 645 ++++++++++++++++++++++++++++++++++++++++++- - hw/i386/pc_piix.c | 200 +++++++++++++- - hw/i386/pc_q35.c | 114 +++++++- + hw/i386/pc.c | 226 ++++++++++++++++++++++++++++++++++++++++++++++++++- + hw/i386/pc_piix.c | 200 ++++++++++++++++++++++++++++++++++++++++++++- + hw/i386/pc_q35.c | 114 +++++++++++++++++++++++++- include/hw/boards.h | 2 + - include/hw/i386/pc.h | 27 ++ + include/hw/i386/pc.h | 27 ++++++ target/i386/cpu.c | 9 +- target/i386/kvm.c | 4 + - 8 files changed, 997 insertions(+), 7 deletions(-) + 8 files changed, 578 insertions(+), 7 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c -index 416da318ae..4cad5645b2 100644 +index f3fdfef..1d64f0b 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c -@@ -190,6 +190,9 @@ static void acpi_get_pm_info(AcpiPmInfo *pm) +@@ -203,6 +203,9 @@ static void acpi_get_pm_info(MachineState *machine, AcpiPmInfo *pm) pm->fadt.reset_reg = r; pm->fadt.reset_val = 0xf; pm->fadt.flags |= 1 << ACPI_FADT_F_RESET_REG_SUP; @@ -49,12 +49,12 @@ index 416da318ae..4cad5645b2 100644 + pm->fadt.rev = 1; pm->cpu_hp_io_base = ICH9_CPU_HOTPLUG_IO_BASE; } - assert(obj); + diff --git a/hw/i386/pc.c b/hw/i386/pc.c -index f2c15bf1f2..03497eed9a 100644 +index 549c437..9ded0db 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c -@@ -350,6 +350,643 @@ GlobalProperty pc_compat_1_4[] = { +@@ -354,6 +354,224 @@ GlobalProperty pc_compat_1_4[] = { }; const size_t pc_compat_1_4_len = G_N_ELEMENTS(pc_compat_1_4); @@ -63,16 +63,10 @@ index f2c15bf1f2..03497eed9a 100644 + * machine type. + */ +GlobalProperty pc_rhel_compat[] = { -+ { /* PC_RHEL_COMPAT */ -+ .driver = TYPE_X86_CPU, -+ .property = "host-phys-bits", -+ .value = "on", -+ }, -+ { /* PC_RHEL_COMPAT bz 1508330 */ -+ .driver = "vfio-pci", -+ .property = "x-no-geforce-quirks", -+ .value = "on", -+ }, ++ { TYPE_X86_CPU, "host-phys-bits", "on" }, ++ { TYPE_X86_CPU, "host-phys-bits-limit", "48" }, ++ /* bz 1508330 */ ++ { "vfio-pci", "x-no-geforce-quirks", "on" }, +}; +const size_t pc_rhel_compat_len = G_N_ELEMENTS(pc_rhel_compat); + @@ -83,51 +77,28 @@ index f2c15bf1f2..03497eed9a 100644 + * machine types irrespective of host. + */ +GlobalProperty pc_rhel_7_6_compat[] = { -+ { /* PC_RHEL7_6_COMPAT from PC_COMPAT_3_0 */ -+ .driver = TYPE_X86_CPU, -+ .property = "x-hv-synic-kvm-only", -+ .value = "on", -+ },{ /* PC_RHEL7_6_COMPAT from PC_COMPAT_3_0 */ -+ .driver = "Skylake-Server" "-" TYPE_X86_CPU, -+ .property = "pku", -+ .value = "off", -+ },{ /* PC_RHEL7_6_COMPAT from PC_COMPAT_3_0 */ -+ .driver = "Skylake-Server-IBRS" "-" TYPE_X86_CPU, -+ .property = "pku", -+ .value = "off", -+ },{ /* PC_RHEL7_6_COMPAT from PC_COMPAT_2_11 */ -+ .driver = TYPE_X86_CPU, -+ .property = "x-migrate-smi-count", -+ .value = "off", -+ },{ /* PC_RHEL7_6_COMPAT from pc_compat_3_1 */ -+ .driver = "Skylake-Client" "-" TYPE_X86_CPU, -+ .property = "mpx", -+ .value = "on", -+ },{ /* PC_RHEL7_6_COMPAT from pc_compat_3_1 */ -+ .driver = "Skylake-Client-IBRS" "-" TYPE_X86_CPU, -+ .property = "mpx", -+ .value = "on", -+ },{ /* PC_RHEL7_6_COMPAT from pc_compat_3_1 */ -+ .driver = "Skylake-Server" "-" TYPE_X86_CPU, -+ .property = "mpx", -+ .value = "on", -+ },{ /* PC_RHEL7_6_COMPAT from pc_compat_3_1 */ -+ .driver = "Skylake-Server-IBRS" "-" TYPE_X86_CPU, -+ .property = "mpx", -+ .value = "on", -+ },{ /* PC_RHEL7_6_COMPAT from pc_compat_3_1 */ -+ .driver = "Cascadelake-Server" "-" TYPE_X86_CPU, -+ .property = "mpx", -+ .value = "on", -+ },{ /* PC_RHEL7_6_COMPAT from pc_compat_3_1 */ -+ .driver = "Icelake-Client" "-" TYPE_X86_CPU, -+ .property = "mpx", -+ .value = "on", -+ },{ /* PC_RHEL7_6_COMPAT from pc_compat_3_1 */ -+ .driver = "Icelake-Server" "-" TYPE_X86_CPU, -+ .property = "mpx", -+ .value = "on", -+ }, ++ /* pc_rhel_7_6_compat from pc_compat_3_0 */ ++ { TYPE_X86_CPU, "x-hv-synic-kvm-only", "on" }, ++ /* pc_rhel_7_6_compat from pc_compat_3_0 */ ++ { "Skylake-Server" "-" TYPE_X86_CPU, "pku", "off" }, ++ /* pc_rhel_7_6_compat from pc_compat_3_0 */ ++ { "Skylake-Server-IBRS" "-" TYPE_X86_CPU, "pku", "off" }, ++ /* pc_rhel_7_6_compat from pc_compat_2_11 */ ++ { TYPE_X86_CPU, "x-migrate-smi-count", "off" }, ++ /* pc_rhel_7_6_compat from pc_compat_2_11 */ ++ { "Skylake-Client" "-" TYPE_X86_CPU, "mpx", "on" }, ++ /* pc_rhel_7_6_compat from pc_compat_2_11 */ ++ { "Skylake-Client-IBRS" "-" TYPE_X86_CPU, "mpx", "on" }, ++ /* pc_rhel_7_6_compat from pc_compat_2_11 */ ++ { "Skylake-Server" "-" TYPE_X86_CPU, "mpx", "on" }, ++ /* pc_rhel_7_6_compat from pc_compat_2_11 */ ++ { "Skylake-Server-IBRS" "-" TYPE_X86_CPU, "mpx", "on" }, ++ /* pc_rhel_7_6_compat from pc_compat_2_11 */ ++ { "Cascadelake-Server" "-" TYPE_X86_CPU, "mpx", "on" }, ++ /* pc_rhel_7_6_compat from pc_compat_2_11 */ ++ { "Icelake-Client" "-" TYPE_X86_CPU, "mpx", "on" }, ++ /* pc_rhel_7_6_compat from pc_compat_2_11 */ ++ { "Icelake-Server" "-" TYPE_X86_CPU, "mpx", "on" }, +}; +const size_t pc_rhel_7_6_compat_len = G_N_ELEMENTS(pc_rhel_7_6_compat); + @@ -136,437 +107,131 @@ index f2c15bf1f2..03497eed9a 100644 + * - x-pci-hole64-fix was backported to 7.5 + */ +GlobalProperty pc_rhel_7_5_compat[] = { -+ { /* PC_RHEL7_5_COMPAT from PC_COMPAT_2_11 */ -+ .driver = "Skylake-Server" "-" TYPE_X86_CPU, -+ .property = "clflushopt", -+ .value = "off", -+ },{ /* PC_RHEL7_5_COMPAT from PC_COMPAT_2_12 */ -+ .driver = TYPE_X86_CPU, -+ .property = "legacy-cache", -+ .value = "on", -+ },{ /* PC_RHEL7_5_COMPAT from PC_COMPAT_2_12 */ -+ .driver = TYPE_X86_CPU, -+ .property = "topoext", -+ .value = "off", -+ },{ /* PC_RHEL7_5_COMPAT from PC_COMPAT_2_12 */ -+ .driver = "EPYC-" TYPE_X86_CPU, -+ .property = "xlevel", -+ .value = stringify(0x8000000a), -+ },{ /* PC_RHEL7_5_COMPAT from PC_COMPAT_2_12 */ -+ .driver = "EPYC-IBPB-" TYPE_X86_CPU, -+ .property = "xlevel", -+ .value = stringify(0x8000000a), -+ }, ++ /* pc_rhel_7_5_compat from pc_compat_2_11 */ ++ { "Skylake-Server" "-" TYPE_X86_CPU, "clflushopt", "off" }, ++ /* pc_rhel_7_5_compat from pc_compat_2_12 */ ++ { TYPE_X86_CPU, "legacy-cache", "on" }, ++ /* pc_rhel_7_5_compat from pc_compat_2_12 */ ++ { TYPE_X86_CPU, "topoext", "off" }, ++ /* pc_rhel_7_5_compat from pc_compat_2_12 */ ++ { "EPYC-" TYPE_X86_CPU, "xlevel", stringify(0x8000000a) }, ++ /* pc_rhel_7_5_compat from pc_compat_2_12 */ ++ { "EPYC-IBPB-" TYPE_X86_CPU, "xlevel", stringify(0x8000000a) }, +}; +const size_t pc_rhel_7_5_compat_len = G_N_ELEMENTS(pc_rhel_7_5_compat); + -+ +GlobalProperty pc_rhel_7_4_compat[] = { -+ { /* PC_RHEL7_4_COMPAT from PC_COMPAT_2_9 */ -+ .driver = "mch", -+ .property = "extended-tseg-mbytes", -+ .value = stringify(0), -+ }, -+ { /* PC_RHEL7_4_COMPAT bz 1489800 */ -+ .driver = "ICH9-LPC", -+ .property = "__com.redhat_force-rev1-fadt", -+ .value = "on", -+ }, -+ { /* PC_RHEL7_4_COMPAT from PC_COMPAT_2_10 */ -+ .driver = "i440FX-pcihost", -+ .property = "x-pci-hole64-fix", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_4_COMPAT from PC_COMPAT_2_10 */ -+ .driver = "q35-pcihost", -+ .property = "x-pci-hole64-fix", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_4_COMPAT from PC_COMPAT_2_10 */ -+ .driver = TYPE_X86_CPU, -+ .property = "x-hv-max-vps", -+ .value = "0x40", -+ }, ++ /* pc_rhel_7_4_compat from pc_compat_2_9 */ ++ { "mch", "extended-tseg-mbytes", stringify(0) }, ++ /* bz 1489800 */ ++ { "ICH9-LPC", "__com.redhat_force-rev1-fadt", "on" }, ++ /* pc_rhel_7_4_compat from pc_compat_2_10 */ ++ { "i440FX-pcihost", "x-pci-hole64-fix", "off" }, ++ /* pc_rhel_7_4_compat from pc_compat_2_10 */ ++ { "q35-pcihost", "x-pci-hole64-fix", "off" }, ++ /* pc_rhel_7_4_compat from pc_compat_2_10 */ ++ { TYPE_X86_CPU, "x-hv-max-vps", "0x40" }, +}; +const size_t pc_rhel_7_4_compat_len = G_N_ELEMENTS(pc_rhel_7_4_compat); + +GlobalProperty pc_rhel_7_3_compat[] = { -+ { /* PC_RHEL7_3_COMPAT from PC_COMPAT_2_8 */ -+ .driver = "kvmclock", -+ .property = "x-mach-use-reliable-get-clock", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_3_COMPAT from PC_COMPAT_2_7 */ -+ .driver = TYPE_X86_CPU, -+ .property = "l3-cache", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_3_COMPAT from PC_COMPAT_2_7 */ -+ .driver = TYPE_X86_CPU, -+ .property = "full-cpuid-auto-level", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_3_COMPAT from PC_COMPAT_2_7 */ -+ .driver = "Opteron_G3" "-" TYPE_X86_CPU, -+ .property = "family", -+ .value = "15", -+ }, -+ { /* PC_RHEL7_3_COMPAT from PC_COMPAT_2_7 */ -+ .driver = "Opteron_G3" "-" TYPE_X86_CPU, -+ .property = "model", -+ .value = "6", -+ }, -+ { /* PC_RHEL7_3_COMPAT from PC_COMPAT_2_7 */ -+ .driver = "Opteron_G3" "-" TYPE_X86_CPU, -+ .property = "stepping", -+ .value = "1", -+ }, -+ { /* PC_RHEL7_3_COMPAT from PC_COMPAT_2_7 */ -+ .driver = "isa-pcspk", -+ .property = "migrate", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_3_COMPAT from PC_COMPAT_2_6 */ -+ .driver = TYPE_X86_CPU, -+ .property = "cpuid-0xb", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_3_COMPAT from PC_COMPAT_2_8 */ -+ .driver = "ICH9-LPC", -+ .property = "x-smi-broadcast", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_3_COMPAT from PC_COMPAT_2_8 */ -+ .driver = TYPE_X86_CPU, -+ .property = "vmware-cpuid-freq", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_3_COMPAT from PC_COMPAT_2_8 */ -+ .driver = "Haswell-" TYPE_X86_CPU, -+ .property = "stepping", -+ .value = "1", -+ }, -+ {/* PC_RHEL7_3_COMPAT from PC_COMPAT_2_3 added in 2.9 */ -+ .driver = TYPE_X86_CPU, -+ .property = "kvm-no-smi-migration", -+ .value = "on", -+ }, ++ /* pc_rhel_7_3_compat from pc_compat_2_8 */ ++ { "kvmclock", "x-mach-use-reliable-get-clock", "off" }, ++ /* pc_rhel_7_3_compat from pc_compat_2_7 */ ++ { TYPE_X86_CPU, "l3-cache", "off" }, ++ /* pc_rhel_7_3_compat from pc_compat_2_7 */ ++ { TYPE_X86_CPU, "full-cpuid-auto-level", "off" }, ++ /* pc_rhel_7_3_compat from pc_compat_2_7 */ ++ { "Opteron_G3" "-" TYPE_X86_CPU, "family", "15" }, ++ /* pc_rhel_7_3_compat from pc_compat_2_7 */ ++ { "Opteron_G3" "-" TYPE_X86_CPU, "model", "6" }, ++ /* pc_rhel_7_3_compat from pc_compat_2_7 */ ++ { "Opteron_G3" "-" TYPE_X86_CPU, "stepping", "1" }, ++ /* pc_rhel_7_3_compat from pc_compat_2_7 */ ++ { "isa-pcspk", "migrate", "off" }, ++ /* pc_rhel_7_3_compat from pc_compat_2_6 */ ++ { TYPE_X86_CPU, "cpuid-0xb", "off" }, ++ /* pc_rhel_7_3_compat from pc_compat_2_8 */ ++ { "ICH9-LPC", "x-smi-broadcast", "off" }, ++ /* pc_rhel_7_3_compat from pc_compat_2_8 */ ++ { TYPE_X86_CPU, "vmware-cpuid-freq", "off" }, ++ /* pc_rhel_7_3_compat from pc_compat_2_8 */ ++ { "Haswell-" TYPE_X86_CPU, "stepping", "1" }, ++ /* pc_rhel_7_3_compat from pc_compat_2_3 added in 2.9*/ ++ { TYPE_X86_CPU, "kvm-no-smi-migration", "on" }, +}; +const size_t pc_rhel_7_3_compat_len = G_N_ELEMENTS(pc_rhel_7_3_compat); + +GlobalProperty pc_rhel_7_2_compat[] = { -+ { -+ .driver = "phenom" "-" TYPE_X86_CPU, -+ .property = "rdtscp", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_2_COMPAT */ -+ .driver = "qemu64" "-" TYPE_X86_CPU, -+ .property = "sse4a", -+ .value = "on", -+ }, -+ { /* PC_RHEL7_2_COMPAT */ -+ .driver = "qemu64" "-" TYPE_X86_CPU, -+ .property = "abm", -+ .value = "on", -+ }, -+ { /* PC_RHEL7_2_COMPAT */ -+ .driver = "Haswell-" TYPE_X86_CPU, -+ .property = "abm", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_2_COMPAT (copied from the entry above) */ -+ .driver = "Haswell-IBRS" "-" TYPE_X86_CPU, -+ .property = "abm", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_2_COMPAT */ -+ .driver = "Haswell-noTSX-" TYPE_X86_CPU, -+ .property = "abm", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_2_COMPAT (copied from the entry above) */ -+ .driver = "Haswell-noTSX-IBRS" "-" TYPE_X86_CPU, -+ .property = "abm", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_2_COMPAT */ -+ .driver = "Broadwell-" TYPE_X86_CPU, -+ .property = "abm", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_2_COMPAT (copied from the entry above) */ -+ .driver = "Broadwell-IBRS" "-" TYPE_X86_CPU, -+ .property = "abm", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_2_COMPAT */ -+ .driver = "Broadwell-noTSX-" TYPE_X86_CPU, -+ .property = "abm", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_2_COMPAT (copied from the entry above) */ -+ .driver = "Broadwell-noTSX-IBRS" "-" TYPE_X86_CPU, -+ .property = "abm", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_2_COMPAT */ -+ .driver = "host" "-" TYPE_X86_CPU, -+ .property = "host-cache-info", -+ .value = "on", -+ }, -+ { /* PC_RHEL7_2_COMPAT */ -+ .driver = TYPE_X86_CPU, -+ .property = "check", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_2_COMPAT */ -+ .driver = "qemu32" "-" TYPE_X86_CPU, -+ .property = "popcnt", -+ .value = "on", -+ }, -+ { /* PC_RHEL7_2_COMPAT */ -+ .driver = TYPE_X86_CPU, -+ .property = "arat", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_2_COMPAT */ -+ .driver = "usb-redir", -+ .property = "streams", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_2_COMPAT */ -+ .driver = TYPE_X86_CPU, -+ .property = "fill-mtrr-mask", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_2_COMPAT */ -+ .driver = "apic-common", -+ .property = "legacy-instance-id", -+ .value = "on", -+ }, ++ { "phenom" "-" TYPE_X86_CPU, "rdtscp", "off"}, ++ { "qemu64" "-" TYPE_X86_CPU, "sse4a", "on" }, ++ { "qemu64" "-" TYPE_X86_CPU, "abm", "on" }, ++ { "Haswell-" TYPE_X86_CPU, "abm", "off" }, ++ { "Haswell-IBRS" "-" TYPE_X86_CPU, "abm", "off" }, ++ { "Haswell-noTSX-" TYPE_X86_CPU, "abm", "off" }, ++ { "Haswell-noTSX-IBRS" "-" TYPE_X86_CPU, "abm", "off" }, ++ { "Broadwell-" TYPE_X86_CPU, "abm", "off" }, ++ { "Broadwell-IBRS" "-" TYPE_X86_CPU, "abm", "off" }, ++ { "Broadwell-noTSX-" TYPE_X86_CPU, "abm", "off" }, ++ { "Broadwell-noTSX-IBRS" "-" TYPE_X86_CPU, "abm", "off" }, ++ { "host" "-" TYPE_X86_CPU, "host-cache-info", "on" }, ++ { TYPE_X86_CPU, "check", "off" }, ++ { "qemu32" "-" TYPE_X86_CPU, "popcnt", "on" }, ++ { TYPE_X86_CPU, "arat", "off" }, ++ { "usb-redir", "streams", "off" }, ++ { TYPE_X86_CPU, "fill-mtrr-mask", "off" }, ++ { "apic-common", "legacy-instance-id", "on" }, +}; +const size_t pc_rhel_7_2_compat_len = G_N_ELEMENTS(pc_rhel_7_2_compat); + +GlobalProperty pc_rhel_7_1_compat[] = { -+ { -+ .driver = "kvm64" "-" TYPE_X86_CPU, -+ .property = "vme", -+ .value = "off", -+ }, -+ { -+ .driver = "kvm32" "-" TYPE_X86_CPU, -+ .property = "vme", -+ .value = "off", -+ }, -+ { -+ .driver = "Conroe" "-" TYPE_X86_CPU, -+ .property = "vme", -+ .value = "off", -+ }, -+ { -+ .driver = "Penryn" "-" TYPE_X86_CPU, -+ .property = "vme", -+ .value = "off", -+ }, -+ { -+ .driver = "Nehalem" "-" TYPE_X86_CPU, -+ .property = "vme", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_1_COMPAT (copied from the entry above) */ -+ .driver = "Nehalem-IBRS" "-" TYPE_X86_CPU, -+ .property = "vme", -+ .value = "off", -+ }, -+ { -+ .driver = "Westmere" "-" TYPE_X86_CPU, -+ .property = "vme", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_1_COMPAT (copied from the entry above) */ -+ .driver = "Westmere-IBRS" "-" TYPE_X86_CPU, -+ .property = "vme", -+ .value = "off", -+ }, -+ { -+ .driver = "SandyBridge" "-" TYPE_X86_CPU, -+ .property = "vme", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_1_COMPAT (copied from the entry above) */ -+ .driver = "SandyBridge-IBRS" "-" TYPE_X86_CPU, -+ .property = "vme", -+ .value = "off", -+ }, -+ { -+ .driver = "Haswell" "-" TYPE_X86_CPU, -+ .property = "vme", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_1_COMPAT (copied from the entry above) */ -+ .driver = "Haswell-IBRS" "-" TYPE_X86_CPU, -+ .property = "vme", -+ .value = "off", -+ }, -+ { -+ .driver = "Broadwell" "-" TYPE_X86_CPU, -+ .property = "vme", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_1_COMPAT (copied from the entry above) */ -+ .driver = "Broadwell-IBRS" "-" TYPE_X86_CPU, -+ .property = "vme", -+ .value = "off", -+ }, -+ { -+ .driver = "Opteron_G1" "-" TYPE_X86_CPU, -+ .property = "vme", -+ .value = "off", -+ }, -+ { -+ .driver = "Opteron_G2" "-" TYPE_X86_CPU, -+ .property = "vme", -+ .value = "off", -+ }, -+ { -+ .driver = "Opteron_G3" "-" TYPE_X86_CPU, -+ .property = "vme", -+ .value = "off", -+ }, -+ { -+ .driver = "Opteron_G4" "-" TYPE_X86_CPU, -+ .property = "vme", -+ .value = "off", -+ }, -+ { -+ .driver = "Opteron_G5" "-" TYPE_X86_CPU, -+ .property = "vme", -+ .value = "off", -+ }, -+ { -+ .driver = "Haswell" "-" TYPE_X86_CPU, -+ .property = "f16c", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_1_COMPAT (copied from the entry above) */ -+ .driver = "Haswell-IBRS" "-" TYPE_X86_CPU, -+ .property = "f16c", -+ .value = "off", -+ }, -+ { -+ .driver = "Haswell" "-" TYPE_X86_CPU, -+ .property = "rdrand", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_1_COMPAT (copied from the entry above) */ -+ .driver = "Haswell-IBRS" "-" TYPE_X86_CPU, -+ .property = "rdrand", -+ .value = "off", -+ }, -+ { -+ .driver = "Broadwell" "-" TYPE_X86_CPU, -+ .property = "f16c", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_1_COMPAT (copied from the entry above) */ -+ .driver = "Broadwell-IBRS" "-" TYPE_X86_CPU, -+ .property = "f16c", -+ .value = "off", -+ }, -+ { -+ .driver = "Broadwell" "-" TYPE_X86_CPU, -+ .property = "rdrand", -+ .value = "off", -+ }, -+ { /* PC_RHEL7_1_COMPAT (copied from the entry above) */ -+ .driver = "Broadwell-IBRS" "-" TYPE_X86_CPU, -+ .property = "rdrand", -+ .value = "off", -+ }, -+ { -+ .driver = "coreduo" "-" TYPE_X86_CPU, -+ .property = "vmx", -+ .value = "on", -+ }, -+ { -+ .driver = "core2duo" "-" TYPE_X86_CPU, -+ .property = "vmx", -+ .value = "on", -+ }, -+ { /* PC_RHEL7_1_COMPAT */ -+ .driver = "qemu64" "-" TYPE_X86_CPU, -+ .property = "min-level", -+ .value = stringify(4), -+ },{ /* PC_RHEL7_1_COMPAT */ -+ .driver = "kvm64" "-" TYPE_X86_CPU, -+ .property = "min-level", -+ .value = stringify(5), -+ },{ /* PC_RHEL7_1_COMPAT */ -+ .driver = "pentium3" "-" TYPE_X86_CPU, -+ .property = "min-level", -+ .value = stringify(2), -+ },{ /* PC_RHEL7_1_COMPAT */ -+ .driver = "n270" "-" TYPE_X86_CPU, -+ .property = "min-level", -+ .value = stringify(5), -+ },{ /* PC_RHEL7_1_COMPAT */ -+ .driver = "Conroe" "-" TYPE_X86_CPU, -+ .property = "min-level", -+ .value = stringify(4), -+ },{ /* PC_RHEL7_1_COMPAT */ -+ .driver = "Penryn" "-" TYPE_X86_CPU, -+ .property = "min-level", -+ .value = stringify(4), -+ },{ /* PC_RHEL7_1_COMPAT */ -+ .driver = "Nehalem" "-" TYPE_X86_CPU, -+ .property = "min-level", -+ .value = stringify(4), -+ },{ /* PC_RHEL7_1_COMPAT */ -+ .driver = "n270" "-" TYPE_X86_CPU, -+ .property = "min-xlevel", -+ .value = stringify(0x8000000a), -+ },{ /* PC_RHEL7_1_COMPAT */ -+ .driver = "Penryn" "-" TYPE_X86_CPU, -+ .property = "min-xlevel", -+ .value = stringify(0x8000000a), -+ },{ /* PC_RHEL7_1_COMPAT */ -+ .driver = "Conroe" "-" TYPE_X86_CPU, -+ .property = "min-xlevel", -+ .value = stringify(0x8000000a), -+ },{ /* PC_RHEL7_1_COMPAT */ -+ .driver = "Nehalem" "-" TYPE_X86_CPU, -+ .property = "min-xlevel", -+ .value = stringify(0x8000000a), -+ },{ /* PC_RHEL7_1_COMPAT */ -+ .driver = "Westmere" "-" TYPE_X86_CPU, -+ .property = "min-xlevel", -+ .value = stringify(0x8000000a), -+ },{ /* PC_RHEL7_1_COMPAT */ -+ .driver = "SandyBridge" "-" TYPE_X86_CPU, -+ .property = "min-xlevel", -+ .value = stringify(0x8000000a), -+ },{ /* PC_RHEL7_1_COMPAT */ -+ .driver = "IvyBridge" "-" TYPE_X86_CPU, -+ .property = "min-xlevel", -+ .value = stringify(0x8000000a), -+ },{ /* PC_RHEL7_1_COMPAT */ -+ .driver = "Haswell" "-" TYPE_X86_CPU, -+ .property = "min-xlevel", -+ .value = stringify(0x8000000a), -+ },{ /* PC_RHEL7_1_COMPAT */ -+ .driver = "Haswell-noTSX" "-" TYPE_X86_CPU, -+ .property = "min-xlevel", -+ .value = stringify(0x8000000a), -+ },{ /* PC_RHEL7_1_COMPAT */ -+ .driver = "Broadwell" "-" TYPE_X86_CPU, -+ .property = "min-xlevel", -+ .value = stringify(0x8000000a), -+ },{ /* PC_RHEL7_1_COMPAT */ -+ .driver = "Broadwell-noTSX" "-" TYPE_X86_CPU, -+ .property = "min-xlevel", -+ .value = stringify(0x8000000a), -+ }, ++ { "kvm64" "-" TYPE_X86_CPU, "vme", "off" }, ++ { "kvm32" "-" TYPE_X86_CPU, "vme", "off" }, ++ { "Conroe" "-" TYPE_X86_CPU, "vme", "off" }, ++ { "Penryn" "-" TYPE_X86_CPU, "vme", "off" }, ++ { "Nehalem" "-" TYPE_X86_CPU, "vme", "off" }, ++ { "Nehalem-IBRS" "-" TYPE_X86_CPU, "vme", "off" }, ++ { "Westmere" "-" TYPE_X86_CPU, "vme", "off" }, ++ { "Westmere-IBRS" "-" TYPE_X86_CPU, "vme", "off" }, ++ { "SandyBridge" "-" TYPE_X86_CPU, "vme", "off" }, ++ { "SandyBridge-IBRS" "-" TYPE_X86_CPU, "vme", "off" }, ++ { "Haswell" "-" TYPE_X86_CPU, "vme", "off" }, ++ { "Haswell-IBRS" "-" TYPE_X86_CPU, "vme", "off" }, ++ { "Broadwell" "-" TYPE_X86_CPU, "vme", "off" }, ++ { "Broadwell-IBRS" "-" TYPE_X86_CPU, "vme", "off" }, ++ { "Opteron_G1" "-" TYPE_X86_CPU, "vme", "off" }, ++ { "Opteron_G2" "-" TYPE_X86_CPU, "vme", "off" }, ++ { "Opteron_G3" "-" TYPE_X86_CPU, "vme", "off" }, ++ { "Opteron_G4" "-" TYPE_X86_CPU, "vme", "off" }, ++ { "Opteron_G5" "-" TYPE_X86_CPU, "vme", "off" }, ++ { "Haswell" "-" TYPE_X86_CPU, "f16c", "off" }, ++ { "Haswell-IBRS" "-" TYPE_X86_CPU, "f16c", "off" }, ++ { "Haswell" "-" TYPE_X86_CPU, "rdrand", "off" }, ++ { "Haswell-IBRS" "-" TYPE_X86_CPU, "rdrand", "off" }, ++ { "Broadwell" "-" TYPE_X86_CPU, "f16c", "off" }, ++ { "Broadwell-IBRS" "-" TYPE_X86_CPU, "f16c", "off" }, ++ { "Broadwell" "-" TYPE_X86_CPU, "rdrand", "off" }, ++ { "Broadwell-IBRS" "-" TYPE_X86_CPU, "rdrand", "off" }, ++ { "coreduo" "-" TYPE_X86_CPU, "vmx", "on" }, ++ { "core2duo" "-" TYPE_X86_CPU, "vmx", "on" }, ++ { "qemu64" "-" TYPE_X86_CPU, "min-level", stringify(4) }, ++ { "kvm64" "-" TYPE_X86_CPU, "min-level", stringify(5) }, ++ { "pentium3" "-" TYPE_X86_CPU, "min-level", stringify(2) }, ++ { "n270" "-" TYPE_X86_CPU, "min-level", stringify(5) }, ++ { "Conroe" "-" TYPE_X86_CPU, "min-level", stringify(4) }, ++ { "Penryn" "-" TYPE_X86_CPU, "min-level", stringify(4) }, ++ { "Nehalem" "-" TYPE_X86_CPU, "min-level", stringify(4) }, ++ { "n270" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) }, ++ { "Penryn" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) }, ++ { "Conroe" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) }, ++ { "Nehalem" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) }, ++ { "Westmere" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) }, ++ { "SandyBridge" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) }, ++ { "IvyBridge" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) }, ++ { "Haswell" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) }, ++ { "Haswell-noTSX" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) }, ++ { "Broadwell" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) }, ++ { "Broadwell-noTSX" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) }, +}; +const size_t pc_rhel_7_1_compat_len = G_N_ELEMENTS(pc_rhel_7_1_compat); + @@ -584,121 +249,37 @@ index f2c15bf1f2..03497eed9a 100644 + * pci-serial-4x) in 7.0. + */ +GlobalProperty pc_rhel_7_0_compat[] = { -+ { -+ .driver = "virtio-scsi-pci", -+ .property = "any_layout", -+ .value = "off", -+ },{ -+ .driver = "PIIX4_PM", -+ .property = "memory-hotplug-support", -+ .value = "off", -+ },{ -+ .driver = "apic", -+ .property = "version", -+ .value = stringify(0x11), -+ },{ -+ .driver = "nec-usb-xhci", -+ .property = "superspeed-ports-first", -+ .value = "off", -+ },{ -+ .driver = "nec-usb-xhci", -+ .property = "force-pcie-endcap", -+ .value = "on", -+ },{ -+ .driver = "pci-serial", -+ .property = "prog_if", -+ .value = stringify(0), -+ },{ -+ .driver = "virtio-net-pci", -+ .property = "guest_announce", -+ .value = "off", -+ },{ -+ .driver = "ICH9-LPC", -+ .property = "memory-hotplug-support", -+ .value = "off", -+ },{ -+ .driver = "xio3130-downstream", -+ .property = COMPAT_PROP_PCP, -+ .value = "off", -+ },{ -+ .driver = "ioh3420", -+ .property = COMPAT_PROP_PCP, -+ .value = "off", -+ },{ -+ .driver = "PIIX4_PM", -+ .property = "acpi-pci-hotplug-with-bridge-support", -+ .value = "off", -+ },{ -+ .driver = "e1000", -+ .property = "mitigation", -+ .value = "off", -+ },{ -+ .driver = "virtio-net-pci", -+ .property = "ctrl_guest_offloads", -+ .value = "off", -+ }, -+ { -+ .driver = "Conroe" "-" TYPE_X86_CPU, -+ .property = "x2apic", -+ .value = "on", -+ }, -+ { -+ .driver = "Penryn" "-" TYPE_X86_CPU, -+ .property = "x2apic", -+ .value = "on", -+ }, -+ { -+ .driver = "Nehalem" "-" TYPE_X86_CPU, -+ .property = "x2apic", -+ .value = "on", -+ }, -+ { /* PC_RHEL7_0_COMPAT (copied from the entry above) */ -+ .driver = "Nehalem-IBRS" "-" TYPE_X86_CPU, -+ .property = "x2apic", -+ .value = "on", -+ }, -+ { -+ .driver = "Westmere" "-" TYPE_X86_CPU, -+ .property = "x2apic", -+ .value = "on", -+ }, -+ { /* PC_RHEL7_0_COMPAT (copied from the entry above) */ -+ .driver = "Westmere-IBRS" "-" TYPE_X86_CPU, -+ .property = "x2apic", -+ .value = "on", -+ }, -+ { -+ .driver = "Opteron_G1" "-" TYPE_X86_CPU, -+ .property = "x2apic", -+ .value = "on", -+ }, -+ { -+ .driver = "Opteron_G2" "-" TYPE_X86_CPU, -+ .property = "x2apic", -+ .value = "on", -+ }, -+ { -+ .driver = "Opteron_G3" "-" TYPE_X86_CPU, -+ .property = "x2apic", -+ .value = "on", -+ }, -+ { -+ .driver = "Opteron_G4" "-" TYPE_X86_CPU, -+ .property = "x2apic", -+ .value = "on", -+ }, -+ { -+ .driver = "Opteron_G5" "-" TYPE_X86_CPU, -+ .property = "x2apic", -+ .value = "on", -+ } ++ { "virtio-scsi-pci", "any_layout", "off" }, ++ { "PIIX4_PM", "memory-hotplug-support", "off" }, ++ { "apic", "version", stringify(0x11) }, ++ { "nec-usb-xhci", "superspeed-ports-first", "off" }, ++ { "nec-usb-xhci", "force-pcie-endcap", "on" }, ++ { "pci-serial", "prog_if", stringify(0) }, ++ { "virtio-net-pci", "guest_announce", "off" }, ++ { "ICH9-LPC", "memory-hotplug-support", "off" }, ++ { "xio3130-downstream", COMPAT_PROP_PCP, "off" }, ++ { "ioh3420", COMPAT_PROP_PCP, "off" }, ++ { "PIIX4_PM", "acpi-pci-hotplug-with-bridge-support", "off" }, ++ { "e1000", "mitigation", "off" }, ++ { "virtio-net-pci", "ctrl_guest_offloads", "off" }, ++ { "Conroe" "-" TYPE_X86_CPU, "x2apic", "on" }, ++ { "Penryn" "-" TYPE_X86_CPU, "x2apic", "on" }, ++ { "Nehalem" "-" TYPE_X86_CPU, "x2apic", "on" }, ++ { "Nehalem-IBRS" "-" TYPE_X86_CPU, "x2apic", "on" }, ++ { "Westmere" "-" TYPE_X86_CPU, "x2apic", "on" }, ++ { "Westmere-IBRS" "-" TYPE_X86_CPU, "x2apic", "on" }, ++ { "Opteron_G1" "-" TYPE_X86_CPU, "x2apic", "on" }, ++ { "Opteron_G2" "-" TYPE_X86_CPU, "x2apic", "on" }, ++ { "Opteron_G3" "-" TYPE_X86_CPU, "x2apic", "on" }, ++ { "Opteron_G4" "-" TYPE_X86_CPU, "x2apic", "on" }, ++ { "Opteron_G5" "-" TYPE_X86_CPU, "x2apic", "on" }, +}; +const size_t pc_rhel_7_0_compat_len = G_N_ELEMENTS(pc_rhel_7_0_compat); + void gsi_handler(void *opaque, int n, int level) { GSIState *s = opaque; -@@ -1814,7 +2451,8 @@ void pc_memory_init(PCMachineState *pcms, +@@ -1901,7 +2119,8 @@ void pc_memory_init(PCMachineState *pcms, option_rom_mr = g_malloc(sizeof(*option_rom_mr)); memory_region_init_ram(option_rom_mr, NULL, "pc.rom", PC_ROM_SIZE, &error_fatal); @@ -708,7 +289,7 @@ index f2c15bf1f2..03497eed9a 100644 memory_region_set_readonly(option_rom_mr, true); } memory_region_add_subregion_overlap(rom_memory, -@@ -2731,6 +3369,8 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) +@@ -2928,6 +3147,8 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->linuxboot_dma_enabled = true; pcmc->pvh_enabled = true; assert(!mc->get_hotplug_handler); @@ -717,9 +298,9 @@ index f2c15bf1f2..03497eed9a 100644 mc->get_hotplug_handler = pc_get_hotplug_handler; mc->cpu_index_to_instance_props = pc_cpu_index_to_props; mc->get_default_cpu_node_id = pc_get_default_cpu_node_id; -@@ -2740,7 +3380,8 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) - mc->default_boot_order = "cad"; +@@ -2938,7 +3159,8 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) mc->hot_add_cpu = pc_hot_add_cpu; + mc->smp_parse = pc_smp_parse; mc->block_default_type = IF_IDE; - mc->max_cpus = 255; + /* 240: max CPU count for RHEL */ @@ -728,10 +309,10 @@ index f2c15bf1f2..03497eed9a 100644 hc->pre_plug = pc_machine_device_pre_plug_cb; hc->plug = pc_machine_device_plug_cb; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c -index 8ad8e885c6..37907fe76a 100644 +index c2280c7..c86c48c 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c -@@ -50,6 +50,7 @@ +@@ -51,6 +51,7 @@ #include "cpu.h" #include "qapi/error.h" #include "qemu/error-report.h" @@ -739,7 +320,7 @@ index 8ad8e885c6..37907fe76a 100644 #ifdef CONFIG_XEN #include #include "hw/xen/xen_pt.h" -@@ -170,8 +171,8 @@ static void pc_init1(MachineState *machine, +@@ -173,8 +174,8 @@ static void pc_init1(MachineState *machine, if (pcmc->smbios_defaults) { MachineClass *mc = MACHINE_GET_CLASS(machine); /* These values are guest ABI, do not change */ @@ -750,7 +331,7 @@ index 8ad8e885c6..37907fe76a 100644 pcmc->smbios_uuid_encoded, SMBIOS_ENTRY_POINT_21); } -@@ -310,6 +311,7 @@ static void pc_init1(MachineState *machine, +@@ -316,6 +317,7 @@ else { * HW_COMPAT_*, PC_COMPAT_*, or * pc_*_machine_options(). */ @@ -758,7 +339,7 @@ index 8ad8e885c6..37907fe76a 100644 static void pc_compat_2_3_fn(MachineState *machine) { PCMachineState *pcms = PC_MACHINE(machine); -@@ -998,3 +1000,197 @@ static void xenfv_machine_options(MachineClass *m) +@@ -1022,3 +1024,197 @@ static void xenfv_machine_options(MachineClass *m) DEFINE_PC_MACHINE(xenfv, "xenfv", pc_xen_hvm_init, xenfv_machine_options); #endif @@ -957,7 +538,7 @@ index 8ad8e885c6..37907fe76a 100644 +DEFINE_PC_MACHINE(rhel700, "pc-i440fx-rhel7.0.0", pc_init_rhel700, + pc_machine_rhel700_options); diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c -index 372c6b73be..4b7df48919 100644 +index 397e1fd..4959ed3 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -198,8 +198,8 @@ static void pc_q35_init(MachineState *machine) @@ -979,7 +560,7 @@ index 372c6b73be..4b7df48919 100644 static void pc_q35_machine_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); -@@ -507,3 +508,112 @@ static void pc_q35_2_4_machine_options(MachineClass *m) +@@ -538,3 +539,112 @@ static void pc_q35_2_4_machine_options(MachineClass *m) DEFINE_Q35_MACHINE(v2_4, "pc-q35-2.4", NULL, pc_q35_2_4_machine_options); @@ -1093,10 +674,10 @@ index 372c6b73be..4b7df48919 100644 +DEFINE_PC_MACHINE(q35_rhel730, "pc-q35-rhel7.3.0", pc_q35_init_rhel730, + pc_q35_machine_rhel730_options); diff --git a/include/hw/boards.h b/include/hw/boards.h -index 456e4a944c..b292365bfa 100644 +index 521c625..b4a8c4a 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h -@@ -206,6 +206,8 @@ struct MachineClass { +@@ -214,6 +214,8 @@ struct MachineClass { const char **valid_cpu_types; strList *allowed_dynamic_sysbus_devices; bool auto_enable_numa_with_memhp; @@ -1106,20 +687,20 @@ index 456e4a944c..b292365bfa 100644 int nb_nodes, ram_addr_t size); bool ignore_boot_device_suffixes; diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h -index ca65ef18af..b066f0a539 100644 +index 859b64c..605cc71 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h -@@ -134,6 +134,9 @@ typedef struct PCMachineClass { +@@ -142,6 +142,9 @@ typedef struct PCMachineClass { - /* use PVH to load kernels that support this feature */ - bool pvh_enabled; -+ + /* Enables contiguous-apic-ID mode */ + bool compat_apic_id_mode; ++ + /* RH only, see bz 1489800 */ + bool pc_rom_ro; } PCMachineClass; #define TYPE_PC_MACHINE "generic-pc-machine" -@@ -350,6 +353,30 @@ extern const size_t pc_compat_1_5_len; +@@ -362,6 +365,30 @@ extern const size_t pc_compat_1_5_len; extern GlobalProperty pc_compat_1_4[]; extern const size_t pc_compat_1_4_len; @@ -1151,10 +732,10 @@ index ca65ef18af..b066f0a539 100644 * depending on QEMU versions up to QEMU 2.4. */ diff --git a/target/i386/cpu.c b/target/i386/cpu.c -index 6616303782..6472cd21f8 100644 +index 47a1236..cd71a09 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c -@@ -1474,11 +1474,17 @@ static CPUCaches epyc_cache_info = { +@@ -1548,11 +1548,17 @@ static CPUCaches epyc_cache_info = { static X86CPUDefinition builtin_x86_defs[] = { { @@ -1173,7 +754,7 @@ index 6616303782..6472cd21f8 100644 .stepping = 3, .features[FEAT_1_EDX] = CPUID_SSE2 | CPUID_SSE | CPUID_FXSR | CPUID_MMX | CPUID_CLFLUSH | CPUID_PSE36 | CPUID_PAT | CPUID_CMOV | -@@ -2973,6 +2979,7 @@ static PropValue kvm_default_props[] = { +@@ -2861,6 +2867,7 @@ static PropValue kvm_default_props[] = { { "acpi", "off" }, { "monitor", "off" }, { "svm", "off" }, @@ -1182,10 +763,10 @@ index 6616303782..6472cd21f8 100644 }; diff --git a/target/i386/kvm.c b/target/i386/kvm.c -index 3b29ce5c0d..478942187a 100644 +index dbbb137..da5a5ef 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c -@@ -2373,6 +2373,7 @@ static int kvm_get_msrs(X86CPU *cpu) +@@ -2805,6 +2805,7 @@ static int kvm_get_msrs(X86CPU *cpu) struct kvm_msr_entry *msrs = cpu->kvm_msr_buf->entries; int ret, i; uint64_t mtrr_top_bits; @@ -1193,7 +774,7 @@ index 3b29ce5c0d..478942187a 100644 kvm_msr_buf_reset(cpu); -@@ -2670,6 +2671,9 @@ static int kvm_get_msrs(X86CPU *cpu) +@@ -3102,6 +3103,9 @@ static int kvm_get_msrs(X86CPU *cpu) break; case MSR_KVM_ASYNC_PF_EN: env->async_pf_en_msr = msrs[i].data; @@ -1204,5 +785,5 @@ index 3b29ce5c0d..478942187a 100644 case MSR_KVM_PV_EOI_EN: env->pv_eoi_en_msr = msrs[i].data; -- -2.20.1 +1.8.3.1 diff --git a/0011-Enable-make-check.patch b/0011-Enable-make-check.patch index 74c8add..a7a4882 100644 --- a/0011-Enable-make-check.patch +++ b/0011-Enable-make-check.patch @@ -1,4 +1,4 @@ -From 0442a72cf9da8f79fe26b08999f2dca900af6ad0 Mon Sep 17 00:00:00 2001 +From c1635c2c93f0efe82a6ab1dc973402882882382c Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Fri, 19 Oct 2018 13:48:41 +0200 Subject: Enable make check @@ -13,29 +13,38 @@ Rebase changes (4.0.0): - Disable device-plug-test on s390x as it use disabled device - Do not run cpu-plug-tests on 7.3 and older machine types -Merged patches (4.0.0: +Rebase changes (4.1.0-rc0): +- removed iotests 068 + +Rebase changes (4.1.0-rc1): +- remove all 205 tests (unstable) + +Merged patches (4.0.0): - f7ffd13 Remove 7 qcow2 and luks iotests that are taking > 25 sec to run during the fast train build proce -Signed-off-by: Danilo C. L. de Paula +Merged patches (4.1.0-rc0): +- 41288ff redhat: Remove raw iotest 205 + +Conflicts: + tests/qemu-iotests/group --- redhat/qemu-kvm.spec.template | 8 +++++++- tests/Makefile.include | 10 +++++----- tests/boot-serial-test.c | 6 +++++- tests/cpu-plug-test.c | 4 ++-- tests/e1000-test.c | 2 ++ - tests/endianness-test.c | 2 ++ - tests/prom-env-test.c | 2 ++ + tests/prom-env-test.c | 4 ++++ tests/qemu-iotests/051 | 12 ++++++------ tests/qemu-iotests/group | 4 ++-- tests/test-x86-cpuid-compat.c | 2 ++ tests/usb-hcd-xhci-test.c | 4 ++++ - 11 files changed, 39 insertions(+), 17 deletions(-) + 10 files changed, 39 insertions(+), 17 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include -index 36fc73fef5..e8f5fbc2c6 100644 +index fd7fdb8..d3da940 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include -@@ -162,7 +162,7 @@ check-qtest-i386-y += tests/ide-test$(EXESUF) +@@ -164,7 +164,7 @@ check-qtest-i386-y += tests/ide-test$(EXESUF) check-qtest-i386-y += tests/ahci-test$(EXESUF) check-qtest-i386-y += tests/hd-geo-test$(EXESUF) check-qtest-i386-y += tests/boot-order-test$(EXESUF) @@ -44,7 +53,7 @@ index 36fc73fef5..e8f5fbc2c6 100644 check-qtest-i386-$(CONFIG_SGA) += tests/boot-serial-test$(EXESUF) check-qtest-i386-$(CONFIG_SLIRP) += tests/pxe-test$(EXESUF) check-qtest-i386-y += tests/rtc-test$(EXESUF) -@@ -221,7 +221,7 @@ check-qtest-mips64el-$(CONFIG_VGA) += tests/display-vga-test$(EXESUF) +@@ -223,7 +223,7 @@ check-qtest-mips64el-$(CONFIG_VGA) += tests/display-vga-test$(EXESUF) check-qtest-moxie-y += tests/boot-serial-test$(EXESUF) check-qtest-ppc-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF) @@ -53,7 +62,7 @@ index 36fc73fef5..e8f5fbc2c6 100644 check-qtest-ppc-y += tests/prom-env-test$(EXESUF) check-qtest-ppc-y += tests/drive_del-test$(EXESUF) check-qtest-ppc-y += tests/boot-serial-test$(EXESUF) -@@ -235,8 +235,8 @@ check-qtest-ppc64-$(CONFIG_PSERIES) += tests/rtas-test$(EXESUF) +@@ -237,8 +237,8 @@ check-qtest-ppc64-$(CONFIG_PSERIES) += tests/rtas-test$(EXESUF) check-qtest-ppc64-$(CONFIG_SLIRP) += tests/pxe-test$(EXESUF) check-qtest-ppc64-$(CONFIG_USB_UHCI) += tests/usb-hcd-uhci-test$(EXESUF) check-qtest-ppc64-$(CONFIG_USB_XHCI_NEC) += tests/usb-hcd-xhci-test$(EXESUF) @@ -64,7 +73,7 @@ index 36fc73fef5..e8f5fbc2c6 100644 check-qtest-ppc64-$(CONFIG_RTL8139_PCI) += tests/test-filter-redirector$(EXESUF) check-qtest-ppc64-$(CONFIG_VGA) += tests/display-vga-test$(EXESUF) check-qtest-ppc64-y += tests/numa-test$(EXESUF) -@@ -278,7 +278,7 @@ check-qtest-s390x-$(CONFIG_SLIRP) += tests/test-netfilter$(EXESUF) +@@ -282,7 +282,7 @@ check-qtest-s390x-$(CONFIG_SLIRP) += tests/test-netfilter$(EXESUF) check-qtest-s390x-$(CONFIG_POSIX) += tests/test-filter-mirror$(EXESUF) check-qtest-s390x-$(CONFIG_POSIX) += tests/test-filter-redirector$(EXESUF) check-qtest-s390x-y += tests/drive_del-test$(EXESUF) @@ -74,7 +83,7 @@ index 36fc73fef5..e8f5fbc2c6 100644 check-qtest-s390x-y += tests/cpu-plug-test$(EXESUF) check-qtest-s390x-y += tests/migration-test$(EXESUF) diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c -index c591748aaf..c5873f8b24 100644 +index 24852d4..dce5860 100644 --- a/tests/boot-serial-test.c +++ b/tests/boot-serial-test.c @@ -97,18 +97,22 @@ static testdef_t tests[] = { @@ -102,7 +111,7 @@ index c591748aaf..c5873f8b24 100644 { "sparc", "LX", "", "TMS390S10" }, { "sparc", "SS-4", "", "MB86904" }, diff --git a/tests/cpu-plug-test.c b/tests/cpu-plug-test.c -index 668f00144e..453ca8e583 100644 +index 668f001..453ca8e 100644 --- a/tests/cpu-plug-test.c +++ b/tests/cpu-plug-test.c @@ -190,8 +190,8 @@ static void add_pseries_test_case(const char *mname) @@ -117,10 +126,10 @@ index 668f00144e..453ca8e583 100644 } data = g_new(PlugTestData, 1); diff --git a/tests/e1000-test.c b/tests/e1000-test.c -index 9e67916169..adbd07f997 100644 +index c387984..c89112d 100644 --- a/tests/e1000-test.c +++ b/tests/e1000-test.c -@@ -21,9 +21,11 @@ struct QE1000 { +@@ -22,9 +22,11 @@ struct QE1000 { static const char *models[] = { "e1000", @@ -132,40 +141,30 @@ index 9e67916169..adbd07f997 100644 }; static void *e1000_get_driver(void *obj, const char *interface) -diff --git a/tests/endianness-test.c b/tests/endianness-test.c -index 58527952a5..1d729ec7f2 100644 ---- a/tests/endianness-test.c -+++ b/tests/endianness-test.c -@@ -39,8 +39,10 @@ static const TestCase test_cases[] = { - { "ppc", "bamboo", 0xe8000000, .bswap = true, .superio = "i82378" }, - { "ppc64", "mac99", 0xf2000000, .bswap = true, .superio = "i82378" }, - { "ppc64", "pseries", (1ULL << 45), .bswap = true, .superio = "i82378" }, -+#if 0 /* Disabled in Red Hat Enterprise Linux */ - { "ppc64", "pseries-2.7", 0x10080000000ULL, - .bswap = true, .superio = "i82378" }, -+#endif - { "sh4", "r2d", 0xfe240000, .superio = "i82378" }, - { "sh4eb", "r2d", 0xfe240000, .bswap = true, .superio = "i82378" }, - { "sparc64", "sun4u", 0x1fe02000000LL, .bswap = true }, diff --git a/tests/prom-env-test.c b/tests/prom-env-test.c -index 61bc1d1e7b..aeb76b0bc3 100644 +index 61bc1d1..028d45c 100644 --- a/tests/prom-env-test.c +++ b/tests/prom-env-test.c -@@ -88,7 +88,9 @@ int main(int argc, char *argv[]) +@@ -88,10 +88,14 @@ int main(int argc, char *argv[]) if (!strcmp(arch, "ppc")) { add_tests(ppc_machines); } else if (!strcmp(arch, "ppc64")) { +#if 0 /* Disabled for Red Hat Enterprise Linux */ add_tests(ppc_machines); -+#endif if (g_test_slow()) { ++#endif qtest_add_data_func("prom-env/pseries", "pseries", test_machine); ++#if 0 /* Disabled for Red Hat Enterprise Linux */ } ++#endif + } else if (!strcmp(arch, "sparc")) { + add_tests(sparc_machines); + } else if (!strcmp(arch, "sparc64")) { diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 -index 02ac960da4..29f13440c0 100755 +index ce942a5..f64429e 100755 --- a/tests/qemu-iotests/051 +++ b/tests/qemu-iotests/051 -@@ -182,11 +182,11 @@ run_qemu -drive if=virtio +@@ -181,11 +181,11 @@ run_qemu -drive if=virtio case "$QEMU_DEFAULT_MACHINE" in pc) run_qemu -drive if=none,id=disk -device ide-cd,drive=disk @@ -180,7 +179,7 @@ index 02ac960da4..29f13440c0 100755 ;; *) ;; -@@ -211,11 +211,11 @@ run_qemu -drive file="$TEST_IMG",if=virtio,readonly=on +@@ -234,11 +234,11 @@ run_qemu -drive file="$TEST_IMG",if=virtio,readonly=on case "$QEMU_DEFAULT_MACHINE" in pc) run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-cd,drive=disk @@ -196,29 +195,29 @@ index 02ac960da4..29f13440c0 100755 *) ;; diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group -index bae7718380..0db5e68af1 100644 +index f13e5f2..813db25 100644 --- a/tests/qemu-iotests/group +++ b/tests/qemu-iotests/group -@@ -77,7 +77,7 @@ - 068 rw auto quick +@@ -92,7 +92,7 @@ + 068 rw quick 069 rw auto quick - 070 rw auto quick + 070 rw quick -071 rw auto quick +# 071 rw auto quick -- requires whitelisted blkverify 072 rw auto quick 073 rw auto quick 074 rw auto quick -@@ -105,7 +105,7 @@ - 096 rw auto quick +@@ -120,7 +120,7 @@ + 096 rw quick 097 rw auto backing 098 rw auto backing quick -099 rw auto quick +# 099 rw auto quick -- requires whitelisted blkverify # 100 was removed, do not reuse - 101 rw auto quick - 102 rw auto quick + 101 rw quick + 102 rw quick diff --git a/tests/test-x86-cpuid-compat.c b/tests/test-x86-cpuid-compat.c -index e75b959950..6b46b73dd0 100644 +index e75b959..6b46b73 100644 --- a/tests/test-x86-cpuid-compat.c +++ b/tests/test-x86-cpuid-compat.c @@ -300,6 +300,7 @@ int main(int argc, char **argv) @@ -238,7 +237,7 @@ index e75b959950..6b46b73dd0 100644 /* Test feature parsing */ add_feature_test("x86/cpuid/features/plus", diff --git a/tests/usb-hcd-xhci-test.c b/tests/usb-hcd-xhci-test.c -index 9eb24b00e4..465ed26dfc 100644 +index 9eb24b0..465ed26 100644 --- a/tests/usb-hcd-xhci-test.c +++ b/tests/usb-hcd-xhci-test.c @@ -21,6 +21,7 @@ static void test_xhci_hotplug(void) @@ -268,5 +267,5 @@ index 9eb24b00e4..465ed26dfc 100644 qtest_start("-device nec-usb-xhci,id=xhci" -- -2.20.1 +1.8.3.1 diff --git a/0012-vfio-cap-number-of-devices-that-can-be-assigned.patch b/0012-vfio-cap-number-of-devices-that-can-be-assigned.patch index 7a3fc9d..42b8e91 100644 --- a/0012-vfio-cap-number-of-devices-that-can-be-assigned.patch +++ b/0012-vfio-cap-number-of-devices-that-can-be-assigned.patch @@ -1,4 +1,4 @@ -From b0626d1bb4f6ec6fba1973ebb26a297e79e95437 Mon Sep 17 00:00:00 2001 +From ce492d69e627db370aef7907409e88b83e71619b Mon Sep 17 00:00:00 2001 From: Bandan Das Date: Tue, 3 Dec 2013 20:05:13 +0100 Subject: vfio: cap number of devices that can be assigned @@ -30,26 +30,31 @@ Rebase notes (2.8.0): Merged patches (2.9.0): - 17eb774 vfio: Use error_setg when reporting max assigned device overshoot + Merged patches (4.1.0-rc3): +- 2b89558 vfio: increase the cap on number of assigned devices to 64 + (cherry picked from commit 9fa3c9fc6dfcde76d80db1aa601b2d577f72ceec) (cherry picked from commit 3cb35556dc7d994f203d732fe952f95fcdb03c0a) -Signed-off-by: Danilo C. L. de Paula --- - hw/vfio/pci.c | 15 ++++++++++++++- - 1 file changed, 14 insertions(+), 1 deletion(-) + hw/vfio/pci.c | 29 ++++++++++++++++++++++++++++- + hw/vfio/pci.h | 1 + + 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c -index 13badcd6ed..7c998afc0f 100644 +index 7c474a9..bb9f28e 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c -@@ -36,6 +36,7 @@ - #include "qapi/error.h" +@@ -41,6 +41,9 @@ + + #define TYPE_VIFO_PCI_NOHOTPLUG "vfio-pci-nohotplug" - #define MSIX_CAP_LENGTH 12 -+#define MAX_DEV_ASSIGN_CMDLINE 32 ++/* RHEL only: Set once for the first assigned dev */ ++static uint16_t device_limit; ++ + static void vfio_disable_interrupts(VFIOPCIDevice *vdev); + static void vfio_mmap_set_enabled(VFIOPCIDevice *vdev, bool enabled); - #define TYPE_VFIO_PCI "vfio-pci" - #define PCI_VFIO(obj) OBJECT_CHECK(VFIOPCIDevice, obj, TYPE_VFIO_PCI) -@@ -2806,9 +2807,21 @@ static void vfio_realize(PCIDevice *pdev, Error **errp) +@@ -2703,9 +2706,30 @@ static void vfio_realize(PCIDevice *pdev, Error **errp) ssize_t len; struct stat st; int groupid; @@ -57,21 +62,52 @@ index 13badcd6ed..7c998afc0f 100644 + int ret, i = 0; bool is_mdev; ++ if (device_limit && device_limit != vdev->assigned_device_limit) { ++ error_setg(errp, "Assigned device limit has been redefined. " ++ "Old:%d, New:%d", ++ device_limit, vdev->assigned_device_limit); ++ return; ++ } else { ++ device_limit = vdev->assigned_device_limit; ++ } ++ + QLIST_FOREACH(group, &vfio_group_list, next) { + QLIST_FOREACH(vbasedev_iter, &group->device_list, next) { + i++; + } + } + -+ if (i >= MAX_DEV_ASSIGN_CMDLINE) { ++ if (i >= vdev->assigned_device_limit) { + error_setg(errp, "Maximum supported vfio devices (%d) " -+ "already attached", MAX_DEV_ASSIGN_CMDLINE); ++ "already attached", vdev->assigned_device_limit); + return; + } + if (!vdev->vbasedev.sysfsdev) { if (!(~vdev->host.domain || ~vdev->host.bus || ~vdev->host.slot || ~vdev->host.function)) { +@@ -3121,6 +3145,9 @@ static Property vfio_pci_dev_properties[] = { + DEFINE_PROP_BOOL("x-no-kvm-msix", VFIOPCIDevice, no_kvm_msix, false), + DEFINE_PROP_BOOL("x-no-geforce-quirks", VFIOPCIDevice, + no_geforce_quirks, false), ++ /* RHEL only */ ++ DEFINE_PROP_UINT16("x-assigned-device-limit", VFIOPCIDevice, ++ assigned_device_limit, 64), + DEFINE_PROP_BOOL("x-no-kvm-ioeventfd", VFIOPCIDevice, no_kvm_ioeventfd, + false), + DEFINE_PROP_BOOL("x-no-vfio-ioeventfd", VFIOPCIDevice, no_vfio_ioeventfd, +diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h +index 834a90d..205954e 100644 +--- a/hw/vfio/pci.h ++++ b/hw/vfio/pci.h +@@ -135,6 +135,7 @@ typedef struct VFIOPCIDevice { + EventNotifier err_notifier; + EventNotifier req_notifier; + int (*resetfn)(struct VFIOPCIDevice *); ++ uint16_t assigned_device_limit; + uint32_t vendor_id; + uint32_t device_id; + uint32_t sub_vendor_id; -- -2.20.1 +1.8.3.1 diff --git a/0013-Add-support-statement-to-help-output.patch b/0013-Add-support-statement-to-help-output.patch index d77418a..421b5b5 100644 --- a/0013-Add-support-statement-to-help-output.patch +++ b/0013-Add-support-statement-to-help-output.patch @@ -1,4 +1,4 @@ -From 6ae79fe200eab13f75050a10b48cea3b5bf21aab Mon Sep 17 00:00:00 2001 +From c219069712b16be5664bfa6a4fcec4aa261d21c8 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Wed, 4 Dec 2013 18:53:17 +0100 Subject: Add support statement to -help output @@ -18,16 +18,15 @@ as unsupported by Red Hat, and advising users to use libvirt instead. Signed-off-by: Eduardo Habkost (cherry picked from commit 2a07700936e39856cc9f149c6a6517f0715536a6) (cherry picked from commit 5dd2f4706e2fef945771949e59a8fcc1b5452de9) -Signed-off-by: Danilo C. L. de Paula --- vl.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vl.c b/vl.c -index 3ada215270..32886ebf7f 100644 +index f9166f5..dd1fadf 100644 --- a/vl.c +++ b/vl.c -@@ -1982,9 +1982,17 @@ static void version(void) +@@ -1803,9 +1803,17 @@ static void version(void) QEMU_COPYRIGHT "\n"); } @@ -45,7 +44,7 @@ index 3ada215270..32886ebf7f 100644 printf("usage: %s [options] [disk_image]\n\n" "'disk_image' is a raw hard disk image for IDE hard disk 0\n\n", error_get_progname()); -@@ -2001,6 +2009,7 @@ static void help(int exitcode) +@@ -1822,6 +1830,7 @@ static void help(int exitcode) "\n" QEMU_HELP_BOTTOM "\n"); @@ -54,5 +53,5 @@ index 3ada215270..32886ebf7f 100644 } -- -2.20.1 +1.8.3.1 diff --git a/0014-globally-limit-the-maximum-number-of-CPUs.patch b/0014-globally-limit-the-maximum-number-of-CPUs.patch index f7e0b07..84fa5b6 100644 --- a/0014-globally-limit-the-maximum-number-of-CPUs.patch +++ b/0014-globally-limit-the-maximum-number-of-CPUs.patch @@ -1,4 +1,4 @@ -From 4d15d2010db402f5910a9b7e4c147a9a3e2f2604 Mon Sep 17 00:00:00 2001 +From 29def10374e810c82ef7e01bcdac0c0e77b42aec Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Tue, 21 Jan 2014 10:46:52 +0100 Subject: globally limit the maximum number of CPUs @@ -74,21 +74,16 @@ The recommended vcpu max limit (KVM_CAP_NR_VCPUS) should be used instead of the actual max vcpu limit (KVM_CAP_MAX_VCPUS) to give an error. This commit matches the limit to current KVM_CAP_NR_VCPUS value. - -Conflicts: - vl.c - -Signed-off-by: Danilo C. L. de Paula --- accel/kvm/kvm-all.c | 12 ++++++++++++ vl.c | 18 ++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c -index 241db496c3..003c0abee2 100644 +index f450f25..2d850df 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c -@@ -1630,6 +1630,18 @@ static int kvm_init(MachineState *ms) +@@ -1869,6 +1869,18 @@ static int kvm_init(MachineState *ms) soft_vcpus_limit = kvm_recommended_vcpus(s); hard_vcpus_limit = kvm_max_vcpus(s); @@ -108,10 +103,10 @@ index 241db496c3..003c0abee2 100644 if (nc->num > soft_vcpus_limit) { warn_report("Number of %s cpus requested (%d) exceeds " diff --git a/vl.c b/vl.c -index 32886ebf7f..2b95925f9b 100644 +index dd1fadf..7c52255 100644 --- a/vl.c +++ b/vl.c -@@ -131,6 +131,8 @@ int main(int argc, char **argv) +@@ -132,6 +132,8 @@ int main(int argc, char **argv) #define MAX_VIRTIO_CONSOLES 1 @@ -120,8 +115,8 @@ index 32886ebf7f..2b95925f9b 100644 static const char *data_dir[16]; static int data_dir_idx; const char *bios_name = NULL; -@@ -1508,6 +1510,20 @@ MachineClass *find_default_machine(void) - return mc; +@@ -1337,6 +1339,20 @@ static MachineClass *find_default_machine(GSList *machines) + return NULL; } +/* Maximum number of CPUs limited for Red Hat Enterprise Linux */ @@ -138,10 +133,10 @@ index 32886ebf7f..2b95925f9b 100644 + } +} + - MachineInfoList *qmp_query_machines(Error **errp) + static int machine_help_func(QemuOpts *opts, MachineState *machine) { - GSList *el, *machines = object_class_get_list(TYPE_MACHINE, false); -@@ -3994,6 +4010,8 @@ int main(int argc, char **argv, char **envp) + ObjectProperty *prop; +@@ -3864,6 +3880,8 @@ int main(int argc, char **argv, char **envp) "mutually exclusive"); exit(EXIT_FAILURE); } @@ -151,5 +146,5 @@ index 32886ebf7f..2b95925f9b 100644 configure_rtc(qemu_find_opts_singleton("rtc")); -- -2.20.1 +1.8.3.1 diff --git a/0015-Add-support-for-simpletrace.patch b/0015-Add-support-for-simpletrace.patch index 3a51b93..a845db4 100644 --- a/0015-Add-support-for-simpletrace.patch +++ b/0015-Add-support-for-simpletrace.patch @@ -1,4 +1,4 @@ -From 75da6e38041efca51934a46a4d481eaac57d4b1e Mon Sep 17 00:00:00 2001 +From 1e856ec9fb79314305380aba4c89c5d8987616a9 Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Thu, 8 Oct 2015 09:50:17 +0200 Subject: Add support for simpletrace @@ -7,7 +7,7 @@ As simpletrace is upstream, we just need to properly handle it during rpmbuild. Signed-off-by: Miroslav Rezanina -Rebase notes (weekly-180727): +Rebase notes (3.1.0): - Fixed python 2 to python3 switch Rebase notes (2.9.0): @@ -21,14 +21,11 @@ Merged patches (2.3.0): - 5292fc3 trace: add SystemTap init scripts for simpletrace bridge - eda9e5e simpletrace: install simpletrace.py - 85c4c8f trace: add systemtap-initscript README file to RPM - -(cherry picked from commit bfc1d7f3628f2ffbabbae71d57a506cea6663ddf) -Signed-off-by: Danilo C. L. de Paula --- .gitignore | 2 ++ Makefile | 4 +++ - README.systemtap | 43 +++++++++++++++++++++++++ - redhat/qemu-kvm.spec.template | 26 ++++++++++++++- + README.systemtap | 43 +++++++++++++++++++++++++++++++++ + redhat/qemu-kvm.spec.template | 26 +++++++++++++++++++- scripts/systemtap/conf.d/qemu_kvm.conf | 4 +++ scripts/systemtap/script.d/qemu_kvm.stp | 1 + 6 files changed, 79 insertions(+), 1 deletion(-) @@ -37,10 +34,10 @@ Signed-off-by: Danilo C. L. de Paula create mode 100644 scripts/systemtap/script.d/qemu_kvm.stp diff --git a/Makefile b/Makefile -index 05f62eab3c..41a77a90af 100644 +index 288a5ac..8caca6c 100644 --- a/Makefile +++ b/Makefile -@@ -832,6 +832,10 @@ endif +@@ -910,6 +910,10 @@ endif $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \ done $(INSTALL_DATA) $(BUILD_DIR)/trace-events-all "$(DESTDIR)$(qemu_datadir)/trace-events-all" @@ -48,12 +45,12 @@ index 05f62eab3c..41a77a90af 100644 + $(INSTALL_DATA) $(SRC_PATH)/scripts/systemtap/script.d/qemu_kvm.stp "$(DESTDIR)$(qemu_datadir)/systemtap/script.d/" + $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/systemtap/conf.d" + $(INSTALL_DATA) $(SRC_PATH)/scripts/systemtap/conf.d/qemu_kvm.conf "$(DESTDIR)$(qemu_datadir)/systemtap/conf.d/" - for d in $(TARGET_DIRS); do \ - $(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \ - done + + .PHONY: ctags + ctags: diff --git a/README.systemtap b/README.systemtap new file mode 100644 -index 0000000000..ad913fc990 +index 0000000..ad913fc --- /dev/null +++ b/README.systemtap @@ -0,0 +1,43 @@ @@ -102,7 +99,7 @@ index 0000000000..ad913fc990 + # /usr/share/qemu-kvm/simpletrace.py --no-header /usr/share/qemu-kvm/trace-events /tmp/trace.log diff --git a/scripts/systemtap/conf.d/qemu_kvm.conf b/scripts/systemtap/conf.d/qemu_kvm.conf new file mode 100644 -index 0000000000..372d8160a4 +index 0000000..372d816 --- /dev/null +++ b/scripts/systemtap/conf.d/qemu_kvm.conf @@ -0,0 +1,4 @@ @@ -112,11 +109,11 @@ index 0000000000..372d8160a4 +qemu_kvm_OPT="-s4" # per-CPU buffer size, in megabytes diff --git a/scripts/systemtap/script.d/qemu_kvm.stp b/scripts/systemtap/script.d/qemu_kvm.stp new file mode 100644 -index 0000000000..c04abf9449 +index 0000000..c04abf9 --- /dev/null +++ b/scripts/systemtap/script.d/qemu_kvm.stp @@ -0,0 +1 @@ +probe qemu.kvm.simpletrace.handle_qmp_command,qemu.kvm.simpletrace.monitor_protocol_*,qemu.kvm.simpletrace.migrate_set_state {} -- -2.20.1 +1.8.3.1 diff --git a/0016-Use-qemu-kvm-in-documentation-instead-of-qemu-system.patch b/0016-Use-qemu-kvm-in-documentation-instead-of-qemu-system.patch index 640e92a..35095e1 100644 --- a/0016-Use-qemu-kvm-in-documentation-instead-of-qemu-system.patch +++ b/0016-Use-qemu-kvm-in-documentation-instead-of-qemu-system.patch @@ -1,4 +1,4 @@ -From ec354bd88aaaf383bdb2177f94dec39b930cbf90 Mon Sep 17 00:00:00 2001 +From 6653aed7b06fd81e60633f7ff81d2d2cd35777fd Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Fri, 30 Nov 2018 09:11:03 +0100 Subject: Use qemu-kvm in documentation instead of qemu-system- @@ -16,16 +16,15 @@ We change the name and location of qemu-kvm binaries. Update documentation to reflect this change. Only architectures available in RHEL are updated. Signed-off-by: Miroslav Rezanina -Signed-off-by: Danilo C. L. de Paula --- - docs/qemu-block-drivers.texi | 70 +++++++++--------- - docs/qemu-cpu-models.texi | 8 +- - qemu-doc.texi | 70 +++++++++--------- - qemu-options.hx | 140 ++++++++++++++++++----------------- + docs/qemu-block-drivers.texi | 70 +++++++++++----------- + docs/qemu-cpu-models.texi | 8 +-- + qemu-doc.texi | 70 +++++++++++----------- + qemu-options.hx | 140 ++++++++++++++++++++++--------------------- 4 files changed, 146 insertions(+), 142 deletions(-) diff --git a/docs/qemu-block-drivers.texi b/docs/qemu-block-drivers.texi -index da06a9bc83..03c6705505 100644 +index 91ab0ec..35cc3d8 100644 --- a/docs/qemu-block-drivers.texi +++ b/docs/qemu-block-drivers.texi @@ -405,7 +405,7 @@ QEMU can automatically create a virtual FAT disk image from a @@ -236,10 +235,10 @@ index da06a9bc83..03c6705505 100644 @var{host}:@var{bus}:@var{slot}.@var{func} is the NVMe controller's PCI device diff --git a/docs/qemu-cpu-models.texi b/docs/qemu-cpu-models.texi -index 23c11dc86f..8697254ad4 100644 +index ad040cf..0de3229 100644 --- a/docs/qemu-cpu-models.texi +++ b/docs/qemu-cpu-models.texi -@@ -566,25 +566,25 @@ CPU models / features in QEMU and libvirt +@@ -578,25 +578,25 @@ CPU models / features in QEMU and libvirt @item Host passthrough @example @@ -270,10 +269,10 @@ index 23c11dc86f..8697254ad4 100644 @end table diff --git a/qemu-doc.texi b/qemu-doc.texi -index ae3c3f9632..a8cd3660bc 100644 +index 577d1e8..44427bb 100644 --- a/qemu-doc.texi +++ b/qemu-doc.texi -@@ -206,12 +206,12 @@ Note that, by default, GUS shares IRQ(7) with parallel ports and so +@@ -207,12 +207,12 @@ Note that, by default, GUS shares IRQ(7) with parallel ports and so QEMU must be told to not have parallel ports to have working GUS. @example @@ -288,7 +287,7 @@ index ae3c3f9632..a8cd3660bc 100644 @end example Or some other unclaimed IRQ. -@@ -227,7 +227,7 @@ CS4231A is the chip used in Windows Sound System and GUSMAX products +@@ -228,7 +228,7 @@ CS4231A is the chip used in Windows Sound System and GUSMAX products Download and uncompress the linux image (@file{linux.img}) and type: @example @@ -297,7 +296,7 @@ index ae3c3f9632..a8cd3660bc 100644 @end example Linux should boot and give you a prompt. -@@ -237,7 +237,7 @@ Linux should boot and give you a prompt. +@@ -238,7 +238,7 @@ Linux should boot and give you a prompt. @example @c man begin SYNOPSIS @@ -306,7 +305,7 @@ index ae3c3f9632..a8cd3660bc 100644 @c man end @end example -@@ -277,21 +277,21 @@ is specified in seconds. The default is 0 which means no timeout. Libiscsi +@@ -278,21 +278,21 @@ is specified in seconds. The default is 0 which means no timeout. Libiscsi Example (without authentication): @example @@ -331,7 +330,7 @@ index ae3c3f9632..a8cd3660bc 100644 @end example @item NBD -@@ -306,12 +306,12 @@ Syntax for specifying a NBD device using Unix Domain Sockets +@@ -307,12 +307,12 @@ Syntax for specifying a NBD device using Unix Domain Sockets Example for TCP @example @@ -346,7 +345,7 @@ index ae3c3f9632..a8cd3660bc 100644 @end example @item SSH -@@ -319,8 +319,8 @@ QEMU supports SSH (Secure Shell) access to remote disks. +@@ -320,8 +320,8 @@ QEMU supports SSH (Secure Shell) access to remote disks. Examples: @example @@ -357,7 +356,7 @@ index ae3c3f9632..a8cd3660bc 100644 @end example Currently authentication must be done using ssh-agent. Other -@@ -338,7 +338,7 @@ sheepdog[+tcp|+unix]://[host:port]/vdiname[?socket=path][#snapid|#tag] +@@ -339,7 +339,7 @@ sheepdog[+tcp|+unix]://[host:port]/vdiname[?socket=path][#snapid|#tag] Example @example @@ -366,7 +365,7 @@ index ae3c3f9632..a8cd3660bc 100644 @end example See also @url{https://sheepdog.github.io/sheepdog/}. -@@ -364,17 +364,17 @@ JSON: +@@ -365,17 +365,17 @@ JSON: Example @example URI: @@ -387,7 +386,7 @@ index ae3c3f9632..a8cd3660bc 100644 @ file.debug=9,file.logfile=/var/log/qemu-gluster.log, @ file.server.0.type=tcp,file.server.0.host=1.2.3.4,file.server.0.port=24007, @ file.server.1.type=unix,file.server.1.socket=/var/run/glusterd.socket -@@ -439,9 +439,9 @@ of . +@@ -440,9 +440,9 @@ of . Example: boot from a remote Fedora 20 live ISO image @example @@ -399,7 +398,7 @@ index ae3c3f9632..a8cd3660bc 100644 @end example Example: boot from a remote Fedora 20 cloud image using a local overlay for -@@ -449,7 +449,7 @@ writes, copy-on-read, and a readahead of 64k +@@ -450,7 +450,7 @@ writes, copy-on-read, and a readahead of 64k @example qemu-img create -f qcow2 -o backing_file='json:@{"file.driver":"http",, "file.url":"https://dl.fedoraproject.org/pub/fedora/linux/releases/20/Images/x86_64/Fedora-x86_64-20-20131211.1-sda.qcow2",, "file.readahead":"64k"@}' /tmp/Fedora-x86_64-20-20131211.1-sda.qcow2 @@ -408,7 +407,7 @@ index ae3c3f9632..a8cd3660bc 100644 @end example Example: boot from an image stored on a VMware vSphere server with a self-signed -@@ -458,7 +458,7 @@ of 10 seconds. +@@ -459,7 +459,7 @@ of 10 seconds. @example qemu-img create -f qcow2 -o backing_file='json:@{"file.driver":"https",, "file.url":"https://user:password@@vsphere.example.com/folder/test/test-flat.vmdk?dcPath=Datacenter&dsName=datastore1",, "file.sslverify":"off",, "file.readahead":"64k",, "file.timeout":10@}' /tmp/test.qcow2 @@ -417,7 +416,7 @@ index ae3c3f9632..a8cd3660bc 100644 @end example @end table -@@ -825,7 +825,7 @@ On Linux hosts, a shared memory device is available. The basic syntax +@@ -826,7 +826,7 @@ On Linux hosts, a shared memory device is available. The basic syntax is: @example @@ -426,7 +425,7 @@ index ae3c3f9632..a8cd3660bc 100644 @end example where @var{hostmem} names a host memory backend. For a POSIX shared -@@ -846,7 +846,7 @@ memory server is: +@@ -847,7 +847,7 @@ memory server is: ivshmem-server -p @var{pidfile} -S @var{path} -m @var{shm-name} -l @var{shm-size} -n @var{vectors} # Then start your qemu instances with matching arguments @@ -435,7 +434,7 @@ index ae3c3f9632..a8cd3660bc 100644 -chardev socket,path=@var{path},id=@var{id} @end example -@@ -871,7 +871,7 @@ Instead of specifying the using POSIX shm, you may specify +@@ -872,7 +872,7 @@ Instead of specifying the using POSIX shm, you may specify a memory backend that has hugepage support: @example @@ -444,7 +443,7 @@ index ae3c3f9632..a8cd3660bc 100644 -device ivshmem-plain,memdev=mb1 @end example -@@ -887,7 +887,7 @@ kernel testing. +@@ -888,7 +888,7 @@ kernel testing. The syntax is: @example @@ -453,7 +452,7 @@ index ae3c3f9632..a8cd3660bc 100644 @end example Use @option{-kernel} to provide the Linux kernel image and -@@ -902,7 +902,7 @@ If you do not need graphical output, you can disable it and redirect +@@ -903,7 +903,7 @@ If you do not need graphical output, you can disable it and redirect the virtual serial port and the QEMU monitor to the console with the @option{-nographic} option. The typical command line is: @example @@ -462,7 +461,7 @@ index ae3c3f9632..a8cd3660bc 100644 -append "root=/dev/hda console=ttyS0" -nographic @end example -@@ -968,7 +968,7 @@ Network adapter that supports CDC ethernet and RNDIS protocols. @var{id} +@@ -969,7 +969,7 @@ Network adapter that supports CDC ethernet and RNDIS protocols. @var{id} specifies a netdev defined with @code{-netdev @dots{},id=@var{id}}. For instance, user-mode networking can be used with @example @@ -471,7 +470,7 @@ index ae3c3f9632..a8cd3660bc 100644 @end example @item usb-ccid Smartcard reader device -@@ -987,7 +987,7 @@ no type is given, the HCI logic corresponds to @code{-bt hci,vlan=0}. +@@ -988,7 +988,7 @@ no type is given, the HCI logic corresponds to @code{-bt hci,vlan=0}. This USB device implements the USB Transport Layer of HCI. Example usage: @example @@ -480,7 +479,7 @@ index ae3c3f9632..a8cd3660bc 100644 @end example @end table -@@ -1064,7 +1064,7 @@ For this setup it is recommended to restrict it to listen on a UNIX domain +@@ -1065,7 +1065,7 @@ For this setup it is recommended to restrict it to listen on a UNIX domain socket only. For example @example @@ -489,7 +488,7 @@ index ae3c3f9632..a8cd3660bc 100644 @end example This ensures that only users on local box with read/write access to that -@@ -1087,7 +1087,7 @@ is running the password is set with the monitor. Until the monitor is used to +@@ -1088,7 +1088,7 @@ is running the password is set with the monitor. Until the monitor is used to set the password all clients will be rejected. @example @@ -498,7 +497,7 @@ index ae3c3f9632..a8cd3660bc 100644 (qemu) change vnc password Password: ******** (qemu) -@@ -1104,7 +1104,7 @@ support provides a secure session, but no authentication. This allows any +@@ -1105,7 +1105,7 @@ support provides a secure session, but no authentication. This allows any client to connect, and provides an encrypted session. @example @@ -507,7 +506,7 @@ index ae3c3f9632..a8cd3660bc 100644 -object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=server,verify-peer=no \ -vnc :1,tls-creds=tls0 -monitor stdio @end example -@@ -1126,7 +1126,7 @@ same syntax as previously, but with @code{verify-peer} set to @code{yes} +@@ -1127,7 +1127,7 @@ same syntax as previously, but with @code{verify-peer} set to @code{yes} instead. @example @@ -516,7 +515,7 @@ index ae3c3f9632..a8cd3660bc 100644 -object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=server,verify-peer=yes \ -vnc :1,tls-creds=tls0 -monitor stdio @end example -@@ -1139,7 +1139,7 @@ Finally, the previous method can be combined with VNC password authentication +@@ -1140,7 +1140,7 @@ Finally, the previous method can be combined with VNC password authentication to provide two layers of authentication for clients. @example @@ -525,7 +524,7 @@ index ae3c3f9632..a8cd3660bc 100644 -object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=server,verify-peer=yes \ -vnc :1,tls-creds=tls0,password -monitor stdio (qemu) change vnc password -@@ -1164,7 +1164,7 @@ used for authentication, but assuming use of one supporting SSF, +@@ -1165,7 +1165,7 @@ used for authentication, but assuming use of one supporting SSF, then QEMU can be launched with: @example @@ -534,7 +533,7 @@ index ae3c3f9632..a8cd3660bc 100644 @end example @node vnc_sec_certificate_sasl -@@ -1178,7 +1178,7 @@ credentials. This can be enabled, by combining the 'sasl' option +@@ -1179,7 +1179,7 @@ credentials. This can be enabled, by combining the 'sasl' option with the aforementioned TLS + x509 options: @example @@ -543,7 +542,7 @@ index ae3c3f9632..a8cd3660bc 100644 -object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=server,verify-peer=yes \ -vnc :1,tls-creds=tls0,sasl -monitor stdio @end example -@@ -1573,7 +1573,7 @@ QEMU has a primitive support to work with gdb, so that you can do +@@ -1574,7 +1574,7 @@ QEMU has a primitive support to work with gdb, so that you can do In order to use gdb, launch QEMU with the '-s' option. It will wait for a gdb connection: @example @@ -552,7 +551,7 @@ index ae3c3f9632..a8cd3660bc 100644 -append "root=/dev/hda" Connected to host network interface: tun0 Waiting gdb connection on port 1234 -@@ -1819,7 +1819,7 @@ Set the initial VGA graphic mode. The default is 800x600x32. +@@ -1820,7 +1820,7 @@ Set the initial VGA graphic mode. The default is 800x600x32. Set OpenBIOS variables in NVRAM, for example: @example @@ -562,10 +561,10 @@ index ae3c3f9632..a8cd3660bc 100644 -prom-env 'boot-args=conf=hd:2,\yaboot.conf' @end example diff --git a/qemu-options.hx b/qemu-options.hx -index 0f55062546..7ec1a3b099 100644 +index 6873f9e..9f323ec 100644 --- a/qemu-options.hx +++ b/qemu-options.hx -@@ -253,7 +253,7 @@ This option defines a free-form string that can be used to describe @var{fd}. +@@ -254,7 +254,7 @@ This option defines a free-form string that can be used to describe @var{fd}. You can open an image using pre-opened file descriptors from an fd set: @example @@ -574,7 +573,7 @@ index 0f55062546..7ec1a3b099 100644 -add-fd fd=3,set=2,opaque="rdwr:/path/to/file" -add-fd fd=4,set=2,opaque="rdonly:/path/to/file" -drive file=/dev/fdset/2,index=0,media=disk -@@ -282,7 +282,7 @@ STEXI +@@ -283,7 +283,7 @@ STEXI Set default value of @var{driver}'s property @var{prop} to @var{value}, e.g.: @example @@ -583,7 +582,7 @@ index 0f55062546..7ec1a3b099 100644 @end example In particular, you can use this to set driver properties for devices which are -@@ -336,11 +336,11 @@ bootindex options. The default is non-strict boot. +@@ -337,11 +337,11 @@ bootindex options. The default is non-strict boot. @example # try to boot from network first, then from hard disk @@ -598,7 +597,7 @@ index 0f55062546..7ec1a3b099 100644 @end example Note: The legacy format '-boot @var{drives}' is still supported but its -@@ -369,7 +369,7 @@ For example, the following command-line sets the guest startup RAM size to +@@ -370,7 +370,7 @@ For example, the following command-line sets the guest startup RAM size to memory the guest can reach to 4GB: @example @@ -607,7 +606,7 @@ index 0f55062546..7ec1a3b099 100644 @end example If @var{slots} and @var{maxmem} are not specified, memory hotplug won't -@@ -668,12 +668,12 @@ Enable audio and selected sound hardware. Use 'help' to print all +@@ -669,12 +669,12 @@ Enable audio and selected sound hardware. Use 'help' to print all available sound hardware. @example @@ -626,7 +625,7 @@ index 0f55062546..7ec1a3b099 100644 @end example Note that Linux's i810_audio OSS kernel (for AC97) module might -@@ -1148,21 +1148,21 @@ is off. +@@ -1149,21 +1149,21 @@ is off. Instead of @option{-cdrom} you can use: @example @@ -654,7 +653,7 @@ index 0f55062546..7ec1a3b099 100644 -add-fd fd=3,set=2,opaque="rdwr:/path/to/file" -add-fd fd=4,set=2,opaque="rdonly:/path/to/file" -drive file=/dev/fdset/2,index=0,media=disk -@@ -1170,28 +1170,28 @@ qemu-system-i386 +@@ -1171,28 +1171,28 @@ qemu-system-i386 You can connect a CDROM to the slave of ide0: @example @@ -689,7 +688,7 @@ index 0f55062546..7ec1a3b099 100644 @end example ETEXI -@@ -2217,8 +2217,8 @@ The following two example do exactly the same, to show how @option{-nic} can +@@ -2258,8 +2258,8 @@ The following two example do exactly the same, to show how @option{-nic} can be used to shorten the command line length (note that the e1000 is the default on i386, so the @option{model=e1000} parameter could even be omitted here, too): @example @@ -700,7 +699,7 @@ index 0f55062546..7ec1a3b099 100644 @end example @item -nic none -@@ -2289,7 +2289,7 @@ can not be resolved. +@@ -2330,7 +2330,7 @@ can not be resolved. Example: @example @@ -709,7 +708,7 @@ index 0f55062546..7ec1a3b099 100644 @end example @item domainname=@var{domain} -@@ -2313,7 +2313,7 @@ a guest from a local directory. +@@ -2354,7 +2354,7 @@ a guest from a local directory. Example (using pxelinux): @example @@ -718,7 +717,7 @@ index 0f55062546..7ec1a3b099 100644 -netdev user,id=n1,tftp=/path/to/tftp/files,bootfile=/pxelinux.0 @end example -@@ -2347,7 +2347,7 @@ screen 0, use the following: +@@ -2388,7 +2388,7 @@ screen 0, use the following: @example # on the host @@ -727,7 +726,7 @@ index 0f55062546..7ec1a3b099 100644 # this host xterm should open in the guest X11 server xterm -display :1 @end example -@@ -2357,7 +2357,7 @@ the guest, use the following: +@@ -2398,7 +2398,7 @@ the guest, use the following: @example # on the host @@ -736,7 +735,7 @@ index 0f55062546..7ec1a3b099 100644 telnet localhost 5555 @end example -@@ -2376,7 +2376,7 @@ lifetime, like in the following example: +@@ -2417,7 +2417,7 @@ lifetime, like in the following example: @example # open 10.10.1.1:4321 on bootup, connect 10.0.2.100:1234 to it whenever # the guest accesses it @@ -745,7 +744,7 @@ index 0f55062546..7ec1a3b099 100644 @end example Or you can execute a command on every TCP connection established by the guest, -@@ -2385,7 +2385,7 @@ so that QEMU behaves similar to an inetd process for that virtual server: +@@ -2426,7 +2426,7 @@ so that QEMU behaves similar to an inetd process for that virtual server: @example # call "netcat 10.10.1.1 4321" on every TCP connection to 10.0.2.100:1234 # and connect the TCP stream to its stdin/stdout @@ -754,7 +753,7 @@ index 0f55062546..7ec1a3b099 100644 @end example @end table -@@ -2412,21 +2412,22 @@ Examples: +@@ -2453,21 +2453,22 @@ Examples: @example #launch a QEMU instance with the default network script @@ -780,7 +779,7 @@ index 0f55062546..7ec1a3b099 100644 -netdev tap,id=n1,"helper=/path/to/qemu-bridge-helper" @end example -@@ -2443,13 +2444,13 @@ Examples: +@@ -2484,13 +2485,13 @@ Examples: @example #launch a QEMU instance with the default network helper to #connect a TAP device to bridge br0 @@ -796,7 +795,7 @@ index 0f55062546..7ec1a3b099 100644 @end example @item -netdev socket,id=@var{id}[,fd=@var{h}][,listen=[@var{host}]:@var{port}][,connect=@var{host}:@var{port}] -@@ -2464,13 +2465,13 @@ specifies an already opened TCP socket. +@@ -2505,13 +2506,13 @@ specifies an already opened TCP socket. Example: @example # launch a first QEMU instance @@ -816,7 +815,7 @@ index 0f55062546..7ec1a3b099 100644 @end example @item -netdev socket,id=@var{id}[,fd=@var{h}][,mcast=@var{maddr}:@var{port}[,localaddr=@var{addr}]] -@@ -2493,15 +2494,15 @@ Use @option{fd=h} to specify an already opened UDP multicast socket. +@@ -2534,15 +2535,15 @@ Use @option{fd=h} to specify an already opened UDP multicast socket. Example: @example # launch one QEMU instance @@ -839,7 +838,7 @@ index 0f55062546..7ec1a3b099 100644 -device e1000,netdev=n3,mac=52:54:00:12:34:58 \ -netdev socket,id=n3,mcast=230.0.0.1:1234 @end example -@@ -2509,7 +2510,7 @@ qemu-system-i386 linux.img \ +@@ -2550,7 +2551,7 @@ qemu-system-i386 linux.img \ Example (User Mode Linux compat.): @example # launch QEMU instance (note mcast address selected is UML's default) @@ -848,7 +847,7 @@ index 0f55062546..7ec1a3b099 100644 -device e1000,netdev=n1,mac=52:54:00:12:34:56 \ -netdev socket,id=n1,mcast=239.192.168.1:1102 # launch UML -@@ -2518,9 +2519,12 @@ qemu-system-i386 linux.img \ +@@ -2559,9 +2560,12 @@ qemu-system-i386 linux.img \ Example (send packets from host's 1.2.3.4): @example @@ -864,7 +863,7 @@ index 0f55062546..7ec1a3b099 100644 @end example @item -netdev l2tpv3,id=@var{id},src=@var{srcaddr},dst=@var{dstaddr}[,srcport=@var{srcport}][,dstport=@var{dstport}],txsession=@var{txsession}[,rxsession=@var{rxsession}][,ipv6][,udp][,cookie64][,counter][,pincounter][,txcookie=@var{txcookie}][,rxcookie=@var{rxcookie}][,offset=@var{offset}] -@@ -2578,7 +2582,7 @@ brctl addif br-lan vmtunnel0 +@@ -2619,7 +2623,7 @@ brctl addif br-lan vmtunnel0 # on 4.3.2.1 # launch QEMU instance - if your network has reorder or is very lossy add ,pincounter @@ -873,7 +872,7 @@ index 0f55062546..7ec1a3b099 100644 -netdev l2tpv3,id=n1,src=4.2.3.1,dst=1.2.3.4,udp,srcport=16384,dstport=16384,rxsession=0xffffffff,txsession=0xffffffff,counter @end example -@@ -2595,7 +2599,7 @@ Example: +@@ -2636,7 +2640,7 @@ Example: # launch vde switch vde_switch -F -sock /tmp/myswitch # launch QEMU instance @@ -882,7 +881,7 @@ index 0f55062546..7ec1a3b099 100644 @end example @item -netdev vhost-user,chardev=@var{id}[,vhostforce=on|off][,queues=n] -@@ -2609,11 +2613,11 @@ be created for multiqueue vhost-user. +@@ -2650,11 +2654,11 @@ be created for multiqueue vhost-user. Example: @example @@ -899,7 +898,7 @@ index 0f55062546..7ec1a3b099 100644 @end example @item -netdev hubport,id=@var{id},hubid=@var{hubid}[,netdev=@var{nd}] -@@ -3053,7 +3057,7 @@ and communicate. Requires the Linux @code{vhci} driver installed. Can +@@ -3094,7 +3098,7 @@ and communicate. Requires the Linux @code{vhci} driver installed. Can be used as following: @example @@ -908,7 +907,7 @@ index 0f55062546..7ec1a3b099 100644 @end example @item -bt device:@var{dev}[,vlan=@var{n}] -@@ -3503,14 +3507,14 @@ ETEXI +@@ -3544,14 +3548,14 @@ ETEXI DEF("realtime", HAS_ARG, QEMU_OPTION_realtime, "-realtime [mlock=on|off]\n" @@ -926,7 +925,7 @@ index 0f55062546..7ec1a3b099 100644 (enabled by default). ETEXI -@@ -3548,7 +3552,7 @@ connections will likely be TCP-based, but also UDP, pseudo TTY, or even +@@ -3589,7 +3593,7 @@ connections will likely be TCP-based, but also UDP, pseudo TTY, or even stdio are reasonable use case. The latter is allowing to start QEMU from within gdb and establish the connection via a pipe: @example @@ -935,7 +934,7 @@ index 0f55062546..7ec1a3b099 100644 @end example ETEXI -@@ -4467,7 +4471,7 @@ which specify the queue number of cryptodev backend, the default of +@@ -4559,7 +4563,7 @@ which specify the queue number of cryptodev backend, the default of @example @@ -944,7 +943,7 @@ index 0f55062546..7ec1a3b099 100644 [...] \ -object cryptodev-backend-builtin,id=cryptodev0 \ -device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0 \ -@@ -4487,7 +4491,7 @@ of cryptodev backend for multiqueue vhost-user, the default of @var{queues} is 1 +@@ -4579,7 +4583,7 @@ of cryptodev backend for multiqueue vhost-user, the default of @var{queues} is 1 @example @@ -954,5 +953,5 @@ index 0f55062546..7ec1a3b099 100644 -chardev socket,id=chardev0,path=/path/to/socket \ -object cryptodev-vhost-user,id=cryptodev0,chardev=chardev0 \ -- -2.20.1 +1.8.3.1 diff --git a/0017-usb-xhci-Fix-PCI-capability-order.patch b/0017-usb-xhci-Fix-PCI-capability-order.patch index b5e74a1..eea2b60 100644 --- a/0017-usb-xhci-Fix-PCI-capability-order.patch +++ b/0017-usb-xhci-Fix-PCI-capability-order.patch @@ -1,4 +1,4 @@ -From a4af398c3849751bc240c4f8f1f0cf2fcf57d21e Mon Sep 17 00:00:00 2001 +From 3d4a21ffdf876acfd5a8546a2f3e9ab2bfcf2ff9 Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Fri, 5 May 2017 19:06:14 +0200 Subject: usb-xhci: Fix PCI capability order @@ -56,16 +56,15 @@ Conflicts: (cherry picked from commit a42f86dc906cc7d2c16d02bf125ed76847b469cb) (cherry picked from commit 992ab2e4f6e15d3e51bc716763aa8d6f45c6d29d) -Signed-off-by: Danilo C. L. de Paula --- hw/usb/hcd-xhci.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c -index ad351a7b6d..43a47539aa 100644 +index 9854fae..adfacac 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c -@@ -3393,6 +3393,12 @@ static void usb_xhci_realize(struct PCIDevice *dev, Error **errp) +@@ -3397,6 +3397,12 @@ static void usb_xhci_realize(struct PCIDevice *dev, Error **errp) xhci->max_pstreams_mask = 0; } @@ -78,7 +77,7 @@ index ad351a7b6d..43a47539aa 100644 if (xhci->msi != ON_OFF_AUTO_OFF) { ret = msi_init(dev, 0x70, xhci->numintrs, true, false, &err); /* Any error other than -ENOTSUP(board's MSI support is broken) -@@ -3441,12 +3447,6 @@ static void usb_xhci_realize(struct PCIDevice *dev, Error **errp) +@@ -3445,12 +3451,6 @@ static void usb_xhci_realize(struct PCIDevice *dev, Error **errp) PCI_BASE_ADDRESS_SPACE_MEMORY|PCI_BASE_ADDRESS_MEM_TYPE_64, &xhci->mem); @@ -92,5 +91,5 @@ index ad351a7b6d..43a47539aa 100644 /* TODO check for errors, and should fail when msix=on */ msix_init(dev, xhci->numintrs, -- -2.20.1 +1.8.3.1 diff --git a/0018-virtio-scsi-Reject-scsi-cd-if-data-plane-enabled-RHE.patch b/0018-virtio-scsi-Reject-scsi-cd-if-data-plane-enabled-RHE.patch index c1e39f5..585ef69 100644 --- a/0018-virtio-scsi-Reject-scsi-cd-if-data-plane-enabled-RHE.patch +++ b/0018-virtio-scsi-Reject-scsi-cd-if-data-plane-enabled-RHE.patch @@ -1,4 +1,4 @@ -From bf7fc2d5907b351ddfc85416d48e47f66024ccbe Mon Sep 17 00:00:00 2001 +From 5ba84e6e9b843cc224735e293da35fc218da27fb Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Wed, 14 Jun 2017 15:37:01 +0200 Subject: virtio-scsi: Reject scsi-cd if data plane enabled [RHEL only] @@ -45,12 +45,12 @@ Signed-off-by: Danilo C. L. de Paula 1 file changed, 9 insertions(+) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c -index 839f120256..fd4b5c46ec 100644 +index 8b9e5e2..9df5494 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c -@@ -796,6 +796,15 @@ static void virtio_scsi_hotplug(HotplugHandler *hotplug_dev, DeviceState *dev, - VirtIOSCSI *s = VIRTIO_SCSI(vdev); +@@ -805,6 +805,15 @@ static void virtio_scsi_hotplug(HotplugHandler *hotplug_dev, DeviceState *dev, SCSIDevice *sd = SCSI_DEVICE(dev); + int ret; + /* XXX: Remove this check once block backend is capable of handling + * AioContext change upon eject/insert. @@ -62,8 +62,8 @@ index 839f120256..fd4b5c46ec 100644 + return; + } if (s->ctx && !s->dataplane_fenced) { - AioContext *ctx; if (blk_op_is_blocked(sd->conf.blk, BLOCK_OP_TYPE_DATAPLANE, errp)) { + return; -- -2.20.1 +1.8.3.1 diff --git a/0019-BZ1653590-Require-at-least-64kiB-pages-for-downstrea.patch b/0019-BZ1653590-Require-at-least-64kiB-pages-for-downstrea.patch index 6061ba9..b932c83 100644 --- a/0019-BZ1653590-Require-at-least-64kiB-pages-for-downstrea.patch +++ b/0019-BZ1653590-Require-at-least-64kiB-pages-for-downstrea.patch @@ -1,4 +1,4 @@ -From 581909cc6cb4e8286126721b76a79e93a9880e1f Mon Sep 17 00:00:00 2001 +From 4653a397c083e29b2a54ade8b17c977f224a3b80 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Wed, 6 Feb 2019 03:58:56 +0000 Subject: BZ1653590: Require at least 64kiB pages for downstream guests & hosts @@ -32,10 +32,10 @@ Signed-off-by: Danilo C. L. de Paula 1 file changed, 7 insertions(+) diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c -index edc5ed0e0c..f59ab398d4 100644 +index bbb001f..40cd9dc 100644 --- a/hw/ppc/spapr_caps.c +++ b/hw/ppc/spapr_caps.c -@@ -340,12 +340,19 @@ void spapr_check_pagesize(SpaprMachineState *spapr, hwaddr pagesize, +@@ -343,12 +343,19 @@ void spapr_check_pagesize(SpaprMachineState *spapr, hwaddr pagesize, static void cap_hpt_maxpagesize_apply(SpaprMachineState *spapr, uint8_t val, Error **errp) { @@ -53,8 +53,8 @@ index edc5ed0e0c..f59ab398d4 100644 + } +#endif - spapr_check_pagesize(spapr, qemu_getrampagesize(), errp); + spapr_check_pagesize(spapr, qemu_minrampagesize(), errp); } -- -2.20.1 +1.8.3.1 diff --git a/0020-doc-fix-the-configuration-path.patch b/0020-doc-fix-the-configuration-path.patch deleted file mode 100644 index f4eea28..0000000 --- a/0020-doc-fix-the-configuration-path.patch +++ /dev/null @@ -1,80 +0,0 @@ -From b1799db735fe51f8b31c565814d79c7ec4fc82dc Mon Sep 17 00:00:00 2001 -From: Danilo de Paula -Date: Fri, 8 Feb 2019 11:51:14 +0000 -Subject: doc: fix the configuration path -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -RH-Author: Danilo de Paula -Message-id: <20190208115114.24850-2-ddepaula@redhat.com> -Patchwork-id: 84320 -O-Subject: [RHEL8/rhel qemu-kvm PATCH v2 1/1] doc: fix the configuration path -Bugzilla: 1644985 -RH-Acked-by: Philippe Mathieu-Daudé -RH-Acked-by: Marc-André Lureau -RH-Acked-by: Stefano Garzarella -RH-Acked-by: Wainer dos Santos Moschetta - -From: Marc-André Lureau - -Use a CONFDIR variable to show the configured sysconf path in the -generated documentations (html, man pages etc). - -Related to: -https://bugzilla.redhat.com/show_bug.cgi?id=1644985 - -Signed-off-by: Marc-André Lureau -Signed-off-by: Danilo C. L. de Paula ---- - Makefile | 9 ++++++--- - qemu-ga.texi | 4 ++-- - 2 files changed, 8 insertions(+), 5 deletions(-) - -diff --git a/Makefile b/Makefile -index 41a77a90af..20c39c41a8 100644 ---- a/Makefile -+++ b/Makefile -@@ -877,11 +877,14 @@ ui/shader.o: $(SRC_PATH)/ui/shader.c \ - MAKEINFO=makeinfo - MAKEINFOINCLUDES= -I docs -I $( $@,"GEN","$@") -+docs/version.texi: $(SRC_PATH)/VERSION config-host.mak -+ $(call quiet-command,(\ -+ echo "@set VERSION $(VERSION)" && \ -+ echo "@set CONFDIR $(qemu_confdir)" \ -+ )> $@,"GEN","$@") - - %.html: %.texi docs/version.texi - $(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --no-headers \ -diff --git a/qemu-ga.texi b/qemu-ga.texi -index 4c7a8fd163..f00ad830f2 100644 ---- a/qemu-ga.texi -+++ b/qemu-ga.texi -@@ -30,7 +30,7 @@ set user's password - @end itemize - - qemu-ga will read a system configuration file on startup (located at --@file{/etc/qemu/qemu-ga.conf} by default), then parse remaining -+@file{@value{CONFDIR}/qemu-ga.conf} by default), then parse remaining - configuration options on the command line. For the same key, the last - option wins, but the lists accumulate (see below for configuration - file format). -@@ -58,7 +58,7 @@ file format). - Enable fsfreeze hook. Accepts an optional argument that specifies - script to run on freeze/thaw. Script will be called with - 'freeze'/'thaw' arguments accordingly (default is -- @samp{/etc/qemu/fsfreeze-hook}). If using -F with an argument, do -+ @samp{@value{CONFDIR}/fsfreeze-hook}). If using -F with an argument, do - not follow -F with a space (for example: - @samp{-F/var/run/fsfreezehook.sh}). - --- -2.20.1 - diff --git a/0021-rhel-Set-host-phys-bits-limit-48-on-rhel-machine-typ.patch b/0021-rhel-Set-host-phys-bits-limit-48-on-rhel-machine-typ.patch deleted file mode 100644 index 2146485..0000000 --- a/0021-rhel-Set-host-phys-bits-limit-48-on-rhel-machine-typ.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 26606676d9d88c3f301fb8b3d39941ceff267af5 Mon Sep 17 00:00:00 2001 -From: "plai@redhat.com" -Date: Mon, 13 May 2019 16:27:20 +0200 -Subject: rhel: Set host-phys-bits-limit=48 on rhel machine-types - -RH-Author: plai@redhat.com -Message-id: <1553276715-26278-3-git-send-email-plai@redhat.com> -Patchwork-id: 85126 -O-Subject: [RHEL8.0 qemu-kvm PATCH 2/2] rhel: Set host-phys-bits-limit=48 on rhel machine-types -Bugzilla: 1688915 -RH-Acked-by: Dr. David Alan Gilbert -RH-Acked-by: Eduardo Habkost -RH-Acked-by: Michael S. Tsirkin - -From: Eduardo Habkost - -Upstream status: not applicable - -Currently we use the host physical address size by default on -VMs. This was a good default on most cases, but this is not the -case on host CPUs supporting 5-level EPT. On those cases, we -want VMs to use 4-level EPT by default. - -Ensure VMs will use 4-level EPT by default, by limiting physical -address bits to 48. - -Not applicable upstream because upstream doesn't set -host-phys-bits=on by default. - -Signed-off-by: Eduardo Habkost -Signed-off-by: Danilo C. L. de Paula -(cherry picked from commit 01a2ecb4c38fe4a35455ea706e76984ee8d5a769) -Signed-off-by: Paul Lai -Signed-off-by: Danilo C. L. de Paula - -Rebase notes (4.0.0): -- update to no compat format - -Signed-off-by: Danilo C. L. de Paula ---- - hw/i386/pc.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/hw/i386/pc.c b/hw/i386/pc.c -index 03497eed9a..91a4c5833a 100644 ---- a/hw/i386/pc.c -+++ b/hw/i386/pc.c -@@ -360,6 +360,11 @@ GlobalProperty pc_rhel_compat[] = { - .property = "host-phys-bits", - .value = "on", - }, -+ { /* PC_RHEL_COMPAT */ -+ .driver = TYPE_X86_CPU, -+ .property = "host-phys-bits-limit", -+ .value = "48", -+ }, - { /* PC_RHEL_COMPAT bz 1508330 */ - .driver = "vfio-pci", - .property = "x-no-geforce-quirks", --- -2.20.1 - diff --git a/0022-redhat-Post-rebase-synchronization.patch b/0022-redhat-Post-rebase-synchronization.patch deleted file mode 100644 index 001c982..0000000 --- a/0022-redhat-Post-rebase-synchronization.patch +++ /dev/null @@ -1,36 +0,0 @@ -From bbdbdb6ebc696a8bef420b6bd39fb3f5bbe0d5d4 Mon Sep 17 00:00:00 2001 -From: Miroslav Rezanina -Date: Mon, 13 May 2019 16:32:48 +0200 -Subject: redhat: Post rebase synchronization - -We based rebase on qemu-kvm-3.1.0-23.el8. However, 8.0.1 version moved -to qemu-kvm-3.1.0-25.el8. Adding missing changes. - -Merged-patches (4.0.0): -- ebb6e97 redhat: Fix LOCALVERSION creation -- b0ab0cc redhat: enable tpmdev passthrough (not disabling tests) -- 7cb3c4a Enable libpmem to support nvdimm - -Signed-off-by: Miroslav Rezanina -Signed-off-by: Danilo C. L. de Paula ---- - configure | 4 ++++ - redhat/Makefile | 4 ++-- - redhat/qemu-kvm.spec.template | 28 +++++++++++++++++++++++++++- - 3 files changed, 33 insertions(+), 3 deletions(-) - -diff --git a/configure b/configure -index eb0a0dde86..d6d5912ee8 100755 ---- a/configure -+++ b/configure -@@ -2411,6 +2411,10 @@ if test "$seccomp" != "no" ; then - seccomp="no" - fi - fi -+ -+# RHEL8-specific, only passthrough for now, rhbz#1688312 -+tpm_emulator=no -+ - ########################################## - # xen probe - diff --git a/kvm-Disable-VXHS-support.patch b/kvm-Disable-VXHS-support.patch deleted file mode 100644 index 75a89ad..0000000 --- a/kvm-Disable-VXHS-support.patch +++ /dev/null @@ -1,293 +0,0 @@ -From 517e4a2f490ff56c8b3fbf9a56c8d4a6e167c2b6 Mon Sep 17 00:00:00 2001 -From: Miroslav Rezanina -Date: Wed, 29 May 2019 16:09:59 +0100 -Subject: [PATCH 1/9] Disable VXHS support - -RH-Author: Miroslav Rezanina -Message-id: <1559146199-30110-1-git-send-email-mrezanin@redhat.com> -Patchwork-id: 88273 -O-Subject: [RHEL-AV-8.1.0 qemu-kvm PATCH] Disable VXHS support -Bugzilla: 1714937 -RH-Acked-by: Markus Armbruster -RH-Acked-by: Stefan Hajnoczi -RH-Acked-by: Danilo de Paula - -From: Miroslav Rezanina - -As we ended our partnership with Veritas, we do not support VXHS anymore. -Reverting our downstream changes included in "Initial redhat commit". - -Signed-off-by: Miroslav Rezanina -Signed-off-by: Danilo C. L. de Paula ---- - block/Makefile.objs | 2 +- - block/vxhs.c | 119 ++++-------------------------------------- - configure | 33 ++++++++++-- - redhat/qemu-kvm.spec.template | 11 +--- - 4 files changed, 41 insertions(+), 124 deletions(-) - -diff --git a/block/Makefile.objs b/block/Makefile.objs -index f4cf03b..7a81892 100644 ---- a/block/Makefile.objs -+++ b/block/Makefile.objs -@@ -30,7 +30,7 @@ block-obj-$(CONFIG_LIBNFS) += nfs.o - block-obj-$(CONFIG_CURL) += curl.o - block-obj-$(CONFIG_RBD) += rbd.o - block-obj-$(CONFIG_GLUSTERFS) += gluster.o --#block-obj-$(CONFIG_VXHS) += vxhs.o -+block-obj-$(CONFIG_VXHS) += vxhs.o - block-obj-$(CONFIG_LIBSSH2) += ssh.o - block-obj-y += accounting.o dirty-bitmap.o - block-obj-y += write-threshold.o -diff --git a/block/vxhs.c b/block/vxhs.c -index 3dbb954..2e18229 100644 ---- a/block/vxhs.c -+++ b/block/vxhs.c -@@ -9,8 +9,7 @@ - */ - - #include "qemu/osdep.h" --#include "block/vxhs_shim.h" --#include -+#include - #include - #include "block/block_int.h" - #include "block/qdict.h" -@@ -60,97 +59,6 @@ typedef struct BDRVVXHSState { - char *tlscredsid; /* tlscredsid */ - } BDRVVXHSState; - --#define LIBVXHS_FULL_PATHNAME "/usr/lib64/qemu/libvxhs.so.1" --static bool libvxhs_loaded; --static GModule *libvxhs_handle; -- --static LibVXHSFuncs libvxhs; -- --typedef struct LibVXHSSymbols { -- const char *name; -- gpointer *addr; --} LibVXHSSymbols; -- --static LibVXHSSymbols libvxhs_symbols[] = { -- {"iio_init", (gpointer *) &libvxhs.iio_init}, -- {"iio_fini", (gpointer *) &libvxhs.iio_fini}, -- {"iio_min_version", (gpointer *) &libvxhs.iio_min_version}, -- {"iio_max_version", (gpointer *) &libvxhs.iio_max_version}, -- {"iio_open", (gpointer *) &libvxhs.iio_open}, -- {"iio_close", (gpointer *) &libvxhs.iio_close}, -- {"iio_writev", (gpointer *) &libvxhs.iio_writev}, -- {"iio_readv", (gpointer *) &libvxhs.iio_readv}, -- {"iio_ioctl", (gpointer *) &libvxhs.iio_ioctl}, -- {NULL} --}; -- --static void bdrv_vxhs_set_funcs(GModule *handle, Error **errp) --{ -- int i = 0; -- while (libvxhs_symbols[i].name) { -- const char *name = libvxhs_symbols[i].name; -- if (!g_module_symbol(handle, name, libvxhs_symbols[i].addr)) { -- error_setg(errp, "%s could not be loaded from libvxhs: %s", -- name, g_module_error()); -- return; -- } -- ++i; -- } --} -- --static void bdrv_vxhs_load_libs(Error **errp) --{ -- Error *local_err = NULL; -- int32_t ver; -- -- if (libvxhs_loaded) { -- return; -- } -- -- if (!g_module_supported()) { -- error_setg(errp, "modules are not supported on this platform: %s", -- g_module_error()); -- return; -- } -- -- libvxhs_handle = g_module_open(LIBVXHS_FULL_PATHNAME, -- G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL); -- if (!libvxhs_handle) { -- error_setg(errp, "The VXHS library from Veritas might not be installed " -- "correctly (%s)", g_module_error()); -- return; -- } -- -- g_module_make_resident(libvxhs_handle); -- -- bdrv_vxhs_set_funcs(libvxhs_handle, &local_err); -- if (local_err) { -- error_propagate(errp, local_err); -- return; -- } -- -- /* Now check to see if the libvxhs we are using here is supported -- * by the loaded version */ -- -- ver = (*libvxhs.iio_min_version)(); -- if (ver > QNIO_VERSION) { -- error_setg(errp, "Trying to use libvxhs version %"PRId32" API, but " -- "only %"PRId32" or newer is supported by %s", -- QNIO_VERSION, ver, LIBVXHS_FULL_PATHNAME); -- return; -- } -- -- ver = (*libvxhs.iio_max_version)(); -- if (ver < QNIO_VERSION) { -- error_setg(errp, "Trying to use libvxhs version %"PRId32" API, but " -- "only %"PRId32" or earlier is supported by %s", -- QNIO_VERSION, ver, LIBVXHS_FULL_PATHNAME); -- return; -- } -- -- libvxhs_loaded = true; --} -- - static void vxhs_complete_aio_bh(void *opaque) - { - VXHSAIOCB *acb = opaque; -@@ -318,7 +226,7 @@ static void vxhs_refresh_limits(BlockDriverState *bs, Error **errp) - static int vxhs_init_and_ref(void) - { - if (vxhs_ref++ == 0) { -- if ((*libvxhs.iio_init)(QNIO_VERSION, vxhs_iio_callback)) { -+ if (iio_init(QNIO_VERSION, vxhs_iio_callback)) { - return -ENODEV; - } - } -@@ -328,7 +236,7 @@ static int vxhs_init_and_ref(void) - static void vxhs_unref(void) - { - if (--vxhs_ref == 0) { -- (*libvxhs.iio_fini)(); -+ iio_fini(); - } - } - -@@ -398,17 +306,8 @@ static int vxhs_open(BlockDriverState *bs, QDict *options, - char *client_key = NULL; - char *client_cert = NULL; - -- bdrv_vxhs_load_libs(&local_err); -- if (local_err) { -- error_propagate(errp, local_err); -- /* on error, cannot cleanup because the iio_fini() function -- * is not loaded */ -- return -EINVAL; -- } -- - ret = vxhs_init_and_ref(); - if (ret < 0) { -- error_setg(&local_err, "libvxhs iio_init() failed"); - ret = -EINVAL; - goto out; - } -@@ -493,8 +392,8 @@ static int vxhs_open(BlockDriverState *bs, QDict *options, - /* - * Open qnio channel to storage agent if not opened before - */ -- dev_handlep = (*libvxhs.iio_open)(of_vsa_addr, s->vdisk_guid, 0, -- cacert, client_key, client_cert); -+ dev_handlep = iio_open(of_vsa_addr, s->vdisk_guid, 0, -+ cacert, client_key, client_cert); - if (dev_handlep == NULL) { - trace_vxhs_open_iio_open(of_vsa_addr); - ret = -ENODEV; -@@ -554,11 +453,11 @@ static BlockAIOCB *vxhs_aio_rw(BlockDriverState *bs, uint64_t offset, - - switch (iodir) { - case VDISK_AIO_WRITE: -- ret = (*libvxhs.iio_writev)(dev_handle, acb, qiov->iov, qiov->niov, -+ ret = iio_writev(dev_handle, acb, qiov->iov, qiov->niov, - offset, size, iio_flags); - break; - case VDISK_AIO_READ: -- ret = (*libvxhs.iio_writev)(dev_handle, acb, qiov->iov, qiov->niov, -+ ret = iio_readv(dev_handle, acb, qiov->iov, qiov->niov, - offset, size, iio_flags); - break; - default: -@@ -607,7 +506,7 @@ static void vxhs_close(BlockDriverState *bs) - * Close vDisk device - */ - if (s->vdisk_hostinfo.dev_handle) { -- (*libvxhs.iio_close)(s->vdisk_hostinfo.dev_handle); -+ iio_close(s->vdisk_hostinfo.dev_handle); - s->vdisk_hostinfo.dev_handle = NULL; - } - -@@ -629,7 +528,7 @@ static int64_t vxhs_get_vdisk_stat(BDRVVXHSState *s) - int ret = 0; - void *dev_handle = s->vdisk_hostinfo.dev_handle; - -- ret = (*libvxhs.iio_ioctl)(dev_handle, IOR_VDISK_STAT, &vdisk_size, 0); -+ ret = iio_ioctl(dev_handle, IOR_VDISK_STAT, &vdisk_size, 0); - if (ret < 0) { - trace_vxhs_get_vdisk_stat_err(s->vdisk_guid, ret, errno); - return -EIO; -diff --git a/configure b/configure -index d6d5912..8cb6740 100755 ---- a/configure -+++ b/configure -@@ -3616,7 +3616,7 @@ fi - - glib_req_ver=2.40 - glib_modules=gthread-2.0 --if test "$modules" = yes -o "$vxhs" = yes; then -+if test "$modules" = yes; then - glib_modules="$glib_modules gmodule-export-2.0" - fi - -@@ -5760,6 +5760,33 @@ if compile_prog "" "" ; then - fi - - ########################################## -+# Veritas HyperScale block driver VxHS -+# Check if libvxhs is installed -+ -+if test "$vxhs" != "no" ; then -+ cat > $TMPC < -+#include -+ -+void *vxhs_callback; -+ -+int main(void) { -+ iio_init(QNIO_VERSION, vxhs_callback); -+ return 0; -+} -+EOF -+ vxhs_libs="-lvxhs -lssl" -+ if compile_prog "" "$vxhs_libs" ; then -+ vxhs=yes -+ else -+ if test "$vxhs" = "yes" ; then -+ feature_not_found "vxhs block device" "Install libvxhs See github" -+ fi -+ vxhs=no -+ fi -+fi -+ -+########################################## - # check for _Static_assert() - - have_static_assert=no -@@ -7195,8 +7222,8 @@ elif test "$pthread_setname_np_wo_tid" = "yes" ; then - fi - - if test "$vxhs" = "yes" ; then -- echo "CONFIG_VXHS=m" >> $config_host_mak -- echo "VXHS_LIBS= -lssl" >> $config_host_mak -+ echo "CONFIG_VXHS=y" >> $config_host_mak -+ echo "VXHS_LIBS=$vxhs_libs" >> $config_host_mak - fi - - if test "$libpmem" = "yes" ; then --- -1.8.3.1 - diff --git a/kvm-aarch64-Add-virt-rhel8.1.0-machine-type-for-ARM.patch b/kvm-aarch64-Add-virt-rhel8.1.0-machine-type-for-ARM.patch deleted file mode 100644 index db57f7b..0000000 --- a/kvm-aarch64-Add-virt-rhel8.1.0-machine-type-for-ARM.patch +++ /dev/null @@ -1,56 +0,0 @@ -From c3e39ef14e99f903b95fa051936f40ebd6c35484 Mon Sep 17 00:00:00 2001 -From: Auger Eric -Date: Mon, 3 Jun 2019 19:17:39 +0100 -Subject: [PATCH 2/9] aarch64: Add virt-rhel8.1.0 machine type for ARM -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -RH-Author: Auger Eric -Message-id: <20190603191740.32665-2-eric.auger@redhat.com> -Patchwork-id: 88461 -O-Subject: [RHEL-AV-8.1.0 qemu-kvm PATCH 1/2] aarch64: Add virt-rhel8.1.0 machine type for ARM -Bugzilla: 1713735 -RH-Acked-by: Andrew Jones -RH-Acked-by: Laszlo Ersek -RH-Acked-by: Philippe Mathieu-Daudé - -This patch adds a new machine type, virt-rhel8.1.0, for QEMU rhel-av. -This machine type is based off 4.0 with the exception that it removes -support for dynamic sysbus devices: VFIO_CALXEDA_XGMAC, VFIO_AMD_XGBE, and -RAMFB_DEVICE because downstream RHEL doesn't support these devices. IOMMU -instantiation still is disabled but will be enabled in subsequent patches. - -Signed-off-by: Eric Auger -Signed-off-by: Danilo C. L. de Paula ---- - hw/arm/virt.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/hw/arm/virt.c b/hw/arm/virt.c -index 5602d9f..9316a8d 100644 ---- a/hw/arm/virt.c -+++ b/hw/arm/virt.c -@@ -2158,7 +2158,7 @@ static void rhel_machine_init(void) - } - type_init(rhel_machine_init); - --static void rhel800_virt_instance_init(Object *obj) -+static void rhel810_virt_instance_init(Object *obj) - { - VirtMachineState *vms = VIRT_MACHINE(obj); - VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms); -@@ -2204,8 +2204,8 @@ static void rhel800_virt_instance_init(Object *obj) - vms->irqmap=a15irqmap; - } - --static void rhel800_virt_options(MachineClass *mc) -+static void rhel810_virt_options(MachineClass *mc) - { - compat_props_add(mc->compat_props, arm_rhel_compat, arm_rhel_compat_len); - } --DEFINE_RHEL_MACHINE_AS_LATEST(8, 0, 0) -+DEFINE_RHEL_MACHINE_AS_LATEST(8, 1, 0) --- -1.8.3.1 - diff --git a/kvm-aarch64-Allow-ARM-VIRT-iommu-option-in-RHEL8.1-machi.patch b/kvm-aarch64-Allow-ARM-VIRT-iommu-option-in-RHEL8.1-machi.patch deleted file mode 100644 index d25318a..0000000 --- a/kvm-aarch64-Allow-ARM-VIRT-iommu-option-in-RHEL8.1-machi.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 59a46d11cad715b082d30c0de33317466a9bab9e Mon Sep 17 00:00:00 2001 -From: Auger Eric -Date: Mon, 3 Jun 2019 19:17:40 +0100 -Subject: [PATCH 3/9] aarch64: Allow ARM VIRT iommu option in RHEL8.1 machine -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -RH-Author: Auger Eric -Message-id: <20190603191740.32665-3-eric.auger@redhat.com> -Patchwork-id: 88460 -O-Subject: [RHEL-AV-8.1.0 qemu-kvm PATCH 2/2] aarch64: Allow ARM VIRT iommu option in RHEL8.1 machine -Bugzilla: 1713735 -RH-Acked-by: Andrew Jones -RH-Acked-by: Laszlo Ersek -RH-Acked-by: Philippe Mathieu-Daudé - -This patch restores the ARM VIRT iommu option historically -introduced in qemu 3.0 and disabled in rhel8.0 (RHBZ#1656504 / -commit 7bfdb4cd2b49) as we did not have support of the feature -at libvirt level. - -Signed-off-by: Eric Auger -Signed-off-by: Danilo C. L. de Paula ---- - hw/arm/virt.c | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/hw/arm/virt.c b/hw/arm/virt.c -index 9316a8d..670fa10 100644 ---- a/hw/arm/virt.c -+++ b/hw/arm/virt.c -@@ -1785,7 +1785,6 @@ static void virt_set_gic_version(Object *obj, const char *value, Error **errp) - } - } - --#if 0 /* Disabled for Red Hat Enterprise Linux */ - static char *virt_get_iommu(Object *obj, Error **errp) - { - VirtMachineState *vms = VIRT_MACHINE(obj); -@@ -1813,7 +1812,6 @@ static void virt_set_iommu(Object *obj, const char *value, Error **errp) - error_append_hint(errp, "Valid values are none, smmuv3.\n"); - } - } --#endif /* disabled for RHEL */ - - static CpuInstanceProperties - virt_cpu_index_to_props(MachineState *ms, unsigned cpu_index) -@@ -2198,8 +2196,13 @@ static void rhel810_virt_instance_init(Object *obj) - NULL); - } - -- /* IOMMU is disabled by default and non-configurable for RHEL */ -+ /* Default disallows iommu instantiation */ - vms->iommu = VIRT_IOMMU_NONE; -+ object_property_add_str(obj, "iommu", virt_get_iommu, virt_set_iommu, NULL); -+ object_property_set_description(obj, "iommu", -+ "Set the IOMMU type. " -+ "Valid values are none and smmuv3", -+ NULL); - - vms->irqmap=a15irqmap; - } --- -1.8.3.1 - diff --git a/kvm-aarch64-Compile-out-IOH3420.patch b/kvm-aarch64-Compile-out-IOH3420.patch deleted file mode 100644 index baf434c..0000000 --- a/kvm-aarch64-Compile-out-IOH3420.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 59097210f25bfcabc82c9989d3c083a6febeadd6 Mon Sep 17 00:00:00 2001 -From: Auger Eric -Date: Tue, 4 Jun 2019 15:23:26 +0100 -Subject: [PATCH 7/9] aarch64: Compile out IOH3420 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -RH-Author: Auger Eric -Message-id: <20190604152326.18510-1-eric.auger@redhat.com> -Patchwork-id: 88525 -O-Subject: [RHEL-AV-8.1.0 qemu-kvm PATCH v2] aarch64: Compile out IOH3420 -Bugzilla: 1627283 -RH-Acked-by: Andrew Jones -RH-Acked-by: Philippe Mathieu-Daudé -RH-Acked-by: Paolo Bonzini -RH-Acked-by: Laszlo Ersek - -BZ: 1627283 -BRANCH: rhel-av-8.1.0/master-4.0.0 -UPSTREAM: N/A -BREW: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=21989313 -TEST: On Sabre, no ioh3420 available - -IOH3420 is not used on aarch64 or arm as we prefer the generic root port -so let's compile it out. - -Signed-off-by: Eric Auger - ---- - -v1 -> v2 -- do not touch arm-softmmu.mak - -Signed-off-by: Danilo C. L. de Paula ---- - default-configs/aarch64-rh-devices.mak | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/default-configs/aarch64-rh-devices.mak b/default-configs/aarch64-rh-devices.mak -index 13ce7c7..224e29b 100644 ---- a/default-configs/aarch64-rh-devices.mak -+++ b/default-configs/aarch64-rh-devices.mak -@@ -12,7 +12,6 @@ CONFIG_EDID=y - CONFIG_FW_CFG_DMA=y - CONFIG_GPIO_KEY=y - CONFIG_I2C=y --CONFIG_IOH3420=y - CONFIG_IVSHMEM=y - CONFIG_KVM=y - CONFIG_LINUX=y --- -1.8.3.1 - diff --git a/kvm-block-file-posix-Unaligned-O_DIRECT-block-status.patch b/kvm-block-file-posix-Unaligned-O_DIRECT-block-status.patch deleted file mode 100644 index 68c7e07..0000000 --- a/kvm-block-file-posix-Unaligned-O_DIRECT-block-status.patch +++ /dev/null @@ -1,98 +0,0 @@ -From cff152749afe8b045db50fdd065756a217efa6e9 Mon Sep 17 00:00:00 2001 -From: Max Reitz -Date: Tue, 25 Jun 2019 21:07:09 +0200 -Subject: [PATCH 4/6] block/file-posix: Unaligned O_DIRECT block-status - -RH-Author: Max Reitz -Message-id: <20190625210710.20946-2-mreitz@redhat.com> -Patchwork-id: 88945 -O-Subject: [RHEL-AV-8.1.0 qemu-kvm PATCH 1/2] block/file-posix: Unaligned O_DIRECT block-status -Bugzilla: 1588356 -RH-Acked-by: Kevin Wolf -RH-Acked-by: John Snow -RH-Acked-by: Stefano Garzarella - -Currently, qemu crashes whenever someone queries the block status of an -unaligned image tail of an O_DIRECT image: -$ echo > foo -$ qemu-img map --image-opts driver=file,filename=foo,cache.direct=on -Offset Length Mapped to File -qemu-img: block/io.c:2093: bdrv_co_block_status: Assertion `*pnum && -QEMU_IS_ALIGNED(*pnum, align) && align > offset - aligned_offset' -failed. - -This is because bdrv_co_block_status() checks that the result returned -by the driver's implementation is aligned to the request_alignment, but -file-posix can fail to do so, which is actually mentioned in a comment -there: "[...] possibly including a partial sector at EOF". - -Fix this by rounding up those partial sectors. - -There are two possible alternative fixes: -(1) We could refuse to open unaligned image files with O_DIRECT - altogether. That sounds reasonable until you realize that qcow2 - does necessarily not fill up its metadata clusters, and that nobody - runs qemu-img create with O_DIRECT. Therefore, unpreallocated qcow2 - files usually have an unaligned image tail. - -(2) bdrv_co_block_status() could ignore unaligned tails. It actually - throws away everything past the EOF already, so that sounds - reasonable. - Unfortunately, the block layer knows file lengths only with a - granularity of BDRV_SECTOR_SIZE, so bdrv_co_block_status() usually - would have to guess whether its file length information is inexact - or whether the driver is broken. - -Fixing what raw_co_block_status() returns is the safest thing to do. - -There seems to be no other block driver that sets request_alignment and -does not make sure that it always returns aligned values. - -Cc: qemu-stable@nongnu.org -Signed-off-by: Max Reitz -Reviewed-by: Eric Blake -Signed-off-by: Kevin Wolf -(cherry picked from commit 9c3db310ff0b7473272ae8dce5e04e2f8a825390) -Signed-off-by: Max Reitz -Signed-off-by: Miroslav Rezanina ---- - block/file-posix.c | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - -diff --git a/block/file-posix.c b/block/file-posix.c -index 1cf4ee4..c185f34 100644 ---- a/block/file-posix.c -+++ b/block/file-posix.c -@@ -2475,6 +2475,8 @@ static int coroutine_fn raw_co_block_status(BlockDriverState *bs, - off_t data = 0, hole = 0; - int ret; - -+ assert(QEMU_IS_ALIGNED(offset | bytes, bs->bl.request_alignment)); -+ - ret = fd_open(bs); - if (ret < 0) { - return ret; -@@ -2500,6 +2502,20 @@ static int coroutine_fn raw_co_block_status(BlockDriverState *bs, - /* On a data extent, compute bytes to the end of the extent, - * possibly including a partial sector at EOF. */ - *pnum = MIN(bytes, hole - offset); -+ -+ /* -+ * We are not allowed to return partial sectors, though, so -+ * round up if necessary. -+ */ -+ if (!QEMU_IS_ALIGNED(*pnum, bs->bl.request_alignment)) { -+ int64_t file_length = raw_getlength(bs); -+ if (file_length > 0) { -+ /* Ignore errors, this is just a safeguard */ -+ assert(hole == file_length); -+ } -+ *pnum = ROUND_UP(*pnum, bs->bl.request_alignment); -+ } -+ - ret = BDRV_BLOCK_DATA; - } else { - /* On a hole, compute bytes to the beginning of the next extent. */ --- -1.8.3.1 - diff --git a/kvm-compat-Generic-hw_compat_rhel_8_0.patch b/kvm-compat-Generic-hw_compat_rhel_8_0.patch deleted file mode 100644 index 017b400..0000000 --- a/kvm-compat-Generic-hw_compat_rhel_8_0.patch +++ /dev/null @@ -1,79 +0,0 @@ -From f19738e4bf8b9d5fb44ef30042cdad31b92edb22 Mon Sep 17 00:00:00 2001 -From: Laurent Vivier -Date: Fri, 24 May 2019 12:13:02 +0100 -Subject: [PATCH 2/4] compat: Generic hw_compat_rhel_8_0 - -RH-Author: Laurent Vivier -Message-id: <20190524121304.15530-3-lvivier@redhat.com> -Patchwork-id: 88201 -O-Subject: [RHEL-AV qemu-kvm PATCH v4 2/4] compat: Generic hw_compat_rhel_8_0 -Bugzilla: 1709726 -RH-Acked-by: David Gibson -RH-Acked-by: Cornelia Huck -RH-Acked-by: Dr. David Alan Gilbert - -Signed-off-by: Laurent Vivier -Signed-off-by: Danilo C. L. de Paula ---- - hw/core/machine.c | 30 ++++++++++++++++++++++++++++++ - include/hw/boards.h | 3 +++ - 2 files changed, 33 insertions(+) - -diff --git a/hw/core/machine.c b/hw/core/machine.c -index e808151..c4aa354 100644 ---- a/hw/core/machine.c -+++ b/hw/core/machine.c -@@ -291,6 +291,36 @@ GlobalProperty hw_compat_rhel_7_6[] = { - }; - const size_t hw_compat_rhel_7_6_len = G_N_ELEMENTS(hw_compat_rhel_7_6); - -+/* The same as hw_compat_3_1 -+ * format of array has been changed by: -+ * 6c36bddf5340 ("machine: Use shorter format for GlobalProperty arrays") -+ */ -+GlobalProperty hw_compat_rhel_8_0[] = { -+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ -+ { "pcie-root-port", "x-speed", "2_5" }, -+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ -+ { "pcie-root-port", "x-width", "1" }, -+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ -+ { "memory-backend-file", "x-use-canonical-path-for-ramblock-id", "true" }, -+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ -+ { "memory-backend-memfd", "x-use-canonical-path-for-ramblock-id", "true" }, -+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ -+ { "tpm-crb", "ppi", "false" }, -+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ -+ { "tpm-tis", "ppi", "false" }, -+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ -+ { "usb-kbd", "serial", "42" }, -+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ -+ { "usb-mouse", "serial", "42" }, -+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ -+ { "usb-tablet", "serial", "42" }, -+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ -+ { "virtio-blk-device", "discard", "false" }, -+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ -+ { "virtio-blk-device", "write-zeroes", "false" }, -+}; -+const size_t hw_compat_rhel_8_0_len = G_N_ELEMENTS(hw_compat_rhel_8_0); -+ - - GlobalProperty hw_compat_3_1[] = { - { "pcie-root-port", "x-speed", "2_5" }, -diff --git a/include/hw/boards.h b/include/hw/boards.h -index b292365..f159e9e 100644 ---- a/include/hw/boards.h -+++ b/include/hw/boards.h -@@ -337,6 +337,9 @@ extern const size_t hw_compat_2_2_len; - extern GlobalProperty hw_compat_2_1[]; - extern const size_t hw_compat_2_1_len; - -+extern GlobalProperty hw_compat_rhel_8_0[]; -+extern const size_t hw_compat_rhel_8_0_len; -+ - extern GlobalProperty hw_compat_rhel_7_6[]; - extern const size_t hw_compat_rhel_7_6_len; - --- -1.8.3.1 - diff --git a/kvm-iotests-Test-unaligned-raw-images-with-O_DIRECT.patch b/kvm-iotests-Test-unaligned-raw-images-with-O_DIRECT.patch deleted file mode 100644 index 8c47593..0000000 --- a/kvm-iotests-Test-unaligned-raw-images-with-O_DIRECT.patch +++ /dev/null @@ -1,182 +0,0 @@ -From d986fc898ca8a20b486afe92dc0c7b370f482366 Mon Sep 17 00:00:00 2001 -From: Max Reitz -Date: Tue, 25 Jun 2019 21:07:10 +0200 -Subject: [PATCH 5/6] iotests: Test unaligned raw images with O_DIRECT - -RH-Author: Max Reitz -Message-id: <20190625210710.20946-3-mreitz@redhat.com> -Patchwork-id: 88946 -O-Subject: [RHEL-AV-8.1.0 qemu-kvm PATCH 2/2] iotests: Test unaligned raw images with O_DIRECT -Bugzilla: 1588356 -RH-Acked-by: Kevin Wolf -RH-Acked-by: John Snow -RH-Acked-by: Stefano Garzarella - -We already have 221 for accesses through the page cache, but it is -better to create a new file for O_DIRECT instead of integrating those -test cases into 221. This way, we can make use of -_supported_cache_modes (and _default_cache_mode) so the test is -automatically skipped on filesystems that do not support O_DIRECT. - -As part of the split, add _supported_cache_modes to 221. With that, it -no longer fails when run with -c none or -c directsync. - -Signed-off-by: Max Reitz -Reviewed-by: Eric Blake -Signed-off-by: Kevin Wolf -(cherry picked from commit 2fab30c80b33cdc6157c7efe6207e54b6835cf92) -Signed-off-by: Max Reitz -Signed-off-by: Miroslav Rezanina ---- - tests/qemu-iotests/221 | 4 +++ - tests/qemu-iotests/253 | 84 ++++++++++++++++++++++++++++++++++++++++++++++ - tests/qemu-iotests/253.out | 14 ++++++++ - tests/qemu-iotests/group | 1 + - 4 files changed, 103 insertions(+) - create mode 100755 tests/qemu-iotests/253 - create mode 100644 tests/qemu-iotests/253.out - -diff --git a/tests/qemu-iotests/221 b/tests/qemu-iotests/221 -index 808cd9a..92c9b13 100755 ---- a/tests/qemu-iotests/221 -+++ b/tests/qemu-iotests/221 -@@ -1,6 +1,7 @@ - #!/usr/bin/env bash - # - # Test qemu-img vs. unaligned images -+# (See also 253, which is the O_DIRECT version) - # - # Copyright (C) 2018 Red Hat, Inc. - # -@@ -37,6 +38,9 @@ _supported_fmt raw - _supported_proto file - _supported_os Linux - -+_default_cache_mode writeback -+_supported_cache_modes writeback writethrough unsafe -+ - echo - echo "=== Check mapping of unaligned raw image ===" - echo -diff --git a/tests/qemu-iotests/253 b/tests/qemu-iotests/253 -new file mode 100755 -index 0000000..d88d5af ---- /dev/null -+++ b/tests/qemu-iotests/253 -@@ -0,0 +1,84 @@ -+#!/usr/bin/env bash -+# -+# Test qemu-img vs. unaligned images; O_DIRECT version -+# (Originates from 221) -+# -+# Copyright (C) 2019 Red Hat, Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program. If not, see . -+# -+ -+seq="$(basename $0)" -+echo "QA output created by $seq" -+ -+status=1 # failure is the default! -+ -+_cleanup() -+{ -+ _cleanup_test_img -+} -+trap "_cleanup; exit \$status" 0 1 2 3 15 -+ -+# get standard environment, filters and checks -+. ./common.rc -+. ./common.filter -+ -+_supported_fmt raw -+_supported_proto file -+_supported_os Linux -+ -+_default_cache_mode none -+_supported_cache_modes none directsync -+ -+echo -+echo "=== Check mapping of unaligned raw image ===" -+echo -+ -+# We do not know how large a physical sector is, but it is certainly -+# going to be a factor of 1 MB -+size=$((1 * 1024 * 1024 - 1)) -+ -+# qemu-img create rounds size up to BDRV_SECTOR_SIZE -+_make_test_img $size -+$QEMU_IMG map --output=json --image-opts \ -+ "driver=$IMGFMT,file.driver=file,file.filename=$TEST_IMG,cache.direct=on" \ -+ | _filter_qemu_img_map -+ -+# so we resize it and check again -+truncate --size=$size "$TEST_IMG" -+$QEMU_IMG map --output=json --image-opts \ -+ "driver=$IMGFMT,file.driver=file,file.filename=$TEST_IMG,cache.direct=on" \ -+ | _filter_qemu_img_map -+ -+# qemu-io with O_DIRECT always writes whole physical sectors. Again, -+# we do not know how large a physical sector is, so we just start -+# writing from a 64 kB boundary, which should always be aligned. -+offset=$((1 * 1024 * 1024 - 64 * 1024)) -+$QEMU_IO -c "w $offset $((size - offset))" "$TEST_IMG" | _filter_qemu_io -+$QEMU_IMG map --output=json --image-opts \ -+ "driver=$IMGFMT,file.driver=file,file.filename=$TEST_IMG,cache.direct=on" \ -+ | _filter_qemu_img_map -+ -+# Resize it and check again -- contrary to 221, we may not get partial -+# sectors here, so there should be only two areas (one zero, one -+# data). -+truncate --size=$size "$TEST_IMG" -+$QEMU_IMG map --output=json --image-opts \ -+ "driver=$IMGFMT,file.driver=file,file.filename=$TEST_IMG,cache.direct=on" \ -+ | _filter_qemu_img_map -+ -+# success, all done -+echo '*** done' -+rm -f $seq.full -+status=0 -diff --git a/tests/qemu-iotests/253.out b/tests/qemu-iotests/253.out -new file mode 100644 -index 0000000..607c0ba ---- /dev/null -+++ b/tests/qemu-iotests/253.out -@@ -0,0 +1,14 @@ -+QA output created by 253 -+ -+=== Check mapping of unaligned raw image === -+ -+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048575 -+[{ "start": 0, "length": 1048576, "depth": 0, "zero": true, "data": false, "offset": OFFSET}] -+[{ "start": 0, "length": 1048576, "depth": 0, "zero": true, "data": false, "offset": OFFSET}] -+wrote 65535/65535 bytes at offset 983040 -+63.999 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -+[{ "start": 0, "length": 983040, "depth": 0, "zero": true, "data": false, "offset": OFFSET}, -+{ "start": 983040, "length": 65536, "depth": 0, "zero": false, "data": true, "offset": OFFSET}] -+[{ "start": 0, "length": 983040, "depth": 0, "zero": true, "data": false, "offset": OFFSET}, -+{ "start": 983040, "length": 65536, "depth": 0, "zero": false, "data": true, "offset": OFFSET}] -+*** done -diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group -index 0db5e68..3ea739d 100644 ---- a/tests/qemu-iotests/group -+++ b/tests/qemu-iotests/group -@@ -248,3 +248,4 @@ - 246 rw auto quick - 247 rw auto quick - 248 rw auto quick -+253 rw auto quick --- -1.8.3.1 - diff --git a/kvm-qxl-check-release-info-object.patch b/kvm-qxl-check-release-info-object.patch deleted file mode 100644 index 10e0147..0000000 --- a/kvm-qxl-check-release-info-object.patch +++ /dev/null @@ -1,51 +0,0 @@ -From b779db9ffd8626b74f969a7c2484239715f2d9e8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= -Date: Wed, 19 Jun 2019 17:18:47 +0200 -Subject: [PATCH 2/6] qxl: check release info object -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -RH-Author: Philippe Mathieu-Daudé -Message-id: <20190619171847.32603-2-philmd@redhat.com> -Patchwork-id: 88739 -O-Subject: [RHEL-AV-8.1.0 qemu-kvm PATCH 1/1] qxl: check release info object -Bugzilla: 1712717 -RH-Acked-by: Gerd Hoffmann -RH-Acked-by: Laszlo Ersek -RH-Acked-by: Stefan Hajnoczi - -From: Prasad J Pandit - -When releasing spice resources in release_resource() routine, -if release info object 'ext.info' is null, it leads to null -pointer dereference. Add check to avoid it. - -Reported-by: Bugs SysSec -Signed-off-by: Prasad J Pandit -Message-id: 20190425063534.32747-1-ppandit@redhat.com -Signed-off-by: Gerd Hoffmann -(cherry picked from commit d52680fc932efb8a2f334cc6993e705ed1e31e99) -Signed-off-by: Philippe Mathieu-Daudé -Signed-off-by: Miroslav Rezanina ---- - hw/display/qxl.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/hw/display/qxl.c b/hw/display/qxl.c -index c8ce578..632923a 100644 ---- a/hw/display/qxl.c -+++ b/hw/display/qxl.c -@@ -777,6 +777,9 @@ static void interface_release_resource(QXLInstance *sin, - QXLReleaseRing *ring; - uint64_t *item, id; - -+ if (!ext.info) { -+ return; -+ } - if (ext.group_id == MEMSLOT_GROUP_HOST) { - /* host group -> vga mode update request */ - QXLCommandExt *cmdext = (void *)(intptr_t)(ext.info->id); --- -1.8.3.1 - diff --git a/kvm-redhat-define-pseries-rhel8.1.0-machine-type.patch b/kvm-redhat-define-pseries-rhel8.1.0-machine-type.patch deleted file mode 100644 index 9c65c32..0000000 --- a/kvm-redhat-define-pseries-rhel8.1.0-machine-type.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 89f01dab29d3c9a833c9c36a8f2151b6f97696c7 Mon Sep 17 00:00:00 2001 -From: Laurent Vivier -Date: Fri, 24 May 2019 12:13:04 +0100 -Subject: [PATCH 4/4] redhat: define pseries-rhel8.1.0 machine type - -RH-Author: Laurent Vivier -Message-id: <20190524121304.15530-5-lvivier@redhat.com> -Patchwork-id: 88203 -O-Subject: [RHEL-AV qemu-kvm PATCH v4 4/4] redhat: define pseries-rhel8.1.0 machine type -Bugzilla: 1709726 -RH-Acked-by: David Gibson -RH-Acked-by: Cornelia Huck -RH-Acked-by: Dr. David Alan Gilbert - -update pseries-rhel8.0.0 like pseries-3.1 except -for SPAPR_CAP_CFPC, SPAPR_CAP_SBBC, SPAPR_CAP_IBS -that have already been backported. - -Signed-off-by: Laurent Vivier -Signed-off-by: Danilo C. L. de Paula ---- - hw/ppc/spapr.c | 28 ++++++++++++++++++++++++++-- - 1 file changed, 26 insertions(+), 2 deletions(-) - -diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c -index 67c9e01..8adcb97 100644 ---- a/hw/ppc/spapr.c -+++ b/hw/ppc/spapr.c -@@ -4670,15 +4670,39 @@ DEFINE_SPAPR_MACHINE(2_1, "2.1", false); - #endif - - /* -+ * pseries-rhel8.1.0 -+ */ -+ -+static void spapr_machine_rhel810_class_options(MachineClass *mc) -+{ -+ /* Defaults for the latest behaviour inherited from the base class */ -+} -+ -+DEFINE_SPAPR_MACHINE(rhel810, "rhel8.1.0", true); -+ -+/* - * pseries-rhel8.0.0 -+ * like spapr_compat_3_1 -+ * except SPAPR_CAP_CFPC, SPAPR_CAP_SBBC and SPAPR_CAP_IBS -+ * that have been backported to pseries-rhel8.0.0 - */ - - static void spapr_machine_rhel800_class_options(MachineClass *mc) - { -- /* Defaults for the latest behaviour inherited from the base class */ -+ SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc); -+ -+ spapr_machine_rhel810_class_options(mc); -+ compat_props_add(mc->compat_props, hw_compat_rhel_8_0, -+ hw_compat_rhel_8_0_len); -+ -+ mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power8_v2.0"); -+ smc->update_dt_enabled = false; -+ smc->dr_phb_enabled = false; -+ smc->broken_host_serial_model = true; -+ smc->default_caps.caps[SPAPR_CAP_LARGE_DECREMENTER] = SPAPR_CAP_OFF; - } - --DEFINE_SPAPR_MACHINE(rhel800, "rhel8.0.0", true); -+DEFINE_SPAPR_MACHINE(rhel800, "rhel8.0.0", false); - - /* - * pseries-rhel7.6.0 --- -1.8.3.1 - diff --git a/kvm-redhat-fix-cut-n-paste-garbage-in-hw_compat-comments.patch b/kvm-redhat-fix-cut-n-paste-garbage-in-hw_compat-comments.patch deleted file mode 100644 index f039cc5..0000000 --- a/kvm-redhat-fix-cut-n-paste-garbage-in-hw_compat-comments.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 479ad3075d0d2832f5327b917c8279feaae5f6d3 Mon Sep 17 00:00:00 2001 -From: Laurent Vivier -Date: Fri, 24 May 2019 12:13:01 +0100 -Subject: [PATCH 1/4] redhat: fix cut'n'paste garbage in hw_compat comments -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -RH-Author: Laurent Vivier -Message-id: <20190524121304.15530-2-lvivier@redhat.com> -Patchwork-id: 88200 -O-Subject: [RHEL-AV qemu-kvm PATCH v4 1/4] redhat: fix cut'n'paste garbage in hw_compat comments -Bugzilla: 1709726 -RH-Acked-by: David Gibson -RH-Acked-by: Cornelia Huck -RH-Acked-by: Dr. David Alan Gilbert -RH-Acked-by: Philippe Mathieu-Daudé - -Signed-off-by: Laurent Vivier -Signed-off-by: Danilo C. L. de Paula ---- - hw/core/machine.c | 38 +++++++++++++++++++------------------- - 1 file changed, 19 insertions(+), 19 deletions(-) - -diff --git a/hw/core/machine.c b/hw/core/machine.c -index fd1594d..e808151 100644 ---- a/hw/core/machine.c -+++ b/hw/core/machine.c -@@ -25,12 +25,12 @@ - #include "hw/mem/nvdimm.h" - - /* Mostly like hw_compat_2_1 but: -- * * we don't need virtio-scsi-pci since 7.0 already had that on -- * * -- * * RH: Note, qemu-extended-regs should have been enabled in the 7.1 -- * * machine type, but was accidentally turned off in 7.2 onwards. -- * * -- * */ -+ * we don't need virtio-scsi-pci since 7.0 already had that on -+ * -+ * RH: Note, qemu-extended-regs should have been enabled in the 7.1 -+ * machine type, but was accidentally turned off in 7.2 onwards. -+ * -+ */ - GlobalProperty hw_compat_rhel_7_1[] = { - { /* COMPAT_RHEL7.1 */ - .driver = "intel-hda-generic", -@@ -81,8 +81,8 @@ GlobalProperty hw_compat_rhel_7_1[] = { - const size_t hw_compat_rhel_7_1_len = G_N_ELEMENTS(hw_compat_rhel_7_1); - - /* Mostly like hw_compat_2_4 + 2_3 but: -- * * we don't need "any_layout" as it has been backported to 7.2 -- * */ -+ * we don't need "any_layout" as it has been backported to 7.2 -+ */ - - GlobalProperty hw_compat_rhel_7_2[] = { - { -@@ -144,9 +144,9 @@ GlobalProperty hw_compat_rhel_7_2[] = { - const size_t hw_compat_rhel_7_2_len = G_N_ELEMENTS(hw_compat_rhel_7_2); - - /* Mostly like HW_COMPAT_2_6 + HW_COMPAT_2_7 + HW_COMPAT_2_8 except -- * * disable-modern, disable-legacy, page-per-vq have already been -- * * backported to RHEL7.3 -- * */ -+ * disable-modern, disable-legacy, page-per-vq have already been -+ * backported to RHEL7.3 -+ */ - GlobalProperty hw_compat_rhel_7_3[] = { - { /* HW_COMPAT_RHEL7_3 */ - .driver = "virtio-mmio", -@@ -209,9 +209,9 @@ GlobalProperty hw_compat_rhel_7_3[] = { - const size_t hw_compat_rhel_7_3_len = G_N_ELEMENTS(hw_compat_rhel_7_3); - - /* Mostly like hw_compat_2_9 except -- * * x-mtu-bypass-backend, x-migrate-msix has already been -- * * backported to RHEL7.4. shpc was already on in 7.4. -- * */ -+ * x-mtu-bypass-backend, x-migrate-msix has already been -+ * backported to RHEL7.4. shpc was already on in 7.4. -+ */ - GlobalProperty hw_compat_rhel_7_4[] = { - { /* HW_COMPAT_RHEL7_4 */ - .driver = "intel-iommu", -@@ -261,11 +261,11 @@ GlobalProperty hw_compat_rhel_7_5[] = { - const size_t hw_compat_rhel_7_5_len = G_N_ELEMENTS(hw_compat_rhel_7_5); - - /* The same as hw_compat_3_0 + hw_compat_2_12 -- * * except that -- * * there's nothing in 3_0 -- * * migration.decompress-error-check=off was in 7.5 from bz 1584139 -- * * -- * */ -+ * except that -+ * there's nothing in 3_0 -+ * migration.decompress-error-check=off was in 7.5 from bz 1584139 -+ * -+ */ - GlobalProperty hw_compat_rhel_7_6[] = { - { /* HW_COMPAT_RHEL7_6 from HW_COMPAT_2_12 */ - .driver = "hda-audio", --- -1.8.3.1 - diff --git a/kvm-redhat-sync-pseries-rhel7.6.0-with-rhel-av-8.0.1.patch b/kvm-redhat-sync-pseries-rhel7.6.0-with-rhel-av-8.0.1.patch deleted file mode 100644 index 3d890ba..0000000 --- a/kvm-redhat-sync-pseries-rhel7.6.0-with-rhel-av-8.0.1.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 2511c637a95e2a5f2a471c03a4dafcb14fbe4db8 Mon Sep 17 00:00:00 2001 -From: Laurent Vivier -Date: Fri, 24 May 2019 12:13:03 +0100 -Subject: [PATCH 3/4] redhat: sync pseries-rhel7.6.0 with rhel-av-8.0.1 - -RH-Author: Laurent Vivier -Message-id: <20190524121304.15530-4-lvivier@redhat.com> -Patchwork-id: 88199 -O-Subject: [RHEL-AV qemu-kvm PATCH v4 3/4] redhat: sync pseries-rhel7.6.0 with rhel-av-8.0.1 -Bugzilla: 1709726 -RH-Acked-by: David Gibson -RH-Acked-by: Cornelia Huck -RH-Acked-by: Dr. David Alan Gilbert - -The default values for SPAPR_CAP_CFPC, SPAPR_CAP_SBBC and -SPAPR_CAP_IBS are SPAPR_CAP_WORKAROUND in pseries-4.0 and -SPAPR_CAP_BROKEN in pseries-3.1, but the change has been -backported to pseries-rhel8.0.0 in rhel-av-8.0.1 so it has -to be reset to SPAPR_CAP_BROKEN in pseries-rhe7.6.0 rather -than in pseries-rhel8.0.0. - -This patch also removes default_cpu_type to POWER8 as it will -be set in pseries-rhel8.0.0 (POWER9 appears with pseries-4.0) - -Signed-off-by: Laurent Vivier -Signed-off-by: Danilo C. L. de Paula ---- - hw/ppc/spapr.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c -index daa5920..67c9e01 100644 ---- a/hw/ppc/spapr.c -+++ b/hw/ppc/spapr.c -@@ -4719,8 +4719,14 @@ static void spapr_machine_rhel760_class_options(MachineClass *mc) - * yet. Postpone this to machine init (see default_caps_with_cpu()). - */ - smc->default_caps.caps[SPAPR_CAP_HPT_MAXPAGESIZE] = 0; -- /* Defaults for the latest behaviour inherited from the base class */ -- mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power8_v2.0"); -+ -+ /* SPAPR_CAP_WORKAROUND enabled in pseries-rhel800 by -+ * f21757edc554 -+ * "Enable mitigations by default for pseries-4.0 machine type") -+ */ -+ smc->default_caps.caps[SPAPR_CAP_CFPC] = SPAPR_CAP_BROKEN; -+ smc->default_caps.caps[SPAPR_CAP_SBBC] = SPAPR_CAP_BROKEN; -+ smc->default_caps.caps[SPAPR_CAP_IBS] = SPAPR_CAP_BROKEN; - } - - DEFINE_SPAPR_MACHINE(rhel760, "rhel7.6.0", false); --- -1.8.3.1 - diff --git a/kvm-rh-set-CONFIG_BOCHS_DISPLAY-y-for-x86.patch b/kvm-rh-set-CONFIG_BOCHS_DISPLAY-y-for-x86.patch deleted file mode 100644 index 20f0f65..0000000 --- a/kvm-rh-set-CONFIG_BOCHS_DISPLAY-y-for-x86.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 27b7c444c3a568e87647f5386fbfc2c0f2b1ff9b Mon Sep 17 00:00:00 2001 -From: Gerd Hoffmann -Date: Fri, 28 Jun 2019 08:34:00 +0200 -Subject: [PATCH 6/6] rh: set CONFIG_BOCHS_DISPLAY=y for x86 - -RH-Author: Gerd Hoffmann -Message-id: <20190628083400.7016-2-kraxel@redhat.com> -Patchwork-id: 88989 -O-Subject: [RHEL-AV-8.1.0 qemu-kvm PATCH v2 1/1] rh: set CONFIG_BOCHS_DISPLAY=y for x86 -Bugzilla: 1707118 -RH-Acked-by: Laszlo Ersek -RH-Acked-by: Miroslav Rezanina -RH-Acked-by: Danilo de Paula - --device bochs-display can replace -device VGA for cases where -legacy vga emulation is not needed. That is the case for UEFI -guests (they use EFI GOP for boot display). seabios guest can -work too with some quirks. - -Main advantage: Much simpler device emulation -> reduced attach surface. - -Signed-off-by: Gerd Hoffmann -Signed-off-by: Miroslav Rezanina ---- - default-configs/x86_64-rh-devices.mak | 1 + - redhat/qemu-kvm.spec.template | 4 ++++ - 2 files changed, 5 insertions(+) - -diff --git a/default-configs/x86_64-rh-devices.mak b/default-configs/x86_64-rh-devices.mak -index 01b5363..05ad6cf 100644 ---- a/default-configs/x86_64-rh-devices.mak -+++ b/default-configs/x86_64-rh-devices.mak -@@ -12,6 +12,7 @@ CONFIG_ACPI_X86_ICH=y - CONFIG_AHCI=y - CONFIG_APIC=y - CONFIG_APM=y -+CONFIG_BOCHS_DISPLAY=y - CONFIG_DIMM=y - CONFIG_E1000E_PCI_EXPRESS=y - CONFIG_E1000_PCI=y --- -1.8.3.1 - diff --git a/kvm-target-i386-add-MDS-NO-feature.patch b/kvm-target-i386-add-MDS-NO-feature.patch deleted file mode 100644 index 9fec966..0000000 --- a/kvm-target-i386-add-MDS-NO-feature.patch +++ /dev/null @@ -1,51 +0,0 @@ -From dd19ddadfbabc54415977cd0b9b3f520a87988ad Mon Sep 17 00:00:00 2001 -From: Paolo Bonzini -Date: Sun, 23 Jun 2019 15:19:17 +0200 -Subject: [PATCH 3/6] target/i386: add MDS-NO feature - -RH-Author: Paolo Bonzini -Message-id: <20190623151917.7942-1-pbonzini@redhat.com> -Patchwork-id: 88873 -O-Subject: [RHEL-AV-8.1.0 PATCH qemu-kvm] target/i386: add MDS-NO feature -Bugzilla: 1722839 -RH-Acked-by: Dr. David Alan Gilbert -RH-Acked-by: Stefano Garzarella -RH-Acked-by: Miroslav Rezanina - -Bugzilla: 1722839 - -Brew build: 22317828 - -Microarchitectural Data Sampling is a hardware vulnerability which allows -unprivileged speculative access to data which is available in various CPU -internal buffers. - -Some Intel processors use the ARCH_CAP_MDS_NO bit in the -IA32_ARCH_CAPABILITIES -MSR to report that they are not vulnerable, make it available to guests. - -Signed-off-by: Paolo Bonzini -Message-Id: <20190516185320.28340-1-pbonzini@redhat.com> -Signed-off-by: Eduardo Habkost -(cherry picked from commit 20140a82c67467f53814ca197403d5e1b561a5e5) -Signed-off-by: Miroslav Rezanina ---- - target/i386/cpu.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/target/i386/cpu.c b/target/i386/cpu.c -index 3886464..2e73821 100644 ---- a/target/i386/cpu.c -+++ b/target/i386/cpu.c -@@ -1183,7 +1183,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = { - .type = MSR_FEATURE_WORD, - .feat_names = { - "rdctl-no", "ibrs-all", "rsba", "skip-l1dfl-vmentry", -- "ssb-no", NULL, NULL, NULL, -+ "ssb-no", "mds-no", NULL, NULL, - NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, --- -1.8.3.1 - diff --git a/kvm-target-i386-define-md-clear-bit.patch b/kvm-target-i386-define-md-clear-bit.patch deleted file mode 100644 index 5bb1258..0000000 --- a/kvm-target-i386-define-md-clear-bit.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 790c94e3240549de61881aebb94d4d933252e540 Mon Sep 17 00:00:00 2001 -From: Danilo de Paula -Date: Mon, 20 May 2019 18:29:57 +0100 -Subject: [PATCH] target/i386: define md-clear bit - -RH-Author: Danilo de Paula -Message-id: <20190520182957.26425-1-ddepaula@redhat.com> -Patchwork-id: 88110 -O-Subject: [RHEL-8 + RHEL-AV qemu-kvm PATCH] target/i386: define md-clear bit -Bugzilla: 1703297 1703304 1703310 1707274 -RH-Acked-by: Daniel P. Berrange -RH-Acked-by: Miroslav Rezanina -RH-Acked-by: John Snow - -From: Paolo Bonzini - -BZ: 1703310 -BZ: 1703304 -BZ: 1703297 -BZ: 1707274 -branch: rhel-av-8.1.0/master-4.0.0 - -BZ: 1705851 -BZ: 1704542 -BZ: 1704538 -BZ: 1704534 -branch: rhel-av-8.0.1 - -BZ: 1703308 -BZ: 1703302 -branch: rhel-8.1.0 - -md-clear is a new CPUID bit which is set when microcode provides the -mechanism to invoke a flush of various exploitable CPU buffers by invoking -the VERW instruction. - -Signed-off-by: Paolo Bonzini -Signed-off-by: Danilo C. L. de Paula ---- - target/i386/cpu.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/target/i386/cpu.c b/target/i386/cpu.c -index 6472cd2..3886464 100644 ---- a/target/i386/cpu.c -+++ b/target/i386/cpu.c -@@ -1076,7 +1076,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = { - .feat_names = { - NULL, NULL, "avx512-4vnniw", "avx512-4fmaps", - NULL, NULL, NULL, NULL, -- NULL, NULL, NULL, NULL, -+ NULL, NULL, "md-clear", NULL, - NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, --- -1.8.3.1 - diff --git a/kvm-usb-call-reset-handler-before-updating-state.patch b/kvm-usb-call-reset-handler-before-updating-state.patch deleted file mode 100644 index 53806c6..0000000 --- a/kvm-usb-call-reset-handler-before-updating-state.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 646f497c8e1dcea5c1ec8731693e3f06be8f6cc2 Mon Sep 17 00:00:00 2001 -From: Gerd Hoffmann -Date: Tue, 4 Jun 2019 07:13:39 +0100 -Subject: [PATCH 4/9] usb: call reset handler before updating state -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -RH-Author: Gerd Hoffmann -Message-id: <20190604071341.3432-2-kraxel@redhat.com> -Patchwork-id: 88478 -O-Subject: [RHEL-AV-8.1.0 qemu-kvm PATCH 1/3] usb: call reset handler before updating state -Bugzilla: 1713679 -RH-Acked-by: Philippe Mathieu-Daudé -RH-Acked-by: Dr. David Alan Gilbert -RH-Acked-by: Max Reitz - -That way the device reset handler can see what -the before-reset state of the device is. - -Signed-off-by: Gerd Hoffmann -Message-id: 20190522094702.17619-2-kraxel@redhat.com -(cherry picked from commit 7ed4657396add28382081a15557c78cd480c1cf1) -Signed-off-by: Danilo C. L. de Paula ---- - hw/usb/core.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/hw/usb/core.c b/hw/usb/core.c -index 8fbd9c7..3ab48a1 100644 ---- a/hw/usb/core.c -+++ b/hw/usb/core.c -@@ -87,10 +87,10 @@ void usb_device_reset(USBDevice *dev) - if (dev == NULL || !dev->attached) { - return; - } -+ usb_device_handle_reset(dev); - dev->remote_wakeup = 0; - dev->addr = 0; - dev->state = USB_STATE_DEFAULT; -- usb_device_handle_reset(dev); - } - - void usb_wakeup(USBEndpoint *ep, unsigned int stream) --- -1.8.3.1 - diff --git a/kvm-usb-host-avoid-libusb_set_configuration-calls.patch b/kvm-usb-host-avoid-libusb_set_configuration-calls.patch deleted file mode 100644 index cfde8ce..0000000 --- a/kvm-usb-host-avoid-libusb_set_configuration-calls.patch +++ /dev/null @@ -1,68 +0,0 @@ -From a92cfe1254f947c32f15ebb1f81b825076c5625e Mon Sep 17 00:00:00 2001 -From: Gerd Hoffmann -Date: Tue, 4 Jun 2019 07:13:41 +0100 -Subject: [PATCH 6/9] usb-host: avoid libusb_set_configuration calls -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -RH-Author: Gerd Hoffmann -Message-id: <20190604071341.3432-4-kraxel@redhat.com> -Patchwork-id: 88477 -O-Subject: [RHEL-AV-8.1.0 qemu-kvm PATCH 3/3] usb-host: avoid libusb_set_configuration calls -Bugzilla: 1713679 -RH-Acked-by: Philippe Mathieu-Daudé -RH-Acked-by: Dr. David Alan Gilbert -RH-Acked-by: Max Reitz - -Seems some devices become confused when we call -libusb_set_configuration(). So before calling the function check -whenever the device has multiple configurations in the first place, and -in case it hasn't (which is the case for the majority of devices) simply -skip the call as it will have no effect anyway. - -Signed-off-by: Gerd Hoffmann -Message-id: 20190522094702.17619-4-kraxel@redhat.com -(cherry picked from commit bfe44898848614cfcb3a269bc965afbe1f0f331c) -Signed-off-by: Danilo C. L. de Paula ---- - hw/usb/host-libusb.c | 18 ++++++++++-------- - 1 file changed, 10 insertions(+), 8 deletions(-) - -diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c -index 4e9a45a..4f765d7 100644 ---- a/hw/usb/host-libusb.c -+++ b/hw/usb/host-libusb.c -@@ -1225,19 +1225,21 @@ static void usb_host_set_address(USBHostDevice *s, int addr) - - static void usb_host_set_config(USBHostDevice *s, int config, USBPacket *p) - { -- int rc; -+ int rc = 0; - - trace_usb_host_set_config(s->bus_num, s->addr, config); - - usb_host_release_interfaces(s); -- rc = libusb_set_configuration(s->dh, config); -- if (rc != 0) { -- usb_host_libusb_error("libusb_set_configuration", rc); -- p->status = USB_RET_STALL; -- if (rc == LIBUSB_ERROR_NO_DEVICE) { -- usb_host_nodev(s); -+ if (s->ddesc.bNumConfigurations != 1) { -+ rc = libusb_set_configuration(s->dh, config); -+ if (rc != 0) { -+ usb_host_libusb_error("libusb_set_configuration", rc); -+ p->status = USB_RET_STALL; -+ if (rc == LIBUSB_ERROR_NO_DEVICE) { -+ usb_host_nodev(s); -+ } -+ return; - } -- return; - } - p->status = usb_host_claim_interfaces(s, config); - if (p->status != USB_RET_SUCCESS) { --- -1.8.3.1 - diff --git a/kvm-usb-host-skip-reset-for-untouched-devices.patch b/kvm-usb-host-skip-reset-for-untouched-devices.patch deleted file mode 100644 index 9968baf..0000000 --- a/kvm-usb-host-skip-reset-for-untouched-devices.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 507b4bb7a63544c72e8ef1713ada9ff7c2e0024f Mon Sep 17 00:00:00 2001 -From: Gerd Hoffmann -Date: Tue, 4 Jun 2019 07:13:40 +0100 -Subject: [PATCH 5/9] usb-host: skip reset for untouched devices -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -RH-Author: Gerd Hoffmann -Message-id: <20190604071341.3432-3-kraxel@redhat.com> -Patchwork-id: 88479 -O-Subject: [RHEL-AV-8.1.0 qemu-kvm PATCH 2/3] usb-host: skip reset for untouched devices -Bugzilla: 1713679 -RH-Acked-by: Philippe Mathieu-Daudé -RH-Acked-by: Dr. David Alan Gilbert -RH-Acked-by: Max Reitz - -If the guest didn't talk to the device yet, skip the reset. -Without this usb-host devices get resetted a number of times -at boot time for no good reason. - -Signed-off-by: Gerd Hoffmann -Message-id: 20190522094702.17619-3-kraxel@redhat.com -(cherry picked from commit 65f14ab98da1da920f98ee8734dc1588b01d6b2b) -Signed-off-by: Danilo C. L. de Paula ---- - hw/usb/host-libusb.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c -index 67b7465..4e9a45a 100644 ---- a/hw/usb/host-libusb.c -+++ b/hw/usb/host-libusb.c -@@ -1459,6 +1459,9 @@ static void usb_host_handle_reset(USBDevice *udev) - if (!s->allow_guest_reset) { - return; - } -+ if (udev->addr == 0) { -+ return; -+ } - - trace_usb_host_reset(s->bus_num, s->addr); - --- -1.8.3.1 - diff --git a/kvm-vfio-increase-the-cap-on-number-of-assigned-devices-.patch b/kvm-vfio-increase-the-cap-on-number-of-assigned-devices-.patch deleted file mode 100644 index 61a853a..0000000 --- a/kvm-vfio-increase-the-cap-on-number-of-assigned-devices-.patch +++ /dev/null @@ -1,111 +0,0 @@ -From 2b89558946fc396c6ecb10249b69960d2a74e18f Mon Sep 17 00:00:00 2001 -From: Bandan Das -Date: Wed, 12 Jun 2019 16:56:23 +0100 -Subject: [PATCH 3/3] vfio: increase the cap on number of assigned devices to - 64 - -RH-Author: Bandan Das -Message-id: -Patchwork-id: 88653 -O-Subject: [RHEL-AV-8.1.0 qemu-kvm PATCH] vfio: increase the cap on number of assigned devices to 64 -Bugzilla: 1719823 -RH-Acked-by: Alex Williamson -RH-Acked-by: Auger Eric -RH-Acked-by: Laszlo Ersek - -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1719823 -Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=22124174 -Branch: rhel-av-8.1.0/master-4.0.0 -Upstrea: N/A, the device limit change is downstream only - -In addition to bumping up the limit, also add a property for -future-proofing. This needs to be set for every assigned device -or via "global": -global vfio-pci.x-assigned-device-limit - -RHEL Notes: -For each vm using vfio, there is at least a container fd. For -each assigned device, there is likely a group fd, a device fd, -an error signaling fd and a device request fd. Assuming SR-IOV -VFs, vectors/device considering MSI/MSI-X could be ~3-5. Therefore, -we have ~14 file descriptors per device or 897 for 64 devices. -The default open fd limit is 1024 on Linux but libvirt bumps it to -8192 and the qemu process inherits that value as well. - -Signed-off-by: Bandan Das -Signed-off-by: Danilo C. L. de Paula ---- - hw/vfio/pci.c | 20 +++++++++++++++++--- - hw/vfio/pci.h | 1 + - 2 files changed, 18 insertions(+), 3 deletions(-) - -diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c -index 7c998af..7c0d93a 100644 ---- a/hw/vfio/pci.c -+++ b/hw/vfio/pci.c -@@ -36,11 +36,13 @@ - #include "qapi/error.h" - - #define MSIX_CAP_LENGTH 12 --#define MAX_DEV_ASSIGN_CMDLINE 32 - - #define TYPE_VFIO_PCI "vfio-pci" - #define PCI_VFIO(obj) OBJECT_CHECK(VFIOPCIDevice, obj, TYPE_VFIO_PCI) - -+/* RHEL only: Set once for the first assigned dev */ -+static uint16_t device_limit; -+ - static void vfio_disable_interrupts(VFIOPCIDevice *vdev); - static void vfio_mmap_set_enabled(VFIOPCIDevice *vdev, bool enabled); - -@@ -2810,15 +2812,24 @@ static void vfio_realize(PCIDevice *pdev, Error **errp) - int ret, i = 0; - bool is_mdev; - -+ if (device_limit && device_limit != vdev->assigned_device_limit) { -+ error_setg(errp, "Assigned device limit has been redefined. " -+ "Old:%d, New:%d", -+ device_limit, vdev->assigned_device_limit); -+ return; -+ } else { -+ device_limit = vdev->assigned_device_limit; -+ } -+ - QLIST_FOREACH(group, &vfio_group_list, next) { - QLIST_FOREACH(vbasedev_iter, &group->device_list, next) { - i++; - } - } - -- if (i >= MAX_DEV_ASSIGN_CMDLINE) { -+ if (i >= vdev->assigned_device_limit) { - error_setg(errp, "Maximum supported vfio devices (%d) " -- "already attached", MAX_DEV_ASSIGN_CMDLINE); -+ "already attached", vdev->assigned_device_limit); - return; - } - -@@ -3223,6 +3234,9 @@ static Property vfio_pci_dev_properties[] = { - DEFINE_PROP_BOOL("x-no-kvm-msix", VFIOPCIDevice, no_kvm_msix, false), - DEFINE_PROP_BOOL("x-no-geforce-quirks", VFIOPCIDevice, - no_geforce_quirks, false), -+ /* RHEL only */ -+ DEFINE_PROP_UINT16("x-assigned-device-limit", VFIOPCIDevice, -+ assigned_device_limit, 64), - DEFINE_PROP_BOOL("x-no-kvm-ioeventfd", VFIOPCIDevice, no_kvm_ioeventfd, - false), - DEFINE_PROP_BOOL("x-no-vfio-ioeventfd", VFIOPCIDevice, no_vfio_ioeventfd, -diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h -index c11c3f1..29a8add 100644 ---- a/hw/vfio/pci.h -+++ b/hw/vfio/pci.h -@@ -136,6 +136,7 @@ typedef struct VFIOPCIDevice { - EventNotifier err_notifier; - EventNotifier req_notifier; - int (*resetfn)(struct VFIOPCIDevice *); -+ uint16_t assigned_device_limit; - uint32_t vendor_id; - uint32_t device_id; - uint32_t sub_vendor_id; --- -1.8.3.1 - diff --git a/kvm-vl-Document-why-objects-are-delayed.patch b/kvm-vl-Document-why-objects-are-delayed.patch deleted file mode 100644 index 7cd695d..0000000 --- a/kvm-vl-Document-why-objects-are-delayed.patch +++ /dev/null @@ -1,66 +0,0 @@ -From d5a193a4b838b00b064d441da5c038a5ff251f8b Mon Sep 17 00:00:00 2001 -From: Markus Armbruster -Date: Thu, 6 Jun 2019 19:31:39 +0100 -Subject: [PATCH 9/9] vl: Document why objects are delayed -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -RH-Author: Markus Armbruster -Message-id: <20190606193139.31976-3-armbru@redhat.com> -Patchwork-id: 88610 -O-Subject: [RHEL-AV-8.1.0 qemu-kvm PATCH 2/2] vl: Document why objects are delayed -Bugzilla: 1714891 -RH-Acked-by: Paolo Bonzini -RH-Acked-by: Stefan Hajnoczi -RH-Acked-by: Philippe Mathieu-Daudé - -Objects should not be "delayed" without a reason, as the previous -commit demonstrates. The remaining ones have reasons. State them. -and demand future ones come with such a statement. - -Signed-off-by: Markus Armbruster -Message-Id: <20190604151251.9903-3-armbru@redhat.com> -Reviewed-by: Michal Privoznik -Signed-off-by: Paolo Bonzini -(cherry picked from commit edfb4389c26cbfd873707306024130bda6049780) -Signed-off-by: Danilo C. L. de Paula ---- - vl.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/vl.c b/vl.c -index 627e37d..686c639 100644 ---- a/vl.c -+++ b/vl.c -@@ -2852,19 +2852,25 @@ static bool object_create_initial(const char *type, QemuOpts *opts) - exit(0); - } - -+ /* -+ * Objects should not be made "delayed" without a reason. If you -+ * add one, state the reason in a comment! -+ */ -+ -+ /* Reason: rng-egd property "chardev" */ - if (g_str_equal(type, "rng-egd")) { - return false; - } - - #if defined(CONFIG_VHOST_USER) && defined(CONFIG_LINUX) -+ /* Reason: cryptodev-vhost-user property "chardev" */ - if (g_str_equal(type, "cryptodev-vhost-user")) { - return false; - } - #endif - - /* -- * return false for concrete netfilters since -- * they depend on netdevs already existing -+ * Reason: filter-* property "netdev" etc. - */ - if (g_str_equal(type, "filter-buffer") || - g_str_equal(type, "filter-dump") || --- -1.8.3.1 - diff --git a/kvm-vl-Fix-drive-blockdev-persistent-reservation-managem.patch b/kvm-vl-Fix-drive-blockdev-persistent-reservation-managem.patch deleted file mode 100644 index 5f9841f..0000000 --- a/kvm-vl-Fix-drive-blockdev-persistent-reservation-managem.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 6473a5d45b4ae75d5eef64b7b5dcd6735f498fb3 Mon Sep 17 00:00:00 2001 -From: Markus Armbruster -Date: Thu, 6 Jun 2019 19:31:38 +0100 -Subject: [PATCH 8/9] vl: Fix -drive / -blockdev persistent reservation - management - -RH-Author: Markus Armbruster -Message-id: <20190606193139.31976-2-armbru@redhat.com> -Patchwork-id: 88609 -O-Subject: [RHEL-AV-8.1.0 qemu-kvm PATCH 1/2] vl: Fix -drive / -blockdev persistent reservation management -Bugzilla: 1714891 -RH-Acked-by: Paolo Bonzini -RH-Acked-by: Stefan Hajnoczi -RH-Acked-by: Eduardo Habkost - -qemu-system-FOO's main() acts on command line arguments in its own -idiosyncratic order. There's not much method to its madness. -Whenever we find a case where one kind of command line argument needs -to refer to something created for another kind later, we rejigger the -order. - -Recent commit cda4aa9a5a "vl: Create block backends before setting -machine properties" was such a rejigger. Block backends are now -created before "delayed" objects. This broke persistent reservation -management. Reproducer: - - $ qemu-system-x86_64 -object pr-manager-helper,id=pr-helper0,path=/tmp/pr-helper0.sock-drive -drive file=/dev/mapper/crypt,file.pr-manager=pr-helper0,format=raw,if=none,id=drive-scsi0-0-0-2 - qemu-system-x86_64: -drive file=/dev/mapper/crypt,file.pr-manager=pr-helper0,format=raw,if=none,id=drive-scsi0-0-0-2: No persistent reservation manager with id 'pr-helper0' - -The delayed pr-manager-helper object is created too late for use by --drive or -blockdev. Normal objects are still created in time. - -pr-manager-helper has always been a delayed object (commit 7c9e527659 -"scsi, file-posix: add support for persistent reservation -management"). Turns out there's no real reason for that. Make it a -normal object. - -Fixes: cda4aa9a5a08777cf13e164c0543bd4888b8adce -Signed-off-by: Markus Armbruster -Message-Id: <20190604151251.9903-2-armbru@redhat.com> -Reviewed-by: Michal Privoznik -Cc: qemu-stable@nongnu.org -Signed-off-by: Paolo Bonzini -(cherry picked from commit 9ea18ed25a36527167e9676f25d983df5e7f76e6) -Signed-off-by: Danilo C. L. de Paula ---- - vl.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/vl.c b/vl.c -index 2b95925..627e37d 100644 ---- a/vl.c -+++ b/vl.c -@@ -2852,8 +2852,7 @@ static bool object_create_initial(const char *type, QemuOpts *opts) - exit(0); - } - -- if (g_str_equal(type, "rng-egd") || -- g_str_has_prefix(type, "pr-manager-")) { -+ if (g_str_equal(type, "rng-egd")) { - return false; - } - --- -1.8.3.1 - diff --git a/kvm-x86_64-rh-devices-add-missing-TPM-passthrough.patch b/kvm-x86_64-rh-devices-add-missing-TPM-passthrough.patch deleted file mode 100644 index 0f52f10..0000000 --- a/kvm-x86_64-rh-devices-add-missing-TPM-passthrough.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 495a27daa8ca91bb357a065c986552c3375eda82 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= -Date: Fri, 24 May 2019 18:40:01 +0100 -Subject: [PATCH 1/3] x86_64-rh-devices: add missing TPM passthrough -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -RH-Author: Marc-André Lureau -Message-id: <20190524184002.14050-2-marcandre.lureau@redhat.com> -Patchwork-id: 88230 -O-Subject: [RHEL-AV-8.1.0 qemu-kvm PATCH 1/2] x86_64-rh-devices: add missing TPM passthrough -Bugzilla: 1519013 -RH-Acked-by: Philippe Mathieu-Daudé -RH-Acked-by: Laszlo Ersek -RH-Acked-by: Dr. David Alan Gilbert - -The TPM passthrough support got lost with 4.0 rebase, due to -configure/Kconfig changes. - -Signed-off-by: Marc-André Lureau -Signed-off-by: Danilo C. L. de Paula ---- - default-configs/x86_64-rh-devices.mak | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/default-configs/x86_64-rh-devices.mak b/default-configs/x86_64-rh-devices.mak -index 05ad6cf..8079fa7 100644 ---- a/default-configs/x86_64-rh-devices.mak -+++ b/default-configs/x86_64-rh-devices.mak -@@ -92,3 +92,6 @@ CONFIG_VTD=y - CONFIG_WDT_IB6300ESB=y - CONFIG_WDT_IB700=y - CONFIG_XIO3130=y -+CONFIG_TPM_CRB=y -+CONFIG_TPM_TIS=y -+CONFIG_TPM_PASSTHROUGH=y --- -1.8.3.1 - diff --git a/kvm-x86_64-rh-devices-enable-TPM-emulation.patch b/kvm-x86_64-rh-devices-enable-TPM-emulation.patch deleted file mode 100644 index e5c7beb..0000000 --- a/kvm-x86_64-rh-devices-enable-TPM-emulation.patch +++ /dev/null @@ -1,53 +0,0 @@ -From e1fe9feada882ece852c66f123535a98ea2230ce Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= -Date: Fri, 24 May 2019 18:40:02 +0100 -Subject: [PATCH 2/3] x86_64-rh-devices: enable TPM emulation -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -RH-Author: Marc-André Lureau -Message-id: <20190524184002.14050-3-marcandre.lureau@redhat.com> -Patchwork-id: 88229 -O-Subject: [RHEL-AV-8.1.0 qemu-kvm PATCH 2/2] x86_64-rh-devices: enable TPM emulation -Bugzilla: 1519013 -RH-Acked-by: Philippe Mathieu-Daudé -RH-Acked-by: Laszlo Ersek -RH-Acked-by: Dr. David Alan Gilbert - -Remove the useless & misleading configure lines. - -Signed-off-by: Marc-André Lureau -Signed-off-by: Danilo C. L. de Paula ---- - configure | 3 --- - default-configs/x86_64-rh-devices.mak | 1 + - 2 files changed, 1 insertion(+), 3 deletions(-) - -diff --git a/configure b/configure -index 8cb6740..638c881 100755 ---- a/configure -+++ b/configure -@@ -2412,9 +2412,6 @@ if test "$seccomp" != "no" ; then - fi - fi - --# RHEL8-specific, only passthrough for now, rhbz#1688312 --tpm_emulator=no -- - ########################################## - # xen probe - -diff --git a/default-configs/x86_64-rh-devices.mak b/default-configs/x86_64-rh-devices.mak -index 8079fa7..906b42d 100644 ---- a/default-configs/x86_64-rh-devices.mak -+++ b/default-configs/x86_64-rh-devices.mak -@@ -94,4 +94,5 @@ CONFIG_WDT_IB700=y - CONFIG_XIO3130=y - CONFIG_TPM_CRB=y - CONFIG_TPM_TIS=y -+CONFIG_TPM_EMULATOR=y - CONFIG_TPM_PASSTHROUGH=y --- -1.8.3.1 - diff --git a/kvm.modules b/kvm.modules deleted file mode 100644 index b9d9646..0000000 --- a/kvm.modules +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -case $(uname -m) in - ppc64) - grep OPAL /proc/cpuinfo >/dev/null 2>&1 && opal=1 - - modprobe -b kvm >/dev/null 2>&1 - modprobe -b kvm-pr >/dev/null 2>&1 && kvm=1 - if [ "$opal" ]; then - modprobe -b kvm-hv >/dev/null 2>&1 - fi - ;; - s390x) - modprobe -b kvm >/dev/null 2>&1 && kvm=1 - ;; -esac - -exit 0 diff --git a/qemu-kvm.spec b/qemu-kvm.spec index 16c7a39..4bdff57 100644 --- a/qemu-kvm.spec +++ b/qemu-kvm.spec @@ -66,8 +66,8 @@ Obsoletes: %1-rhev Summary: QEMU is a machine emulator and virtualizer Name: qemu-kvm -Version: 4.0.0 -Release: 6%{?dist} +Version: 4.1.0 +Release: 1%{?dist} # Epoch because we pushed a qemu-1.0 package. AIUI this can't ever be dropped Epoch: 15 License: GPLv2 and GPLv2+ and CC-BY @@ -76,7 +76,7 @@ URL: http://www.qemu.org/ ExclusiveArch: x86_64 %{power64} aarch64 s390x -Source0: http://wiki.qemu.org/download/qemu-4.0.0.tar.xz +Source0: http://wiki.qemu.org/download/qemu-4.1.0-rc4.tar.xz # KSM control scripts Source4: ksm.service @@ -120,57 +120,9 @@ Patch0016: 0016-Use-qemu-kvm-in-documentation-instead-of-qemu-system.patch Patch0017: 0017-usb-xhci-Fix-PCI-capability-order.patch Patch0018: 0018-virtio-scsi-Reject-scsi-cd-if-data-plane-enabled-RHE.patch Patch0019: 0019-BZ1653590-Require-at-least-64kiB-pages-for-downstrea.patch -Patch0020: 0020-doc-fix-the-configuration-path.patch -Patch0021: 0021-rhel-Set-host-phys-bits-limit-48-on-rhel-machine-typ.patch -Patch0022: 0022-redhat-Post-rebase-synchronization.patch -# For bz#1703297 - CVE-2018-12126 virt:8.0.0/qemu-kvm: hardware: Microarchitectural Store Buffer Data Sampling (MSBDS) [rhel-av-8] -# For bz#1703304 - CVE-2018-12130 virt:8.0.0/qemu-kvm: hardware: Microarchitectural Fill Buffer Data Sampling (MFBDS) [rhel-av-8] -# For bz#1703310 - CVE-2018-12127 virt:8.0.0/qemu-kvm: hardware: Micro-architectural Load Port Data Sampling - Information Leak (MLPDS) [rhel-av-8] -# For bz#1707274 - CVE-2019-11091 virt:8.0.0/qemu-kvm: hardware: Microarchitectural Data Sampling Uncacheable Memory (MDSUM) [rhel-av-8.1.0] -Patch23: kvm-target-i386-define-md-clear-bit.patch -# For bz#1709726 - Forward and backward migration failed with "qemu-kvm: error while loading state for instance 0x0 of device 'spapr'" -Patch24: kvm-redhat-fix-cut-n-paste-garbage-in-hw_compat-comments.patch -# For bz#1709726 - Forward and backward migration failed with "qemu-kvm: error while loading state for instance 0x0 of device 'spapr'" -Patch25: kvm-compat-Generic-hw_compat_rhel_8_0.patch -# For bz#1709726 - Forward and backward migration failed with "qemu-kvm: error while loading state for instance 0x0 of device 'spapr'" -Patch26: kvm-redhat-sync-pseries-rhel7.6.0-with-rhel-av-8.0.1.patch -# For bz#1709726 - Forward and backward migration failed with "qemu-kvm: error while loading state for instance 0x0 of device 'spapr'" -Patch27: kvm-redhat-define-pseries-rhel8.1.0-machine-type.patch -# For bz#1714937 - Disable VXHS support -Patch28: kvm-Disable-VXHS-support.patch -# For bz#1713735 - Allow ARM VIRT iommu option in RHEL8.1 machine -Patch29: kvm-aarch64-Add-virt-rhel8.1.0-machine-type-for-ARM.patch -# For bz#1713735 - Allow ARM VIRT iommu option in RHEL8.1 machine -Patch30: kvm-aarch64-Allow-ARM-VIRT-iommu-option-in-RHEL8.1-machi.patch -# For bz#1713679 - Detached device when trying to upgrade USB device firmware when in doing USB Passthrough via QEMU -Patch31: kvm-usb-call-reset-handler-before-updating-state.patch -# For bz#1713679 - Detached device when trying to upgrade USB device firmware when in doing USB Passthrough via QEMU -Patch32: kvm-usb-host-skip-reset-for-untouched-devices.patch -# For bz#1713679 - Detached device when trying to upgrade USB device firmware when in doing USB Passthrough via QEMU -Patch33: kvm-usb-host-avoid-libusb_set_configuration-calls.patch -# For bz#1627283 - Compile out IOH3420 on aarch64 -Patch34: kvm-aarch64-Compile-out-IOH3420.patch -# For bz#1714891 - Guest with persistent reservation manager for a disk fails to start -Patch35: kvm-vl-Fix-drive-blockdev-persistent-reservation-managem.patch -# For bz#1714891 - Guest with persistent reservation manager for a disk fails to start -Patch36: kvm-vl-Document-why-objects-are-delayed.patch -# For bz#1712717 - CVE-2019-12155 qemu-kvm: QEMU: qxl: null pointer dereference while releasing spice resources [rhel-av-8] -Patch37: kvm-qxl-check-release-info-object.patch -# For bz#1722839 - [Intel 8.1 FEAT] MDS_NO exposure to guest - Fast Train -Patch38: kvm-target-i386-add-MDS-NO-feature.patch -# For bz#1588356 - qemu crashed on the source host when do storage migration with source qcow2 disk created by 'qemu-img' -Patch39: kvm-block-file-posix-Unaligned-O_DIRECT-block-status.patch -# For bz#1588356 - qemu crashed on the source host when do storage migration with source qcow2 disk created by 'qemu-img' -Patch40: kvm-iotests-Test-unaligned-raw-images-with-O_DIRECT.patch -# For bz#1707118 - enable device: bochs-display (QEMU) -Patch41: kvm-rh-set-CONFIG_BOCHS_DISPLAY-y-for-x86.patch -# For bz#1519013 - [RFE] QEMU Software TPM support (vTPM, or TPM emulation) -Patch42: kvm-x86_64-rh-devices-add-missing-TPM-passthrough.patch -# For bz#1519013 - [RFE] QEMU Software TPM support (vTPM, or TPM emulation) -Patch43: kvm-x86_64-rh-devices-enable-TPM-emulation.patch -# For bz#1719823 - [RHEL 8.1] [RFE] increase the maximum of vfio devices to more than 32 in qemu-kvm -Patch44: kvm-vfio-increase-the-cap-on-number-of-assigned-devices-.patch +BuildRequires: wget +BuildRequires: rpm-build BuildRequires: zlib-devel BuildRequires: glib2-devel BuildRequires: which @@ -189,6 +141,7 @@ BuildRequires: libusbx-devel >= 1.0.22 BuildRequires: usbredir-devel >= 0.7.1 %endif BuildRequires: texinfo +BuildRequires: python3-sphinx %if %{have_spice} BuildRequires: spice-protocol >= 0.12.12 BuildRequires: spice-server-devel >= 0.12.8 @@ -199,7 +152,7 @@ BuildRequires: nss-devel BuildRequires: libseccomp-devel >= 2.4.0 # For network block driver BuildRequires: libcurl-devel -BuildRequires: libssh2-devel +BuildRequires: libssh-devel BuildRequires: librados-devel BuildRequires: librbd-devel %if %{have_gluster} @@ -451,7 +404,7 @@ the Secure Shell (SSH) protocol. %prep -%setup -n qemu-%{version} +%setup -n qemu-%{version}-rc4 %autopatch -p1 %build @@ -551,7 +504,7 @@ buildldflags="VL_LDFLAGS=-Wl,--build-id" --enable-kvm \ --enable-libiscsi \ --disable-libnfs \ - --enable-libssh2 \ + --enable-libssh \ --enable-libusb \ --disable-bzip2 \ --enable-linux-aio \ @@ -621,9 +574,12 @@ buildldflags="VL_LDFLAGS=-Wl,--build-id" --disable-qed \ --disable-parallels \ --disable-sheepdog \ + --disable-auth-pam \ + --enable-iconv \ + --disable-lzfse \ + --enable-vhost-kernel \ --without-default-devices - echo "config-host.mak contents:" echo "===" cat config-host.mak @@ -796,6 +752,15 @@ rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/hppa-firmware.img rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/canyonlands.dtb rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/u-boot-sam460-20100605.bin +rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/firmware +rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/edk2-*.fd +rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/edk2-licenses.txt + +rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/opensbi-riscv32-virt-fw_jump.bin +rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/opensbi-riscv64-sifive_u-fw_jump.bin +rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/opensbi-riscv64-virt-fw_jump.bin +rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/qemu-nsis.bmp + %ifarch s390x # Use the s390-ccw.img that we've just built, not the pre-built one install -m 0644 pc-bios/s390-ccw/s390-ccw.img $RPM_BUILD_ROOT%{_datadir}/%{name}/ @@ -896,13 +861,16 @@ chmod +x $RPM_BUILD_ROOT%{_libdir}/qemu-kvm/block-*.so # Remove buildinfo rm -rf $RPM_BUILD_ROOT%{qemudocdir}/interop/.buildinfo +# Remove spec +rm -rf $RPM_BUILD_ROOT%{qemudocdir}/specs + %check export DIFF=diff; make check V=1 pushd tests/qemu-iotests ./check -v -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 045 048 052 063 077 086 101 104 106 120 132 140 143 145 147 150 152 157 159 160 162 170 171 175 181 184 194 208 218 221 222 226 227 232 -./check -v -qcow2 001 002 003 004 005 007 008 009 010 011 012 017 018 019 020 021 022 024 025 027 028 029 031 032 033 034 035 036 037 038 039 042 043 046 047 048 049 050 052 053 054 056 057 058 062 063 065 066 068 069 072 073 074 080 085 086 087 089 090 091 095 096 097 098 102 103 104 105 107 108 110 111 114 117 120 126 127 130 132 133 134 137 138 140 141 142 143 144 145 147 150 151 152 156 157 158 159 162 165 170 174 177 179 181 184 187 188 189 190 191 194 195 196 198 201 202 203 204 205 206 208 209 214 216 217 218 222 226 227 232 +./check -v -qcow2 001 002 003 004 005 007 008 009 010 011 012 017 018 019 020 021 022 024 025 027 028 029 031 032 033 034 035 036 037 038 039 042 043 046 047 048 049 050 052 053 054 056 057 058 062 063 065 066 069 072 073 074 080 085 086 087 089 090 091 095 096 097 098 102 103 104 105 107 108 110 111 114 117 120 126 127 130 132 133 134 137 138 140 141 142 143 144 145 147 150 151 152 156 157 158 159 162 165 170 174 177 179 181 184 187 188 189 190 191 194 195 196 198 201 202 203 204 206 208 209 214 216 217 218 222 226 227 232 ./check -v -luks 001 002 003 004 005 008 009 010 011 012 021 032 033 052 140 143 145 157 162 174 181 184 208 218 227 -./check -v -nbd 001 002 003 004 005 008 009 010 011 021 032 033 045 077 094 104 119 123 132 143 145 147 151 152 162 181 184 194 205 208 218 222 +./check -v -nbd 001 002 003 004 005 008 009 010 011 021 032 033 045 077 094 104 119 123 132 143 145 147 151 152 162 181 184 194 208 218 222 popd %post -n qemu-kvm-core @@ -1093,6 +1061,11 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %changelog +* Wed Aug 14 2019 Miroslav Rezanina - 4.1.0-1.el8 +- Rebase to qemu 4.1.0 rc4 [bz#1705235] +- Resolves: bz#1705235 + (Rebase qemu-kvm for RHEL-AV 8.1.0) + * Tue Jul 23 2019 Danilo Cesar Lemes de Paula - 4.0.0-6.el8 - kvm-x86_64-rh-devices-add-missing-TPM-passthrough.patch [bz#1519013] - kvm-x86_64-rh-devices-enable-TPM-emulation.patch [bz#1519013] @@ -1160,10 +1133,18 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ - Resolves: bz#1707274 (CVE-2019-11091 virt:8.0.0/qemu-kvm: hardware: Microarchitectural Data Sampling Uncacheable Memory (MDSUM) [rhel-av-8.1.0]) -* Thu May 16 2019 Danilo Cesar Lemes de Paula - 4.0.0-1.el8 -- 4.0.0 temporary rebase -- Resolves: bz#1705235 - (Rebase qemu-kvm for RHEL-AV 8.1.0) +* Wed May 15 2019 Danilo Cesar Lemes de Paula - 3.1.0-26.el8 +- kvm-target-ppc-spapr-Add-SPAPR_CAP_LARGE_DECREMENTER.patch [bz#1698711] +- kvm-target-ppc-spapr-Add-workaround-option-to-SPAPR_CAP_.patch [bz#1698711] +- kvm-target-ppc-spapr-Add-SPAPR_CAP_CCF_ASSIST.patch [bz#1698711] +- kvm-target-ppc-tcg-make-spapr_caps-apply-cap-cfpc-sbbc-i.patch [bz#1698711] +- kvm-target-ppc-spapr-Enable-mitigations-by-default-for-p.patch [bz#1698711] +- kvm-slirp-ensure-there-is-enough-space-in-mbuf-to-null-t.patch [bz#1693076] +- kvm-slirp-don-t-manipulate-so_rcv-in-tcp_emu.patch [bz#1693076] +- Resolves: bz#1693076 + (CVE-2019-6778 qemu-kvm: QEMU: slirp: heap buffer overflow in tcp_emu() [rhel-av-8]) +- Resolves: bz#1698711 + (Enable Spectre / Meltdown mitigations by default in pseries-rhel8.0.0 machine type) * Mon May 06 2019 Danilo Cesar Lemes de Paula - 3.1.0-25.el8 - kvm-redhat-enable-tpmdev-passthrough.patch [bz#1688312] diff --git a/sources b/sources index e43b6a0..3c58d7d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qemu-4.0.0.tar.xz) = 952e94194ce9e64c15388c59035cb31fb9f761d30095c2fb9441012b609c18c9976285727b93bf37b95e15675802d73f8e1c4619ebecd23606675bb503646b13 +SHA512 (qemu-4.1.0-rc4.tar.xz) = 349e1e5281fa62201bfd332b1e8f628488302eeac0211a3464551a3ac0f3212e6e816d2e046f07e5fa84ec6f86954615c6215f722af995c0a0cb07c2190ddba9