QEMU is a FAST! processor emulator
CentOS Sources
2017-11-09 76daa3d38986a767f3cfaf0467544b2bea337967
import qemu-kvm-2.9.0-23.el7a
230 files added
1 files deleted
39976 ■■■■■ changed files
.gitignore 9 ●●●●● patch | view | raw | blame | history
.qemu-kvm.metadata 9 ●●●●● patch | view | raw | blame | history
README.md 5 ●●●●● patch | view | raw | blame | history
SOURCES/0001-Initial-redhat-build.patch 318 ●●●●● patch | view | raw | blame | history
SOURCES/0002-Add-RHEL-7-machine-types.patch 2899 ●●●●● patch | view | raw | blame | history
SOURCES/0003-Enable-disable-devices-for-RHEL-7.patch 1844 ●●●●● patch | view | raw | blame | history
SOURCES/0004-Use-kvm-by-default.patch 38 ●●●●● patch | view | raw | blame | history
SOURCES/0005-add-qxl_screendump-monitor-command.patch 188 ●●●●● patch | view | raw | blame | history
SOURCES/0006-seabios-paravirt-allow-more-than-1TB-in-x86-guest.patch 40 ●●●●● patch | view | raw | blame | history
SOURCES/0007-monitor-Remove-usb_add-del-commands-for-Red-Hat-Ente.patch 56 ●●●●● patch | view | raw | blame | history
SOURCES/0008-monitor-Remove-host_net_add-remove-for-Red-Hat-Enter.patch 56 ●●●●● patch | view | raw | blame | history
SOURCES/0009-vfio-cap-number-of-devices-that-can-be-assigned.patch 74 ●●●●● patch | view | raw | blame | history
SOURCES/0010-QMP-Forward-port-__com.redhat_drive_del-from-RHEL-6.patch 165 ●●●●● patch | view | raw | blame | history
SOURCES/0011-QMP-Forward-port-__com.redhat_drive_add-from-RHEL-6.patch 228 ●●●●● patch | view | raw | blame | history
SOURCES/0012-HMP-Forward-port-__com.redhat_drive_add-from-RHEL-6.patch 172 ●●●●● patch | view | raw | blame | history
SOURCES/0013-Add-support-statement-to-help-output.patch 57 ●●●●● patch | view | raw | blame | history
SOURCES/0014-vl-Round-memory-sizes-below-2MiB-up-to-2MiB.patch 47 ●●●●● patch | view | raw | blame | history
SOURCES/0015-use-recommended-max-vcpu-count.patch 43 ●●●●● patch | view | raw | blame | history
SOURCES/0016-Add-support-for-simpletrace.patch 119 ●●●●● patch | view | raw | blame | history
SOURCES/0017-Use-qemu-kvm-in-documentation-instead-of-qemu-system.patch 921 ●●●●● patch | view | raw | blame | history
SOURCES/0018-qmp-add-__com.redhat_reason-to-the-BLOCK_IO_ERROR-ev.patch 151 ●●●●● patch | view | raw | blame | history
SOURCES/0019-Migration-compat-for-pckbd.patch 61 ●●●●● patch | view | raw | blame | history
SOURCES/0020-Migration-compat-for-fdc.patch 127 ●●●●● patch | view | raw | blame | history
SOURCES/0021-RHEL-Set-vcpus-hard-limit-to-240-for-Power.patch 63 ●●●●● patch | view | raw | blame | history
SOURCES/0022-spapr-Reduce-advertised-max-LUNs-for-spapr_vscsi.patch 49 ●●●●● patch | view | raw | blame | history
SOURCES/0023-qmp-Report-__com.redhat_drive_add-error-to-monitor.patch 52 ●●●●● patch | view | raw | blame | history
SOURCES/0024-Add-PCIe-bridge-devices-for-AArch64.patch 45 ●●●●● patch | view | raw | blame | history
SOURCES/0025-Fix-qemu-kvm-does-not-quit-when-booting-guest-w-241-.patch 55 ●●●●● patch | view | raw | blame | history
SOURCES/0026-RHEL-only-hw-char-pl011-fix-SBSA-reset.patch 58 ●●●●● patch | view | raw | blame | history
SOURCES/0027-blockdev-ignore-cache-options-for-empty-CDROM-drives.patch 91 ●●●●● patch | view | raw | blame | history
SOURCES/0028-Revert-kvm_stat-Remove.patch 1263 ●●●●● patch | view | raw | blame | history
SOURCES/0029-migcompat-e1000e-Work-around-7.3-msi-intr_state-fiel.patch 136 ●●●●● patch | view | raw | blame | history
SOURCES/0030-migcompat-rtl8139-Work-around-version-bump.patch 63 ●●●●● patch | view | raw | blame | history
SOURCES/0031-x86-bump-maximum-vcpu-count-of-pc-q35-rhel7.4.0-to-2.patch 54 ●●●●● patch | view | raw | blame | history
SOURCES/0032-x86-Work-around-SMI-breakages.patch 80 ●●●●● patch | view | raw | blame | history
SOURCES/0033-s390x-virtio-ccw-Disable-crypto-device-in-downstream.patch 77 ●●●●● patch | view | raw | blame | history
SOURCES/0035-spapr-update-SPAPR_COMPAT_RHEL7_3.patch 56 ●●●●● patch | view | raw | blame | history
SOURCES/0036-migration-update-HW_COMPAT_RHEL7_3.patch 72 ●●●●● patch | view | raw | blame | history
SOURCES/0038-x86-bump-maximum-vcpu-count-of-pc-q35-rhel7.4.0-to-3.patch 48 ●●●●● patch | view | raw | blame | history
SOURCES/0039-re-enable-DMA-for-7.3-machine-type.patch 46 ●●●●● patch | view | raw | blame | history
SOURCES/50-kvm-pgste.conf 3 ●●●●● patch | view | raw | blame | history
SOURCES/80-kvm.rules 1 ●●●● patch | view | raw | blame | history
SOURCES/85-kvm.preset 5 ●●●●● patch | view | raw | blame | history
SOURCES/95-kvm-memlock.conf 10 ●●●●● patch | view | raw | blame | history
SOURCES/99-qemu-guest-agent.rules 2 ●●●●● patch | view | raw | blame | history
SOURCES/README.rhel6-gpxe-source 9 ●●●●● patch | view | raw | blame | history
SOURCES/bridge.conf 1 ●●●● patch | view | raw | blame | history
SOURCES/build_configure.sh 156 ●●●●● patch | view | raw | blame | history
SOURCES/ksm.service 13 ●●●●● patch | view | raw | blame | history
SOURCES/ksm.sysconfig 4 ●●●● patch | view | raw | blame | history
SOURCES/ksmctl.c 77 ●●●●● patch | view | raw | blame | history
SOURCES/ksmtuned 138 ●●●●● patch | view | raw | blame | history
SOURCES/ksmtuned.conf 21 ●●●●● patch | view | raw | blame | history
SOURCES/ksmtuned.service 12 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-AArch64-Add-pci-testdev.patch 39 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-AArch64-remove-mach-virt-7.3-machine-type.patch 61 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-Disable-rs6000-mc-device.patch 35 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-Disable-serial-isa-for-ppc64.patch 38 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-Disable-unimplemented-device.patch 39 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-Disable-virtio-pci-for-s390x-builds.patch 41 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-Downstream-Update-pseries-machine-types-for-RHEL-ALT.patch 130 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-Enable-USB_CONFIG-for-aarch64.patch 34 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-RHEL-Diff.-Add-option-in-configure-to-disable-live-b.patch 77 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-RHEL-Diff.-Disable-live-block-operations-in-HMP-moni.patch 164 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-RHEL-Diff.-Unregister-live-block-operations.patch 53 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-Reenable-Educational-device.patch 40 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-Revert-Change-net-socket.c-to-use-socket_-functions-.patch 236 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-Revert-hw-pci-disable-pci-bridge-s-shpc-by-default.patch 72 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-aarch64-Enable-usb-xhci.patch 44 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-aio-add-missing-aio_notify-to-aio_enable_external.patch 83 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-all-Pass-an-error-object-to-kvm_device_access.patch 224 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-Add-errp-to-b-lk-drv-_truncate.patch 629 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-An-empty-filename-counts-as-no-filename.patch 57 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-Do-not-unref-bs-file-on-error-in-BD-s-open.patch 90 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-Reuse-bs-as-backing-hd-for-drive-backup-sync-n.patch 92 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-add-bdrv_set_read_only-helper-function.patch 138 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-code-movement.patch 57 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-do-not-set-BDS-read_only-if-copy_on_read-enabl.patch 206 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-fix-external-snapshot-abort-permission-error.patch 51 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-gluster-glfs_lseek-workaround.patch 118 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-honor-BDRV_O_ALLOW_RDWR-when-clearing-bs-read_.patch 51 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-introduce-bdrv_can_set_read_only.patch 75 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-iscsi-enable-filename-option-and-parsing.patch 89 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-rbd-Add-support-for-reopen.patch 71 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-rbd-enable-filename-option-and-parsing.patch 89 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-rbd-update-variable-names-to-more-apt-names.patch 150 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-use-bdrv_can_set_read_only-during-reopen.patch 59 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-vhdx-Make-vhdx_create-always-set-errp.patch 166 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-vxhs-modularize-VXHS-via-g_module.patch 479 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-vxhs.c-Add-qemu-iotests-for-new-block-device-t.patch 153 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-vxhs.c-Add-support-for-a-new-block-device-type.patch 825 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-blockdev-ignore-aio-native-for-empty-drives.patch 73 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-blockdev-use-drained_begin-end-for-qmp_block_resize.patch 56 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-commit-Fix-completion-with-extra-reference.patch 54 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-commit-Fix-use-after-free-in-completion.patch 61 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-configure-allow-to-disable-VT-d-emulation.patch 93 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-cpu-don-t-allow-negative-core-id.patch 54 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-curl-avoid-recursive-locking-of-BDRVCURLState-mutex.patch 141 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-curl-convert-CURLAIOCB-to-byte-values.patch 169 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-curl-convert-readv-to-coroutines.patch 263 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-curl-do-not-do-aio_poll-when-waiting-for-a-free-CURL.patch 101 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-curl-never-invoke-callbacks-with-s-mutex-held.patch 102 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-curl-split-curl_find_state-curl_init_state.patch 135 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-curl-strengthen-assertion-in-curl_clean_state.patch 49 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-disable-linuxboot_dma.bin-option-rom-for-7.3-machine.patch 72 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-Acquire-BQL-around-vm_start-in-dump-thread.patch 91 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-e1000e-Fix-ICR-Other-causes-clear-logic.patch 113 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-ehci-fix-frame-timer-invocation.patch 71 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-ehci-fix-overflow-in-frame-timer-code.patch 48 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-gluster-add-support-for-PREALLOC_MODE_FALLOC.patch 193 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-hmp-gpa2hva-and-gpa2hpa-hostaddr-command.patch 186 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-hw-intc-arm_gicv3_its-Allow-save-restore.patch 115 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-hw-intc-arm_gicv3_its-Implement-state-save-restore.patch 238 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-hw-intc-arm_gicv3_kvm-Implement-pending-table-save.patch 93 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-hw-pcie-fix-the-generic-pcie-root-port-to-support-mi.patch 109 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-hw-ppc-spapr-Adjust-firmware-name-for-PCI-bridges.patch 53 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-hw-virtio-fix-vhost-user-fails-to-startup-when-MQ.patch 116 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-input-don-t-queue-delay-if-paused.patch 60 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-intel_iommu-allow-dynamic-switch-of-IOMMU-region.patch 208 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-intel_iommu-enable-remote-IOTLB.patch 401 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-intel_iommu-provide-its-own-replay-callback.patch 300 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-intel_iommu-use-the-correct-memory-region-for-device.patch 53 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-iommu-Don-t-crash-if-machine-is-not-PC_MACHINE.patch 110 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-irqchip-skip-update-msi-when-disabled.patch 83 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-irqchip-trace-changes-on-msi-add-remove.patch 74 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-linux-headers-update.patch 582 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-memory-add-MemoryRegionIOMMUOps.replay-callback.patch 67 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-memory-add-section-range-info-for-IOMMU-notifier.patch 185 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-memory-introduce-memory_region_notify_one.patch 122 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-memory-provide-IOMMU_NOTIFIER_FOREACH-macro.patch 70 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-memory-provide-iommu_replay_all.patch 73 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-migration-Call-blk_resume_after_migration-for-postco.patch 53 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-migration-Fix-non-multiple-of-page-size-migration.patch 75 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-migration-Unify-block-node-activation-error-handling.patch 122 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-migration-rdma-Allow-cancelling-while-waiting-for-wr.patch 111 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-migration-rdma-Fix-race-on-source.patch 73 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-migration-rdma-Safely-convert-control-types.patch 150 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-migration-rdma-Send-error-during-cancelling.patch 57 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-migration-rdma-fix-qemu_rdma_block_for_wrid-error-pa.patch 65 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-migration-setup-bi-directional-I-O-channel-for-exec-.patch 59 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-mirror-Drop-permissions-on-s-target-on-completion.patch 69 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-monitor-Use-numa_get_node_for_cpu-on-info-numa.patch 56 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-monitor-add-handle_hmp_command-trace-event.patch 57 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-monitor-resurrect-handle_qmp_command-trace-event.patch 71 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-msix-trace-control-bit-write-op.patch 85 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-nbd-Fix-regression-on-resiliency-to-port-scan.patch 208 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-nbd-Fully-initialize-client-in-case-of-failed-negoti.patch 93 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-nbd-fix-NBD-over-TLS-bz1461827.patch 56 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-nbd-make-it-thread-safe-fix-qcow2-over-nbd.patch 136 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-nbd-make-nbd_drop-public.patch 151 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-nbd-read_sync-and-friends-return-0-on-success.patch 620 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-nbd-server-get-rid-of-nbd_negotiate_read-and-friends.patch 292 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-nbd-strict-nbd_wr_syncv.patch 66 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-numa-Allow-setting-NUMA-distance-for-different-NUMA-.patch 449 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-pc-Use-min-x-level-on-compat_props-on-RHEL-machine-t.patch 189 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-pc-fwcfg-unbreak-migration-from-qemu-2.5-and-qemu-2..patch 146 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-pegas-add-disable-vhost-user.patch 298 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-postcopy-Require-RAMBlocks-that-are-whole-pages.patch 75 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-ppc-kvm-have-the-family-CPU-alias-to-point-to-TYPE_H.patch 79 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-ppc64le-Remove-isabus-bridge-device.patch 39 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-pseries-Correct-panic-behaviour-for-pseries-machine-.patch 63 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-img-wait-for-convert-coroutines-to-complete.patch 111 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-iotests-Allow-starting-new-qemu-after-cleanup.patch 46 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-iotests-Test-automatic-commit-job-cancel-on-hot.patch 99 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-iotests-Test-exiting-qemu-with-running-job.patch 323 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-iotests-Test-streaming-with-missing-job-ID.patch 61 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-iotests-exclude-vxhs-from-image-creation-via-pr.patch 145 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-nbd-Ignore-SIGPIPE.patch 63 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-replication-Make-disable-replication-compile-again.patch 94 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-scsi-Disable-deprecated-implicit-SCSI-HBA-creation-m.patch 122 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-setup 40 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-setup.service 14 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-shutdown-Add-source-information-to-SHUTDOWN-and-RESE.patch 1128 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-shutdown-Expose-bool-cause-in-SHUTDOWN-and-RESET-eve.patch 352 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-shutdown-Prepare-for-use-of-an-enum-in-reset-shutdow.patch 315 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-shutdown-Preserve-shutdown-cause-through-replay.patch 126 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-shutdown-Simplify-shutdown_signal.patch 65 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-sockets-ensure-we-can-bind-to-both-ipv4-ipv6-separat.patch 112 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-spapr-Add-a-no-HPT-encoding-to-HTAB-migration-stream.patch 100 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-spapr-Add-ibm-processor-radix-AP-encodings-to-the-de.patch 169 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-spapr-Consolidate-HPT-freeing-code-into-a-routine.patch 91 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-spapr-Don-t-accidentally-advertise-HTM-support-on-PO.patch 55 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-spapr-Enable-ISA-3.0-MMU-mode-selection-via-CAS.patch 239 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-spapr-Fix-migration-of-Radix-guests.patch 56 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-spapr-Workaround-for-broken-radix-guests.patch 155 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-spapr-htab-fix-savevm.patch 54 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-spapr-move-spapr_populate_pa_features.patch 173 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-spec-vhost-user-spec-Add-IOMMU-support.patch 281 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-stream-fix-crash-in-stream_start-when-block_job_crea.patch 51 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-target-ppc-Add-debug-function-for-radix-mmu-translat.patch 136 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-target-ppc-Add-new-H-CALL-shells-for-in-memory-table.patch 103 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-target-ppc-Add-stub-implementation-of-the-PSSCR.patch 74 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-target-ppc-Allow-workarounds-for-POWER9-DD1.patch 80 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-target-ppc-Fix-return-value-in-tcg-radix-mmu-fault-h.patch 55 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-target-ppc-Fix-size-of-struct-PPCElfPrstatus.patch 45 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-target-ppc-Implement-H_REGISTER_PROCESS_TABLE-H_CALL.patch 335 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-target-ppc-Implement-ISA-V3.00-radix-page-fault-hand.patch 497 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-target-ppc-Implement-TIDR.patch 70 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-target-ppc-Refactor-tcg-radix-mmu-code.patch 99 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-target-ppc-Show-POWER9-in-cpu-help.patch 70 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-target-ppc-kvm-make-use-of-KVM_CREATE_SPAPR_TCE_64.patch 190 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-target-ppc-support-KVM_CAP_PPC_MMU_RADIX-KVM_CAP_PPC.patch 103 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-tests-acpi-extend-cphp-and-memhp-testcase-with-numa-.patch 84 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-usb-don-t-wakeup-during-coldplug.patch 45 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-usb-hub-clear-PORT_STAT_SUSPEND-on-wakeup.patch 59 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-usb-xhci-Fix-PCI-capability-order.patch 86 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vfio-spapr-Fix-levels-calculation.patch 50 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vhost-propagate-errors-in-vhost_device_iotlb_miss.patch 89 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vhost-rework-IOTLB-messaging.patch 283 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vhost-user-add-slave-req-fd-support.patch 285 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vhost-user-add-vhost_user-to-hold-the-chr.patch 99 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vhost-user-pass-message-as-a-pointer-to-process_mess.patch 96 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-rng-stop-virtqueue-while-the-CPU-is-stopped.patch 152 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-scsi-Reject-scsi-cd-if-data-plane-enabled-RHE.patch 66 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-scsi-Unset-hotplug-handler-when-unrealize.patch 54 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-serial-bus-Unset-hotplug-handler-when-unreali.patch 55 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-serial-fix-segfault-on-disconnect.patch 86 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio_net-Bypass-backends-for-MTU-feature-negotiati.patch 129 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-x86-machine-compat-2.9-stragglers.patch 82 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-xhci-only-update-dequeue-ptr-on-completed-transfers.patch 71 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-xhci-relax-link-check.patch 53 ●●●●● patch | view | raw | blame | history
SOURCES/kvm.conf 12 ●●●●● patch | view | raw | blame | history
SOURCES/pc-slit.cphp patch | view | raw | blame | history
SOURCES/pc-slit.memhp patch | view | raw | blame | history
SOURCES/q35-slit.cphp patch | view | raw | blame | history
SOURCES/q35-slit.memhp patch | view | raw | blame | history
SOURCES/qemu-ga.sysconfig 19 ●●●●● patch | view | raw | blame | history
SOURCES/qemu-guest-agent.service 21 ●●●●● patch | view | raw | blame | history
SOURCES/qemu.binfmt 17 ●●●●● patch | view | raw | blame | history
SOURCES/vhost.conf 3 ●●●●● patch | view | raw | blame | history
SPECS/qemu-kvm.spec 6741 ●●●●● patch | view | raw | blame | history
.gitignore
New file
@@ -0,0 +1,9 @@
SOURCES/bios-256k.bin
SOURCES/kvm-unit-tests.git-4ea7633.tar.bz2
SOURCES/pxe-e1000e.rom
SOURCES/qemu-2.9.0.tar.xz
SOURCES/rhel6-e1000.rom
SOURCES/rhel6-ne2k_pci.rom
SOURCES/rhel6-pcnet.rom
SOURCES/rhel6-rtl8139.rom
SOURCES/rhel6-virtio.rom
.qemu-kvm.metadata
New file
@@ -0,0 +1,9 @@
5678cee702e664634abf28dce0688d01683611dd SOURCES/bios-256k.bin
8d79fca1e904b82272ebf96bbb65f858e1c491a9 SOURCES/kvm-unit-tests.git-4ea7633.tar.bz2
e304721d2b96cdf9dfa89e07947f19ef3e26107e SOURCES/pxe-e1000e.rom
5cc63c6cababaaa7d0685e8b32bacf5022873ebc SOURCES/qemu-2.9.0.tar.xz
957fd6b653b4550c6be727385331d58f1381e082 SOURCES/rhel6-e1000.rom
3f183b9c65e959ab346a013828f1d7530bc4a14e SOURCES/rhel6-ne2k_pci.rom
5bf1eb9f40dc52fa2c9bfecd9330af03a49b35f9 SOURCES/rhel6-pcnet.rom
adffc84ebaf9faf982ecb707423395c1630186a4 SOURCES/rhel6-rtl8139.rom
29e633bcdb4ea9604b7bdaaaeaa0a1223774cb1d SOURCES/rhel6-virtio.rom
README.md
File was deleted
SOURCES/0001-Initial-redhat-build.patch
New file
@@ -0,0 +1,318 @@
From a4e4a2f66d7a4efc873c5c1cafc502db480ff363 Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Thu, 5 Nov 2015 10:38:15 +0100
Subject: Initial redhat build
This patch introduces redhat build structure in redhat subdirectory. In addition,
several issues are fixed in QEMU tree:
- Change of app name for sasl_server_init in VNC code from qemu to qemu-kvm
 - As we use qemu-kvm as name in all places, this is updated to be consistent
- Man page renamed from qemu to qemu-kvm
 - man page is installed using make install so we have to fix it in qemu tree
- Added live-block-migration configuration option support
 - Downstream differentiation support
- Use "/share/qemu-kvm" as SHARE_SUFFIX
 - We reconfigured our share to qemu-kvm to be consistent with used name
- Added .gitpbulish configuration file
 - Support for git publish has to be stored in repository root
(cherry picked from commit 4a27bb33559ef5a702dc91dc02892ad255325c92)
--
Rebase notes (2.9.0):
- documentation files handling changes (upstrem)
- removed --enable-colo option and --disable-archipelago (upstream)
- bump BuildRequires versions
- new mandatory argument for tracetool.py (upstream)
- updated RHEL 6 roms
- switch from sha1sum to sha256sum
- Moved adding rhel6-e1000.rom from machine types commit
- Moved adding pxe-e1000e.rom from device disable commit
- Use rdma-core instead of librdmacm
- Add upstream tarballs tar.xz to .gitignore
- Updated git-backport-diff script
Rebase notes (2.8.0):
- removed vhdx option (upstream)
- qemu-tech.html merged to qemu-doc.html (upstream)
- removed skiboot.lid firmware
- Changed tracetool.py parameters
- Added support for easy z-stream switch
Rebase notes (2.7.0):
- removed kvm_stat
- added efi-e1000e.rom
- added efi-vmxnet.rom
- added linuxboot_dma.bin
- trace-events renamed to trace-events-all
- reverted dependency to seccomp on aarch64
- Add ipxe-qemu-roms ad build dependency to pass tests
Rebase notes (2.6.0):
- removed q35-acpi-dsdt.aml
- add enable-gcrypt option
Rebase notes (2.5.0):
- New seccomp hadling in configure
- New condition format  in migration/migration.c
- libcacard extracted
- vnc fixes
- libsecomp for aarch64 requirements changed downstream
Rebase notes (2.4.0):
- remove --enable-ws-vnc
- use error_setg instead of error_set in migration/migration.c
- remove target-x86_64.conf
- create /etc/qemu-kvm on copying of bridge.conf
- disabled opengl
- rebased to version 2.3.0-30.el7
Merged patches (rebase 2.9.0)
- 9c7ab94 Enable seccomp for ppc64/ppc64le architecture
- f6d7e9d Update qemu-kvm package Summary and Description
- a9e55b6 Disable usbredir and libcacard for unsupported architectures
- 0218220 Update configuration for 2.8.0 release
Merged patches (rebase 2.7.0)
- 2be6077 Fix SLOF dependency
- dc58590 spec: Remove dependency to ipxe-roms-qemu for aarch64
- 357ef43 spec: link sgabios.bin only for x86_64
- 08d82cc spec: Update rules before triggering for kvm device
- 8980a76 spec: Do not package ivshmem-server and ivshmem-client
- 027067c spec: add a sample kvm.conf to enable Nested Virtualization
- ba2ba30 Adjust locked memory limits to allow unprivileged VMs on Power
- e9740b0 Increase locked memory limit for all users, not just kvm group
- 8c301be add vgabios-virtio.bin symlink
- 4d03723 usb: enable streams support
- 2a9363e Add install dependency required for usb streams
- 9a54442 Add dump-guest-memory.py to all archs
- 73fffc9 add e1000e ipxe rom symlink
- aaaa2a9 Add 'luks' to block driver whitelist
- c78c3a8 redhat: switch from gcrypt to nettle for crypto
- bb51a69 redhat: include username and date in RPM N-E-V-R for scratch builds
Merged patches (rebase 2.4.0)
- 9201274 spec: Remove obsolete differentiation code
- a938a8c spec: Use external configuration script
- 5ca8d0e spec: Use configure options to prevent default resolution
- 5dca391 spec: Ship complete QMP documentation files
- 7899edd aarch64: allow --enable-seccomp
- a56fb9c aarch64: redhat spec: enable seccomp
- a9571e6 rhel: Update package version for SLOF dependency
- 25c70c4 configure: Add support for tcmalloc
- db72485 Change fsreeze-hook default location
- 14b8a9e redhat: add kvm-unit-tests tarball to environment
- 5ee4238 spec: Build tscdeadline_latency.flat from kvm-unit-tests
- 6ba800b Downstream-only: Start kvm-setup service before libvirtd service
- 59b43d6 Do not stop qemu-guest-agent service on target switch
- 4d851fa provide vhost module config file with max_mem_regions set to 509
- 0b18027 spec: Require proper version of SLOF
- 3c436c7 Fix rh-brew-aarch64, rh-brew-ppc rh-brew-ga-ppc target
(cherry picked from commit 7875d3bf6e3f2b0cf8b1a41cef685aac0ddfb42d)
---
 .gitpublish                               |    8 +
 Makefile                                  |    2 +-
 configure                                 |   11 +
 migration/migration.c                     |    7 +
 os-posix.c                                |    2 +-
 redhat/.gitignore                         |    2 +
 redhat/80-kvm.rules                       |    1 +
 redhat/85-kvm.preset                      |    5 +
 redhat/95-kvm-memlock.conf                |   10 +
 redhat/99-qemu-guest-agent.rules          |    2 +
 redhat/Makefile                           |   72 +
 redhat/Makefile.common                    |   36 +
 redhat/README.rhel6-gpxe-source           |    9 +
 redhat/bios-256k.bin                      |  Bin 0 -> 262144 bytes
 redhat/bridge.conf                        |    1 +
 redhat/build_configure.sh                 |  138 +
 redhat/ksm.service                        |   13 +
 redhat/ksm.sysconfig                      |    4 +
 redhat/ksmctl.c                           |   77 +
 redhat/ksmtuned                           |  138 +
 redhat/ksmtuned.conf                      |   21 +
 redhat/ksmtuned.service                   |   12 +
 redhat/kvm-setup                          |   31 +
 redhat/kvm-setup.service                  |   14 +
 redhat/kvm-unit-tests.git-4ea7633.tar.bz2 |  Bin 0 -> 148090 bytes
 redhat/kvm.conf                           |   12 +
 redhat/kvm.modules                        |   21 +
 redhat/pxe-e1000e.rom                     |  Bin 0 -> 262144 bytes
 redhat/qemu-ga.sysconfig                  |   19 +
 redhat/qemu-guest-agent.service           |   21 +
 redhat/qemu-kvm.spec.template             | 5654 +++++++++++++++++++++++++++++
 redhat/qemu.binfmt                        |   17 +
 redhat/rhel6-e1000.rom                    |  Bin 0 -> 69632 bytes
 redhat/rhel6-ne2k_pci.rom                 |  Bin 0 -> 54272 bytes
 redhat/rhel6-pcnet.rom                    |  Bin 0 -> 54784 bytes
 redhat/rhel6-rtl8139.rom                  |  Bin 0 -> 54272 bytes
 redhat/rhel6-virtio.rom                   |  Bin 0 -> 53760 bytes
 redhat/rpmbuild/BUILD/.gitignore          |    2 +
 redhat/rpmbuild/RPMS/.gitignore           |    2 +
 redhat/rpmbuild/SOURCES/.gitignore        |    2 +
 redhat/rpmbuild/SPECS/.gitignore          |    2 +
 redhat/rpmbuild/SRPMS/.gitignore          |    2 +
 redhat/scripts/frh.py                     |   27 +
 redhat/scripts/git-backport-diff          |  327 ++
 redhat/scripts/git-compile-check          |  215 ++
 redhat/scripts/process-patches.sh         |   82 +
 redhat/scripts/tarball_checksum.sh        |    3 +
 redhat/vhost.conf                         |    3 +
 ui/vnc.c                                  |    2 +-
 49 files changed, 7026 insertions(+), 3 deletions(-)
 create mode 100644 .gitpublish
 create mode 100644 redhat/.gitignore
 create mode 100644 redhat/80-kvm.rules
 create mode 100644 redhat/85-kvm.preset
 create mode 100644 redhat/95-kvm-memlock.conf
 create mode 100644 redhat/99-qemu-guest-agent.rules
 create mode 100644 redhat/Makefile
 create mode 100644 redhat/Makefile.common
 create mode 100644 redhat/README.rhel6-gpxe-source
 create mode 100644 redhat/bios-256k.bin
 create mode 100644 redhat/bridge.conf
 create mode 100755 redhat/build_configure.sh
 create mode 100644 redhat/ksm.service
 create mode 100644 redhat/ksm.sysconfig
 create mode 100644 redhat/ksmctl.c
 create mode 100644 redhat/ksmtuned
 create mode 100644 redhat/ksmtuned.conf
 create mode 100644 redhat/ksmtuned.service
 create mode 100644 redhat/kvm-setup
 create mode 100644 redhat/kvm-setup.service
 create mode 100644 redhat/kvm-unit-tests.git-4ea7633.tar.bz2
 create mode 100644 redhat/kvm.conf
 create mode 100755 redhat/kvm.modules
 create mode 100644 redhat/pxe-e1000e.rom
 create mode 100644 redhat/qemu-ga.sysconfig
 create mode 100644 redhat/qemu-guest-agent.service
 create mode 100644 redhat/qemu-kvm.spec.template
 create mode 100644 redhat/qemu.binfmt
 create mode 100644 redhat/rhel6-e1000.rom
 create mode 100644 redhat/rhel6-ne2k_pci.rom
 create mode 100644 redhat/rhel6-pcnet.rom
 create mode 100644 redhat/rhel6-rtl8139.rom
 create mode 100644 redhat/rhel6-virtio.rom
 create mode 100644 redhat/rpmbuild/BUILD/.gitignore
 create mode 100644 redhat/rpmbuild/RPMS/.gitignore
 create mode 100644 redhat/rpmbuild/SOURCES/.gitignore
 create mode 100644 redhat/rpmbuild/SPECS/.gitignore
 create mode 100644 redhat/rpmbuild/SRPMS/.gitignore
 create mode 100755 redhat/scripts/frh.py
 create mode 100755 redhat/scripts/git-backport-diff
 create mode 100755 redhat/scripts/git-compile-check
 create mode 100755 redhat/scripts/process-patches.sh
 create mode 100755 redhat/scripts/tarball_checksum.sh
 create mode 100644 redhat/vhost.conf
diff --git a/Makefile b/Makefile
index 6c359b2..4202ee5 100644
--- a/Makefile
+++ b/Makefile
@@ -565,7 +565,7 @@ install-doc: $(DOCS)
     $(INSTALL_DATA) docs/qemu-qmp-ref.txt "$(DESTDIR)$(qemu_docdir)"
 ifdef CONFIG_POSIX
     $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
-    $(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1"
+    $(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1/qemu-kvm.1"
     $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man7"
     $(INSTALL_DATA) docs/qemu-qmp-ref.7 "$(DESTDIR)$(mandir)/man7"
 ifneq ($(TOOLS),)
diff --git a/configure b/configure
index be4d326..a1842a8 100755
--- a/configure
+++ b/configure
@@ -316,6 +316,7 @@ vte=""
 virglrenderer=""
 tpm="yes"
 libssh2=""
+live_block_migration="no"
 numa=""
 tcmalloc="no"
 jemalloc="no"
@@ -1183,6 +1184,10 @@ for opt do
   ;;
   --enable-replication) replication="yes"
   ;;
+  --disable-live-block-migration) live_block_migration="no"
+  ;;
+  --enable-live-block-migration) live_block_migration="yes"
+  ;;
   *)
       echo "ERROR: unknown option $opt"
       echo "Try '$0 --help' for more information"
@@ -1417,6 +1422,7 @@ disabled with --disable-FEATURE, default is enabled if available:
   glusterfs       GlusterFS backend
   tpm             TPM support
   libssh2         ssh block device support
+  live-block-migration live block migration support
   numa            libnuma support
   tcmalloc        tcmalloc support
   jemalloc        jemalloc support
@@ -5138,6 +5144,7 @@ echo "TPM support       $tpm"
 echo "libssh2 support   $libssh2"
 echo "TPM passthrough   $tpm_passthrough"
 echo "QOM debugging     $qom_cast_debug"
+echo "Live block migration $live_block_migration"
 echo "lzo support       $lzo"
 echo "snappy support    $snappy"
 echo "bzip2 support     $bzip2"
@@ -5703,6 +5710,10 @@ if test "$libssh2" = "yes" ; then
   echo "LIBSSH2_LIBS=$libssh2_libs" >> $config_host_mak
 fi
+if test "$live_block_migration" = "yes" ; then
+  echo "CONFIG_LIVE_BLOCK_MIGRATION=y" >> $config_host_mak
+fi
+
 # USB host support
 if test "$libusb" = "yes"; then
   echo "HOST_USB=libusb legacy" >> $config_host_mak
diff --git a/migration/migration.c b/migration/migration.c
index ad4036f..fb58f54 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1227,6 +1227,13 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
     params.blk = has_blk && blk;
     params.shared = has_inc && inc;
+#ifndef CONFIG_LIVE_BLOCK_MIGRATION
+    if (params.blk || params.shared) {
+        error_setg(errp, QERR_UNSUPPORTED);
+        return;
+    }
+#endif
+
     if (migration_is_setup_or_active(s->state) ||
         s->state == MIGRATION_STATUS_CANCELLING ||
         s->state == MIGRATION_STATUS_COLO) {
diff --git a/os-posix.c b/os-posix.c
index c6ddb7d..84da202 100644
--- a/os-posix.c
+++ b/os-posix.c
@@ -77,7 +77,7 @@ void os_setup_signal_handling(void)
 /* Find a likely location for support files using the location of the binary.
    For installed binaries this will be "$bindir/../share/qemu".  When
    running from the build tree this will be "$bindir/../pc-bios".  */
-#define SHARE_SUFFIX "/share/qemu"
+#define SHARE_SUFFIX "/share/qemu-kvm"
 #define BUILD_SUFFIX "/pc-bios"
 char *os_find_datadir(void)
 {
diff --git a/ui/vnc.c b/ui/vnc.c
index 349cfc9..8cf99d8 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -3944,7 +3944,7 @@ void vnc_display_open(const char *id, Error **errp)
     }
 #ifdef CONFIG_VNC_SASL
-    if ((saslErr = sasl_server_init(NULL, "qemu")) != SASL_OK) {
+    if ((saslErr = sasl_server_init(NULL, "qemu-kvm")) != SASL_OK) {
         error_setg(errp, "Failed to initialize SASL auth: %s",
                    sasl_errstring(saslErr, NULL, NULL));
         goto fail;
--
1.8.3.1
SOURCES/0002-Add-RHEL-7-machine-types.patch
New file
@@ -0,0 +1,2899 @@
From d682dec685d0a342b990068b20dbef5aebc30a23 Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Sun, 14 Dec 2014 18:32:18 +0100
Subject: Add RHEL 7 machine types
This commit adds all changes related to machine types applied in
qemu-kvm-rhev-2.1.2-16.el7.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
Conflicts (on 2.3 rebase):
    default-configs/ppc64-softmmu.mak
    hw/arm/Makefile.objs
    hw/i386/pc_piix.c
    hw/i386/pc_q35.c
    hw/ppc/spapr.c
    savevm.c - has to change shadow_bios tail to rcu list handling
    target-i386/machine.c - use xmm instead of ymmh register
(cherry picked from commit 61bf982cb6e977f0f77264f323b6d0bfd6129b5f)
Rebase notes (2.9.0):
- new header file for arm (upstream)
- query_hotpluggable_cpus renamed to has_hotpluggable_cpus (upstream)
- replace MAX_CPUMASK_BITS with max_cpus
- Adding rhel6-e1000.rom moved to Initial redhat commit
- Fixed conflict on cirrus_vga.c
Rebase notes (2.8.0):
- new "m->max_cpus = 288" in pc_q35_machine_options hw/i386/pc_q35.c
Rebase notes (2.7.0):
- Additional fsl-imx6.o sabrelito.o files in arm hw dir
Rebase notes (2.6.0):
- Changes in handling of some compat properties
- Fixes in x86_64 copmat models
- Added required devices for aarch64
- Fixes for ppc machine types
Rebase notes (2.5.0):
- changed cpu defaults structure
- chnaged cpu compat properties handling
- added fix for arm machine type
Rebase notes (2.4.0)
- Moved needed attribute (due to 5cd8cadae8db905afcbf877cae568c27d1d55a8a)
- Fixes to machine types changes
Merged patches (2.9.0)
- 8475d69 hw/arm/virt: Disable virtio-net-pci option ROM file loading
- 73fe1f6 Workaround rhel6 ctrl_guest_offloads machine type mismatch
- 21d32ca pc_piix: fix compat props typo for RHEL6 machine types
- 55a5002 compat: define HW_COMPAT_RHEL7_3
- 1b8e927 spapr: define pseries-rhel7.4.0 machine type
- cdb76ec hw/arm/virt: remove aarch64 rhel machine type
- 7dfa88b hw/arm/virt: create virt-rhel7.3.0 machine type
- 6894f91 hw/arm/virt: create virt-rhel7.4.0 machine type
- a9d2d39 x86: Split out options for the head rhel7 machine types
- fdafbdc x86: Create PC_RHEL7_3_COMPAT definition
- 3427c72 x86: Define pc-i440fx-rhel7.4.0
- aea20ab x86: Define pc-q35-rhel7.4.0
- 0185c0f x86: Remove downstream opteron rdtscp override
- 6b51073 fix abort in acpi_setup() since 2.8 with rhel6 machine types
- 954fc0d intel-hda: fix rhel6 compat property
- 1b57274 kvmclock: reduce kvmclock difference on migration (rhel only part)
Merged patches (2.8.0)
- a1da2f0 virtio-pci: reduce modern_mem_bar size (rhel only part)
Merged patches (2.7.0):
- fe9d1cf pc: Use right HW_COMPAT_* macros at PC_RHEL7* compat macros
- 3938189 compat: Add missing "any_layout" in HW_COMPAT_RHEL7_1
- 6dffc9d spapr: update RHEL-7.2 machine type
- c5d5910 migration: fix HW_COMPAT_RHEL7_2
- 2da9bb8 pc: New (default) pc-i440fx-rhel7.3.0 machine-type
- 0520d7e 7.3 mismerge fix: Fix ich9-intel-hda compatibility
- 89528b3 PC migration compat: Section footers/global state
- 2231e35 fw_cfg for 7.2 compatibility
- b8a3ade pc: Create new pc-q35-rhel7.3.0 machine-type
- 340929b q35: Remove 7.0, 7.1, 7.2 machine types
- bb7fc95 machine types: fix pc_machine_*_options chain
- d9fa9aa Fix rhel6 rom file
- dc39363 fix vga type for older machines
- 255a2d1 7.2 machine type compatibility
- 16c3d25 target-i386: Remove SSE4a from qemu64 CPU model (rhel only part)
- 76a1796 target-i386: Remove ABM from qemu64 CPU model (rhel only part)
- a9f8773 pc: Recover PC_RHEL7_1_COMPAT from RHEL-7.2 code
- 7a6ed67 pc: Include missing PC_COMPAT_2_3 entries in PC_RHEL7_2_COMPAT
- 07428f6 Revert "static checker: e1000-82540em got aliased to e1000"
- 446cf1f Revert "e1000: use alias for default model"
- 615096e 7.x compat: e1000-82540em
- 0855905 hw/arm/virt: kill 7.2 machine type
- 18bbea2 usbredir: turn off streams for rhel7.2 & older
- 910cf4a target-i386: Fill high bits of mtrr mask (rhel only part)
- 0e8ab1b target-i386: Enable host-phys-bits on RHEL
- 8c5f8a5 pc: Fix rhel6.3.0 compat_props setting
- 8f869f1 pc: use new CPU hotplug interface since 2.7 machine type (rhel only part)
- d9d646f machine: add properties to compat_props incrementaly (rhel only part)
- acb18fd apic: Use apic_id as apic's migration instance_id (rhel only part)
- c7e37d4 apic: fix broken migration for kvm-apic (rhel only part)
- eca64aee hw/virtio-pci: fix virtio behaviour
- c56b8F6e pc-rhel-7.2: pcie: fix link active status bit migration
- 5522aa3 q35-rhel: allow dynamic sysbus
Merged patches (2.6.0):
- f915d7f arm: virt: Add an abstract RHEL ARM virt machine type
- deffcc0 arm: virt: Add RHEL 7.3.0 virt machine type
- 04ca07d arm: virt: Consolidate the naming of RHEL virt machine types
- 2856ce2 Define HW_COMPAT_RHEL7_2
- 1869242 spapr: move pseries-2.5 machine to RHEL disabled machine zone
- cc59ce7 spapr: add RHEL-7.3 machine type
- 98549c5 pc: Fix property names on CPU compat code
- caa47bb Fix ich9-intel-hda compatibility
Merged patches (2.3.0):
- bb4e53c2 pc: add rhel6.6.0 machine type
- 129a2b3 Downstream-only: Restore "pseries" machine alias
Merged patches (2.4.0):
- 8e8107c numa: Don't allow memdev= on RHEL-6 machine-types
- 8b220c0 pc_sysfw: prevent pflash and/or mis-sized firmware for rhel6.x.0 machtypes
- 9dba3a5 Add pc-i440fx-rhel7.2.0 machine type
- 1c88ffa Add pc-q35-rhel7.2.0 machine type
- 6f74d0c Downstream-only: Add rhel7.2.0 machine type
- a7d6105 Add flag for pre-2.2 migration compatibility
- 17f9a18 Serial: Migration compatibility pre 2.2/7.2
- 3799a57 Migration compat for mc146818rtc/irq_reinject_on_ack_count subsection
- 5668cc1 Fix reported machine type
- 2417534 386: drop FDC in pc-q35-rhel7.2.0 if neither it nor fl. drives are anted
- f42eee5 global_state: Make section optional
- 8640f84 migration: Add configuration section
- 48c857b pc: memhotplug: fix incorrectly set reserved-memory-end
- f33f0b6 pc: memhotplug: keep reserved-memory-end broken on rhel71 and earlier machines
(cherry picked from commit ea0ae2aa4e3eca96ee620d8516567566d186fb75)
---
 default-configs/aarch64-softmmu.mak |   2 +
 default-configs/arm-softmmu.mak     |   1 -
 hw/acpi/piix4.c                     |   6 +-
 hw/arm/Makefile.objs                |  18 +-
 hw/arm/virt.c                       | 142 ++++++-
 hw/char/serial.c                    |  29 ++
 hw/display/cirrus_vga.c             |   4 +-
 hw/display/vga-isa.c                |   2 +-
 hw/i386/pc_piix.c                   | 783 +++++++++++++++++++++++++++++++++++-
 hw/i386/pc_q35.c                    |  51 ++-
 hw/i386/pc_sysfw.c                  |  16 +
 hw/net/e1000.c                      |  20 +-
 hw/net/ne2000.c                     |   2 +-
 hw/net/pcnet-pci.c                  |   2 +-
 hw/net/rtl8139.c                    |   2 +-
 hw/ppc/Makefile.objs                |   2 +-
 hw/ppc/spapr.c                      | 105 +++++
 hw/smbios/smbios.c                  |   1 +
 hw/timer/i8254_common.c             |   2 +-
 hw/timer/mc146818rtc.c              |   6 +
 hw/usb/hcd-uhci.c                   |  15 +-
 hw/usb/hcd-xhci.c                   |  20 +
 hw/virtio/virtio-pci.c              |   2 +-
 hw/virtio/virtio.c                  |  22 +-
 include/hw/arm/virt.h               |  27 ++
 include/hw/compat.h                 | 128 ++++++
 include/hw/i386/pc.h                | 427 ++++++++++++++++++++
 include/hw/usb.h                    |   7 +
 include/hw/virtio/virtio.h          |   1 +
 include/migration/migration.h       |   5 +
 include/sysemu/sysemu.h             |   1 +
 migration/migration.c               |   1 +
 migration/savevm.c                  |  69 ++++
 numa.c                              |  13 +
 qdev-monitor.c                      |   1 -
 redhat/qemu-kvm.spec.template       |  11 +-
 scripts/vmstate-static-checker.py   |   1 -
 target/i386/cpu.c                   |  51 ++-
 target/i386/machine.c               |  21 +
 39 files changed, 1961 insertions(+), 58 deletions(-)
diff --git a/default-configs/aarch64-softmmu.mak b/default-configs/aarch64-softmmu.mak
index 2449483..abd18c2 100644
--- a/default-configs/aarch64-softmmu.mak
+++ b/default-configs/aarch64-softmmu.mak
@@ -7,3 +7,5 @@ CONFIG_AUX=y
 CONFIG_DDC=y
 CONFIG_DPCD=y
 CONFIG_XLNX_ZYNQMP=y
+CONFIG_PL061=y
+CONFIG_GPIO_KEY=y
diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 1e3bd2b..3ae1bf4 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -74,7 +74,6 @@ CONFIG_ARM11SCU=y
 CONFIG_A9SCU=y
 CONFIG_DIGIC=y
 CONFIG_MARVELL_88W8618=y
-CONFIG_OMAP=y
 CONFIG_TSC210X=y
 CONFIG_BLIZZARD=y
 CONFIG_ONENAND=y
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index a553a7e..d4cd3fd 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -311,7 +311,7 @@ static const VMStateDescription vmstate_cpuhp_state = {
 static const VMStateDescription vmstate_acpi = {
     .name = "piix4_pm",
     .version_id = 3,
-    .minimum_version_id = 3,
+    .minimum_version_id = 2,
     .minimum_version_id_old = 1,
     .load_state_old = acpi_load_old,
     .post_load = vmstate_acpi_post_load,
@@ -670,8 +670,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),
-    DEFINE_PROP_UINT8(ACPI_PM_PROP_S3_DISABLED, PIIX4PMState, disable_s3, 0),
-    DEFINE_PROP_UINT8(ACPI_PM_PROP_S4_DISABLED, PIIX4PMState, disable_s4, 0),
+    DEFINE_PROP_UINT8(ACPI_PM_PROP_S3_DISABLED, PIIX4PMState, disable_s3, 1),
+    DEFINE_PROP_UINT8(ACPI_PM_PROP_S4_DISABLED, PIIX4PMState, disable_s4, 1),
     DEFINE_PROP_UINT8(ACPI_PM_PROP_S4_VAL, PIIX4PMState, s4_val, 2),
     DEFINE_PROP_BOOL("acpi-pci-hotplug-with-bridge-support", PIIX4PMState,
                      use_acpi_pci_hotplug, true),
diff --git a/hw/arm/Makefile.objs b/hw/arm/Makefile.objs
index 4c5c4ee..906367c 100644
--- a/hw/arm/Makefile.objs
+++ b/hw/arm/Makefile.objs
@@ -1,20 +1,4 @@
-obj-y += boot.o collie.o exynos4_boards.o gumstix.o highbank.o
-obj-$(CONFIG_DIGIC) += digic_boards.o
-obj-y += integratorcp.o mainstone.o musicpal.o nseries.o
-obj-y += omap_sx1.o palm.o realview.o spitz.o stellaris.o
-obj-y += tosa.o versatilepb.o vexpress.o virt.o xilinx_zynq.o z2.o
 obj-$(CONFIG_ACPI) += virt-acpi-build.o
-obj-y += netduino2.o
 obj-y += sysbus-fdt.o
-obj-y += armv7m.o exynos4210.o pxa2xx.o pxa2xx_gpio.o pxa2xx_pic.o
-obj-$(CONFIG_DIGIC) += digic.o
-obj-y += omap1.o omap2.o strongarm.o
-obj-$(CONFIG_ALLWINNER_A10) += allwinner-a10.o cubieboard.o
-obj-$(CONFIG_RASPI) += bcm2835_peripherals.o bcm2836.o raspi.o
-obj-$(CONFIG_STM32F205_SOC) += stm32f205_soc.o
-obj-$(CONFIG_XLNX_ZYNQMP) += xlnx-zynqmp.o xlnx-ep108.o
-obj-$(CONFIG_FSL_IMX25) += fsl-imx25.o imx25_pdk.o
-obj-$(CONFIG_FSL_IMX31) += fsl-imx31.o kzm.o
-obj-$(CONFIG_FSL_IMX6) += fsl-imx6.o sabrelite.o
-obj-$(CONFIG_ASPEED_SOC) += aspeed_soc.o aspeed.o
+obj-y += boot.o virt.o
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 5f62a03..82d2636 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -57,6 +57,7 @@
 #include "qapi/visitor.h"
 #include "standard-headers/linux/input.h"
+#if 0 /* disabled Red Hat Enterprise Linux */
 #define DEFINE_VIRT_MACHINE_LATEST(major, minor, latest) \
     static void virt_##major##_##minor##_class_init(ObjectClass *oc, \
                                                     void *data) \
@@ -84,7 +85,36 @@
     DEFINE_VIRT_MACHINE_LATEST(major, minor, true)
 #define DEFINE_VIRT_MACHINE(major, minor) \
     DEFINE_VIRT_MACHINE_LATEST(major, minor, false)
-
+#endif /* disabled for RHEL */
+
+#define DEFINE_RHEL_MACHINE_LATEST(m, n, s, latest)                     \
+    static void rhel##m##n##s##_virt_class_init(ObjectClass *oc,        \
+                                                void *data)             \
+    {                                                                   \
+        MachineClass *mc = MACHINE_CLASS(oc);                           \
+        rhel##m##n##s##_virt_options(mc);                               \
+        mc->desc = "RHEL " # m "." # n "." # s " ARM Virtual Machine";  \
+        if (latest) {                                                   \
+            mc->alias = "virt";                                         \
+            mc->is_default = 1;                                         \
+        }                                                               \
+    }                                                                   \
+    static const TypeInfo rhel##m##n##s##_machvirt_info = {             \
+        .name = MACHINE_TYPE_NAME("virt-rhel" # m "." # n "." # s),     \
+        .parent = TYPE_RHEL_MACHINE,                                    \
+        .instance_init = rhel##m##n##s##_virt_instance_init,            \
+        .class_init = rhel##m##n##s##_virt_class_init,                  \
+    };                                                                  \
+    static void rhel##m##n##s##_machvirt_init(void)                     \
+    {                                                                   \
+        type_register_static(&rhel##m##n##s##_machvirt_info);           \
+    }                                                                   \
+    type_init(rhel##m##n##s##_machvirt_init);
+
+#define DEFINE_RHEL_MACHINE_AS_LATEST(major, minor, subminor)   \
+    DEFINE_RHEL_MACHINE_LATEST(major, minor, subminor, true)
+#define DEFINE_RHEL_MACHINE(major, minor, subminor)             \
+    DEFINE_RHEL_MACHINE_LATEST(major, minor, subminor, false)
 /* Number of external interrupt lines to configure the GIC with */
 #define NUM_IRQS 256
@@ -1438,6 +1468,7 @@ static void machvirt_init(MachineState *machine)
     create_platform_bus(vms, pic);
 }
+#if 0 /* disabled for RHEL */
 static bool virt_get_secure(Object *obj, Error **errp)
 {
     VirtMachineState *vms = VIRT_MACHINE(obj);
@@ -1466,6 +1497,7 @@ static void virt_set_virt(Object *obj, bool value, Error **errp)
     vms->virt = value;
 }
+#endif /* disabled for RHEL */
 static bool virt_get_highmem(Object *obj, Error **errp)
 {
     VirtMachineState *vms = VIRT_MACHINE(obj);
@@ -1518,6 +1550,7 @@ static void virt_set_gic_version(Object *obj, const char *value, Error **errp)
     }
 }
+#if 0 /* disabled for RHEL */
 static void virt_machine_class_init(ObjectClass *oc, void *data)
 {
     MachineClass *mc = MACHINE_CLASS(oc);
@@ -1677,3 +1710,110 @@ static void virt_machine_2_6_options(MachineClass *mc)
     vmc->no_pmu = true;
 }
 DEFINE_VIRT_MACHINE(2, 6)
+#endif /* disabled for RHEL */
+
+static void rhel_machine_class_init(ObjectClass *oc, void *data)
+{
+    MachineClass *mc = MACHINE_CLASS(oc);
+
+    mc->family = "virt-rhel-Z";
+    mc->init = machvirt_init;
+    /* Start max_cpus at the maximum QEMU supports. We'll further restrict
+     * it later in machvirt_init, where we have more information about the
+     * configuration of the particular instance.
+     */
+    mc->max_cpus = 255;
+    mc->has_dynamic_sysbus = false;
+    mc->block_default_type = IF_VIRTIO;
+    mc->no_cdrom = 1;
+    mc->pci_allow_0_address = true;
+    /* We know we will never create a pre-ARMv7 CPU which needs 1K pages */
+    mc->minimum_page_bits = 12;
+}
+
+static const TypeInfo rhel_machine_info = {
+    .name          = TYPE_RHEL_MACHINE,
+    .parent        = TYPE_MACHINE,
+    .abstract      = true,
+    .instance_size = sizeof(VirtMachineState),
+    .class_size    = sizeof(VirtMachineClass),
+    .class_init    = rhel_machine_class_init,
+};
+
+static void rhel_machine_init(void)
+{
+    type_register_static(&rhel_machine_info);
+}
+type_init(rhel_machine_init);
+
+static void rhel740_virt_instance_init(Object *obj)
+{
+    VirtMachineState *vms = VIRT_MACHINE(obj);
+    VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
+
+    /* EL3 is disabled by default and non-configurable for RHEL */
+    vms->secure = false;
+    /* EL2 is disabled by default and non-configurable for RHEL */
+    vms->virt = false;
+    /* High memory is enabled by default for RHEL */
+    vms->highmem = true;
+    object_property_add_bool(obj, "highmem", virt_get_highmem,
+                             virt_set_highmem, NULL);
+    object_property_set_description(obj, "highmem",
+                                    "Set on/off to enable/disable using "
+                                    "physical address space above 32 bits",
+                                    NULL);
+    /* Default GIC type is still v2, but became configurable for RHEL */
+    vms->gic_version = 2;
+    object_property_add_str(obj, "gic-version", virt_get_gic_version,
+                        virt_set_gic_version, NULL);
+    object_property_set_description(obj, "gic-version",
+                                    "Set GIC version. "
+                                    "Valid values are 2, 3 and host", NULL);
+
+    if (vmc->no_its) {
+        vms->its = false;
+    } else {
+        /* Default allows ITS instantiation */
+        vms->its = true;
+        object_property_add_bool(obj, "its", virt_get_its,
+                                 virt_set_its, NULL);
+        object_property_set_description(obj, "its",
+                                        "Set on/off to enable/disable "
+                                        "ITS instantiation",
+                                        NULL);
+    }
+
+    vms->memmap=a15memmap;
+    vms->irqmap=a15irqmap;
+}
+
+static void rhel740_virt_options(MachineClass *mc)
+{
+    SET_MACHINE_COMPAT(mc, ARM_RHEL_COMPAT);
+}
+DEFINE_RHEL_MACHINE_AS_LATEST(7, 4, 0)
+
+#define ARM_COMPAT_RHEL7_3                      \
+    HW_COMPAT_RHEL7_3
+
+static void rhel730_virt_instance_init(Object *obj)
+{
+    rhel740_virt_instance_init(obj);
+}
+
+static void rhel730_virt_options(MachineClass *mc)
+{
+    VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
+
+    rhel740_virt_options(mc);
+    SET_MACHINE_COMPAT(mc, ARM_COMPAT_RHEL7_3);
+    /* the following options need to be re-configured because they weren't
+     * present in RHEL 7.3.
+     */
+    vmc->disallow_affinity_adjustment = true;
+    vmc->no_its = true;
+    vmc->no_pmu = true;
+    mc->minimum_page_bits = 0;
+}
+DEFINE_RHEL_MACHINE(7, 3, 0)
diff --git a/hw/char/serial.c b/hw/char/serial.c
index 03d890c..771d399 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -30,6 +30,7 @@
 #include "qemu/timer.h"
 #include "exec/address-spaces.h"
 #include "qemu/error-report.h"
+#include "migration/migration.h"
 //#define DEBUG_SERIAL
@@ -683,6 +684,10 @@ static bool serial_thr_ipending_needed(void *opaque)
 {
     SerialState *s = opaque;
+    if (migrate_pre_2_2) {
+        return false;
+    }
+
     if (s->ier & UART_IER_THRI) {
         bool expected_value = ((s->iir & UART_IIR_ID) == UART_IIR_THRI);
         return s->thr_ipending != expected_value;
@@ -709,6 +714,10 @@ static const VMStateDescription vmstate_serial_thr_ipending = {
 static bool serial_tsr_needed(void *opaque)
 {
     SerialState *s = (SerialState *)opaque;
+    if (migrate_pre_2_2) {
+        return false;
+    }
+
     return s->tsr_retry != 0;
 }
@@ -728,6 +737,10 @@ static const VMStateDescription vmstate_serial_tsr = {
 static bool serial_recv_fifo_needed(void *opaque)
 {
     SerialState *s = (SerialState *)opaque;
+    if (migrate_pre_2_2) {
+        return false;
+    }
+
     return !fifo8_is_empty(&s->recv_fifo);
 }
@@ -746,6 +759,10 @@ static const VMStateDescription vmstate_serial_recv_fifo = {
 static bool serial_xmit_fifo_needed(void *opaque)
 {
     SerialState *s = (SerialState *)opaque;
+    if (migrate_pre_2_2) {
+        return false;
+    }
+
     return !fifo8_is_empty(&s->xmit_fifo);
 }
@@ -763,6 +780,10 @@ static const VMStateDescription vmstate_serial_xmit_fifo = {
 static bool serial_fifo_timeout_timer_needed(void *opaque)
 {
     SerialState *s = (SerialState *)opaque;
+    if (migrate_pre_2_2) {
+        return false;
+    }
+
     return timer_pending(s->fifo_timeout_timer);
 }
@@ -780,6 +801,10 @@ static const VMStateDescription vmstate_serial_fifo_timeout_timer = {
 static bool serial_timeout_ipending_needed(void *opaque)
 {
     SerialState *s = (SerialState *)opaque;
+    if (migrate_pre_2_2) {
+        return false;
+    }
+
     return s->timeout_ipending != 0;
 }
@@ -797,6 +822,10 @@ static const VMStateDescription vmstate_serial_timeout_ipending = {
 static bool serial_poll_needed(void *opaque)
 {
     SerialState *s = (SerialState *)opaque;
+    if (migrate_pre_2_2) {
+        return false;
+    }
+
     return s->poll_msl >= 0;
 }
diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
index afc290a..14008aa 100644
--- a/hw/display/cirrus_vga.c
+++ b/hw/display/cirrus_vga.c
@@ -3063,7 +3063,7 @@ static void isa_cirrus_vga_realizefn(DeviceState *dev, Error **errp)
 static Property isa_cirrus_vga_properties[] = {
     DEFINE_PROP_UINT32("vgamem_mb", struct ISACirrusVGAState,
-                       cirrus_vga.vga.vram_size_mb, 4),
+                       cirrus_vga.vga.vram_size_mb, 16),
     DEFINE_PROP_BOOL("blitter", struct ISACirrusVGAState,
                        cirrus_vga.enable_blitter, true),
     DEFINE_PROP_END_OF_LIST(),
@@ -3134,7 +3134,7 @@ static void pci_cirrus_vga_realize(PCIDevice *dev, Error **errp)
 static Property pci_vga_cirrus_properties[] = {
     DEFINE_PROP_UINT32("vgamem_mb", struct PCICirrusVGAState,
-                       cirrus_vga.vga.vram_size_mb, 4),
+                       cirrus_vga.vga.vram_size_mb, 16),
     DEFINE_PROP_BOOL("blitter", struct PCICirrusVGAState,
                      cirrus_vga.enable_blitter, true),
     DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/display/vga-isa.c b/hw/display/vga-isa.c
index 1af9556..91a675d 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)
 }
 static Property vga_isa_properties[] = {
-    DEFINE_PROP_UINT32("vgamem_mb", ISAVGAState, state.vram_size_mb, 8),
+    DEFINE_PROP_UINT32("vgamem_mb", ISAVGAState, state.vram_size_mb, 16),
     DEFINE_PROP_END_OF_LIST(),
 };
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 9f102aa..fa41189 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -48,6 +48,7 @@
 #include "hw/acpi/acpi.h"
 #include "cpu.h"
 #include "qemu/error-report.h"
+#include "migration/migration.h"
 #ifdef CONFIG_XEN
 #include <xen/hvm/hvm_info_table.h>
 #include "hw/xen/xen_pt.h"
@@ -166,8 +167,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 */
-        smbios_set_defaults("QEMU", "Standard PC (i440FX + PIIX, 1996)",
-                            mc->name, pcmc->smbios_legacy_mode,
+        smbios_set_defaults("Red Hat", "KVM",
+                            mc->desc, pcmc->smbios_legacy_mode,
                             pcmc->smbios_uuid_encoded,
                             SMBIOS_ENTRY_POINT_21);
     }
@@ -309,6 +310,7 @@ static void pc_init1(MachineState *machine,
  * HW_COMPAT_*, PC_COMPAT_*, or * pc_*_machine_options().
  */
+#if 0 /* Disabled for Red Hat Enterprise Linux */
 static void pc_compat_2_3(MachineState *machine)
 {
     PCMachineState *pcms = PC_MACHINE(machine);
@@ -1112,3 +1114,780 @@ static void xenfv_machine_options(MachineClass *m)
 DEFINE_PC_MACHINE(xenfv, "xenfv", pc_xen_hvm_init,
                   xenfv_machine_options);
 #endif
+machine_init(pc_machine_init);
+
+#endif  /* Disabled for Red Hat Enterprise Linux */
+
+/* Red Hat Enterprise Linux machine types */
+
+/* Options for the latest rhel7 machine type */
+static void pc_machine_rhel7_options(MachineClass *m)
+{
+    m->family = "pc_piix_Y";
+    m->default_machine_opts = "firmware=bios-256k.bin";
+    m->default_display = "std";
+    SET_MACHINE_COMPAT(m, PC_RHEL_COMPAT);
+    m->alias = "pc";
+    m->is_default = 1;
+}
+
+static void pc_init_rhel740(MachineState *machine)
+{
+    pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
+             TYPE_I440FX_PCI_DEVICE);
+}
+
+static void pc_machine_rhel740_options(MachineClass *m)
+{
+    pc_machine_rhel7_options(m);
+    m->desc = "RHEL 7.4.0 PC (i440FX + PIIX, 1996)";
+}
+
+DEFINE_PC_MACHINE(rhel740, "pc-i440fx-rhel7.4.0", pc_init_rhel740,
+                  pc_machine_rhel740_options);
+
+static void pc_init_rhel730(MachineState *machine)
+{
+    pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
+             TYPE_I440FX_PCI_DEVICE);
+}
+
+static void pc_machine_rhel730_options(MachineClass *m)
+{
+    pc_machine_rhel740_options(m);
+    m->alias = NULL;
+    m->is_default = 0;
+    m->desc = "RHEL 7.3.0 PC (i440FX + PIIX, 1996)";
+    SET_MACHINE_COMPAT(m, PC_RHEL7_3_COMPAT);
+}
+
+DEFINE_PC_MACHINE(rhel730, "pc-i440fx-rhel7.3.0", pc_init_rhel730,
+                  pc_machine_rhel730_options);
+
+
+static void pc_compat_rhel720(MachineState *machine)
+{
+    /* 7.2 was based on qemu 2.3 */
+    savevm_skip_section_footers();
+    global_state_set_optional();
+}
+
+static void pc_init_rhel720(MachineState *machine)
+{
+    pc_compat_rhel720(machine);
+    pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
+             TYPE_I440FX_PCI_DEVICE);
+}
+
+static void pc_machine_rhel720_options(MachineClass *m)
+{
+    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
+    pc_machine_rhel730_options(m);
+    m->desc = "RHEL 7.2.0 PC (i440FX + PIIX, 1996)";
+    /* From pc_i440fx_2_5_machine_options */
+    pcmc->save_tsc_khz = false;
+    m->legacy_fw_cfg_order = 1;
+    /* Note: broken_reserved_end was already in 7.2 */
+    /* From pc_i440fx_2_6_machine_options */
+    pcmc->legacy_cpu_hotplug = true;
+    SET_MACHINE_COMPAT(m, PC_RHEL7_2_COMPAT);
+}
+
+DEFINE_PC_MACHINE(rhel720, "pc-i440fx-rhel7.2.0", pc_init_rhel720,
+                  pc_machine_rhel720_options);
+
+static void pc_compat_rhel710(MachineState *machine)
+{
+    PCMachineState *pcms = PC_MACHINE(machine);
+    PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
+
+    /* 7.1.0 is based on 2.1.2, 7.2.0 is based on 2.3 */
+    pc_compat_rhel720(machine);
+
+    /* From pc_compat_2_2 */
+    pcmc->rsdp_in_ram = false;
+    machine->suppress_vmdesc = true;
+
+    /* From pc_compat_2_1 */
+    pcmc->smbios_uuid_encoded = false;
+    x86_cpu_change_kvm_default("svm", NULL);
+    pcmc->enforce_aligned_dimm = false;
+
+    /* Disable all the extra subsections that were added in 2.2 */
+    migrate_pre_2_2 = true;
+    global_state_set_optional();
+    savevm_skip_configuration();
+
+    /* From pc_i440fx_2_4_machine_options */
+    pcmc->broken_reserved_end = true;
+}
+
+static void pc_init_rhel710(MachineState *machine)
+{
+    pc_compat_rhel710(machine);
+    pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
+             TYPE_I440FX_PCI_DEVICE);
+}
+
+static void pc_machine_rhel710_options(MachineClass *m)
+{
+    pc_machine_rhel720_options(m);
+    m->family = "pc_piix_Y";
+    m->desc = "RHEL 7.1.0 PC (i440FX + PIIX, 1996)";
+    m->default_display = "cirrus";
+    SET_MACHINE_COMPAT(m, PC_RHEL7_1_COMPAT);
+}
+
+DEFINE_PC_MACHINE(rhel710, "pc-i440fx-rhel7.1.0", pc_init_rhel710,
+                  pc_machine_rhel710_options);
+
+static void pc_compat_rhel700(MachineState *machine)
+{
+    PCMachineState *pcms = PC_MACHINE(machine);
+    PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
+
+    pc_compat_rhel710(machine);
+
+    /* Upstream enables it for everyone, we're a little more selective */
+    x86_cpu_change_kvm_default("x2apic", NULL);
+    x86_cpu_change_kvm_default("svm", NULL);
+    pcmc->legacy_acpi_table_size = 6418; /* see pc_compat_2_0() */
+    pcmc->smbios_legacy_mode = true;
+    pcmc->has_reserved_memory = false;
+    migrate_cve_2014_5263_xhci_fields = true;
+}
+
+static void pc_init_rhel700(MachineState *machine)
+{
+    pc_compat_rhel700(machine);
+    pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
+             TYPE_I440FX_PCI_DEVICE);
+}
+
+static void pc_machine_rhel700_options(MachineClass *m)
+{
+    pc_machine_rhel710_options(m);
+    m->family = "pc_piix_Y";
+    m->desc = "RHEL 7.0.0 PC (i440FX + PIIX, 1996)";
+    SET_MACHINE_COMPAT(m, PC_RHEL7_0_COMPAT);
+}
+
+DEFINE_PC_MACHINE(rhel700, "pc-i440fx-rhel7.0.0", pc_init_rhel700,
+                  pc_machine_rhel700_options);
+
+#define PC_RHEL6_6_COMPAT \
+        {\
+            .driver   = "scsi-hd",\
+            .property = "discard_granularity",\
+            .value    = stringify(0),\
+        },{\
+            .driver   = "scsi-cd",\
+            .property = "discard_granularity",\
+            .value    = stringify(0),\
+        },{\
+            .driver   = "scsi-disk",\
+            .property = "discard_granularity",\
+            .value    = stringify(0),\
+        },{\
+            .driver   = "ide-hd",\
+            .property = "discard_granularity",\
+            .value    = stringify(0),\
+        },{\
+            .driver   = "ide-cd",\
+            .property = "discard_granularity",\
+            .value    = stringify(0),\
+        },{\
+            .driver   = "ide-drive",\
+            .property = "discard_granularity",\
+            .value    = stringify(0),\
+        },{\
+            .driver   = "virtio-blk-pci",\
+            .property = "discard_granularity",\
+            .value    = stringify(0),\
+        },{\
+            .driver   = "virtio-serial-pci",\
+            .property = "vectors",\
+            /* DEV_NVECTORS_UNSPECIFIED as a uint32_t string */\
+            .value    = stringify(0xFFFFFFFF),\
+        },{\
+            .driver   = "486-" TYPE_X86_CPU,\
+            .property = "model",\
+            .value    = stringify(0),\
+        },{\
+            .driver   = "usb-tablet",\
+            .property = "usb_version",\
+            .value    = stringify(1),\
+        },{\
+            .driver   = "virtio-net-pci",\
+            .property = "mq",\
+            .value    = "off",\
+        },{\
+            .driver   = "VGA",\
+            .property = "mmio",\
+            .value    = "off",\
+        },{\
+            .driver   = "virtio-blk-pci",\
+            .property = "config-wce",\
+            .value    = "off",\
+        },{\
+            .driver   = TYPE_ISA_FDC,\
+            .property = "check_media_rate",\
+            .value    = "off",\
+        },{\
+            .driver   = "virtio-balloon-pci",\
+            .property = "class",\
+            .value    = stringify(PCI_CLASS_MEMORY_RAM),\
+        },{\
+            .driver   = TYPE_PCI_DEVICE,\
+            .property = "command_serr_enable",\
+            .value    = "off",\
+        },{\
+            .driver   = "AC97",\
+            .property = "use_broken_id",\
+            .value    = stringify(1),\
+        },{\
+            .driver   = "intel-hda",\
+            .property = "msi",\
+            .value    = "off",\
+        },{\
+            .driver = "qemu32-" TYPE_X86_CPU,\
+            .property = "xlevel",\
+            .value = stringify(0),\
+        },{\
+            .driver = "486-" TYPE_X86_CPU,\
+            .property = "level",\
+            .value = stringify(0),\
+        },{\
+            .driver   = "qemu32-" TYPE_X86_CPU,\
+            .property = "model",\
+            .value    = stringify(3),\
+        },{\
+            .driver   = "usb-ccid",\
+            .property = "serial",\
+            .value    = "1",\
+        },{\
+            .driver   = "ne2k_pci",\
+            .property = "romfile",\
+            .value    = "rhel6-ne2k_pci.rom",\
+        },{\
+            .driver   = "pcnet",\
+            .property = "romfile",\
+            .value    = "rhel6-pcnet.rom",\
+        },{\
+            .driver   = "rtl8139",\
+            .property = "romfile",\
+            .value    = "rhel6-rtl8139.rom",\
+        },{\
+            .driver   = "e1000",\
+            .property = "romfile",\
+            .value    = "rhel6-e1000.rom",\
+        },{\
+            .driver   = "virtio-net-pci",\
+            .property = "romfile",\
+            .value    = "rhel6-virtio.rom",\
+        },{\
+            .driver   = "virtio-net-pci",\
+            .property = "any_layout",\
+            .value    = "off",\
+        },\
+        {\
+            .driver = "pentium" "-" TYPE_X86_CPU,\
+            .property = "apic",\
+            .value = "off",\
+        },\
+        {\
+            .driver = "pentium2" "-" TYPE_X86_CPU,\
+            .property = "apic",\
+            .value = "off",\
+        },\
+        {\
+            .driver = "pentium3" "-" TYPE_X86_CPU,\
+            .property = "apic",\
+            .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",\
+        },\
+        {\
+            .driver = "Westmere" "-" TYPE_X86_CPU,\
+            .property = "x2apic",\
+            .value = "on",\
+        },\
+        {\
+            .driver = "Westmere" "-" TYPE_X86_CPU,\
+            .property = "pclmulqdq",\
+            .value = "off",\
+        },\
+        {\
+            .driver = "Westmere" "-" TYPE_X86_CPU,\
+            .property = "fxsr",\
+            .value = "on",\
+        },\
+        {\
+            .driver = "Westmere" "-" TYPE_X86_CPU,\
+            .property = "mmx",\
+            .value = "on",\
+        },\
+        {\
+            .driver = "Westmere" "-" TYPE_X86_CPU,\
+            .property = "pat",\
+            .value = "on",\
+        },\
+        {\
+            .driver = "Westmere" "-" TYPE_X86_CPU,\
+            .property = "cmov",\
+            .value = "on",\
+        },\
+        {\
+            .driver = "Westmere" "-" TYPE_X86_CPU,\
+            .property = "pge",\
+            .value = "on",\
+        },\
+        {\
+            .driver = "Westmere" "-" TYPE_X86_CPU,\
+            .property = "apic",\
+            .value = "on",\
+        },\
+        {\
+            .driver = "Westmere" "-" TYPE_X86_CPU,\
+            .property = "cx8",\
+            .value = "on",\
+        },\
+        {\
+            .driver = "Westmere" "-" TYPE_X86_CPU,\
+            .property = "mce",\
+            .value = "on",\
+        },\
+        {\
+            .driver = "Westmere" "-" TYPE_X86_CPU,\
+            .property = "pae",\
+            .value = "on",\
+        },\
+        {\
+            .driver = "Westmere" "-" TYPE_X86_CPU,\
+            .property = "msr",\
+            .value = "on",\
+        },\
+        {\
+            .driver = "Westmere" "-" TYPE_X86_CPU,\
+            .property = "tsc",\
+            .value = "on",\
+        },\
+        {\
+            .driver = "Westmere" "-" TYPE_X86_CPU,\
+            .property = "pse",\
+            .value = "on",\
+        },\
+        {\
+            .driver = "Westmere" "-" TYPE_X86_CPU,\
+            .property = "de",\
+            .value = "on",\
+        },\
+        {\
+            .driver = "Westmere" "-" TYPE_X86_CPU,\
+            .property = "fpu",\
+            .value = "on",\
+        },\
+        {\
+            .driver = "Broadwell" "-" TYPE_X86_CPU,\
+            .property = "rdtscp",\
+            .value = "off",\
+        },\
+        {\
+            .driver = "Broadwell" "-" TYPE_X86_CPU,\
+            .property = "smap",\
+            .value = "off",\
+        },\
+        {\
+            .driver = TYPE_X86_CPU,\
+            .property = "rdtscp",\
+            .value = "off",\
+        },\
+        {\
+            .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 = "off",\
+        },\
+        {\
+            .driver = "Opteron_G5" "-" TYPE_X86_CPU,\
+            .property = "x2apic",\
+            .value = "off",\
+        },\
+        {\
+            .driver = TYPE_X86_CPU,\
+            .property = "3dnow",\
+            .value = "off",\
+        },\
+        {\
+            .driver = TYPE_X86_CPU,\
+            .property = "3dnowext",\
+            .value = "off",\
+        },\
+        {\
+            .driver = "virtio-net-pci",\
+            .property = "__com.redhat_rhel6_ctrl_guest_workaround", \
+            .value = "on",\
+        },
+
+static void pc_compat_rhel660(MachineState *machine)
+{
+    PCMachineState *pcms = PC_MACHINE(machine);
+    PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
+
+    pc_compat_rhel700(machine);
+    if (!machine->cpu_model) {
+        machine->cpu_model = "cpu64-rhel6";
+    }
+
+    x86_cpu_change_kvm_default("kvm-pv-unhalt", NULL);
+
+    pcmc->gigabyte_align = false;
+    shadow_bios_after_incoming = true;
+    ich9_uhci123_irqpin_override = true;
+}
+
+static void pc_init_rhel660(MachineState *machine)
+{
+    pc_compat_rhel660(machine);
+    pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
+             TYPE_I440FX_PCI_DEVICE);}
+
+static void pc_machine_rhel660_options(MachineClass *m)
+{
+    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
+    pc_machine_rhel700_options(m);
+    m->family = "pc_piix_Z";
+    m->desc = "RHEL 6.6.0 PC";
+    m->rom_file_has_mr = false;
+    m->default_machine_opts = "firmware=bios.bin";
+    pcmc->has_acpi_build = false;
+    SET_MACHINE_COMPAT(m, PC_RHEL6_6_COMPAT);
+}
+
+DEFINE_PC_MACHINE(rhel660, "rhel6.6.0", pc_init_rhel660,
+                  pc_machine_rhel660_options);
+
+#define PC_RHEL6_5_COMPAT \
+        {\
+            .driver   = TYPE_USB_DEVICE,\
+            .property = "msos-desc",\
+            .value    = "no",\
+        },
+
+static void pc_compat_rhel650(MachineState *machine)
+{
+    pc_compat_rhel660(machine);
+}
+
+static void pc_init_rhel650(MachineState *machine)
+{
+    pc_compat_rhel650(machine);
+    pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
+             TYPE_I440FX_PCI_DEVICE);}
+
+static void pc_machine_rhel650_options(MachineClass *m)
+{
+    pc_machine_rhel660_options(m);
+    m->family = "pc_piix_Z";
+    m->desc = "RHEL 6.5.0 PC";
+    SET_MACHINE_COMPAT(m, PC_RHEL6_5_COMPAT);
+}
+
+DEFINE_PC_MACHINE(rhel650, "rhel6.5.0", pc_init_rhel650,
+                  pc_machine_rhel650_options);
+
+#define PC_RHEL6_4_COMPAT \
+        {\
+            .driver   = "virtio-scsi-pci",\
+            .property = "vectors",\
+            .value    = stringify(2),\
+        },{\
+            .driver   = "hda-micro",\
+            .property = "mixer",\
+            .value    = "off",\
+        },{\
+            .driver   = "hda-duplex",\
+            .property = "mixer",\
+            .value    = "off",\
+        },{\
+            .driver   = "hda-output",\
+            .property = "mixer",\
+            .value    = "off",\
+        },{\
+            .driver   = "virtio-net-pci",\
+            .property = "ctrl_mac_addr",\
+            .value    = "off",\
+        },\
+        {\
+            .driver = TYPE_X86_CPU,\
+            .property = "sep",\
+            .value = "off",\
+        },\
+        {\
+            .driver = "virtio-net-pci",\
+            .property = "__com.redhat_rhel6_ctrl_guest_workaround", \
+            .value = "off",\
+        },
+
+static void pc_compat_rhel640(MachineState *machine)
+{
+    pc_compat_rhel650(machine);
+}
+
+static void pc_init_rhel640(MachineState *machine)
+{
+    pc_compat_rhel640(machine);
+    pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
+             TYPE_I440FX_PCI_DEVICE);}
+
+static void pc_machine_rhel640_options(MachineClass *m)
+{
+    pc_machine_rhel650_options(m);
+    m->family = "pc_piix_Z";
+    m->desc = "RHEL 6.4.0 PC";
+    SET_MACHINE_COMPAT(m, PC_RHEL6_4_COMPAT);
+}
+
+DEFINE_PC_MACHINE(rhel640, "rhel6.4.0", pc_init_rhel640,
+                  pc_machine_rhel640_options);
+
+#define PC_RHEL6_3_COMPAT \
+        {\
+            .driver   = "Conroe-" TYPE_X86_CPU,\
+            .property = "level",\
+            .value    = stringify(2),\
+        },{\
+            .driver   = "Penryn-" TYPE_X86_CPU,\
+            .property = "level",\
+            .value    = stringify(2),\
+        },{\
+            .driver   = "Nehalem-" TYPE_X86_CPU,\
+            .property = "level",\
+            .value    = stringify(2),\
+        },{\
+            .driver   = "e1000",\
+            .property = "autonegotiation",\
+            .value    = "off",\
+        },{\
+            .driver   = "qxl",\
+            .property = "revision",\
+            .value    = stringify(3),\
+        },{\
+            .driver   = "qxl-vga",\
+            .property = "revision",\
+            .value    = stringify(3),\
+        },{\
+            .driver   = "virtio-scsi-pci",\
+            .property = "hotplug",\
+            .value    = "off",\
+        },{\
+            .driver   = "virtio-scsi-pci",\
+            .property = "param_change",\
+            .value    = "off",\
+        },{\
+            .driver = TYPE_X86_CPU,\
+            .property = "pmu",\
+            .value = "on",\
+        },{\
+            .driver   = "usb-hub",\
+            .property = "serial",\
+            .value    = "314159",\
+        },{\
+            .driver   = "usb-storage",\
+            .property = "serial",\
+            .value    = "1",\
+        },\
+        {\
+            .driver = "SandyBridge" "-" TYPE_X86_CPU,\
+            .property = "tsc-deadline",\
+            .value = "off",\
+        },
+
+static void pc_compat_rhel630(MachineState *machine)
+{
+    pc_compat_rhel640(machine);
+    x86_cpu_change_kvm_default("kvm-pv-eoi",NULL);
+    enable_compat_apic_id_mode();
+}
+
+static void pc_init_rhel630(MachineState *machine)
+{
+    pc_compat_rhel630(machine);
+    pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
+             TYPE_I440FX_PCI_DEVICE);}
+
+static void pc_machine_rhel630_options(MachineClass *m)
+{
+    pc_machine_rhel640_options(m);
+    m->family = "pc_piix_Z";
+    m->desc = "RHEL 6.3.0 PC";
+    SET_MACHINE_COMPAT(m, PC_RHEL6_3_COMPAT);
+}
+
+DEFINE_PC_MACHINE(rhel630, "rhel6.3.0", pc_init_rhel630,
+                  pc_machine_rhel630_options);
+
+
+#define PC_RHEL6_2_COMPAT \
+        {\
+            .driver = TYPE_X86_CPU,\
+            .property = "pmu",\
+            .value = "off",\
+        },
+
+static void pc_compat_rhel620(MachineState *machine)
+{
+    pc_compat_rhel630(machine);
+}
+
+static void pc_init_rhel620(MachineState *machine)
+{
+    pc_compat_rhel620(machine);
+    pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
+             TYPE_I440FX_PCI_DEVICE);}
+
+static void pc_machine_rhel620_options(MachineClass *m)
+{
+    pc_machine_rhel630_options(m);
+    m->family = "pc_piix_Z";
+    m->desc = "RHEL 6.2.0 PC";
+    SET_MACHINE_COMPAT(m, PC_RHEL6_2_COMPAT);
+}
+
+DEFINE_PC_MACHINE(rhel620, "rhel6.2.0", pc_init_rhel620,
+                  pc_machine_rhel620_options);
+
+/*
+ * NOTE: We don't have the event_idx compat entry for the
+ * virtio-balloon-pci driver because RHEL6 doesn't disable
+ * it either due to a bug (see RHBZ 1029539 fo more info)
+ */
+#define PC_RHEL6_1_COMPAT \
+        {\
+            .driver   = "PIIX4_PM",\
+            .property = "disable_s3",\
+            .value    = "0",\
+        },{\
+            .driver   = "PIIX4_PM",\
+            .property = "disable_s4",\
+            .value    = "0",\
+        },{\
+            .driver   = "qxl",\
+            .property = "revision",\
+            .value    = stringify(2),\
+        },{\
+            .driver   = "qxl-vga",\
+            .property = "revision",\
+            .value    = stringify(2),\
+        },{\
+            .driver   = "virtio-blk-pci",\
+            .property = "event_idx",\
+            .value    = "off",\
+        },{\
+            .driver   = "virtio-serial-pci",\
+            .property = "event_idx",\
+            .value    = "off",\
+        },{\
+            .driver   = "virtio-net-pci",\
+            .property = "event_idx",\
+            .value    = "off",\
+        },{\
+            .driver   = "usb-kbd",\
+            .property = "serial",\
+            .value    = "1",\
+        },{\
+            .driver   = "usb-mouse",\
+            .property = "serial",\
+            .value    = "1",\
+        },{\
+            .driver   = "usb-tablet",\
+            .property = "serial",\
+            .value    = "1",\
+        },
+
+static void pc_compat_rhel610(MachineState *machine)
+{
+    pc_compat_rhel620(machine);
+}
+
+static void pc_init_rhel610(MachineState *machine)
+{
+    pc_compat_rhel610(machine);
+    pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
+             TYPE_I440FX_PCI_DEVICE);}
+
+static void pc_machine_rhel610_options(MachineClass *m)
+{
+    pc_machine_rhel620_options(m);
+    m->family = "pc_piix_Z";
+    m->desc = "RHEL 6.1.0 PC";
+    SET_MACHINE_COMPAT(m, PC_RHEL6_1_COMPAT);
+}
+
+DEFINE_PC_MACHINE(rhel610, "rhel6.1.0", pc_init_rhel610,
+                  pc_machine_rhel610_options);
+
+#define PC_RHEL6_0_COMPAT \
+        {\
+            .driver   = "qxl",\
+            .property = "revision",\
+            .value    = stringify(1),\
+        },{\
+            .driver   = "qxl-vga",\
+            .property = "revision",\
+            .value    = stringify(1),\
+        },{\
+            .driver   = "VGA",\
+            .property = "rombar",\
+            .value    = stringify(0),\
+        },
+
+static void pc_compat_rhel600(MachineState *machine)
+{
+    pc_compat_rhel610(machine);
+}
+
+static void pc_init_rhel600(MachineState *machine)
+{
+    pc_compat_rhel600(machine);
+    pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
+             TYPE_I440FX_PCI_DEVICE);}
+
+static void pc_machine_rhel600_options(MachineClass *m)
+{
+    pc_machine_rhel610_options(m);
+    m->family = "pc_piix_Z";
+    m->desc = "RHEL 6.0.0 PC";
+    SET_MACHINE_COMPAT(m, PC_RHEL6_0_COMPAT);
+}
+
+DEFINE_PC_MACHINE(rhel600, "rhel6.0.0", pc_init_rhel600,
+                  pc_machine_rhel600_options);
+
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index dd792a8..a8ab052 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -136,8 +136,8 @@ static void pc_q35_init(MachineState *machine)
     if (pcmc->smbios_defaults) {
         /* These values are guest ABI, do not change */
-        smbios_set_defaults("QEMU", "Standard PC (Q35 + ICH9, 2009)",
-                            mc->name, pcmc->smbios_legacy_mode,
+        smbios_set_defaults("Red Hat", "KVM",
+                            mc->desc, pcmc->smbios_legacy_mode,
                             pcmc->smbios_uuid_encoded,
                             SMBIOS_ENTRY_POINT_21);
     }
@@ -288,6 +288,7 @@ static void pc_q35_init(MachineState *machine)
     DEFINE_PC_MACHINE(suffix, name, pc_init_##suffix, optionfn)
+#if 0 /* Disabled for Red Hat Enterprise Linux */
 static void pc_q35_machine_options(MachineClass *m)
 {
     m->family = "pc_q35";
@@ -299,6 +300,7 @@ static void pc_q35_machine_options(MachineClass *m)
     m->no_floppy = 1;
     m->has_dynamic_sysbus = true;
     m->max_cpus = 288;
+    SET_MACHINE_COMPAT(m, PC_RHEL_COMPAT);
 }
 static void pc_q35_2_9_machine_options(MachineClass *m)
@@ -364,3 +366,48 @@ 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);
+#endif  /* Disabled for Red Hat Enterprise Linux */
+
+/* Red Hat Enterprise Linux machine types */
+
+/* Options for the latest rhel7 q35 machine type */
+static void pc_q35_machine_rhel7_options(MachineClass *m)
+{
+    m->family = "pc_q35_Z";
+    m->default_machine_opts = "firmware=bios-256k.bin";
+    m->default_display = "std";
+    m->no_floppy = 1;
+    m->has_dynamic_sysbus = true;
+    m->alias = "q35";
+    SET_MACHINE_COMPAT(m, PC_RHEL_COMPAT);
+}
+
+static void pc_q35_init_rhel740(MachineState *machine)
+{
+    pc_q35_init(machine);
+}
+
+static void pc_q35_machine_rhel740_options(MachineClass *m)
+{
+    pc_q35_machine_rhel7_options(m);
+    m->desc = "RHEL-7.4.0 PC (Q35 + ICH9, 2009)";
+}
+
+DEFINE_PC_MACHINE(q35_rhel740, "pc-q35-rhel7.4.0", pc_q35_init_rhel740,
+                  pc_q35_machine_rhel740_options);
+
+static void pc_q35_init_rhel730(MachineState *machine)
+{
+    pc_q35_init(machine);
+}
+
+static void pc_q35_machine_rhel730_options(MachineClass *m)
+{
+    pc_q35_machine_rhel740_options(m);
+    m->alias = NULL;
+    m->desc = "RHEL-7.3.0 PC (Q35 + ICH9, 2009)";
+    SET_MACHINE_COMPAT(m, PC_RHEL7_3_COMPAT);
+}
+
+DEFINE_PC_MACHINE(q35_rhel730, "pc-q35-rhel7.3.0", pc_q35_init_rhel730,
+                  pc_q35_machine_rhel730_options);
diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c
index f915ad0..7c0723f 100644
--- a/hw/i386/pc_sysfw.c
+++ b/hw/i386/pc_sysfw.c
@@ -194,6 +194,13 @@ static void old_pc_system_rom_init(MemoryRegion *rom_memory, bool isapc_ram_fw)
         (bios_size % 65536) != 0) {
         goto bios_error;
     }
+    if (shadow_bios_after_incoming && bios_size != 128 * 1024) {
+        MachineClass *mc;
+
+        mc = MACHINE_GET_CLASS(current_machine);
+        error_report("machine %s only supports a 128KB BIOS image", mc->name);
+        exit(1);
+    }
     bios = g_malloc(sizeof(*bios));
     memory_region_init_ram(bios, NULL, "pc.bios", bios_size, &error_fatal);
     vmstate_register_ram_global(bios);
@@ -242,6 +249,15 @@ void pc_system_firmware_init(MemoryRegion *rom_memory, bool isapc_ram_fw)
         return;
     }
+    if (shadow_bios_after_incoming) {
+        MachineClass *mc;
+
+        mc = MACHINE_GET_CLASS(current_machine);
+        error_report("flash-based firmware is not supported by machine %s",
+                     mc->name);
+        exit(1);
+    }
+
     if (kvm_enabled() && !kvm_readonly_mem_enabled()) {
         /* Older KVM cannot execute from device memory. So, flash memory
          * cannot be used unless the readonly memory kvm capability is present. */
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index f2e5072..3d86146 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -1595,6 +1595,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;
@@ -1657,7 +1667,7 @@ static void e1000_class_init(ObjectClass *klass, void *data)
     k->realize = pci_e1000_realize;
     k->exit = pci_e1000_uninit;
-    k->romfile = "efi-e1000.rom";
+    k->romfile = "pxe-e1000.rom";
     k->vendor_id = PCI_VENDOR_ID_INTEL;
     k->device_id = info->device_id;
     k->revision = info->revision;
@@ -1689,7 +1699,7 @@ static const TypeInfo e1000_base_info = {
 static const E1000Info e1000_devices[] = {
     {
-        .name      = "e1000",
+        .name      = "e1000-82540em",
         .device_id = E1000_DEV_ID_82540EM,
         .revision  = 0x03,
         .phy_id2   = E1000_PHY_ID2_8254xx_DEFAULT,
@@ -1708,6 +1718,11 @@ static const E1000Info e1000_devices[] = {
     },
 };
+static const TypeInfo e1000_default_info = {
+    .name          = "e1000",
+    .parent        = "e1000-82540em",
+};
+
 static void e1000_register_types(void)
 {
     int i;
@@ -1725,6 +1740,7 @@ static void e1000_register_types(void)
         type_register(&type_info);
     }
+    type_register_static(&e1000_default_info);
 }
 type_init(e1000_register_types)
diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c
index 798d681..8660955 100644
--- a/hw/net/ne2000.c
+++ b/hw/net/ne2000.c
@@ -771,7 +771,7 @@ static void ne2000_class_init(ObjectClass *klass, void *data)
     k->realize = pci_ne2000_realize;
     k->exit = pci_ne2000_exit;
-    k->romfile = "efi-ne2k_pci.rom",
+    k->romfile = "pxe-ne2k_pci.rom",
     k->vendor_id = PCI_VENDOR_ID_REALTEK;
     k->device_id = PCI_DEVICE_ID_REALTEK_8029;
     k->class_id = PCI_CLASS_NETWORK_ETHERNET;
diff --git a/hw/net/pcnet-pci.c b/hw/net/pcnet-pci.c
index 0acf8a4..eeab4ca 100644
--- a/hw/net/pcnet-pci.c
+++ b/hw/net/pcnet-pci.c
@@ -348,7 +348,7 @@ static void pcnet_class_init(ObjectClass *klass, void *data)
     k->realize = pci_pcnet_realize;
     k->exit = pci_pcnet_uninit;
-    k->romfile = "efi-pcnet.rom",
+    k->romfile = "pxe-pcnet.rom",
     k->vendor_id = PCI_VENDOR_ID_AMD;
     k->device_id = PCI_DEVICE_ID_AMD_LANCE;
     k->revision = 0x10;
diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c
index 671c7e4..450658c 100644
--- a/hw/net/rtl8139.c
+++ b/hw/net/rtl8139.c
@@ -3472,7 +3472,7 @@ static void rtl8139_class_init(ObjectClass *klass, void *data)
     k->realize = pci_rtl8139_realize;
     k->exit = pci_rtl8139_uninit;
-    k->romfile = "efi-rtl8139.rom";
+    k->romfile = "pxe-rtl8139.rom";
     k->vendor_id = PCI_VENDOR_ID_REALTEK;
     k->device_id = PCI_DEVICE_ID_REALTEK_8139;
     k->revision = RTL8139_PCI_REVID; /* >=0x20 is for 8139C+ */
diff --git a/hw/ppc/Makefile.objs b/hw/ppc/Makefile.objs
index 0012934..72edbf1 100644
--- a/hw/ppc/Makefile.objs
+++ b/hw/ppc/Makefile.objs
@@ -12,7 +12,7 @@ obj-y += spapr_pci_vfio.o
 endif
 obj-$(CONFIG_PSERIES) += spapr_rtas_ddw.o
 # PowerPC 4xx boards
-obj-y += ppc405_boards.o ppc4xx_devs.o ppc405_uc.o ppc440_bamboo.o
+obj-y += ppc4xx_devs.o ppc405_uc.o
 obj-y += ppc4xx_pci.o
 # PReP
 obj-$(CONFIG_PREP) += prep.o
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 35db949..596cc11 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -3157,6 +3157,7 @@ static const TypeInfo spapr_machine_info = {
     }                                                                \
     type_init(spapr_machine_register_##suffix)
+#if 0 /* Disabled for Red Hat Enterprise Linux */
 /*
  * pseries-2.9
  */
@@ -3221,6 +3222,7 @@ DEFINE_SPAPR_MACHINE(2_8, "2.8", false);
         .property = "pre-2.8-migration",            \
         .value    = "on",                           \
     },
+#endif
 static void phb_placement_2_7(sPAPRMachineState *spapr, uint32_t index,
                               uint64_t *buid, hwaddr *pio,
@@ -3271,6 +3273,7 @@ static void phb_placement_2_7(sPAPRMachineState *spapr, uint32_t index,
      */
 }
+#if 0 /* Disabled for Red Hat Enterprise Linux */
 static void spapr_machine_2_7_instance_options(MachineState *machine)
 {
     sPAPRMachineState *spapr = SPAPR_MACHINE(machine);
@@ -3422,6 +3425,7 @@ DEFINE_SPAPR_MACHINE(2_2, "2.2", false);
 #define SPAPR_COMPAT_2_1 \
         HW_COMPAT_2_1
+
 static void spapr_machine_2_1_instance_options(MachineState *machine)
 {
     spapr_machine_2_2_instance_options(machine);
@@ -3433,6 +3437,107 @@ static void spapr_machine_2_1_class_options(MachineClass *mc)
     SET_MACHINE_COMPAT(mc, SPAPR_COMPAT_2_1);
 }
 DEFINE_SPAPR_MACHINE(2_1, "2.1", false);
+#endif
+
+/*
+ * pseries-rhel7.4.0
+ */
+static void spapr_machine_rhel740_instance_options(MachineState *machine)
+{
+}
+
+static void spapr_machine_rhel740_class_options(MachineClass *mc)
+{
+    /* Defaults for the latest behaviour inherited from the base class */
+}
+
+DEFINE_SPAPR_MACHINE(rhel740, "rhel7.4.0", true);
+
+/*
+ * pseries-rhel7.3.0
+ * like SPAPR_COMPAT_2_6 and _2_7 but "ddw" has been backported to RHEL7_3
+ */
+#define SPAPR_COMPAT_RHEL7_3 \
+    HW_COMPAT_RHEL7_3                               \
+    {                                               \
+        .driver   = TYPE_SPAPR_PCI_HOST_BRIDGE,     \
+        .property = "mem_win_size",                 \
+        .value    = stringify(SPAPR_PCI_2_7_MMIO_WIN_SIZE),\
+    },                                              \
+    {                                               \
+        .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",                           \
+    },
+
+static void spapr_machine_rhel730_instance_options(MachineState *machine)
+{
+    sPAPRMachineState *spapr = SPAPR_MACHINE(machine);
+
+    spapr_machine_rhel740_instance_options(machine);
+    spapr->use_hotplug_event_source = false;
+}
+
+static void spapr_machine_rhel730_class_options(MachineClass *mc)
+{
+    sPAPRMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
+
+    spapr_machine_rhel740_class_options(mc);
+    smc->tcg_default_cpu = "POWER7";
+    SET_MACHINE_COMPAT(mc, SPAPR_COMPAT_RHEL7_3);
+    smc->phb_placement = phb_placement_2_7;
+}
+
+DEFINE_SPAPR_MACHINE(rhel730, "rhel7.3.0", false);
+
+/*
+ * pseries-rhel7.2.0
+ */
+/* Should be like SPAPR_COMPAT_2_5 + 2_4 + 2_3, but "dynamic-reconfiguration"
+ * has been backported to RHEL7_2 so we don't need it here.
+ */
+
+#define SPAPR_COMPAT_RHEL7_2 \
+    HW_COMPAT_RHEL7_2 \
+    { \
+        .driver   = "spapr-vlan", \
+        .property = "use-rx-buffer-pools", \
+        .value    = "off", \
+    },{ \
+        .driver   = TYPE_SPAPR_PCI_HOST_BRIDGE,\
+        .property = "ddw",\
+        .value    = stringify(off),\
+    },
+
+
+static void spapr_machine_rhel720_instance_options(MachineState *machine)
+{
+    spapr_machine_rhel730_instance_options(machine);
+    savevm_skip_section_footers();
+    global_state_set_optional();
+}
+
+static void spapr_machine_rhel720_class_options(MachineClass *mc)
+{
+    sPAPRMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
+
+    spapr_machine_rhel730_class_options(mc);
+    smc->use_ohci_by_default = true;
+    mc->has_hotpluggable_cpus = NULL;
+    SET_MACHINE_COMPAT(mc, SPAPR_COMPAT_RHEL7_2);
+}
+
+DEFINE_SPAPR_MACHINE(rhel720, "rhel7.2.0", false);
 static void spapr_machine_register_types(void)
 {
diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c
index 1a5437a..cd9cdfa 100644
--- a/hw/smbios/smbios.c
+++ b/hw/smbios/smbios.c
@@ -743,6 +743,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);
+    SMBIOS_SET_DEFAULT(type1.family, "Red Hat Enterprise Linux");
     SMBIOS_SET_DEFAULT(type2.manufacturer, manufacturer);
     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 e18299a..0817461 100644
--- a/hw/timer/i8254_common.c
+++ b/hw/timer/i8254_common.c
@@ -267,7 +267,7 @@ static const VMStateDescription vmstate_pit_common = {
     .pre_save = pit_dispatch_pre_save,
     .post_load = pit_dispatch_post_load,
     .fields = (VMStateField[]) {
-        VMSTATE_UINT32_V(channels[0].irq_disabled, PITCommonState, 3),
+        VMSTATE_UINT32(channels[0].irq_disabled, PITCommonState), /* qemu-kvm's v2 had 'flags' here */
         VMSTATE_STRUCT_ARRAY(channels, PITCommonState, 3, 2,
                              vmstate_pit_channel, PITChannelState),
         VMSTATE_INT64(channels[0].next_transition_time,
diff --git a/hw/timer/mc146818rtc.c b/hw/timer/mc146818rtc.c
index 4165450..bf693c0 100644
--- a/hw/timer/mc146818rtc.c
+++ b/hw/timer/mc146818rtc.c
@@ -32,6 +32,7 @@
 #include "qapi/visitor.h"
 #include "qapi-event.h"
 #include "qmp-commands.h"
+#include "migration/migration.h"
 #ifdef TARGET_I386
 #include "hw/i386/apic.h"
@@ -760,6 +761,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;
+
+    if (migrate_pre_2_2) {
+        return false;
+    }
+
     return s->irq_reinject_on_ack_count != 0;
 }
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
index ca72a80..1d37b66 100644
--- a/hw/usb/hcd-uhci.c
+++ b/hw/usb/hcd-uhci.c
@@ -152,6 +152,8 @@ typedef struct UHCI_QH {
     uint32_t el_link;
 } UHCI_QH;
+bool ich9_uhci123_irqpin_override;
+
 static void uhci_async_cancel(UHCIAsync *async);
 static void uhci_queue_fill(UHCIQueue *q, UHCI_TD *td);
 static void uhci_resume(void *opaque);
@@ -1214,12 +1216,23 @@ static void usb_uhci_common_realize(PCIDevice *dev, Error **errp)
     UHCIState *s = UHCI(dev);
     uint8_t *pci_conf = s->dev.config;
     int i;
+    int irq_pin;
     pci_conf[PCI_CLASS_PROG] = 0x00;
     /* TODO: reset value should be 0. */
     pci_conf[USB_SBRN] = USB_RELEASE_1; // release number
-    pci_config_set_interrupt_pin(pci_conf, u->info.irq_pin + 1);
+    if (ich9_uhci123_irqpin_override &&
+        u->info.vendor_id == PCI_VENDOR_ID_INTEL &&
+        (u->info.device_id == PCI_DEVICE_ID_INTEL_82801I_UHCI1 ||
+         u->info.device_id == PCI_DEVICE_ID_INTEL_82801I_UHCI2 ||
+         u->info.device_id == PCI_DEVICE_ID_INTEL_82801I_UHCI3)) {
+        fprintf(stderr, "RHEL-6 compat: %s: irq_pin = 3\n", u->info.name);
+        irq_pin = 3;
+    } else {
+        irq_pin = u->info.irq_pin;
+    }
+    pci_config_set_interrupt_pin(pci_conf, irq_pin + 1);
     if (s->masterbus) {
         USBPort *ports[NB_PORTS];
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index a2d3143..c38594c 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -418,6 +418,8 @@ typedef struct XHCIEvent {
     uint32_t flags;
     uint8_t slotid;
     uint8_t epid;
+    uint8_t cve_2014_5263_a;
+    uint8_t cve_2014_5263_b;
 } XHCIEvent;
 typedef struct XHCIInterrupter {
@@ -3760,9 +3762,25 @@ static const VMStateDescription vmstate_xhci_slot = {
     }
 };
+static void xhci_event_pre_save(void *opaque)
+{
+    XHCIEvent *s = opaque;
+
+    s->cve_2014_5263_a = ((uint8_t *)&s->type)[0];
+    s->cve_2014_5263_b = ((uint8_t *)&s->type)[1];
+}
+
+bool migrate_cve_2014_5263_xhci_fields;
+
+static bool xhci_event_cve_2014_5263(void *opaque, int version_id)
+{
+    return migrate_cve_2014_5263_xhci_fields;
+}
+
 static const VMStateDescription vmstate_xhci_event = {
     .name = "xhci-event",
     .version_id = 1,
+    .pre_save = xhci_event_pre_save,
     .fields = (VMStateField[]) {
         VMSTATE_UINT32(type,   XHCIEvent),
         VMSTATE_UINT32(ccode,  XHCIEvent),
@@ -3771,6 +3789,8 @@ static const VMStateDescription vmstate_xhci_event = {
         VMSTATE_UINT32(flags,  XHCIEvent),
         VMSTATE_UINT8(slotid,  XHCIEvent),
         VMSTATE_UINT8(epid,    XHCIEvent),
+        VMSTATE_UINT8_TEST(cve_2014_5263_a, XHCIEvent, xhci_event_cve_2014_5263),
+        VMSTATE_UINT8_TEST(cve_2014_5263_b, XHCIEvent, xhci_event_cve_2014_5263),
         VMSTATE_END_OF_LIST()
     }
 };
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index f9b7244..13fc414 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -2339,7 +2339,7 @@ static void virtio_net_pci_class_init(ObjectClass *klass, void *data)
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
     VirtioPCIClass *vpciklass = VIRTIO_PCI_CLASS(klass);
-    k->romfile = "efi-virtio.rom";
+    k->romfile = "pxe-virtio.rom";
     k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
     k->device_id = PCI_DEVICE_ID_VIRTIO_NET;
     k->revision = VIRTIO_PCI_ABI_VERSION;
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 03592c5..3d6f05f 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -25,6 +25,7 @@
 #include "hw/virtio/virtio-access.h"
 #include "sysemu/dma.h"
+#include "standard-headers/linux/virtio_net.h"
 /*
  * The alignment to use between consumer and producer parts of vring.
  * x86 pagesize again. This is the default, used by transports like PCI
@@ -1984,7 +1985,24 @@ const VMStateInfo  virtio_vmstate_info = {
 static int virtio_set_features_nocheck(VirtIODevice *vdev, uint64_t val)
 {
     VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
-    bool bad = (val & ~(vdev->host_features)) != 0;
+    bool bad;
+    uint64_t ctrl_guest_mask = 1ull << VIRTIO_NET_F_CTRL_GUEST_OFFLOADS;
+
+    if (vdev->rhel6_ctrl_guest_workaround && (val & ctrl_guest_mask) &&
+          !(vdev->host_features & ctrl_guest_mask)) {
+        /*
+         * This works around a mistake in the definition of the rhel6.[56].0
+         * machinetypes, ctrl-guest-offload was not set in qemu-kvm-rhev for
+         * those machine types, but is set on the rhel6 qemu-kvm-rhev build.
+         * If an incoming rhel6 guest uses it then we need to allow it.
+         * Note: There's a small race where a guest read the flag but didn't
+         * declare it's useage yet.
+         */
+        fprintf(stderr, "RHEL6 ctrl_guest_offload workaround\n");
+        vdev->host_features |= ctrl_guest_mask;
+    }
+
+    bad = (val & ~(vdev->host_features)) != 0;
     val &= vdev->host_features;
     if (k->set_features) {
@@ -2548,6 +2566,8 @@ static void virtio_device_instance_finalize(Object *obj)
 static Property virtio_properties[] = {
     DEFINE_VIRTIO_COMMON_FEATURES(VirtIODevice, host_features),
+    DEFINE_PROP_BOOL("__com.redhat_rhel6_ctrl_guest_workaround", VirtIODevice,
+                     rhel6_ctrl_guest_workaround, false),
     DEFINE_PROP_END_OF_LIST(),
 };
diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
index 33b0ff3..565d743 100644
--- a/include/hw/arm/virt.h
+++ b/include/hw/arm/virt.h
@@ -108,7 +108,10 @@ typedef struct {
     int psci_conduit;
 } VirtMachineState;
+#if 0 /* disabled for Red Hat Enterprise Linux */
+
 #define TYPE_VIRT_MACHINE   MACHINE_TYPE_NAME("virt")
+
 #define VIRT_MACHINE(obj) \
     OBJECT_CHECK(VirtMachineState, (obj), TYPE_VIRT_MACHINE)
 #define VIRT_MACHINE_GET_CLASS(obj) \
@@ -116,6 +119,30 @@ typedef struct {
 #define VIRT_MACHINE_CLASS(klass) \
     OBJECT_CLASS_CHECK(VirtMachineClass, klass, TYPE_VIRT_MACHINE)
+#else
+
+#define TYPE_RHEL_MACHINE MACHINE_TYPE_NAME("virt-rhel")
+#define VIRT_MACHINE(obj) \
+    OBJECT_CHECK(VirtMachineState, (obj), TYPE_RHEL_MACHINE)
+#define VIRT_MACHINE_GET_CLASS(obj) \
+    OBJECT_GET_CLASS(VirtMachineClass, obj, TYPE_RHEL_MACHINE)
+#define VIRT_MACHINE_CLASS(klass) \
+    OBJECT_CLASS_CHECK(VirtMachineClass, klass, TYPE_RHEL_MACHINE)
+
+#endif
+
+/* This macro is for changes to properties that are RHEL specific,
+ * different to the current upstream and to be applied to the latest
+ * machine type.
+ */
+#define ARM_RHEL_COMPAT \
+    {\
+        .driver   = "virtio-net-pci",\
+        .property = "romfile",\
+        .value    = "",\
+    },
+
+
 void virt_acpi_setup(VirtMachineState *vms);
 #endif /* QEMU_ARM_VIRT_H */
diff --git a/include/hw/compat.h b/include/hw/compat.h
index 5d5be91..6f64306 100644
--- a/include/hw/compat.h
+++ b/include/hw/compat.h
@@ -198,4 +198,132 @@
         .value    = "on",\
     },
+/* Mostly like HW_COMPAT_2_1 but:
+ *    we don't need virtio-scsi-pci since 7.0 already had that on
+ */
+#define HW_COMPAT_RHEL7_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-balloon-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",\
+        },
+
+/* Mostly like HW_COMPAT_2_4 + 2_3 but:
+ *  we don't need "any_layout" as it has been backported to 7.2
+ */
+
+#define HW_COMPAT_RHEL7_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",\
+        },{ /* HW_COMPAT_RHEL7_2 */ \
+            .driver   = "virtio-pci",\
+            .property = "disable-legacy",\
+            .value    = "off",\
+        },{ /* 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",\
+        },
+
+/* 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
+ */
+#define HW_COMPAT_RHEL7_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",\
+    },
+
 #endif /* HW_COMPAT_H */
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index f278b3a..c88c46a 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -982,4 +982,431 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
     type_init(pc_machine_init_##suffix)
 extern void igd_passthrough_isa_bridge_create(PCIBus *bus, uint16_t gpu_dev_id);
+
+/* See include/hw/compat.h for shared compatibility lists */
+
+/* This macro is for changes to properties that are RHEL specific,
+ * different to the current upstream and to be applied to the latest
+ * machine type.
+ */
+#define PC_RHEL_COMPAT \
+        { /* PC_RHEL_COMPAT */ \
+            .driver = TYPE_X86_CPU,\
+            .property = "host-phys-bits",\
+            .value = "on",\
+        },
+
+#define PC_RHEL7_3_COMPAT \
+        HW_COMPAT_RHEL7_3 \
+        { /* PC_RHEL7_3_COMPAT from PC_COMPAT_2_7 */ \
+             .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   = "fw_cfg_io",\
+            .property = "dma_enabled",\
+            .value    = "off",\
+        },\
+        { /* PC_RHEL7_3_COMPAT from PC_COMPAT_2_6 */ \
+            .driver   = TYPE_X86_CPU,\
+            .property = "cpuid-0xb",\
+            .value    = "off",\
+        },
+
+#define PC_RHEL7_2_COMPAT \
+        HW_COMPAT_RHEL7_2 \
+    {\
+        .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 */ \
+            .driver   = "Haswell-noTSX-" TYPE_X86_CPU,\
+            .property = "abm",\
+            .value    = "off",\
+        },\
+        { /* PC_RHEL7_2_COMPAT */ \
+            .driver   = "Broadwell-" 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 */ \
+            .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",\
+        },
+
+
+
+#define PC_RHEL7_1_COMPAT \
+        HW_COMPAT_RHEL7_1 \
+    {\
+        .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",\
+    },\
+    {\
+        .driver = "Westmere" "-" TYPE_X86_CPU,\
+        .property = "vme",\
+        .value = "off",\
+    },\
+    {\
+        .driver = "SandyBridge" "-" TYPE_X86_CPU,\
+        .property = "vme",\
+        .value = "off",\
+    },\
+    {\
+        .driver = "Haswell" "-" TYPE_X86_CPU,\
+        .property = "vme",\
+        .value = "off",\
+    },\
+    {\
+        .driver = "Broadwell" "-" 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",\
+    },\
+    {\
+        .driver = "Haswell" "-" TYPE_X86_CPU,\
+        .property = "rdrand",\
+        .value = "off",\
+    },\
+    {\
+        .driver = "Broadwell" "-" TYPE_X86_CPU,\
+        .property = "f16c",\
+        .value = "off",\
+    },\
+    {\
+        .driver = "Broadwell" "-" 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 = "level",\
+            .value    = stringify(4),\
+        },{ /* PC_RHEL7_1_COMPAT */ \
+            .driver   = "kvm64" "-" TYPE_X86_CPU,\
+            .property = "level",\
+            .value    = stringify(5),\
+        },{ /* PC_RHEL7_1_COMPAT */ \
+            .driver   = "pentium3" "-" TYPE_X86_CPU,\
+            .property = "level",\
+            .value    = stringify(2),\
+        },{ /* PC_RHEL7_1_COMPAT */ \
+            .driver   = "n270" "-" TYPE_X86_CPU,\
+            .property = "level",\
+            .value    = stringify(5),\
+        },{ /* PC_RHEL7_1_COMPAT */ \
+            .driver   = "Conroe" "-" TYPE_X86_CPU,\
+            .property = "level",\
+            .value    = stringify(4),\
+        },{ /* PC_RHEL7_1_COMPAT */ \
+            .driver   = "Penryn" "-" TYPE_X86_CPU,\
+            .property = "level",\
+            .value    = stringify(4),\
+        },{ /* PC_RHEL7_1_COMPAT */ \
+            .driver   = "Nehalem" "-" TYPE_X86_CPU,\
+            .property = "level",\
+            .value    = stringify(4),\
+        },{ /* PC_RHEL7_1_COMPAT */ \
+            .driver   = "n270" "-" TYPE_X86_CPU,\
+            .property = "xlevel",\
+            .value    = stringify(0x8000000a),\
+        },{ /* PC_RHEL7_1_COMPAT */ \
+            .driver   = "Penryn" "-" TYPE_X86_CPU,\
+            .property = "xlevel",\
+            .value    = stringify(0x8000000a),\
+        },{ /* PC_RHEL7_1_COMPAT */ \
+            .driver   = "Conroe" "-" TYPE_X86_CPU,\
+            .property = "xlevel",\
+            .value    = stringify(0x8000000a),\
+        },{ /* PC_RHEL7_1_COMPAT */ \
+            .driver   = "Nehalem" "-" TYPE_X86_CPU,\
+            .property = "xlevel",\
+            .value    = stringify(0x8000000a),\
+        },{ /* PC_RHEL7_1_COMPAT */ \
+            .driver   = "Westmere" "-" TYPE_X86_CPU,\
+            .property = "xlevel",\
+            .value    = stringify(0x8000000a),\
+        },{ /* PC_RHEL7_1_COMPAT */ \
+            .driver   = "SandyBridge" "-" TYPE_X86_CPU,\
+            .property = "xlevel",\
+            .value    = stringify(0x8000000a),\
+        },{ /* PC_RHEL7_1_COMPAT */ \
+            .driver   = "IvyBridge" "-" TYPE_X86_CPU,\
+            .property = "xlevel",\
+            .value    = stringify(0x8000000a),\
+        },{ /* PC_RHEL7_1_COMPAT */ \
+            .driver   = "Haswell" "-" TYPE_X86_CPU,\
+            .property = "xlevel",\
+            .value    = stringify(0x8000000a),\
+        },{ /* PC_RHEL7_1_COMPAT */ \
+            .driver   = "Haswell-noTSX" "-" TYPE_X86_CPU,\
+            .property = "xlevel",\
+            .value    = stringify(0x8000000a),\
+        },{ /* PC_RHEL7_1_COMPAT */ \
+            .driver   = "Broadwell" "-" TYPE_X86_CPU,\
+            .property = "xlevel",\
+            .value    = stringify(0x8000000a),\
+        },{ /* PC_RHEL7_1_COMPAT */ \
+            .driver   = "Broadwell-noTSX" "-" TYPE_X86_CPU,\
+            .property = "xlevel",\
+            .value    = stringify(0x8000000a),\
+        },
+
+/*
+ * The PC_RHEL_*_COMPAT serve the same purpose for RHEL-7 machine
+ * types as the PC_COMPAT_* do for upstream types.
+ * PC_RHEL_7_*_COMPAT apply both to i440fx and q35 types.
+ * PC_RHEL6_*_COMPAT apply to i440fx types only, and therefore live
+ * in pc_piix.c.
+ */
+
+/*
+ * RHEL-7 is based on QEMU 1.5.3, so this needs the PC_COMPAT_*
+ * between our base and 1.5, less stuff backported to RHEL-7.0
+ * (usb-device.msos-desc), less stuff for devices we changed
+ * (qemu64-x86_64-cpu) or don't support (hpet, pci-serial-2x,
+ * pci-serial-4x) in 7.0.
+ */
+#define PC_RHEL7_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",\
+    },\
+    {\
+        .driver = "Westmere" "-" 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",\
+    },
 #endif
diff --git a/include/hw/usb.h b/include/hw/usb.h
index eb28655..e2d3d77 100644
--- a/include/hw/usb.h
+++ b/include/hw/usb.h
@@ -608,4 +608,11 @@ int usb_get_quirks(uint16_t vendor_id, uint16_t product_id,
                    uint8_t interface_class, uint8_t interface_subclass,
                    uint8_t interface_protocol);
+
+/* hcd-uhci.c -- RHEL-6 machine type compatibility */
+extern bool ich9_uhci123_irqpin_override;
+
+/* hcd-xhci.c -- rhel7.0.0 machine type compatibility */
+extern bool migrate_cve_2014_5263_xhci_fields;
+
 #endif
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index 7b6edba..7dcb53a 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -94,6 +94,7 @@ struct VirtIODevice
     uint8_t device_endian;
     bool use_guest_notifier_mask;
     AddressSpace *dma_as;
+    bool rhel6_ctrl_guest_workaround;
     QLIST_HEAD(, VirtQueue) *vector_queues;
 };
diff --git a/include/migration/migration.h b/include/migration/migration.h
index 5720c88..eaa31c8 100644
--- a/include/migration/migration.h
+++ b/include/migration/migration.h
@@ -385,4 +385,9 @@ uint64_t ram_pagesize_summary(void);
 PostcopyState postcopy_state_get(void);
 /* Set the state and return the old state */
 PostcopyState postcopy_state_set(PostcopyState new_state);
+/*
+ * Disables a load of subsections that were added in 2.2/rh7.2 for backwards
+ * migration compatibility.
+ */
+extern bool migrate_pre_2_2;
 #endif
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 576c7ce..53a2588 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -130,6 +130,7 @@ void qemu_savevm_send_postcopy_ram_discard(QEMUFile *f, const char *name,
                                            uint64_t *length_list);
 int qemu_loadvm_state(QEMUFile *f);
+extern bool shadow_bios_after_incoming;
 extern int autostart;
diff --git a/migration/migration.c b/migration/migration.c
index fb58f54..fdc17bc 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -83,6 +83,7 @@ static bool deferred_incoming;
  * at the end as MIS is being freed.
  */
 static PostcopyState incoming_postcopy_state;
+bool migrate_pre_2_2;
 /* When we add fault tolerance, we could have several
    migrations at once.  For now we don't need to add
diff --git a/migration/savevm.c b/migration/savevm.c
index 3b19a4a..8e05383 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -43,6 +43,7 @@
 #include "qemu/error-report.h"
 #include "qemu/sockets.h"
 #include "qemu/queue.h"
+#include "qemu/rcu_queue.h"
 #include "sysemu/cpus.h"
 #include "exec/memory.h"
 #include "qmp-commands.h"
@@ -54,6 +55,7 @@
 #include "qemu/cutils.h"
 #include "io/channel-buffer.h"
 #include "io/channel-file.h"
+#include "exec/ram_addr.h"
 #ifndef ETH_P_RARP
 #define ETH_P_RARP 0x8035
@@ -65,6 +67,7 @@
 const unsigned int postcopy_ram_discard_version = 0;
 static bool skip_section_footers;
+bool shadow_bios_after_incoming;
 static struct mig_cmd_args {
     ssize_t     len; /* -1 = variable */
@@ -1827,6 +1830,65 @@ static bool check_section_footer(QEMUFile *f, LoadStateEntry *le)
     return true;
 }
+static void shadow_bios(void)
+{
+    RAMBlock *block, *ram, *oprom, *bios;
+    size_t one_meg, oprom_size, bios_size;
+    uint8_t *cd_seg_host, *ef_seg_host;
+
+    ram = NULL;
+    oprom = NULL;
+    bios = NULL;
+    rcu_read_lock();
+    QLIST_FOREACH_RCU(block, &ram_list.blocks, next) {
+        if (strcmp("pc.ram", block->idstr) == 0) {
+            assert(ram == NULL);
+            ram = block;
+        } else if (strcmp("pc.rom", block->idstr) == 0) {
+            assert(oprom == NULL);
+            oprom = block;
+        } else if (strcmp("pc.bios", block->idstr) == 0) {
+            assert(bios == NULL);
+            bios = block;
+        }
+    }
+    assert(ram != NULL);
+    assert(oprom != NULL);
+    assert(bios != NULL);
+    assert(memory_region_is_ram(ram->mr));
+    assert(memory_region_is_ram(oprom->mr));
+    assert(memory_region_is_ram(bios->mr));
+    assert(int128_eq(ram->mr->size, int128_make64(ram->used_length)));
+    assert(int128_eq(oprom->mr->size, int128_make64(oprom->used_length)));
+    assert(int128_eq(bios->mr->size, int128_make64(bios->used_length)));
+
+    one_meg = 1024 * 1024;
+    oprom_size = 128 * 1024;
+    bios_size = 128 * 1024;
+    assert(ram->used_length >= one_meg);
+    assert(oprom->used_length == oprom_size);
+    assert(bios->used_length == bios_size);
+
+    ef_seg_host = memory_region_get_ram_ptr(ram->mr) + (one_meg - bios_size);
+    cd_seg_host = ef_seg_host - oprom_size;
+
+    /* This is a crude hack, but we must distinguish a rhel6.x.0 machtype guest
+     * coming in from a RHEL-6 emulator (where shadowing has had no effect on
+     * "pc.ram") from a similar guest coming in from a RHEL-7 emulator (where
+     * shadowing has worked). In the latter case we must not trample the live
+     * SeaBIOS variables in "pc.ram".
+     */
+    if (buffer_is_zero(ef_seg_host, bios_size)) {
+        fprintf(stderr, "copying E and F segments from pc.bios to pc.ram\n");
+        memcpy(ef_seg_host, memory_region_get_ram_ptr(bios->mr), bios_size);
+    }
+    if (buffer_is_zero(cd_seg_host, oprom_size)) {
+        fprintf(stderr, "copying C and D segments from pc.rom to pc.ram\n");
+        memcpy(cd_seg_host, memory_region_get_ram_ptr(oprom->mr), oprom_size);
+    }
+    rcu_read_unlock();
+}
+
 void loadvm_free_handlers(MigrationIncomingState *mis)
 {
     LoadStateEntry *le, *new_le;
@@ -2066,6 +2128,13 @@ int qemu_loadvm_state(QEMUFile *f)
         }
     }
+    /* Supplement SeaBIOS's shadowing now, because it was useless when the
+     * incoming VM started on the RHEL-6 emulator.
+     */
+    if (shadow_bios_after_incoming) {
+        shadow_bios();
+    }
+
     cpu_synchronize_all_post_init();
     return ret;
diff --git a/numa.c b/numa.c
index 6fc2393..80d9029 100644
--- a/numa.c
+++ b/numa.c
@@ -452,6 +452,19 @@ void memory_region_allocate_system_memory(MemoryRegion *mr, Object *owner,
         return;
     }
+    /* The shadow_bios_after_incoming hack at savevm.c:shadow_bios() is not
+     * able to handle the multiple memory blocks added when using NUMA
+     * memdevs. We can disallow -numa memdev= when using rhel6.* machine-types
+     * because RHEL-6 didn't support the NUMA memdev option.
+     */
+    if (shadow_bios_after_incoming) {
+        MachineClass *mc;
+        mc = MACHINE_GET_CLASS(current_machine);
+        error_report("-numa memdev is not supported by machine %s",
+                     mc->name);
+        exit(1);
+    }
+
     memory_region_init(mr, owner, name, ram_size);
     for (i = 0; i < MAX_NODES; i++) {
         uint64_t size = numa_info[i].node_mem;
diff --git a/qdev-monitor.c b/qdev-monitor.c
index 5f2fcdf..2cdc643 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -43,7 +43,6 @@ typedef struct QDevAlias
 /* Please keep this table sorted by typename. */
 static const QDevAlias qdev_alias_table[] = {
-    { "e1000", "e1000-82540em" },
     { "ich9-ahci", "ahci" },
     { "kvm-pci-assign", "pci-assign" },
     { "lsi53c895a", "lsi" },
diff --git a/scripts/vmstate-static-checker.py b/scripts/vmstate-static-checker.py
index bcef7ee..ffb13d1 100755
--- a/scripts/vmstate-static-checker.py
+++ b/scripts/vmstate-static-checker.py
@@ -104,7 +104,6 @@ def get_changed_sec_name(sec):
     # Section names can change -- see commit 292b1634 for an example.
     changes = {
         "ICH9 LPC": "ICH9-LPC",
-        "e1000-82540em": "e1000",
     }
     for item in changes:
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 13c0985..c3b06d3 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -758,20 +758,29 @@ struct X86CPUDefinition {
 static X86CPUDefinition builtin_x86_defs[] = {
     {
+        /* qemu64 is the default CPU model for all *-rhel7.* machine-types.
+         * The default on RHEL-6 was cpu64-rhel6.
+         * libvirt assumes that qemu64 is the default for _all_ machine-types,
+         * so we should try to keep qemu64 and cpu64-rhel6 as similar as
+         * possible.
+         */
         .name = "qemu64",
         .level = 0xd,
         .vendor = CPUID_VENDOR_AMD,
         .family = 6,
-        .model = 6,
+        .model = 13,
         .stepping = 3,
-        .features[FEAT_1_EDX] =
-            PPRO_FEATURES |
-            CPUID_MTRR | CPUID_CLFLUSH | CPUID_MCA |
-            CPUID_PSE36,
-        .features[FEAT_1_ECX] =
-            CPUID_EXT_SSE3 | CPUID_EXT_CX16,
-        .features[FEAT_8000_0001_EDX] =
-            CPUID_EXT2_LM | CPUID_EXT2_SYSCALL | CPUID_EXT2_NX,
+        .features[FEAT_1_EDX] = CPUID_SSE2 | CPUID_SSE | CPUID_FXSR |
+            CPUID_MMX | CPUID_CLFLUSH | CPUID_PSE36 | CPUID_PAT | CPUID_CMOV |
+            CPUID_MCA | CPUID_PGE | CPUID_MTRR | CPUID_SEP | CPUID_APIC |
+            CPUID_CX8 | CPUID_MCE | CPUID_PAE | CPUID_MSR | CPUID_TSC |
+            CPUID_PSE | CPUID_DE | CPUID_FP87,
+        .features[FEAT_1_ECX] = CPUID_EXT_CX16 | CPUID_EXT_SSE3,
+        .features[FEAT_8000_0001_EDX] = CPUID_EXT2_LM | CPUID_EXT2_FXSR |
+            CPUID_EXT2_MMX | CPUID_EXT2_NX | CPUID_EXT2_PAT | CPUID_EXT2_CMOV |
+            CPUID_EXT2_PGE | CPUID_EXT2_SYSCALL | CPUID_EXT2_APIC |
+            CPUID_EXT2_CX8 | CPUID_EXT2_MCE | CPUID_EXT2_PAE | CPUID_EXT2_MSR | CPUID_EXT2_TSC |
+            CPUID_EXT2_PSE | CPUID_EXT2_DE | CPUID_EXT2_FPU,
         .features[FEAT_8000_0001_ECX] =
             CPUID_EXT3_LAHF_LM | CPUID_EXT3_SVM,
         .xlevel = 0x8000000A,
@@ -997,6 +1006,29 @@ static X86CPUDefinition builtin_x86_defs[] = {
         .model_id = "Intel(R) Atom(TM) CPU N270   @ 1.60GHz",
     },
     {
+        .name = "cpu64-rhel6",
+        .level = 4,
+        .vendor = CPUID_VENDOR_AMD,
+        .family = 6,
+        .model = 13,
+        .stepping = 3,
+        .features[FEAT_1_EDX] = CPUID_SSE2 | CPUID_SSE | CPUID_FXSR |
+             CPUID_MMX | CPUID_CLFLUSH | CPUID_PSE36 | CPUID_PAT | CPUID_CMOV |
+             CPUID_MCA | CPUID_PGE | CPUID_MTRR | CPUID_SEP | CPUID_APIC |
+             CPUID_CX8 | CPUID_MCE | CPUID_PAE | CPUID_MSR | CPUID_TSC |
+             CPUID_PSE | CPUID_DE | CPUID_FP87,
+        .features[FEAT_1_ECX] = CPUID_EXT_CX16 | CPUID_EXT_SSE3,
+        .features[FEAT_8000_0001_EDX] = CPUID_EXT2_LM | CPUID_EXT2_FXSR |
+             CPUID_EXT2_MMX | CPUID_EXT2_NX | CPUID_EXT2_PAT | CPUID_EXT2_CMOV |
+             CPUID_EXT2_PGE | CPUID_EXT2_SYSCALL | CPUID_EXT2_APIC |
+             CPUID_EXT2_CX8 | CPUID_EXT2_MCE | CPUID_EXT2_PAE | CPUID_EXT2_MSR | CPUID_EXT2_TSC |
+             CPUID_EXT2_PSE | CPUID_EXT2_DE | CPUID_EXT2_FPU,
+        .features[FEAT_8000_0001_ECX] = CPUID_EXT3_SSE4A | CPUID_EXT3_ABM |
+             CPUID_EXT3_SVM | CPUID_EXT3_LAHF_LM,
+        .xlevel = 0x8000000A,
+        .model_id = "QEMU Virtual CPU version (cpu64-rhel6)",
+    },
+    {
         .name = "Conroe",
         .level = 10,
         .vendor = CPUID_VENDOR_INTEL,
@@ -1498,6 +1530,7 @@ static PropValue kvm_default_props[] = {
     { "acpi", "off" },
     { "monitor", "off" },
     { "svm", "off" },
+    { "kvm-pv-unhalt", "on" },
     { NULL, NULL },
 };
diff --git a/target/i386/machine.c b/target/i386/machine.c
index 78ae2f9..6629e1b 100644
--- a/target/i386/machine.c
+++ b/target/i386/machine.c
@@ -927,6 +927,26 @@ static const VMStateDescription vmstate_mcg_ext_ctl = {
     }
 };
+static bool vmstate_xsave_needed(void *opaque)
+{
+    /* The xsave state is already on the main "cpu" section */
+    return false;
+}
+
+static const VMStateDescription vmstate_xsave ={
+    .name = "cpu/xsave",
+    .version_id = 1,
+    .minimum_version_id = 1,
+    .minimum_version_id_old = 1,
+    .needed = vmstate_xsave_needed,
+    .fields      = (VMStateField []) {
+    VMSTATE_UINT64_V(env.xcr0, X86CPU, 1),
+    VMSTATE_UINT64_V(env.xstate_bv, X86CPU, 1),
+    VMSTATE_YMMH_REGS_VARS(env.xmm_regs, X86CPU, CPU_NB_REGS, 1),
+    VMSTATE_END_OF_LIST()
+    }
+};
+
 VMStateDescription vmstate_x86_cpu = {
     .name = "cpu",
     .version_id = 12,
@@ -1054,6 +1074,7 @@ VMStateDescription vmstate_x86_cpu = {
         &vmstate_pkru,
 #endif
         &vmstate_mcg_ext_ctl,
+        &vmstate_xsave,
         NULL
     }
 };
--
1.8.3.1
SOURCES/0003-Enable-disable-devices-for-RHEL-7.patch
New file
@@ -0,0 +1,1844 @@
From a36a3ad800b282cef9d72e6d8026470035f8f21c Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Mon, 11 Jan 2016 11:53:33 +0100
Subject: Enable/disable devices for RHEL 7
This commit adds all changes related to changes in supported devices
up to qemu-kvm-rhev-2.1.2-16.el7.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
(cherry picked from commit 7f8f6f97fbd36398d25207aa8aad39edc4f8de06)
Rebase notes (2.9.0):
- enabled CONFIG_ARM_V7M for aarch64
- need to fix cpu mask
- disabled some irrelevant ppc64 tests
- Adding pxe-e1000e.rom to Inital redhat commit
- Context changed in vfio_probe_igd_bar4_quirk (rc3)
Rebase notes (2.8.0):
- Removed CONFIG_PIIX_PCI (upstream)
- Disabled POWERNV
- Disabled additional occurencies of prom-env-test
- Disabled additional occurencies of usb-hcd-ohci-test and usb-hcd-uhci-test
- Disabled unsupported machine types in boot-serieal-test
- Disabled 2.7 machine type compatibility test in test-x86-cpuid-compat
- Disabled pnv-xscom-test
- Disabled RHEl 6 machine types for qom-test (failing acpi setting)
- Added diffutils BuildRequires and diff usage for make check
Rebase notes (2.6.0):
- disabled prom-env-test
Rebase notes (2.4.0):
- fixed types
- include CONFIG_PLATFORM_BUS for aarch64
- disable failing virtio-scsi-test
Rebase notes (2.3.0):
- Added USB=y in 2.3-rc2 (used instead of downstream version fora aarch64)
Merged patches (2.9.0):
- 9320fc1 Fix unuseds/Fedora build
- cb16934 config: Remove EHCI from ppc64 builds