QEMU is a FAST! processor emulator
CentOS Sources
2015-03-05 958e1b8dccf9809600478f316ab641d490881fe7
import qemu-kvm-1.5.3-86.el7
229 files added
83 files modified
33310 ■■■■■ changed files
.qemu-kvm.metadata 2 ●●● patch | view | raw | blame | history
SOURCES/kvm-Allow-mismatched-virtio-config-len.patch 16 ●●●● patch | view | raw | blame | history
SOURCES/kvm-Count-used-RAMBlock-pages-for-migration_dirty_pages.patch 10 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-Define-the-architecture-for-compressed-dump-format.patch 90 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-Disallow-outward-migration-while-awaiting-incoming-m.patch 62 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-Enforce-stack-protector-usage.patch 70 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-Init-the-XBZRLE.lock-in-ram_mig_init.patch 6 ●●●● patch | view | raw | blame | history
SOURCES/kvm-Introduce-cpu_clean_all_dirty.patch 114 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-Provide-init-function-for-ram-migration.patch 6 ●●●● patch | view | raw | blame | history
SOURCES/kvm-Revert-Build-ceph-rbd-only-for-rhev.patch 87 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-Revert-kvmclock-Ensure-proper-env-tsc-value-for-kvmc.patch 58 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-Revert-kvmclock-Ensure-time-in-migration-never-goes-.patch 106 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-Revert-linux-aio-use-event-notifiers.patch 189 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-Revert-rbd-Only-look-for-qemu-specific-copy-of-librb.patch 38 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-Revert-rbd-link-and-load-librbd-dynamically.patch 564 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-Use-qemu-kvm-in-documentation-instead-of-qemu-system.patch 809 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-XBZRLE-Fix-one-XBZRLE-corruption-issues.patch 6 ●●●● patch | view | raw | blame | history
SOURCES/kvm-XBZRLE-Fix-qemu-crash-when-resize-the-xbzrle-cache.patch 6 ●●●● patch | view | raw | blame | history
SOURCES/kvm-ac97-register-reset-via-qom.patch 60 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-acpi-fix-tables-for-no-hpet-configuration.patch 66 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-aio-Fix-use-after-free-in-cancellation-path.patch 96 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-aio-fix-qemu_bh_schedule-bh-ctx-race-condition.patch 80 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-Add-errp-to-bdrv_new.patch 308 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-Catch-duplicate-IDs-in-bdrv_new.patch 123 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-Ignore-duplicate-or-NULL-format_name-in-bdrv_i.patch 81 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-Improve-driver-whitelist-checks.patch 103 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-New-bdrv_nb_sectors.patch 135 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-Use-correct-width-in-format-strings.patch 213 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-add-__com.redhat_change-backing-file-qmp-comma.patch 12 ●●●● patch | view | raw | blame | history
SOURCES/kvm-block-add-backing-file-option-to-block-stream.patch 14 ●●●● patch | view | raw | blame | history
SOURCES/kvm-block-add-helper-function-to-determine-if-a-BDS-is-i.patch 8 ●●●● patch | view | raw | blame | history
SOURCES/kvm-block-allow-bdrv_unref-to-be-passed-NULL-pointers.patch 44 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-delete-cow-block-driver.patch 644 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-do-not-abuse-EMEDIUMTYPE.patch 177 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-extend-block-commit-to-accept-a-string-for-the.patch 22 ●●●● patch | view | raw | blame | history
SOURCES/kvm-block-iotest-update-084-to-test-static-VDI-image-cre.patch 97 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-iscsi-fix-segfault-if-writesame-fails.patch 4 ●●●● patch | view | raw | blame | history
SOURCES/kvm-block-iscsi-query-for-supported-VPD-pages.patch 4 ●●●● patch | view | raw | blame | history
SOURCES/kvm-block-make-top-argument-to-block-commit-optional.patch 16 ●●●● patch | view | raw | blame | history
SOURCES/kvm-block-make-vdi-bounds-check-match-upstream.patch 83 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-raw-posix-Fix-disk-corruption-in-try_fiemap.patch 10 ●●●● patch | view | raw | blame | history
SOURCES/kvm-block-raw-posix-Try-both-FIEMAP-and-SEEK_HOLE.patch 14 ●●●● patch | view | raw | blame | history
SOURCES/kvm-block-raw-posix-use-seek_hole-ahead-of-fiemap.patch 10 ●●●● patch | view | raw | blame | history
SOURCES/kvm-block-use-per-object-cflags-and-libs.patch 157 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-use-the-standard-ret-instead-of-result.patch 143 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-vdi-Error-out-immediately-in-vdi_create.patch 72 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-vdi-use-block-layer-ops-in-vdi_create-instead-.patch 148 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-vhdx-account-for-identical-header-sections.patch 86 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-vmdk-add-basic-.bdrv_check-support.patch 103 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-vmdk-do-not-report-file-offset-for-compressed-.patch 48 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-vpc-use-QEMU_PACKED-for-on-disk-structures.patch 144 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-block-vpc-use-block-layer-ops-in-vpc_create-instead-.patch 220 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-blockdev-Fail-blockdev-add-with-encrypted-images.patch 68 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-blockdev-Fix-NULL-pointer-dereference-in-blockdev-ad.patch 53 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-blockjob-Add-block_job_yield.patch 6 ●●●● patch | view | raw | blame | history
SOURCES/kvm-char-report-frontend-open-closed-state-in-query-char.patch 119 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-char-restore-read-callback-on-a-reattached-hotplug-c.patch 9 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-cirrus-don-t-overflow-CirrusVGAState-cirrus_bltbuf.patch 39 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-cirrus-fix-blit-region-check.patch 134 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-cow-correctly-propagate-errors.patch 60 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-Drop-pointless-error_is_set-DumpState-member-er.patch 69 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-Drop-qmp_dump_guest_memory-stub-and-build-for-a.patch 114 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-RHEL-specific-fix-for-CPUState-bug-introduced-b.patch 126 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-add-API-to-write-dump-header.patch 383 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-add-API-to-write-dump-pages.patch 300 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-add-API-to-write-dump_bitmap.patch 221 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-add-API-to-write-elf-notes-to-buffer.patch 70 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-add-API-to-write-header-of-flatten-format.patch 141 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-add-API-to-write-vmcore.patch 70 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-add-APIs-to-operate-DataCache.patch 118 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-add-argument-to-write_elfxx_notes.patch 115 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-add-members-to-DumpState-and-init-some-of-them.patch 104 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-add-query-dump-guest-memory-capability-command.patch 144 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-add-support-for-lzo-snappy.patch 137 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-const-qualify-the-buf-of-WriteCoreDumpFunction.patch 59 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-eliminate-DumpState.page_shift-guest-s-page-shi.patch 110 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-eliminate-DumpState.page_size-guest-s-page-size.patch 265 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-fill-in-the-flat-header-signature-more-pleasing.patch 51 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-guest-memory-Check-for-the-correct-return-value.patch 51 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-hoist-lzo_init-from-get_len_buf_out-to-dump_ini.patch 70 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-make-kdump-compressed-format-available-for-dump.patch 345 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-select-header-bitness-based-on-ELF-class-not-EL.patch 56 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-simplify-get_len_buf_out.patch 99 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-dump-simplify-write_start_flat_header.patch 76 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-error-Add-error_abort.patch 123 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-exit-when-no-kvm-and-vcpu-count-160.patch 121 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-fpu-softfloat-drop-INLINE-macro.patch 704 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-gluster-Add-discard-support-for-GlusterFS-block-driv.patch 149 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-gluster-default-scheme-to-gluster-and-host-to-localh.patch 58 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-hpet-fix-buffer-overrun-on-invalid-state-load.patch 18 ●●●● patch | view | raw | blame | history
SOURCES/kvm-hw-pci-fix-error-flow-in-pci-multifunction-init.patch 113 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-hw-pci-fixed-error-flow-in-pci_qdev_init.patch 48 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-hw-pci-fixed-hotplug-crash-when-using-rombar-0-with-.patch 52 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-hw-pci-pcie_aer.c-fix-buffer-overruns-on-invalid-sta.patch 18 ●●●● patch | view | raw | blame | history
SOURCES/kvm-ide-Add-wwn-support-to-IDE-ATAPI-drive.patch 67 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-ide-Correct-improper-smart-self-test-counter-reset-i.patch 4 ●●●● patch | view | raw | blame | history
SOURCES/kvm-ide-Fix-segfault-when-flushing-a-device-that-doesn-t.patch 74 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-ide-Treat-read-write-beyond-end-as-invalid.patch 94 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-ide-only-constrain-read-write-requests-to-drive-size.patch 47 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-ide-test-Add-FLUSH-CACHE-test-case.patch 97 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-ide-test-Add-enum-value-for-DEV.patch 49 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-iscsi-Don-t-set-error-if-already-set-in-iscsi_do_inq.patch 4 ●●●● patch | view | raw | blame | history
SOURCES/kvm-iscsi-Remember-to-set-ret-for-iscsi_open-in-error-ca.patch 4 ●●●● patch | view | raw | blame | history
SOURCES/kvm-iscsi-always-query-max-WRITE-SAME-length.patch 4 ●●●● patch | view | raw | blame | history
SOURCES/kvm-iscsi-correctly-propagate-errors-in-iscsi_open.patch 4 ●●●● patch | view | raw | blame | history
SOURCES/kvm-iscsi-fix-indentation.patch 4 ●●●● patch | view | raw | blame | history
SOURCES/kvm-iscsi-ignore-flushes-on-scsi-generic-devices.patch 4 ●●●● patch | view | raw | blame | history
SOURCES/kvm-iscsi-recognize-invalid-field-ASCQ-from-WRITE-SAME-c.patch 4 ●●●● patch | view | raw | blame | history
SOURCES/kvm-kvmclock-Ensure-proper-env-tsc-value-for-kvmclock.v2.patch 57 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-kvmclock-Ensure-proper-env-tsc-value-for-kvmclock_cu.patch 69 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-kvmclock-Ensure-time-in-migration-never-goes-back.v2.patch 117 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-kvmclock-Ensure-time-in-migration-never-goes-backwar.patch 122 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-libcacard-link-against-qemu-error.o-for-error_report.patch 44 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-memory-Don-t-call-memory_region_update_coalesced_ran.patch 23 ●●●● patch | view | raw | blame | history
SOURCES/kvm-migration-dump-vmstate-info-as-a-json-file-for-stati.patch 278 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-migration-fix-parameter-validation-on-ram-load-CVE-2.patch 76 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-migration-qmp_migrate-keep-working-after-syntax-erro.patch 64 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-migration-static-variables-will-not-be-reset-at-seco.patch 76 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-mirror-Fix-qiov-size-for-short-requests.patch 6 ●●●● patch | view | raw | blame | history
SOURCES/kvm-mirror-Fix-resource-leak-when-bdrv_getlength-fails.patch 6 ●●●● patch | view | raw | blame | history
SOURCES/kvm-mirror-Go-through-ready-complete-process-for-0-len-i.patch 6 ●●●● patch | view | raw | blame | history
SOURCES/kvm-pc-Add-Broadwell-CPUID-compatibility-bits.patch 41 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-pc-add-hot_add_cpu-callback-to-all-machine-types.patch 8 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-pc-increase-maximal-VCPU-count-to-240.patch 42 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-pflash_cfi01-write-flash-contents-to-bdrv-on-incomin.patch 105 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qapi-introduce-PreallocMode-and-new-PreallocModes-fu.patch 163 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qapi-treat-all-negative-return-of-strtosz_suffix-as-.patch 64 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qcow-correctly-propagate-errors.patch 8 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qcow1-Check-maximum-cluster-size.patch 12 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qcow1-Make-padding-in-the-header-explicit.patch 8 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qcow1-Stricter-backing-file-length-check.patch 8 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qcow1-Validate-L2-table-size-CVE-2014-0222.patch 8 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qcow1-Validate-image-size-CVE-2014-0223.patch 8 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qcow2-Add-falloc-and-full-preallocation-option.patch 465 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qcow2-Free-preallocated-zero-clusters.patch 8 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qdev-properties-system.c-Allow-vlan-or-netdev-for-de.patch 66 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-Adjust-qemu-wakeup.patch 141 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-img-Allow-cache-mode-specification-for-amend.patch 115 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-img-Allow-source-cache-mode-specification.patch 410 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-img-Avoid-duplicate-block-device-IDs.patch 172 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-img-Convert-by-cluster-size-if-target-is-compre.patch 66 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-img-clarify-src_cache-option-documentation.patch 67 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-img-fix-img_compare-flags-error-path.patch 57 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-img-fix-rebase-src_cache-option-documentation.patch 63 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-iotest-Make-077-raw-only.patch 54 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-iotests-Add-_unsupported_imgopts-for-vmdk-subfo.patch 167 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-iotests-Add-sample-image-and-test-for-VMDK-vers.patch 88 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-iotests-Discard-preallocated-zero-clusters.patch 10 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-iotests-Don-t-run-005-on-vmdk-split-formats.patch 68 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-iotests-Introduce-_unsupported_imgopts.patch 57 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-iotests-Test-0-length-image-for-mirror.patch 6 ●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-iotests-Test-BLOCK_JOB_READY-event-for-0Kb-imag.patch 6 ●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-iotests-Test-a-few-blockdev-add-error-cases.patch 218 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-iotests-Test-case-for-backing-file-deletion.patch 138 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu-iotests-Test-converting-to-streamOptimized-from.patch 69 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-qemu_loadvm_state-shadow-SeaBIOS-for-VM-incoming-fro.patch 4 ●●●● patch | view | raw | blame | history
SOURCES/kvm-raw-posix-Add-falloc-and-full-preallocation-option.patch 188 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-raw-posix-Fix-raw_co_get_block_status-after-EOF.patch 14 ●●●● patch | view | raw | blame | history
SOURCES/kvm-raw-posix-SEEK_HOLE-suffices-get-rid-of-FIEMAP.patch 16 ●●●● patch | view | raw | blame | history
SOURCES/kvm-raw-posix-The-SEEK_HOLE-code-is-flawed-rewrite-it.patch 12 ●●●● patch | view | raw | blame | history
SOURCES/kvm-raw-posix-raw_co_get_block_status-return-value.patch 18 ●●●● patch | view | raw | blame | history
SOURCES/kvm-rdma-Fix-block-during-rdma-migration.patch 49 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-rdma-bug-fixes.patch 91 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-rename-parse_enum_option-to-qapi_enum_parse-and-make.patch 119 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-rhel-Drop-machine-type-pc-q35-rhel7.0.0.patch 114 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-rules.mak-allow-per-object-cflags-and-libs.patch 104 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-rules.mak-fix-obj-to-a-real-relative-path.patch 208 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-scsi-Improve-error-messages-more.patch 103 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-scsi-Report-error-when-lun-number-is-in-use.patch 52 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-scsi-disk-Improve-error-messager-if-can-t-get-versio.patch 54 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-scsi-disk-fix-bug-in-scsi_block_new_request-introduc.patch 8 ●●●● patch | view | raw | blame | history
SOURCES/kvm-seccomp-add-semctl-to-the-syscall-whitelist.patch 50 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-seccomp-add-shmctl-mlock-and-munlock-to-the-syscall-.patch 66 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-simpletrace-add-simpletrace.py-no-header-option.patch 109 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-simpletrace-add-support-for-trace-record-pid-field.patch 113 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-skip-system-call-when-msi-route-is-unchanged.patch 4 ●●●● patch | view | raw | blame | history
SOURCES/kvm-slirp-udp-fix-NULL-pointer-dereference-because-of-un.patch 55 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-spice-call-qemu_spice_set_passwd-during-init.patch 46 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-spice-display-add-display-channel-id-to-the-debug-me.patch 30 ●●●● patch | view | raw | blame | history
SOURCES/kvm-spice-make-sure-we-don-t-overflow-ssd-buf.patch 14 ●●●● patch | view | raw | blame | history
SOURCES/kvm-spice-move-qemu_spice_display_-from-spice-graphics-t.patch 91 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-spice-move-spice_server_vm_-start-stop-calls-into-qe.patch 57 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-spice-stop-server-for-qxl-hard-reset.patch 62 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-target-i386-Broadwell-CPU-model.patch 90 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-target-i386-get-CPL-from-SS.DPL.patch 74 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-tests-vmstate-static-checker-add-dump1-and-dump2-fil.patch 2376 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-tests-vmstate-static-checker-add-size-mismatch-insid.patch 43 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-tests-vmstate-static-checker-add-substructure-for-us.patch 168 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-tests-vmstate-static-checker-add-version-error-in-ma.patch 43 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-tests-vmstate-static-checker-change-description-name.patch 42 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-tests-vmstate-static-checker-incompat-machine-types.patch 44 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-tests-vmstate-static-checker-minimum_version_id-chec.patch 43 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-tests-vmstate-static-checker-remove-Description-insi.patch 68 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-tests-vmstate-static-checker-remove-Description.patch 73 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-tests-vmstate-static-checker-remove-Fields.patch 154 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-tests-vmstate-static-checker-remove-Subsections.patch 55 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-tests-vmstate-static-checker-remove-a-field.patch 46 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-tests-vmstate-static-checker-remove-a-section.patch 42 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-tests-vmstate-static-checker-remove-a-subsection.patch 53 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-tests-vmstate-static-checker-remove-last-field-in-a-.patch 47 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-tests-vmstate-static-checker-version-mismatch-inside.patch 43 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-trace-add-SystemTap-init-scripts-for-simpletrace-bri.patch 107 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-trace-add-pid-field-to-simpletrace-record.patch 89 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-trace-add-systemtap-initscript-README-file-to-RPM.patch 85 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-trace-add-tracetool-simpletrace_stap-format.patch 140 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-trace-extract-stap_escape-function-for-reuse.patch 66 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-trace-install-simpletrace-SystemTap-tapset.patch 97 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-trace-install-trace-events-file.patch 52 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-trace-use-unique-Red-Hat-version-number-in-simpletra.patch 78 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-uhci-UNfix-irq-routing-for-RHEL-6-machtypes-RHEL-onl.patch 2 ●●● patch | view | raw | blame | history
SOURCES/kvm-uhci-egsm-fix.patch 56 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-uhci-invalidate-queue-on-device-address-changes.patch 43 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-usb-Add-max_streams-attribute-to-endpoint-info.patch 115 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-usb-Add-usb_device_alloc-free_streams.patch 91 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-usb-Also-reset-max_packet_size-on-ep_reset.patch 51 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-usb-Fix-iovec-memleak-on-combined-packet-free.patch 42 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-usb-add-usb_pick_speed.patch 115 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-usb-fix-up-post-load-checks.patch 18 ●●●● patch | view | raw | blame | history
SOURCES/kvm-usb-hcd-xhci-QOM-Upcast-Sweep.patch 126 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-usb-hcd-xhci-QOM-parent-field-cleanup.patch 331 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-usb-hcd-xhci-Remove-unused-cancelled-member-from-XHC.patch 72 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-usb-hcd-xhci-Remove-unused-sstreamsm-member-from-XHC.patch 67 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-usb-hcd-xhci-Report-completion-of-active-transfer-wi.patch 136 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-usb-hcd-xhci-Update-endpoint-context-dequeue-pointer.patch 77 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-usb-initialize-libusb_device-to-avoid-crash.patch 72 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-usb-parallelize-usb3-streams.patch 66 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-usb-redir-fix-use-after-free.patch 45 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-usb-sanity-check-setup_index-setup_len-in-post_l2.patch 16 ●●●● patch | view | raw | blame | history
SOURCES/kvm-usb-sanity-check-setup_index-setup_len-in-post_load.patch 16 ●●●● patch | view | raw | blame | history
SOURCES/kvm-util-Split-out-exec_dir-from-os_find_datadir.patch 358 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vbe-make-bochs-dispi-interface-return-the-correct-me.patch 11 ●●●● patch | view | raw | blame | history
SOURCES/kvm-vbe-rework-sanity-checks.patch 7 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vdi-remove-double-conversion.patch 44 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vdi-say-why-an-image-is-bad.patch 98 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vfio-Don-t-cache-MSIMessage.patch 14 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vfio-Fix-MSI-X-vector-expansion.patch 14 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vfio-correct-debug-macro-typo.patch 14 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vfio-pci-Add-debug-config-options-to-disable-MSI-X-K.patch 13 ●●●● patch | view | raw | blame | history
SOURCES/kvm-vfio-pci-Fix-MSI-X-debug-code.patch 14 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vfio-pci-Fix-MSI-X-masking-performance.patch 14 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vfio-pci-Fix-interrupt-disabling.patch 74 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vga-fix-invalid-read-after-free.patch 73 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-allow-mapping-up-to-max-queue-size.patch 20 ●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-avoid-buffer-overrun-on-incoming-migration.patch 18 ●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-balloon-fix-integer-overflow-in-memory-stats-.patch 64 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-blk-Bypass-error-action-and-I-O-accounting-on.patch 88 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-blk-Factor-common-checks-out-of-virtio_blk_ha.patch 74 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-blk-Treat-read-write-beyond-end-as-invalid.patch 56 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-net-Do-not-filter-VLANs-without-F_CTRL_VLAN.patch 10 ●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-net-add-vlan-receive-state-to-RxFilterInfo.patch 12 ●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-net-fix-buffer-overflow-on-invalid-state-load.patch 18 ●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-net-out-of-bounds-buffer-write-on-invalid-sta.patch 25 ●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-net-out-of-bounds-buffer-write-on-load.patch 23 ●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-out-of-bounds-buffer-write-on-invalid-state-l.patch 19 ●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-pci-Report-an-error-when-msix-vectors-init-fa.patch 54 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-rng-check-return-value-of-virtio_load.patch 55 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-scsi-Fix-memory-leak-when-realize-failed.patch 41 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-scsi-Fix-num_queue-input-validation.patch 53 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-scsi-Plug-memory-leak-on-virtio_scsi_push_eve.patch 55 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-scsi-Report-error-if-num_queues-is-0-or-too-l.patch 49 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-scsi-fix-buffer-overrun-on-invalid-state-load.patch 18 ●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-serial-report-frontend-connection-state-via-m.patch 142 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-validate-config_len-on-load.patch 19 ●●●● patch | view | raw | blame | history
SOURCES/kvm-virtio-validate-num_sg-when-mapping.patch 18 ●●●● patch | view | raw | blame | history
SOURCES/kvm-vl.c-Output-error-on-invalid-machine-type.patch 80 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vmdk-Allow-vmdk_create-to-work-with-protocol.patch 308 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vmdk-Check-VMFS-extent-line-field-number.patch 103 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vmdk-Check-for-overhead-when-opening.patch 86 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vmdk-Fix-big-flat-extent-IO.patch 152 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vmdk-Fix-creating-big-description-file.patch 2237 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vmdk-Fix-d-and-lld-to-PRI-in-format-strings.patch 77 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vmdk-Fix-format-specific-information-create-type-for.patch 66 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vmdk-Fix-integer-overflow-in-offset-calculation.patch 175 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vmdk-Fix-local_err-in-vmdk_create.patch 74 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vmdk-Fix-x-to-PRIx32-in-format-strings-for-cid.patch 73 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vmdk-Handle-failure-for-potentially-large-allocation.patch 70 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vmdk-Implement-.bdrv_get_info.patch 89 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vmdk-Implement-.bdrv_write_compressed.patch 67 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vmdk-Optimize-cluster-allocation.patch 475 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vmdk-Use-bdrv_nb_sectors-where-sectors-not-bytes-are.patch 80 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vmdk-correctly-propagate-errors.patch 105 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vmdk-do-not-try-opening-a-file-as-both-image-and-des.patch 101 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vmdk-extract-vmdk_read_desc.patch 99 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vmdk-fix-buf-leak-in-vmdk_parse_extents.patch 51 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vmdk-fix-vmdk_parse_extents-extent_file-leaks.patch 54 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vmdk-push-vmdk_read_desc-up-to-caller.patch 170 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vmstate-add-VMSTATE_VALIDATE.patch 14 ●●●● patch | view | raw | blame | history
SOURCES/kvm-vmstate-add-VMS_MUST_EXIST.patch 20 ●●●● patch | view | raw | blame | history
SOURCES/kvm-vmstate-reduce-code-duplication.patch 25 ●●●● patch | view | raw | blame | history
SOURCES/kvm-vmstate-static-checker-script-to-validate-vmstate-ch.patch 409 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vmstate_xhci_event-bug-compat-with-RHEL-7.0-RHEL-onl.patch 9 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vmstate_xhci_event-fix-unterminated-field-list.patch 8 ●●●● patch | view | raw | blame | history
SOURCES/kvm-vnc-sanitize-bits_per_pixel-from-the-client.patch 60 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-vpc-Implement-.bdrv_has_zero_init.patch 86 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-xhci-Add-a-few-missing-checks-for-disconnected-devic.patch 79 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-xhci-Add-xhci_epid_to_usbep-helper-function.patch 134 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-xhci-Call-usb_device_alloc-free_streams.patch 178 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-xhci-Fix-memory-leak-on-xhci_disable_ep.patch 56 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-xhci-Init-a-transfers-xhci-slotid-and-epid-member-on.patch 61 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-xhci-add-port-to-slot_address-tracepoint.patch 62 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-xhci-add-sanity-checks-to-xhci_lookup_uport.patch 52 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-xhci-add-tracepoint-for-endpoint-state-changes.patch 85 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-xhci-child-detach-fix.patch 47 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-xhci-fix-overflow-in-usb_xhci_post_load.patch 44 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-xhci-iso-allow-for-some-latency.patch 46 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-xhci-iso-fix-time-calculation.patch 45 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-xhci-make-port-reset-trace-point-more-verbose.patch 55 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-xhci-remove-leftover-debug-printf.patch 40 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-xhci-switch-debug-printf-to-tracepoint.patch 42 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-xhci-use-DPRINTF-instead-of-fprintf-stderr.patch 396 ●●●●● patch | view | raw | blame | history
SOURCES/kvm-zero-initialize-KVM_SET_GSI_ROUTING-input.patch 4 ●●●● patch | view | raw | blame | history
SPECS/qemu-kvm.spec 1796 ●●●● patch | view | raw | blame | history
.qemu-kvm.metadata
@@ -1,4 +1,4 @@
7c83cf03604d7db8ca5e7c8fce49b59cda240596 SOURCES/bios-256k.bin
9d4dcfdd25605fed27e625620e78a6a83eadd04c SOURCES/bios-256k.bin
e5a40bb63de8445a465c507ce27e736cff35ec12 SOURCES/qemu-1.5.3.tar.bz2
a07ce6c2f11c692f70c80cea3345aefd20be8a7b SOURCES/rhel6-e1000.rom
faac4c56f0ef593721edc66af965bac63760965b SOURCES/rhel6-ne2k_pci.rom
SOURCES/kvm-Allow-mismatched-virtio-config-len.patch
@@ -1,16 +1,16 @@
From 88fd47b4c3a1a272d7e21ba0e7358e0a4e9ecf88 Mon Sep 17 00:00:00 2001
From 3741ae811d3287e34779a307480dfb3e93dbb451 Mon Sep 17 00:00:00 2001
From: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
Date: Mon, 30 Jun 2014 11:10:01 +0200
Date: Mon, 30 Jun 2014 09:49:51 +0200
Subject: [PATCH] Allow mismatched virtio config-len
RH-Author: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
Message-id: <1404126601-23992-2-git-send-email-dgilbert@redhat.com>
Patchwork-id: 59407
O-Subject: [RHEL-7.0.z qemu-kvm PATCH 1/1] Allow mismatched virtio config-len
Bugzilla: 1095782
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Juan Quintela <quintela@redhat.com>
Message-id: <1404121791-14438-2-git-send-email-dgilbert@redhat.com>
Patchwork-id: 59405
O-Subject: [RHEL-7.1 qemu-kvm PATCH 1/1] Allow mismatched virtio config-len
Bugzilla: 1113009
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
RH-Acked-by: Juan Quintela <quintela@redhat.com>
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
SOURCES/kvm-Count-used-RAMBlock-pages-for-migration_dirty_pages.patch
@@ -1,20 +1,20 @@
From 118493a7515526d7adc52b1ca1b667db1458e98c Mon Sep 17 00:00:00 2001
From 20a401a160bb959469e95cc809b53609eedccb40 Mon Sep 17 00:00:00 2001
From: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
Date: Thu, 8 May 2014 11:27:33 +0200
Subject: [PATCH 21/30] Count used RAMBlock pages for migration_dirty_pages
Subject: [PATCH 08/31] Count used RAMBlock pages for migration_dirty_pages
RH-Author: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
Message-id: <1399548453-9181-2-git-send-email-dgilbert@redhat.com>
Patchwork-id: 58746
O-Subject: [RHEL7.1/RHEL7.0.z qemu-kvm PATCH 1/1] Count used RAMBlock pages for migration_dirty_pages
Bugzilla: 1110189
Bugzilla: 1074913
RH-Acked-by: Juan Quintela <quintela@redhat.com>
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
RH-Acked-by: Amit Shah <amit.shah@redhat.com>
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
This is a fix for a bug triggered by a migration after hot unplugging
This is a fix for a bug* triggered by a migration after hot unplugging
a few virtio-net NICs, that caused migration never to converge, because
'migration_dirty_pages' is incorrectly initialised.
@@ -29,6 +29,8 @@
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
(* https://bugzilla.redhat.com/show_bug.cgi?id=1074913 )
Signed-off-by: Juan Quintela <quintela@redhat.com>
(cherry picked from commit e30d1d8c7195848abb28a8c734a82b845b8b456a)
---
SOURCES/kvm-Define-the-architecture-for-compressed-dump-format.patch
New file
@@ -0,0 +1,90 @@
From da105287a0b61d57f015299cdf5211ba2e21a70f Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Fri, 7 Nov 2014 17:18:04 +0100
Subject: [PATCH 17/41] Define the architecture for compressed dump format
Message-id: <1415380693-16593-18-git-send-email-lersek@redhat.com>
Patchwork-id: 62203
O-Subject: [RHEL-7.1 qemu-kvm PATCH 17/26] Define the architecture for compressed dump format
Bugzilla: 1157798
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
RH-Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
RH-Acked-by: dgibson <dgibson@redhat.com>
From: qiaonuohan <qiaonuohan@cn.fujitsu.com>
Signed-off-by: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
(cherry picked from commit 4ab23a918249772458fd330758dc0fad96edce50)
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 dump.c             | 7 +++++--
 target-i386/cpu.h  | 2 ++
 target-s390x/cpu.h | 1 +
 3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/dump.c b/dump.c
index c0d5877..507a250 100644
--- a/dump.c
+++ b/dump.c
@@ -32,6 +32,9 @@
 #ifdef CONFIG_SNAPPY
 #include <snappy-c.h>
 #endif
+#ifndef ELF_MACHINE_UNAME
+#define ELF_MACHINE_UNAME "Unknown"
+#endif
 static uint16_t cpu_convert_to_target16(uint16_t val, int endian)
 {
@@ -823,7 +826,7 @@ static int create_header32(DumpState *s)
     dh->nr_cpus = cpu_convert_to_target32(s->nr_cpus, endian);
     bitmap_blocks = DIV_ROUND_UP(s->len_dump_bitmap, block_size) * 2;
     dh->bitmap_blocks = cpu_convert_to_target32(bitmap_blocks, endian);
-    memcpy(&(dh->utsname.machine), "i686", 4);
+    strncpy(dh->utsname.machine, ELF_MACHINE_UNAME, sizeof(dh->utsname.machine));
     if (s->flag_compress & DUMP_DH_COMPRESSED_ZLIB) {
         status |= DUMP_DH_COMPRESSED_ZLIB;
@@ -930,7 +933,7 @@ static int create_header64(DumpState *s)
     dh->nr_cpus = cpu_convert_to_target32(s->nr_cpus, endian);
     bitmap_blocks = DIV_ROUND_UP(s->len_dump_bitmap, block_size) * 2;
     dh->bitmap_blocks = cpu_convert_to_target32(bitmap_blocks, endian);
-    memcpy(&(dh->utsname.machine), "x86_64", 6);
+    strncpy(dh->utsname.machine, ELF_MACHINE_UNAME, sizeof(dh->utsname.machine));
     if (s->flag_compress & DUMP_DH_COMPRESSED_ZLIB) {
         status |= DUMP_DH_COMPRESSED_ZLIB;
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index ad40aab..207645c 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -38,8 +38,10 @@
 #ifdef TARGET_X86_64
 #define ELF_MACHINE     EM_X86_64
+#define ELF_MACHINE_UNAME "x86_64"
 #else
 #define ELF_MACHINE     EM_386
+#define ELF_MACHINE_UNAME "i686"
 #endif
 #define CPUArchState struct CPUX86State
diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h
index 0ce82cf..4979e0e 100644
--- a/target-s390x/cpu.h
+++ b/target-s390x/cpu.h
@@ -28,6 +28,7 @@
 #define TARGET_LONG_BITS 64
 #define ELF_MACHINE    EM_S390
+#define ELF_MACHINE_UNAME "S390X"
 #define CPUArchState struct CPUS390XState
--
1.8.3.1
SOURCES/kvm-Disallow-outward-migration-while-awaiting-incoming-m.patch
New file
@@ -0,0 +1,62 @@
From 6bdff9954d46304a278bff833ecb15450c19c4f5 Mon Sep 17 00:00:00 2001
From: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
Date: Thu, 8 May 2014 11:52:12 +0200
Subject: [PATCH 05/13] Disallow outward migration while awaiting incoming migration
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
RH-Author: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
Message-id: <1399549932-9977-1-git-send-email-dgilbert@redhat.com>
Patchwork-id: 58747
O-Subject: [RHEL7.1 qemu-kvm PATCH 1/1] Disallow outward migration while awaiting incoming migration
Bugzilla: 1086987
RH-Acked-by: Amos Kong <akong@redhat.com>
RH-Acked-by: Juan Quintela <quintela@redhat.com>
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1086987
brew: https://brewweb.devel.redhat.com/taskinfo?taskID=7432751
upstream: ca99993adc9205c905dba5dc1bb819959ada7200
QEMU will assert if you attempt to start an outgoing migration on
a QEMU that's sitting waiting for an incoming migration (started
with -incoming), so disallow it with a proper error.
(This is a fix for https://bugzilla.redhat.com/show_bug.cgi?id=1086987 )
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
(cherry picked from commit ca99993adc9205c905dba5dc1bb819959ada7200)
---
 migration.c | 5 +++++
 1 file changed, 5 insertions(+)
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 migration.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/migration.c b/migration.c
index 7efbd25..44b993a 100644
--- a/migration.c
+++ b/migration.c
@@ -430,6 +430,11 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
         return;
     }
+    if (runstate_check(RUN_STATE_INMIGRATE)) {
+        error_setg(errp, "Guest is waiting for an incoming migration");
+        return;
+    }
+
     if (qemu_savevm_state_blocked(errp)) {
         return;
     }
--
1.7.1
SOURCES/kvm-Enforce-stack-protector-usage.patch
New file
@@ -0,0 +1,70 @@
From 3938c85004bbd742c5a8c7e1480ed14c2420cd9d Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Tue, 26 Aug 2014 13:33:14 +0200
Subject: [PATCH 1/6] Enforce stack protector usage
Message-id: <1409059994-2966-1-git-send-email-mrezanin@redhat.com>
Patchwork-id: 60699
O-Subject: [RHEL-7.1 qemu-kvm PATCH] Enforce stack protector usage
Bugzilla: 1064260
RH-Acked-by: Amos Kong <akong@redhat.com>
RH-Acked-by: Jeff Nelson <jenelson@redhat.com>
RH-Acked-by: Fam Zheng <famz@redhat.com>
From: Miroslav Rezanina <mrezanin@redhat.com>
If --enable-stack-protector is used is used, configure script try to use
--fstack-protector-strong. In case it's not supported, --fstack-protector-all
is enabled. If both protectors are not supported, configure does not use
any protector at all without any notification.
This patch reports error when user requests stack protector to be used and
both protector modes are not supported. Behavior is not changed in case
user do not use any of --enable-stack-protector/--disable-stack-protector.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
[Fix non-POSIX operator in test. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 3b463a3fa8f7690ffa3ef273993dff349b3a73d3)
Conflicts:
    configure - upstream use -fstack-protector-all as second option
                we used -fstack-protector.
                Updated to upstream behavior
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 configure |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/configure b/configure
index 4552e08..0c666e5 100755
--- a/configure
+++ b/configure
@@ -1303,14 +1303,21 @@ for flag in $gcc_flags; do
 done
 if test "$stack_protector" != "no" ; then
-  gcc_flags="-fstack-protector-strong -fstack-protector"
+  gcc_flags="-fstack-protector-strong -fstack-protector-all"
+  sp_on=0
   for flag in $gcc_flags; do
     if compile_prog "-Werror $flag" "" ; then
       QEMU_CFLAGS="$QEMU_CFLAGS $flag"
       LIBTOOLFLAGS="$LIBTOOLFLAGS -Wc,$flag"
+      sp_on=1
       break
     fi
   done
+  if test "$stack_protector" = yes; then
+    if test $sp_on = 0; then
+      error_exit "Stack protector not supported"
+    fi
+  fi
 fi
 # Workaround for http://gcc.gnu.org/PR55489.  Happens with -fPIE/-fPIC and
--
1.7.1
SOURCES/kvm-Init-the-XBZRLE.lock-in-ram_mig_init.patch
@@ -1,13 +1,13 @@
From ac978ade92aa12ae6c700b8be85a10355f728c78 Mon Sep 17 00:00:00 2001
From 7b47ae208675e0da813f9f46838d9a8935c68a02 Mon Sep 17 00:00:00 2001
From: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
Date: Thu, 8 May 2014 10:58:41 +0200
Subject: [PATCH 19/30] Init the XBZRLE.lock in ram_mig_init
Subject: [PATCH 06/31] Init the XBZRLE.lock in ram_mig_init
RH-Author: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
Message-id: <1399546722-6350-4-git-send-email-dgilbert@redhat.com>
Patchwork-id: 58743
O-Subject: [RHEL7.1/RHEL7.0.z qemu-kvm PATCH 3/4] Init the XBZRLE.lock in ram_mig_init
Bugzilla: 1110191
Bugzilla: 1066338
RH-Acked-by: Juan Quintela <quintela@redhat.com>
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
RH-Acked-by: Amit Shah <amit.shah@redhat.com>
SOURCES/kvm-Introduce-cpu_clean_all_dirty.patch
New file
@@ -0,0 +1,114 @@
From 2611b6a31041da5b9ed3793152d309aae77932bb Mon Sep 17 00:00:00 2001
From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
Date: Wed, 22 Oct 2014 09:46:35 +0200
Subject: [PATCH 4/6] Introduce cpu_clean_all_dirty
Message-id: <1413971197-4624-4-git-send-email-dgilbert@redhat.com>
Patchwork-id: 61791
O-Subject: [RHEL-7.1 qemu-kvm PATCH 3/5] Introduce cpu_clean_all_dirty
Bugzilla: 1098602 1130428
RH-Acked-by: Marcelo Tosatti <mtosatti@redhat.com>
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
From: Marcelo Tosatti <mtosatti@redhat.com>
Introduce cpu_clean_all_dirty, to force subsequent cpu_synchronize_all_states
to read in-kernel register state.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit de9d61e83d43be9069e6646fa9d57a3f47779d28)
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
Conflicts:
    cpus.c
    kvm-all.c
dgilbert: Had to replace CPU_FOREACH by a loop
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 cpus.c                | 9 +++++++++
 include/sysemu/cpus.h | 1 +
 include/sysemu/kvm.h  | 8 ++++++++
 kvm-all.c             | 5 +++++
 4 files changed, 23 insertions(+)
diff --git a/cpus.c b/cpus.c
index caccf5a..3948cdf 100644
--- a/cpus.c
+++ b/cpus.c
@@ -437,6 +437,15 @@ bool cpu_is_stopped(CPUState *cpu)
     return !runstate_is_running() || cpu->stopped;
 }
+void cpu_clean_all_dirty(void)
+{
+    CPUArchState *cpu;
+
+    for (cpu = first_cpu; cpu; cpu = cpu->next_cpu) {
+        cpu_clean_state(ENV_GET_CPU(cpu));
+    }
+}
+
 static int do_vm_stop(RunState state)
 {
     int ret = 0;
diff --git a/include/sysemu/cpus.h b/include/sysemu/cpus.h
index 6502488..4f8a3df 100644
--- a/include/sysemu/cpus.h
+++ b/include/sysemu/cpus.h
@@ -10,6 +10,7 @@ void cpu_stop_current(void);
 void cpu_synchronize_all_states(void);
 void cpu_synchronize_all_post_reset(void);
 void cpu_synchronize_all_post_init(void);
+void cpu_clean_all_dirty(void);
 void qtest_clock_warp(int64_t dest);
diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
index e722027..0c6833f 100644
--- a/include/sysemu/kvm.h
+++ b/include/sysemu/kvm.h
@@ -274,6 +274,7 @@ int kvm_physical_memory_addr_from_host(KVMState *s, void *ram_addr,
 void kvm_cpu_synchronize_post_reset(CPUState *cpu);
 void kvm_cpu_synchronize_post_init(CPUState *cpu);
+void kvm_cpu_clean_state(CPUState *cpu);
 static inline void cpu_synchronize_post_reset(CPUState *cpu)
 {
@@ -289,6 +290,13 @@ static inline void cpu_synchronize_post_init(CPUState *cpu)
     }
 }
+static inline void cpu_clean_state(CPUState *cpu)
+{
+    if (kvm_enabled()) {
+        kvm_cpu_clean_state(cpu);
+    }
+}
+
 int kvm_irqchip_add_msi_route(KVMState *s, MSIMessage msg);
 int kvm_irqchip_update_msi_route(KVMState *s, int virq, MSIMessage msg);
 void kvm_irqchip_release_virq(KVMState *s, int virq);
diff --git a/kvm-all.c b/kvm-all.c
index f7f621b..fc6e3ab 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1615,6 +1615,11 @@ void kvm_cpu_synchronize_post_init(CPUState *cpu)
     cpu->kvm_vcpu_dirty = false;
 }
+void kvm_cpu_clean_state(CPUState *cpu)
+{
+    cpu->kvm_vcpu_dirty = false;
+}
+
 int kvm_cpu_exec(CPUArchState *env)
 {
     CPUState *cpu = ENV_GET_CPU(env);
--
1.8.3.1
SOURCES/kvm-Provide-init-function-for-ram-migration.patch
@@ -1,13 +1,13 @@
From 8928f6a2f77e167b7602c3f3bb071641134e544e Mon Sep 17 00:00:00 2001
From 86303381279f7c0e9d98693496d888801a503148 Mon Sep 17 00:00:00 2001
From: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
Date: Thu, 8 May 2014 10:58:40 +0200
Subject: [PATCH 18/30] Provide init function for ram migration
Subject: [PATCH 05/31] Provide init function for ram migration
RH-Author: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
Message-id: <1399546722-6350-3-git-send-email-dgilbert@redhat.com>
Patchwork-id: 58742
O-Subject: [RHEL7.1/RHEL7.0.z qemu-kvm PATCH 2/4] Provide init function for ram migration
Bugzilla: 1110191
Bugzilla: 1066338
RH-Acked-by: Juan Quintela <quintela@redhat.com>
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
RH-Acked-by: Amit Shah <amit.shah@redhat.com>
SOURCES/kvm-Revert-Build-ceph-rbd-only-for-rhev.patch
New file
@@ -0,0 +1,87 @@
From 6c1152b03b7ba00048ca46c424064aab14b2a18d Mon Sep 17 00:00:00 2001
From: Kevin Wolf <kwolf@redhat.com>
Date: Thu, 20 Nov 2014 13:47:21 +0100
Subject: [PATCH 2/5] Revert "Build ceph/rbd only for rhev"
Message-id: <1416491244-20209-2-git-send-email-kwolf@redhat.com>
Patchwork-id: 62496
O-Subject: [RHEL-7.1 qemu-kvm PATCH v2 1/4] Revert "Build ceph/rbd only for rhev"
Bugzilla: 1140742
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
RH-Acked-by: Max Reitz <mreitz@redhat.com>
This reverts commit 5d5af5b18e07ef4c97a45feeaad3fe493d38f427.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
Conflicts:
    configure
    redhat/qemu-kvm.spec.template
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 block/Makefile.objs           |  2 +-
 configure                     | 11 -----------
 redhat/qemu-kvm.spec.template |  6 ------
 3 files changed, 1 insertion(+), 18 deletions(-)
diff --git a/block/Makefile.objs b/block/Makefile.objs
index dd01fb3..6b578d9 100644
--- a/block/Makefile.objs
+++ b/block/Makefile.objs
@@ -13,7 +13,7 @@ ifeq ($(CONFIG_POSIX),y)
 block-obj-y += nbd.o sheepdog.o
 block-obj-$(CONFIG_LIBISCSI) += iscsi.o
 block-obj-$(CONFIG_CURL) += curl.o
-block-obj-$(CONFIG_CEPH_SUPPORT) += rbd.o
+block-obj-y += rbd.o
 block-obj-$(CONFIG_GLUSTERFS) += gluster.o
 block-obj-$(CONFIG_LIBSSH2) += ssh.o
 endif
diff --git a/configure b/configure
index ca8b107..8db9dbe 100755
--- a/configure
+++ b/configure
@@ -248,7 +248,6 @@ tpm="no"
 libssh2=""
 live_block_ops="yes"
 live_block_migration="no"
-ceph_support="yes"
 vhdx=""
 # parse CC options first
@@ -959,10 +958,6 @@ for opt do
   ;;
   --enable-live-block-migration) live_block_migration="yes"
   ;;
-  --disable-ceph-support) ceph_support="no"
-  ;;
-  --enable-ceph-support) ceph_support="yes"
-  ;;
   --enable-vhdx) vhdx="yes"
   ;;
   --disable-vhdx) vhdx="no"
@@ -1245,8 +1240,6 @@ echo "  --disable-live-block-ops disable live block operations support"
 echo "  --enable-live-block-ops  enable live block operations support"
 echo "  --disable-live-block-migration disable live block migration"
 echo "  --enable-live-block-migration  enable live block migration"
-echo "  --disable-ceph-support   disable support for rbd block driver support"
-echo "  --enable-ceph-support    enable support for rbd block driver support"
 echo "  --disable-vhdx           disables support for the Microsoft VHDX image format"
 echo "  --enable-vhdx            enable support for the Microsoft VHDX image format"
 echo ""
@@ -4105,10 +4098,6 @@ if test "$live_block_migration" = "yes" ; then
   echo "CONFIG_LIVE_BLOCK_MIGRATION=y" >> $config_host_mak
 fi
-if test "$ceph_support" = "yes"; then
-  echo "CONFIG_CEPH_SUPPORT=y" >> $config_host_mak
-fi
-
 if test "$vhdx" = "yes" ; then
   echo "CONFIG_VHDX=y" >> $config_host_mak
 fi
--
1.8.3.1
SOURCES/kvm-Revert-kvmclock-Ensure-proper-env-tsc-value-for-kvmc.patch
New file
@@ -0,0 +1,58 @@
From 51db6795c68e1d00373d373c043543bbc6fb8f08 Mon Sep 17 00:00:00 2001
From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
Date: Wed, 22 Oct 2014 09:46:33 +0200
Subject: [PATCH 2/6] Revert "kvmclock: Ensure proper env->tsc value for
 kvmclock_current_nsec calculation"
Message-id: <1413971197-4624-2-git-send-email-dgilbert@redhat.com>
Patchwork-id: 61789
O-Subject: [RHEL-7.1 qemu-kvm PATCH 1/5] Revert "kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation"
Bugzilla: 1098602 1130428
RH-Acked-by: Marcelo Tosatti <mtosatti@redhat.com>
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
This reverts commit da4fe791cecafbec05395041c52cb545308b1b61.
The equivalent upstream revert is Paolo's 108e4c3871e0d0cd185c
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 hw/i386/kvm/clock.c | 4 ----
 1 file changed, 4 deletions(-)
diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
index d52c2ea..1f2a26e 100644
--- a/hw/i386/kvm/clock.c
+++ b/hw/i386/kvm/clock.c
@@ -17,7 +17,6 @@
 #include "qemu/host-utils.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/kvm.h"
-#include "sysemu/cpus.h"
 #include "hw/sysbus.h"
 #include "hw/kvm/clock.h"
@@ -61,7 +60,6 @@ static uint64_t kvmclock_current_nsec(KVMClockState *s)
     cpu_physical_memory_read(kvmclock_struct_pa, &time, sizeof(time));
-    assert(time.tsc_timestamp <= migration_tsc);
     delta = migration_tsc - time.tsc_timestamp;
     if (time.tsc_shift < 0) {
         delta >>= -time.tsc_shift;
@@ -120,8 +118,6 @@ static void kvmclock_vm_state_change(void *opaque, int running,
         if (s->clock_valid) {
             return;
         }
-
-        cpu_synchronize_all_states();
         ret = kvm_vm_ioctl(kvm_state, KVM_GET_CLOCK, &data);
         if (ret < 0) {
             fprintf(stderr, "KVM_GET_CLOCK failed: %s\n", strerror(ret));
--
1.8.3.1
SOURCES/kvm-Revert-kvmclock-Ensure-time-in-migration-never-goes-.patch
New file
@@ -0,0 +1,106 @@
From 62ac85ec7c8e41b0454bdec0e0a9c7d5adc39280 Mon Sep 17 00:00:00 2001
From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
Date: Wed, 22 Oct 2014 09:46:34 +0200
Subject: [PATCH 3/6] Revert "kvmclock: Ensure time in migration never goes
 backward"
Message-id: <1413971197-4624-3-git-send-email-dgilbert@redhat.com>
Patchwork-id: 61788
O-Subject: [RHEL-7.1 qemu-kvm PATCH 2/5] Revert "kvmclock: Ensure time in migration never goes backward"
Bugzilla: 1098602 1130428
RH-Acked-by: Marcelo Tosatti <mtosatti@redhat.com>
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
This reverts commit 4b6035c2a739bc4c086abbb36f0883a1178a8f1c.
The equivalent upstream revert is Paolo's fa666c10f2f3e15685ff
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 hw/i386/kvm/clock.c | 49 -------------------------------------------------
 1 file changed, 49 deletions(-)
diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
index 1f2a26e..6d6f3a7 100644
--- a/hw/i386/kvm/clock.c
+++ b/hw/i386/kvm/clock.c
@@ -14,7 +14,6 @@
  */
 #include "qemu-common.h"
-#include "qemu/host-utils.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/kvm.h"
 #include "hw/sysbus.h"
@@ -29,48 +28,6 @@ typedef struct KVMClockState {
     bool clock_valid;
 } KVMClockState;
-struct pvclock_vcpu_time_info {
-    uint32_t   version;
-    uint32_t   pad0;
-    uint64_t   tsc_timestamp;
-    uint64_t   system_time;
-    uint32_t   tsc_to_system_mul;
-    int8_t     tsc_shift;
-    uint8_t    flags;
-    uint8_t    pad[2];
-} __attribute__((__packed__)); /* 32 bytes */
-
-static uint64_t kvmclock_current_nsec(KVMClockState *s)
-{
-    CPUArchState *acpu = first_cpu;
-    CPUState *cpu = ENV_GET_CPU(acpu);
-    CPUX86State *env = cpu->env_ptr;
-    hwaddr kvmclock_struct_pa = env->system_time_msr & ~1ULL;
-    uint64_t migration_tsc = env->tsc;
-    struct pvclock_vcpu_time_info time;
-    uint64_t delta;
-    uint64_t nsec_lo;
-    uint64_t nsec_hi;
-    uint64_t nsec;
-
-    if (!(env->system_time_msr & 1ULL)) {
-        /* KVM clock not active */
-        return 0;
-    }
-
-    cpu_physical_memory_read(kvmclock_struct_pa, &time, sizeof(time));
-
-    delta = migration_tsc - time.tsc_timestamp;
-    if (time.tsc_shift < 0) {
-        delta >>= -time.tsc_shift;
-    } else {
-        delta <<= time.tsc_shift;
-    }
-
-    mulu64(&nsec_lo, &nsec_hi, delta, time.tsc_to_system_mul);
-    nsec = (nsec_lo >> 32) | (nsec_hi << 32);
-    return nsec + time.system_time;
-}
 static void kvmclock_vm_state_change(void *opaque, int running,
                                      RunState state)
@@ -82,15 +39,9 @@ static void kvmclock_vm_state_change(void *opaque, int running,
     if (running) {
         struct kvm_clock_data data;
-        uint64_t time_at_migration = kvmclock_current_nsec(s);
         s->clock_valid = false;
-    /* We can't rely on the migrated clock value, just discard it */
-    if (time_at_migration) {
-            s->clock = time_at_migration;
-    }
-
         data.clock = s->clock;
         data.flags = 0;
         ret = kvm_vm_ioctl(kvm_state, KVM_SET_CLOCK, &data);
--
1.8.3.1
SOURCES/kvm-Revert-linux-aio-use-event-notifiers.patch
New file
@@ -0,0 +1,189 @@
From 31d1d075a4cb1526d4c0ba43a8a6d581cedf0292 Mon Sep 17 00:00:00 2001
From: Fam Zheng <famz@redhat.com>
Date: Fri, 7 Nov 2014 10:09:29 +0100
Subject: [PATCH 8/9] Revert "linux-aio: use event notifiers"
Message-id: <1415354969-14209-1-git-send-email-famz@redhat.com>
Patchwork-id: 62180
O-Subject: [RHEL-7.1 qemu-kvm PATCH v3] Revert "linux-aio: use event notifiers"
Bugzilla: 1104748
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
This reverts commit c90caf25e2b6945ae13560476a5ecd7992e9f945:
    linux-aio: use event notifiers
    Since linux-aio already uses an eventfd, converting it to use the
    EventNotifier-based API simplifies the code even though it is not
    meant to be portable.
    Reviewed-by: Anthony Liguori <anthony@codemonkey.ws>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Justification:
    There is a performance regression compared to RHEL 6 since we picked
    this patch during RHEL 7 rebase. The bugzilla has more data but as a
    quick overview we can see the difference is significant:
    Configuration   rw         bs         iodepth    bw         iops
    ------------------------------------------------------------------
    Before revert   randwrite  4k         32         579        148464
    After revert    randwrite  4k         32         877        224752
    The reason is that before revert, we pass min_nr=MAX_EVENTS to
    io_getevents, which is much slower (50000+ ns compared to a few
    hundreds) than when min_nr is val, the number of events, after
    revert.
    The decisive difference is that MAX_EVENTS is usually strictly
    greater than the number of pending events, hence the kernel code
    takes a different path into the hrtimer, despite timeout=0.
    In other words, the root cause is in kernel. A fix is posted to
    upstream. But let's have this workaround in qemu-kvm anyway.
Upstream:
    The issue is silently compensated since cd758dd0aca (aio / timers:
    Add prctl(PR_SET_TIMERSLACK, 1, ...) to reduce timer slack), and the
    io_getevents call is moved to a BH, so changing min_nr back to 1 in
    upstream is not demanding. As the ultimate fix in kernel is on its
    way, reverting is a reasonable move for RHEL.
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
Conflicts:
    block/linux-aio.c
Trivial context conflict in #include section.
---
 block/linux-aio.c | 49 ++++++++++++++++++++++++++++++-------------------
 1 file changed, 30 insertions(+), 19 deletions(-)
diff --git a/block/linux-aio.c b/block/linux-aio.c
index ee0f8d1..40041d1 100644
--- a/block/linux-aio.c
+++ b/block/linux-aio.c
@@ -11,8 +11,8 @@
 #include "block/aio.h"
 #include "qemu/queue.h"
 #include "block/raw-aio.h"
-#include "qemu/event_notifier.h"
+#include <sys/eventfd.h>
 #include <libaio.h>
 /*
@@ -38,7 +38,7 @@ struct qemu_laiocb {
 struct qemu_laio_state {
     io_context_t ctx;
-    EventNotifier e;
+    int efd;
     int count;
 };
@@ -77,17 +77,29 @@ static void qemu_laio_process_completion(struct qemu_laio_state *s,
     qemu_aio_release(laiocb);
 }
-static void qemu_laio_completion_cb(EventNotifier *e)
+static void qemu_laio_completion_cb(void *opaque)
 {
-    struct qemu_laio_state *s = container_of(e, struct qemu_laio_state, e);
+    struct qemu_laio_state *s = opaque;
-    while (event_notifier_test_and_clear(&s->e)) {
+    while (1) {
         struct io_event events[MAX_EVENTS];
+        uint64_t val;
+        ssize_t ret;
         struct timespec ts = { 0 };
         int nevents, i;
         do {
-            nevents = io_getevents(s->ctx, MAX_EVENTS, MAX_EVENTS, events, &ts);
+            ret = read(s->efd, &val, sizeof(val));
+        } while (ret == -1 && errno == EINTR);
+
+        if (ret == -1 && errno == EAGAIN)
+            break;
+
+        if (ret != 8)
+            break;
+
+        do {
+            nevents = io_getevents(s->ctx, val, MAX_EVENTS, events, &ts);
         } while (nevents == -EINTR);
         for (i = 0; i < nevents; i++) {
@@ -101,9 +113,9 @@ static void qemu_laio_completion_cb(EventNotifier *e)
     }
 }
-static int qemu_laio_flush_cb(EventNotifier *e)
+static int qemu_laio_flush_cb(void *opaque)
 {
-    struct qemu_laio_state *s = container_of(e, struct qemu_laio_state, e);
+    struct qemu_laio_state *s = opaque;
     return (s->count > 0) ? 1 : 0;
 }
@@ -135,9 +147,8 @@ static void laio_cancel(BlockDriverAIOCB *blockacb)
      * We might be able to do this slightly more optimal by removing the
      * O_NONBLOCK flag.
      */
-    while (laiocb->ret == -EINPROGRESS) {
-        qemu_laio_completion_cb(&laiocb->ctx->e);
-    }
+    while (laiocb->ret == -EINPROGRESS)
+        qemu_laio_completion_cb(laiocb->ctx);
 }
 static const AIOCBInfo laio_aiocb_info = {
@@ -176,7 +187,7 @@ BlockDriverAIOCB *laio_submit(BlockDriverState *bs, void *aio_ctx, int fd,
                         __func__, type);
         goto out_free_aiocb;
     }
-    io_set_eventfd(&laiocb->iocb, event_notifier_get_fd(&s->e));
+    io_set_eventfd(&laiocb->iocb, s->efd);
     s->count++;
     if (io_submit(s->ctx, 1, &iocbs) < 0)
@@ -195,21 +206,21 @@ void *laio_init(void)
     struct qemu_laio_state *s;
     s = g_malloc0(sizeof(*s));
-    if (event_notifier_init(&s->e, false) < 0) {
+    s->efd = eventfd(0, 0);
+    if (s->efd == -1)
         goto out_free_state;
-    }
+    fcntl(s->efd, F_SETFL, O_NONBLOCK);
-    if (io_setup(MAX_EVENTS, &s->ctx) != 0) {
+    if (io_setup(MAX_EVENTS, &s->ctx) != 0)
         goto out_close_efd;
-    }
-    qemu_aio_set_event_notifier(&s->e, qemu_laio_completion_cb,
-                                qemu_laio_flush_cb);
+    qemu_aio_set_fd_handler(s->efd, qemu_laio_completion_cb, NULL,
+        qemu_laio_flush_cb, s);
     return s;
 out_close_efd:
-    event_notifier_cleanup(&s->e);
+    close(s->efd);
 out_free_state:
     g_free(s);
     return NULL;
--
1.8.3.1
SOURCES/kvm-Revert-rbd-Only-look-for-qemu-specific-copy-of-librb.patch
New file
@@ -0,0 +1,38 @@
From 7e01df44401fb6a0aeeecabdb0026290b36f0a03 Mon Sep 17 00:00:00 2001
From: Kevin Wolf <kwolf@redhat.com>
Date: Thu, 20 Nov 2014 13:47:22 +0100
Subject: [PATCH 3/5] Revert "rbd: Only look for qemu-specific copy of
 librbd.so.1"
Message-id: <1416491244-20209-3-git-send-email-kwolf@redhat.com>
Patchwork-id: 62498
O-Subject: [RHEL-7.1 qemu-kvm PATCH v2 2/4] Revert "rbd: Only look for qemu-specific copy of librbd.so.1"
Bugzilla: 1140742
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
RH-Acked-by: Max Reitz <mreitz@redhat.com>
This reverts commit ece4ff225717364edc3136599113709dacdc5731.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 block/rbd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/rbd.c b/block/rbd.c
index b870401..89319dc 100644
--- a/block/rbd.c
+++ b/block/rbd.c
@@ -1125,7 +1125,7 @@ static int qemu_rbd_load_libs(void)
         return -1;
     }
-    librbd_handle = g_module_open("/usr/lib64/qemu/librbd.so.1", 0);
+    librbd_handle = g_module_open("librbd.so.1", 0);
     if (!librbd_handle) {
         error_report("error loading librbd: %s", g_module_error());
         return -1;
--
1.8.3.1
SOURCES/kvm-Revert-rbd-link-and-load-librbd-dynamically.patch
New file
@@ -0,0 +1,564 @@
From e2fd1947f5c17139ab279ff155f31f1a74d8d3e0 Mon Sep 17 00:00:00 2001
From: Kevin Wolf <kwolf@redhat.com>
Date: Thu, 20 Nov 2014 13:47:23 +0100
Subject: [PATCH 4/5] Revert "rbd: link and load librbd dynamically"
Message-id: <1416491244-20209-4-git-send-email-kwolf@redhat.com>
Patchwork-id: 62493
O-Subject: [RHEL-7.1 qemu-kvm PATCH v2 3/4] Revert "rbd: link and load librbd dynamically"
Bugzilla: 1140742
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
RH-Acked-by: Max Reitz <mreitz@redhat.com>
This reverts commit 64d9964fc97fc525b86e12c5f385dea7e646a3b0.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
Conflicts:
    configure
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 block/Makefile.objs |   2 +-
 block/rbd.c         | 218 ++++++++++++----------------------------------------
 block/rbd_types.h   |  91 ----------------------
 configure           |  41 +++++++++-
 4 files changed, 89 insertions(+), 263 deletions(-)
 delete mode 100644 block/rbd_types.h
diff --git a/block/Makefile.objs b/block/Makefile.objs
index 6b578d9..0be180f 100644
--- a/block/Makefile.objs
+++ b/block/Makefile.objs
@@ -13,7 +13,7 @@ ifeq ($(CONFIG_POSIX),y)
 block-obj-y += nbd.o sheepdog.o
 block-obj-$(CONFIG_LIBISCSI) += iscsi.o
 block-obj-$(CONFIG_CURL) += curl.o
-block-obj-y += rbd.o
+block-obj-$(CONFIG_RBD) += rbd.o
 block-obj-$(CONFIG_GLUSTERFS) += gluster.o
 block-obj-$(CONFIG_LIBSSH2) += ssh.o
 endif
diff --git a/block/rbd.c b/block/rbd.c
index 89319dc..4eea455 100644
--- a/block/rbd.c
+++ b/block/rbd.c
@@ -11,14 +11,13 @@
  * GNU GPL, version 2 or (at your option) any later version.
  */
-#include <gmodule.h>
 #include <inttypes.h>
 #include "qemu-common.h"
 #include "qemu/error-report.h"
 #include "block/block_int.h"
-#include "rbd_types.h"
+#include <rbd/librbd.h>
 /*
  * When specifying the image filename use:
@@ -45,6 +44,13 @@
  * leading "\".
  */
+/* rbd_aio_discard added in 0.1.2 */
+#if LIBRBD_VERSION_CODE >= LIBRBD_VERSION(0, 1, 2)
+#define LIBRBD_SUPPORTS_DISCARD
+#else
+#undef LIBRBD_SUPPORTS_DISCARD
+#endif
+
 #define OBJ_MAX_SIZE (1UL << OBJ_DEFAULT_OBJ_ORDER)
 #define RBD_MAX_CONF_NAME_SIZE 128
@@ -100,10 +106,6 @@ typedef struct BDRVRBDState {
     RADOSCB *event_rcb;
 } BDRVRBDState;
-static bool librbd_loaded;
-static GModule *librbd_handle;
-
-static int qemu_rbd_load_libs(void);
 static void rbd_aio_bh_cb(void *opaque);
 static int qemu_rbd_next_tok(char *dst, int dst_len,
@@ -309,10 +311,6 @@ static int qemu_rbd_create(const char *filename, QEMUOptionParameter *options,
         return -EINVAL;
     }
-    if (qemu_rbd_load_libs() < 0) {
-        return -EIO;
-    }
-
     /* Read out options */
     while (options && options->name) {
         if (!strcmp(options->name, BLOCK_OPT_SIZE)) {
@@ -491,10 +489,6 @@ static int qemu_rbd_open(BlockDriverState *bs, QDict *options, int flags,
         goto failed_opts;
     }
-    if (qemu_rbd_load_libs() < 0) {
-        return -EIO;
-    }
-
     clientname = qemu_rbd_parse_clientname(conf, clientname_buf);
     r = rados_create(&s->cluster, clientname);
     if (r < 0) {
@@ -686,6 +680,28 @@ static void rbd_aio_bh_cb(void *opaque)
     }
 }
+static int rbd_aio_discard_wrapper(rbd_image_t image,
+                                   uint64_t off,
+                                   uint64_t len,
+                                   rbd_completion_t comp)
+{
+#ifdef LIBRBD_SUPPORTS_DISCARD
+    return rbd_aio_discard(image, off, len, comp);
+#else
+    return -ENOTSUP;
+#endif
+}
+
+static int rbd_aio_flush_wrapper(rbd_image_t image,
+                                 rbd_completion_t comp)
+{
+#ifdef LIBRBD_SUPPORTS_AIO_FLUSH
+    return rbd_aio_flush(image, comp);
+#else
+    return -ENOTSUP;
+#endif
+}
+
 static BlockDriverAIOCB *rbd_start_aio(BlockDriverState *bs,
                                        int64_t sector_num,
                                        QEMUIOVector *qiov,
@@ -748,10 +764,10 @@ static BlockDriverAIOCB *rbd_start_aio(BlockDriverState *bs,
         r = rbd_aio_read(s->image, off, size, buf, c);
         break;
     case RBD_AIO_DISCARD:
-        r = rbd_aio_discard(s->image, off, size, c);
+        r = rbd_aio_discard_wrapper(s->image, off, size, c);
         break;
     case RBD_AIO_FLUSH:
-        r = rbd_aio_flush(s->image, c);
+        r = rbd_aio_flush_wrapper(s->image, c);
         break;
     default:
         r = -EINVAL;
@@ -792,6 +808,7 @@ static BlockDriverAIOCB *qemu_rbd_aio_writev(BlockDriverState *bs,
                          RBD_AIO_WRITE);
 }
+#ifdef LIBRBD_SUPPORTS_AIO_FLUSH
 static BlockDriverAIOCB *qemu_rbd_aio_flush(BlockDriverState *bs,
                                             BlockDriverCompletionFunc *cb,
                                             void *opaque)
@@ -799,14 +816,19 @@ static BlockDriverAIOCB *qemu_rbd_aio_flush(BlockDriverState *bs,
     return rbd_start_aio(bs, 0, NULL, 0, cb, opaque, RBD_AIO_FLUSH);
 }
+#else
+
 static int qemu_rbd_co_flush(BlockDriverState *bs)
 {
+#if LIBRBD_VERSION_CODE >= LIBRBD_VERSION(0, 1, 1)
+    /* rbd_flush added in 0.1.1 */
     BDRVRBDState *s = bs->opaque;
-    if (rbd_flush) {
-        return rbd_flush(s->image);
-    }
+    return rbd_flush(s->image);
+#else
     return 0;
+#endif
 }
+#endif
 static int qemu_rbd_getinfo(BlockDriverState *bs, BlockDriverInfo *bdi)
 {
@@ -944,6 +966,7 @@ static int qemu_rbd_snap_list(BlockDriverState *bs,
     return snap_count;
 }
+#ifdef LIBRBD_SUPPORTS_DISCARD
 static BlockDriverAIOCB* qemu_rbd_aio_discard(BlockDriverState *bs,
                                               int64_t sector_num,
                                               int nb_sectors,
@@ -953,6 +976,7 @@ static BlockDriverAIOCB* qemu_rbd_aio_discard(BlockDriverState *bs,
     return rbd_start_aio(bs, sector_num, NULL, nb_sectors, cb, opaque,
                          RBD_AIO_DISCARD);
 }
+#endif
 static QEMUOptionParameter qemu_rbd_create_options[] = {
     {
@@ -983,9 +1007,16 @@ static BlockDriver bdrv_rbd = {
     .bdrv_aio_readv         = qemu_rbd_aio_readv,
     .bdrv_aio_writev        = qemu_rbd_aio_writev,
+
+#ifdef LIBRBD_SUPPORTS_AIO_FLUSH
     .bdrv_aio_flush         = qemu_rbd_aio_flush,
+#else
     .bdrv_co_flush_to_disk  = qemu_rbd_co_flush,
+#endif
+
+#ifdef LIBRBD_SUPPORTS_DISCARD
     .bdrv_aio_discard       = qemu_rbd_aio_discard,
+#endif
     .bdrv_snapshot_create   = qemu_rbd_snap_create,
     .bdrv_snapshot_delete   = qemu_rbd_snap_remove,
@@ -998,153 +1029,4 @@ static void bdrv_rbd_init(void)
     bdrv_register(&bdrv_rbd);
 }
-typedef struct LibSymbol {
-    const char *name;
-    gpointer *addr;
-} LibSymbol;
-
-static int qemu_rbd_set_functions(GModule *lib, const LibSymbol *funcs)
-{
-    int i = 0;
-    while (funcs[i].name) {
-        const char *name = funcs[i].name;
-        if (!g_module_symbol(lib, name, funcs[i].addr)) {
-            error_report("%s could not be loaded from librbd or librados: %s",
-                         name, g_module_error());
-            return -1;
-        }
-        ++i;
-    }
-    return 0;
-}
-
-/*
- * Set function pointers for basic librados and librbd
- * functions that have always been present in these libraries.
- */
-static int qemu_rbd_set_mandatory_functions(void)
-{
-    LibSymbol symbols[] = {
-        {"rados_create",
-         (gpointer *) &rados_create},
-        {"rados_connect",
-         (gpointer *) &rados_connect},
-        {"rados_shutdown",
-         (gpointer *) &rados_shutdown},
-        {"rados_conf_read_file",
-         (gpointer *) &rados_conf_read_file},
-        {"rados_conf_set",
-         (gpointer *) &rados_conf_set},
-        {"rados_ioctx_create",
-         (gpointer *) &rados_ioctx_create},
-        {"rados_ioctx_destroy",
-         (gpointer *) &rados_ioctx_destroy},
-        {"rbd_create",
-         (gpointer *) &rbd_create},
-        {"rbd_open",
-         (gpointer *) &rbd_open},
-        {"rbd_close",
-         (gpointer *) &rbd_close},
-        {"rbd_resize",
-         (gpointer *) &rbd_resize},
-        {"rbd_stat",
-         (gpointer *) &rbd_stat},
-        {"rbd_snap_list",
-         (gpointer *) &rbd_snap_list},
-        {"rbd_snap_list_end",
-         (gpointer *) &rbd_snap_list_end},
-        {"rbd_snap_create",
-         (gpointer *) &rbd_snap_create},
-        {"rbd_snap_remove",
-         (gpointer *) &rbd_snap_remove},
-        {"rbd_snap_rollback",
-         (gpointer *) &rbd_snap_rollback},
-        {"rbd_aio_write",
-         (gpointer *) &rbd_aio_write},
-        {"rbd_aio_read",
-         (gpointer *) &rbd_aio_read},
-        {"rbd_aio_create_completion",
-         (gpointer *) &rbd_aio_create_completion},
-        {"rbd_aio_get_return_value",
-         (gpointer *) &rbd_aio_get_return_value},
-        {"rbd_aio_release",
-         (gpointer *) &rbd_aio_release},
-        {NULL}
-    };
-
-    if (qemu_rbd_set_functions(librbd_handle, symbols) < 0) {
-        return -1;
-    }
-
-    return 0;
-}
-
-/*
- * Detect whether the installed version of librbd
- * supports newer functionality, and enable or disable
- * it appropriately in bdrv_rbd.
- */
-static void qemu_rbd_set_optional_functions(void)
-{
-    if (g_module_symbol(librbd_handle, "rbd_flush",
-                         (gpointer *) &rbd_flush)) {
-        bdrv_rbd.bdrv_aio_flush = NULL;
-        bdrv_rbd.bdrv_co_flush_to_disk = qemu_rbd_co_flush;
-    } else {
-        rbd_flush = NULL;
-        bdrv_rbd.bdrv_co_flush_to_disk = NULL;
-    }
-
-    if (g_module_symbol(librbd_handle, "rbd_aio_flush",
-                        (gpointer *) &rbd_aio_flush)) {
-        bdrv_rbd.bdrv_co_flush_to_disk = NULL;
-        bdrv_rbd.bdrv_aio_flush = qemu_rbd_aio_flush;
-    } else {
-        rbd_aio_flush = NULL;
-        bdrv_rbd.bdrv_aio_flush = NULL;
-    }
-
-    if (g_module_symbol(librbd_handle, "rbd_aio_discard",
-                        (gpointer *) &rbd_aio_discard)) {
-        bdrv_rbd.bdrv_aio_discard = qemu_rbd_aio_discard;
-    } else {
-        rbd_aio_discard = NULL;
-        bdrv_rbd.bdrv_aio_discard = NULL;
-    }
-}
-
-static int qemu_rbd_load_libs(void)
-{
-    if (librbd_loaded) {
-        return 0;
-    }
-
-    if (!g_module_supported()) {
-        error_report("modules are not supported on this platform: %s",
-                     g_module_error());
-        return -1;
-    }
-
-    librbd_handle = g_module_open("librbd.so.1", 0);
-    if (!librbd_handle) {
-        error_report("error loading librbd: %s", g_module_error());
-        return -1;
-    }
-
-    /*
-     * Due to c++ templates used in librbd/librados and their
-     * dependencies, and linker duplicate trimming rules, closing
-     * librbd would leave it mapped. Make this explicit.
-     */
-    g_module_make_resident(librbd_handle);
-
-    if (qemu_rbd_set_mandatory_functions() < 0) {
-        return -1;
-    }
-    qemu_rbd_set_optional_functions();
-    librbd_loaded = true;
-
-    return 0;
-}
-
 block_init(bdrv_rbd_init);
diff --git a/block/rbd_types.h b/block/rbd_types.h
deleted file mode 100644
index f327cb4..0000000
--- a/block/rbd_types.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Types and signatures for librados and librbd
- *
- * Copyright (C) 2013 Inktank Storage Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef QEMU_BLOCK_RBD_TYPES_H
-#define QEMU_BLOCK_RBD_TYPES_H
-
-/* types from librados used by the rbd block driver */
-
-typedef void *rados_t;
-typedef void *rados_ioctx_t;
-
-static int   (*rados_create)(rados_t *cluster, const char * const id);
-static int   (*rados_connect)(rados_t cluster);
-static void  (*rados_shutdown)(rados_t cluster);
-static int   (*rados_conf_read_file)(rados_t cluster, const char *path);
-static int   (*rados_conf_set)(rados_t cluster, const char *option,
-                               const char *value);
-static int   (*rados_ioctx_create)(rados_t cluster, const char *pool_name,
-                                   rados_ioctx_t *ioctx);
-static void  (*rados_ioctx_destroy)(rados_ioctx_t io);
-
-/* types from librbd used by the rbd block driver*/
-
-typedef void *rbd_image_t;
-typedef void *rbd_completion_t;
-typedef void (*rbd_callback_t)(rbd_completion_t cb, void *arg);
-
-typedef struct {
-    uint64_t id;
-    uint64_t size;
-    const char *name;
-} rbd_snap_info_t;
-
-#define RBD_MAX_IMAGE_NAME_SIZE 96
-#define RBD_MAX_BLOCK_NAME_SIZE 24
-
-typedef struct {
-    uint64_t size;
-    uint64_t obj_size;
-    uint64_t num_objs;
-    int order;
-    char block_name_prefix[RBD_MAX_BLOCK_NAME_SIZE];
-    int64_t parent_pool;
-    char parent_name[RBD_MAX_IMAGE_NAME_SIZE];
-} rbd_image_info_t;
-
-static int      (*rbd_create)(rados_ioctx_t io, const char *name, uint64_t size,
-                              int *order);
-static int      (*rbd_open)(rados_ioctx_t io, const char *name, rbd_image_t *image,
-                            const char *snap_name);
-static int      (*rbd_close)(rbd_image_t image);
-static int      (*rbd_resize)(rbd_image_t image, uint64_t size);
-static int      (*rbd_stat)(rbd_image_t image, rbd_image_info_t *info,
-                            size_t infosize);
-static int      (*rbd_snap_list)(rbd_image_t image, rbd_snap_info_t *snaps,
-                                 int *max_snaps);
-static void     (*rbd_snap_list_end)(rbd_snap_info_t *snaps);
-static int      (*rbd_snap_create)(rbd_image_t image, const char *snapname);
-static int      (*rbd_snap_remove)(rbd_image_t image, const char *snapname);
-static int      (*rbd_snap_rollback)(rbd_image_t image, const char *snapname);
-static int      (*rbd_aio_write)(rbd_image_t image, uint64_t off, size_t len,
-                                 const char *buf, rbd_completion_t c);
-static int      (*rbd_aio_read)(rbd_image_t image, uint64_t off, size_t len,
-                                char *buf, rbd_completion_t c);
-static int      (*rbd_aio_discard)(rbd_image_t image, uint64_t off, uint64_t len,
-                                   rbd_completion_t c);
-static int      (*rbd_aio_create_completion)(void *cb_arg,
-                                             rbd_callback_t complete_cb,
-                                             rbd_completion_t *c);
-static ssize_t  (*rbd_aio_get_return_value)(rbd_completion_t c);
-static void     (*rbd_aio_release)(rbd_completion_t c);
-static int      (*rbd_flush)(rbd_image_t image);
-static int      (*rbd_aio_flush)(rbd_image_t image, rbd_completion_t c);
-
-#endif
diff --git a/configure b/configure
index 8db9dbe..1583359 100755
--- a/configure
+++ b/configure
@@ -227,6 +227,7 @@ qom_cast_debug="yes"
 trace_backend="nop"
 trace_file="trace"
 spice=""
+rbd=""
 smartcard_nss=""
 libusb=""
 usb_redir=""
@@ -892,6 +893,10 @@ for opt do
   ;;
   --enable-glx) glx="yes"
   ;;
+  --disable-rbd) rbd="no"
+  ;;
+  --enable-rbd) rbd="yes"
+  ;;
   --disable-xfsctl) xfs="no"
   ;;
   --enable-xfsctl) xfs="yes"
@@ -1213,6 +1218,7 @@ echo "  --with-trace-file=NAME   Full PATH,NAME of file to store traces"
 echo "                           Default:trace-<pid>"
 echo "  --disable-spice          disable spice"
 echo "  --enable-spice           enable spice"
+echo "  --enable-rbd             enable building the rados block device (rbd)"
 echo "  --disable-libiscsi       disable iscsi support"
 echo "  --enable-libiscsi        enable iscsi support"
 echo "  --disable-smartcard-nss  disable smartcard nss support"
@@ -2372,10 +2378,10 @@ if test "$mingw32" = yes; then
 else
     glib_req_ver=2.12
 fi
-if $pkg_config --atleast-version=$glib_req_ver gthread-2.0 gmodule-2.0 > /dev/null 2>&1
+if $pkg_config --atleast-version=$glib_req_ver gthread-2.0 > /dev/null 2>&1
 then
-    glib_cflags=`$pkg_config --cflags gthread-2.0 gmodule-2.0 2>/dev/null`
-    glib_libs=`$pkg_config --libs gthread-2.0 gmodule-2.0 2>/dev/null`
+    glib_cflags=`$pkg_config --cflags gthread-2.0 2>/dev/null`
+    glib_libs=`$pkg_config --libs gthread-2.0 2>/dev/null`
     CFLAGS="$glib_cflags $CFLAGS"
     LIBS="$glib_libs $LIBS"
     libs_qga="$glib_libs $libs_qga"
@@ -2477,6 +2483,31 @@ if test "$mingw32" != yes -a "$pthread" = no; then
 fi
 ##########################################
+# rbd probe
+if test "$rbd" != "no" ; then
+  cat > $TMPC <<EOF
+#include <stdio.h>
+#include <rbd/librbd.h>
+int main(void) {
+    rados_t cluster;
+    rados_create(&cluster, NULL);
+    return 0;
+}
+EOF
+  rbd_libs="-lrbd -lrados"
+  if compile_prog "" "$rbd_libs" ; then
+    rbd=yes
+    libs_tools="$rbd_libs $libs_tools"
+    libs_softmmu="$rbd_libs $libs_softmmu"
+  else
+    if test "$rbd" = "yes" ; then
+      feature_not_found "rados block device"
+    fi
+    rbd=no
+  fi
+fi
+
+##########################################
 # libssh2 probe
 min_libssh2_version=1.2.8
 if test "$libssh2" != "no" ; then
@@ -3665,6 +3696,7 @@ echo "vhost-scsi support $vhost_scsi"
 echo "Trace backend     $trace_backend"
 echo "Trace output file $trace_file-<pid>"
 echo "spice support     $spice ($spice_protocol_version/$spice_server_version)"
+echo "rbd support       $rbd"
 echo "xfsctl support    $xfs"
 echo "nss used          $smartcard_nss"
 echo "libusb            $libusb"
@@ -4035,6 +4067,9 @@ fi
 if test "$qom_cast_debug" = "yes" ; then
   echo "CONFIG_QOM_CAST_DEBUG=y" >> $config_host_mak
 fi
+if test "$rbd" = "yes" ; then
+  echo "CONFIG_RBD=y" >> $config_host_mak
+fi
 echo "CONFIG_COROUTINE_BACKEND=$coroutine" >> $config_host_mak
--
1.8.3.1
SOURCES/kvm-Use-qemu-kvm-in-documentation-instead-of-qemu-system.patch
New file
@@ -0,0 +1,809 @@
From 7266fe6b09986cfa24d704075d940022cabdc8f5 Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Fri, 14 Nov 2014 08:28:01 +0100
Subject: [PATCH 32/41] ] Use qemu-kvm in documentation instead of
 qemu-system-i386
Message-id: <1415953681-20015-1-git-send-email-mrezanin@redhat.com>
Patchwork-id: 62376
O-Subject: [RHEL-7.1 qemu-kvm PATCHv4]] Use qemu-kvm in documentation instead of qemu-system-i386
Bugzilla: 1140618
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
From: Miroslav Rezanina <mrezanin@redhat.com>
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1140618
Brew: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=8244530
We change the name and location of qemu-kvm binaries. Update documentation
to reflect this change.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
v4:
 - Replace qemu with qemu-kvm
v3:
 - Use qemu-kvm instead of /usr/libexec/qemu-kvm
 - Replace qemu-system-x86_64 too
v2:
 - do not replace qemu-system-i386.exe
---
 qemu-doc.texi   |  98 ++++++++++++++++++++++-----------------------
 qemu-options.hx | 120 ++++++++++++++++++++++++++++----------------------------
 2 files changed, 109 insertions(+), 109 deletions(-)
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 qemu-doc.texi   |  98 ++++++++++++++++++++++-----------------------
 qemu-options.hx | 120 ++++++++++++++++++++++++++++----------------------------
 2 files changed, 109 insertions(+), 109 deletions(-)
diff --git a/qemu-doc.texi b/qemu-doc.texi
index 0f7e5f8..ff124fe 100644
--- a/qemu-doc.texi
+++ b/qemu-doc.texi
@@ -226,12 +226,12 @@ Note that, by default, GUS shares IRQ(7) with parallel ports and so
 QEMU must be told to not have parallel ports to have working GUS.
 @example
-qemu-system-i386 dos.img -soundhw gus -parallel none
+qemu-kvm dos.img -soundhw gus -parallel none
 @end example
 Alternatively:
 @example
-qemu-system-i386 dos.img -device gus,irq=5
+qemu-kvm dos.img -device gus,irq=5
 @end example
 Or some other unclaimed IRQ.
@@ -247,7 +247,7 @@ CS4231A is the chip used in Windows Sound System and GUSMAX products
 Download and uncompress the linux image (@file{linux.img}) and type:
 @example
-qemu-system-i386 linux.img
+qemu-kvm linux.img
 @end example
 Linux should boot and give you a prompt.
@@ -257,7 +257,7 @@ Linux should boot and give you a prompt.
 @example
 @c man begin SYNOPSIS
-usage: qemu-system-i386 [options] [@var{disk_image}]
+usage: qemu-kvm [options] [@var{disk_image}]
 @c man end
 @end example
@@ -766,7 +766,7 @@ QEMU can automatically create a virtual FAT disk image from a
 directory tree. In order to use it, just type:
 @example
-qemu-system-i386 linux.img -hdb fat:/my_directory
+qemu-kvm linux.img -hdb fat:/my_directory
 @end example
 Then you access access to all the files in the @file{/my_directory}
@@ -776,14 +776,14 @@ them via SAMBA or NFS. The default access is @emph{read-only}.
 Floppies can be emulated with the @code{:floppy:} option:
 @example
-qemu-system-i386 linux.img -fda fat:floppy:/my_directory
+qemu-kvm linux.img -fda fat:floppy:/my_directory
 @end example
 A read/write support is available for testing (beta stage) with the
 @code{:rw:} option:
 @example
-qemu-system-i386 linux.img -fda fat:floppy:rw:/my_directory
+qemu-kvm linux.img -fda fat:floppy:rw:/my_directory
 @end example
 What you should @emph{never} do:
@@ -801,14 +801,14 @@ QEMU can access directly to block device exported using the Network Block Device
 protocol.
 @example
-qemu-system-i386 linux.img -hdb nbd://my_nbd_server.mydomain.org:1024/
+qemu-kvm linux.img -hdb nbd://my_nbd_server.mydomain.org:1024/
 @end example
 If the NBD server is located on the same host, you can use an unix socket instead
 of an inet socket:
 @example
-qemu-system-i386 linux.img -hdb nbd+unix://?socket=/tmp/my_socket
+qemu-kvm linux.img -hdb nbd+unix://?socket=/tmp/my_socket
 @end example
 In this case, the block device must be exported using qemu-nbd:
@@ -825,23 +825,23 @@ qemu-nbd --socket=/tmp/my_socket --share=2 my_disk.qcow2
 @noindent
 and then you can use it with two guests:
 @example
-qemu-system-i386 linux1.img -hdb nbd+unix://?socket=/tmp/my_socket
-qemu-system-i386 linux2.img -hdb nbd+unix://?socket=/tmp/my_socket
+qemu-kvm linux1.img -hdb nbd+unix://?socket=/tmp/my_socket
+qemu-kvm linux2.img -hdb nbd+unix://?socket=/tmp/my_socket
 @end example
 If the nbd-server uses named exports (supported since NBD 2.9.18, or with QEMU's
 own embedded NBD server), you must specify an export name in the URI:
 @example
-qemu-system-i386 -cdrom nbd://localhost/debian-500-ppc-netinst
-qemu-system-i386 -cdrom nbd://localhost/openSUSE-11.1-ppc-netinst
+qemu-kvm -cdrom nbd://localhost/debian-500-ppc-netinst
+qemu-kvm -cdrom nbd://localhost/openSUSE-11.1-ppc-netinst
 @end example
 The URI syntax for NBD is supported since QEMU 1.3.  An alternative syntax is
 also available.  Here are some example of the older syntax:
 @example
-qemu-system-i386 linux.img -hdb nbd:my_nbd_server.mydomain.org:1024
-qemu-system-i386 linux2.img -hdb nbd:unix:/tmp/my_socket
-qemu-system-i386 -cdrom nbd:localhost:10809:exportname=debian-500-ppc-netinst
+qemu-kvm linux.img -hdb nbd:my_nbd_server.mydomain.org:1024
+qemu-kvm linux2.img -hdb nbd:unix:/tmp/my_socket
+qemu-kvm -cdrom nbd:localhost:10809:exportname=debian-500-ppc-netinst
 @end example
 @node disk_images_sheepdog
@@ -866,7 +866,7 @@ qemu-img convert @var{filename} sheepdog:///@var{image}
 You can boot from the Sheepdog disk image with the command:
 @example
-qemu-system-i386 sheepdog:///@var{image}
+qemu-kvm sheepdog:///@var{image}
 @end example
 You can also create a snapshot of the Sheepdog image like qcow2.
@@ -878,7 +878,7 @@ where @var{tag} is a tag name of the newly created snapshot.
 To boot from the Sheepdog snapshot, specify the tag name of the
 snapshot.
 @example
-qemu-system-i386 sheepdog:///@var{image}#@var{tag}
+qemu-kvm sheepdog:///@var{image}#@var{tag}
 @end example
 You can create a cloned image from the existing snapshot.
@@ -891,14 +891,14 @@ is its tag name.
 You can use an unix socket instead of an inet socket:
 @example
-qemu-system-i386 sheepdog+unix:///@var{image}?socket=@var{path}
+qemu-kvm sheepdog+unix:///@var{image}?socket=@var{path}
 @end example
 If the Sheepdog daemon doesn't run on the local host, you need to
 specify one of the Sheepdog servers to connect to.
 @example
 qemu-img create sheepdog://@var{hostname}:@var{port}/@var{image} @var{size}
-qemu-system-i386 sheepdog://@var{hostname}:@var{port}/@var{image}
+qemu-kvm sheepdog://@var{hostname}:@var{port}/@var{image}
 @end example
 @node disk_images_iscsi
@@ -940,7 +940,7 @@ Various session related parameters can be set via special options, either
 in a configuration file provided via '-readconfig' or directly on the
 command line.
-If the initiator-name is not specified qemu will use a default name
+If the initiator-name is not specified qemu-kvm will use a default name
 of 'iqn.2008-11.org.linux-kvm[:<name>'] where <name> is the name of the
 virtual machine.
@@ -987,7 +987,7 @@ cat >iscsi.conf <<EOF
   header-digest = "CRC32C"
 EOF
-qemu-system-i386 -drive file=iscsi://127.0.0.1/iqn.qemu.test/1 \
+qemu-kvm -drive file=iscsi://127.0.0.1/iqn.qemu.test/1 \
     -readconfig iscsi.conf
 @end example
@@ -1006,7 +1006,7 @@ tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 2 \
     -b /IMAGES/cd.iso --device-type=cd
 tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL
-qemu-system-i386 -iscsi initiator-name=iqn.qemu.test:my-initiator \
+qemu-kvm -iscsi initiator-name=iqn.qemu.test:my-initiator \
     -boot d -drive file=iscsi://127.0.0.1/iqn.qemu.test/1 \
     -cdrom iscsi://127.0.0.1/iqn.qemu.test/2
 @end example
@@ -1018,7 +1018,7 @@ GlusterFS is an user space distributed file system.
 You can boot from the GlusterFS disk image with the command:
 @example
-qemu-system-x86_64 -drive file=gluster[+@var{transport}]://[@var{server}[:@var{port}]]/@var{volname}/@var{image}[?socket=...]
+qemu-kvm -drive file=gluster[+@var{transport}]://[@var{server}[:@var{port}]]/@var{volname}/@var{image}[?socket=...]
 @end example
 @var{gluster} is the protocol.
@@ -1051,14 +1051,14 @@ qemu-img create gluster://@var{server}/@var{volname}/@var{image} @var{size}
 Examples
 @example
-qemu-system-x86_64 -drive file=gluster://1.2.3.4/testvol/a.img
-qemu-system-x86_64 -drive file=gluster+tcp://1.2.3.4/testvol/a.img
-qemu-system-x86_64 -drive file=gluster+tcp://1.2.3.4:24007/testvol/dir/a.img
-qemu-system-x86_64 -drive file=gluster+tcp://[1:2:3:4:5:6:7:8]/testvol/dir/a.img
-qemu-system-x86_64 -drive file=gluster+tcp://[1:2:3:4:5:6:7:8]:24007/testvol/dir/a.img
-qemu-system-x86_64 -drive file=gluster+tcp://server.domain.com:24007/testvol/dir/a.img
-qemu-system-x86_64 -drive file=gluster+unix:///testvol/dir/a.img?socket=/tmp/glusterd.socket
-qemu-system-x86_64 -drive file=gluster+rdma://1.2.3.4:24007/testvol/a.img
+qemu-kvm -drive file=gluster://1.2.3.4/testvol/a.img
+qemu-kvm -drive file=gluster+tcp://1.2.3.4/testvol/a.img
+qemu-kvm -drive file=gluster+tcp://1.2.3.4:24007/testvol/dir/a.img
+qemu-kvm -drive file=gluster+tcp://[1:2:3:4:5:6:7:8]/testvol/dir/a.img
+qemu-kvm -drive file=gluster+tcp://[1:2:3:4:5:6:7:8]:24007/testvol/dir/a.img
+qemu-kvm -drive file=gluster+tcp://server.domain.com:24007/testvol/dir/a.img
+qemu-kvm -drive file=gluster+unix:///testvol/dir/a.img?socket=/tmp/glusterd.socket
+qemu-kvm -drive file=gluster+rdma://1.2.3.4:24007/testvol/a.img
 @end example
 @node disk_images_ssh
@@ -1068,13 +1068,13 @@ You can access disk images located on a remote ssh server
 by using the ssh protocol:
 @example
-qemu-system-x86_64 -drive file=ssh://[@var{user}@@]@var{server}[:@var{port}]/@var{path}[?host_key_check=@var{host_key_check}]
+qemu-kvm -drive file=ssh://[@var{user}@@]@var{server}[:@var{port}]/@var{path}[?host_key_check=@var{host_key_check}]
 @end example
 Alternative syntax using properties:
 @example
-qemu-system-x86_64 -drive file.driver=ssh[,file.user=@var{user}],file.host=@var{server}[,file.port=@var{port}],file.path=@var{path}[,file.host_key_check=@var{host_key_check}]
+qemu-kvm -drive file.driver=ssh[,file.user=@var{user}],file.host=@var{server}[,file.port=@var{port}],file.path=@var{path}[,file.host_key_check=@var{host_key_check}]
 @end example
 @var{ssh} is the protocol.
@@ -1211,7 +1211,7 @@ zero-copy communication to the application level of the guests.  The basic
 syntax is:
 @example
-qemu-system-i386 -device ivshmem,size=<size in format accepted by -m>[,shm=<shm name>]
+qemu-kvm -device ivshmem,size=<size in format accepted by -m>[,shm=<shm name>]
 @end example
 If desired, interrupts can be sent between guest VMs accessing the same shared
@@ -1221,9 +1221,9 @@ is qemu.git/contrib/ivshmem-server.  An example syntax when using the shared
 memory server is:
 @example
-qemu-system-i386 -device ivshmem,size=<size in format accepted by -m>[,chardev=<id>]
+qemu-kvm -device ivshmem,size=<size in format accepted by -m>[,chardev=<id>]
                  [,msi=on][,ioeventfd=on][,vectors=n][,role=peer|master]
-qemu-system-i386 -chardev socket,path=<path>,id=<id>
+qemu-kvm -chardev socket,path=<path>,id=<id>
 @end example
 When using the server, the guest will be assigned a VM ID (>=0) that allows guests
@@ -1253,7 +1253,7 @@ kernel testing.
 The syntax is:
 @example
-qemu-system-i386 -kernel arch/i386/boot/bzImage -hda root-2.4.20.img -append "root=/dev/hda"
+qemu-kvm -kernel arch/i386/boot/bzImage -hda root-2.4.20.img -append "root=/dev/hda"
 @end example
 Use @option{-kernel} to provide the Linux kernel image and
@@ -1268,7 +1268,7 @@ If you do not need graphical output, you can disable it and redirect
 the virtual serial port and the QEMU monitor to the console with the
 @option{-nographic} option. The typical command line is:
 @example
-qemu-system-i386 -kernel arch/i386/boot/bzImage -hda root-2.4.20.img \
+qemu-kvm -kernel arch/i386/boot/bzImage -hda root-2.4.20.img \
                  -append "root=/dev/hda console=ttyS0" -nographic
 @end example
@@ -1332,7 +1332,7 @@ Network adapter that supports CDC ethernet and RNDIS protocols.  @var{options}
 specifies NIC options as with @code{-net nic,}@var{options} (see description).
 For instance, user-mode networking can be used with
 @example
-qemu-system-i386 [...OPTIONS...] -net user,vlan=0 -usbdevice net:vlan=0
+qemu-kvm [...OPTIONS...] -net user,vlan=0 -usbdevice net:vlan=0
 @end example
 Currently this cannot be used in machines that support PCI NICs.
 @item bt[:@var{hci-type}]
@@ -1342,7 +1342,7 @@ no type is given, the HCI logic corresponds to @code{-bt hci,vlan=0}.
 This USB device implements the USB Transport Layer of HCI.  Example
 usage:
 @example
-qemu-system-i386 [...OPTIONS...] -usbdevice bt:hci,vlan=3 -bt device:keyboard,vlan=3
+qemu-kvm [...OPTIONS...] -usbdevice bt:hci,vlan=3 -bt device:keyboard,vlan=3
 @end example
 @end table
@@ -1420,7 +1420,7 @@ For this setup it is recommended to restrict it to listen on a UNIX domain
 socket only. For example
 @example
-qemu-system-i386 [...OPTIONS...] -vnc unix:/home/joebloggs/.qemu-myvm-vnc
+qemu-kvm [...OPTIONS...] -vnc unix:/home/joebloggs/.qemu-myvm-vnc
 @end example
 This ensures that only users on local box with read/write access to that
@@ -1443,7 +1443,7 @@ is running the password is set with the monitor. Until the monitor is used to
 set the password all clients will be rejected.
 @example
-qemu-system-i386 [...OPTIONS...] -vnc :1,password -monitor stdio
+qemu-kvm [...OPTIONS...] -vnc :1,password -monitor stdio
 (qemu) change vnc password
 Password: ********
 (qemu)
@@ -1460,7 +1460,7 @@ support provides a secure session, but no authentication. This allows any
 client to connect, and provides an encrypted session.
 @example
-qemu-system-i386 [...OPTIONS...] -vnc :1,tls,x509=/etc/pki/qemu -monitor stdio
+qemu-kvm [...OPTIONS...] -vnc :1,tls,x509=/etc/pki/qemu -monitor stdio
 @end example
 In the above example @code{/etc/pki/qemu} should contain at least three files,
@@ -1478,7 +1478,7 @@ then validate against the CA certificate. This is a good choice if deploying
 in an environment with a private internal certificate authority.
 @example
-qemu-system-i386 [...OPTIONS...] -vnc :1,tls,x509verify=/etc/pki/qemu -monitor stdio
+qemu-kvm [...OPTIONS...] -vnc :1,tls,x509verify=/etc/pki/qemu -monitor stdio
 @end example
@@ -1489,7 +1489,7 @@ Finally, the previous method can be combined with VNC password authentication
 to provide two layers of authentication for clients.
 @example
-qemu-system-i386 [...OPTIONS...] -vnc :1,password,tls,x509verify=/etc/pki/qemu -monitor stdio
+qemu-kvm [...OPTIONS...] -vnc :1,password,tls,x509verify=/etc/pki/qemu -monitor stdio
 (qemu) change vnc password
 Password: ********
 (qemu)
@@ -1512,7 +1512,7 @@ used for authentication, but assuming use of one supporting SSF,
 then QEMU can be launched with:
 @example
-qemu-system-i386 [...OPTIONS...] -vnc :1,sasl -monitor stdio
+qemu-kvm [...OPTIONS...] -vnc :1,sasl -monitor stdio
 @end example
 @node vnc_sec_certificate_sasl
@@ -1526,7 +1526,7 @@ credentials. This can be enabled, by combining the 'sasl' option
 with the aforementioned TLS + x509 options:
 @example
-qemu-system-i386 [...OPTIONS...] -vnc :1,tls,x509,sasl -monitor stdio
+qemu-kvm [...OPTIONS...] -vnc :1,tls,x509,sasl -monitor stdio
 @end example
@@ -1694,7 +1694,7 @@ QEMU has a primitive support to work with gdb, so that you can do
 In order to use gdb, launch QEMU with the '-s' option. It will wait for a
 gdb connection:
 @example
-qemu-system-i386 -s -kernel arch/i386/boot/bzImage -hda root-2.4.20.img \
+qemu-kvm -s -kernel arch/i386/boot/bzImage -hda root-2.4.20.img \
                     -append "root=/dev/hda"
 Connected to host network interface: tun0
 Waiting gdb connection on port 1234
diff --git a/qemu-options.hx b/qemu-options.hx
index 5d0f2cd..62c3e06 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -124,7 +124,7 @@ This option defines a free-form string that can be used to describe @var{fd}.
 You can open an image using pre-opened file descriptors from an fd set:
 @example
-qemu-system-i386
+qemu-kvm
 -add-fd fd=3,set=2,opaque="rdwr:/path/to/file"
 -add-fd fd=4,set=2,opaque="rdonly:/path/to/file"
 -drive file=/dev/fdset/2,index=0,media=disk
@@ -151,7 +151,7 @@ STEXI
 Set default value of @var{driver}'s property @var{prop} to @var{value}, e.g.:
 @example
-qemu-system-i386 -global ide-drive.physical_block_size=4096 -drive file=file,if=ide,index=0,media=disk
+qemu-kvm -global ide-drive.physical_block_size=4096 -drive file=file,if=ide,index=0,media=disk
 @end example
 In particular, you can use this to set driver properties for devices which are
@@ -189,7 +189,7 @@ the recommended is 320x240, 640x480, 800x640.
 A timeout could be passed to bios, guest will pause for @var{rb_timeout} ms
 when boot failed, then reboot. If @var{rb_timeout} is '-1', guest will not
-reboot, qemu passes '-1' to bios by default. Currently Seabios for X86
+reboot, qemu-kvm passes '-1' to bios by default. Currently Seabios for X86
 system support it.
 Do strict boot via @option{strict=on} as far as firmware/BIOS
@@ -198,11 +198,11 @@ bootindex options. The default is non-strict boot.
 @example
 # try to boot from network first, then from hard disk
-qemu-system-i386 -boot order=nc
+qemu-kvm -boot order=nc
 # boot from CD-ROM first, switch back to default order after reboot
-qemu-system-i386 -boot once=d
+qemu-kvm -boot once=d
 # boot with a splash picture for 5 seconds.
-qemu-system-i386 -boot menu=on,splash=/root/boot.bmp,splash-time=5000
+qemu-kvm -boot menu=on,splash=/root/boot.bmp,splash-time=5000
 @end example
 Note: The legacy format '-boot @var{drives}' is still supported but its
@@ -282,12 +282,12 @@ Enable audio and selected sound hardware. Use 'help' to print all
 available sound hardware.
 @example
-qemu-system-i386 -soundhw sb16,adlib disk.img
-qemu-system-i386 -soundhw es1370 disk.img
-qemu-system-i386 -soundhw ac97 disk.img
-qemu-system-i386 -soundhw hda disk.img
-qemu-system-i386 -soundhw all disk.img
-qemu-system-i386 -soundhw help
+qemu-kvm -soundhw sb16,adlib disk.img
+qemu-kvm -soundhw es1370 disk.img
+qemu-kvm -soundhw ac97 disk.img
+qemu-kvm -soundhw hda disk.img
+qemu-kvm -soundhw all disk.img
+qemu-kvm -soundhw help
 @end example
 Note that Linux's i810_audio OSS kernel (for AC97) module might
@@ -500,21 +500,21 @@ is off.
 Instead of @option{-cdrom} you can use:
 @example
-qemu-system-i386 -drive file=file,index=2,media=cdrom
+qemu-kvm -drive file=file,index=2,media=cdrom
 @end example
 Instead of @option{-hda}, @option{-hdb}, @option{-hdc}, @option{-hdd}, you can
 use:
 @example
-qemu-system-i386 -drive file=file,index=0,media=disk
-qemu-system-i386 -drive file=file,index=1,media=disk
-qemu-system-i386 -drive file=file,index=2,media=disk
-qemu-system-i386 -drive file=file,index=3,media=disk
+qemu-kvm -drive file=file,index=0,media=disk
+qemu-kvm -drive file=file,index=1,media=disk
+qemu-kvm -drive file=file,index=2,media=disk
+qemu-kvm -drive file=file,index=3,media=disk
 @end example
 You can open an image using pre-opened file descriptors from an fd set:
 @example
-qemu-system-i386
+qemu-kvm
 -add-fd fd=3,set=2,opaque="rdwr:/path/to/file"
 -add-fd fd=4,set=2,opaque="rdonly:/path/to/file"
 -drive file=/dev/fdset/2,index=0,media=disk
@@ -522,33 +522,33 @@ qemu-system-i386
 You can connect a CDROM to the slave of ide0:
 @example
-qemu-system-i386 -drive file=file,if=ide,index=1,media=cdrom
+qemu-kvm -drive file=file,if=ide,index=1,media=cdrom
 @end example
 If you don't specify the "file=" argument, you define an empty drive:
 @example
-qemu-system-i386 -drive if=ide,index=1,media=cdrom
+qemu-kvm -drive if=ide,index=1,media=cdrom
 @end example
 You can connect a SCSI disk with unit ID 6 on the bus #0:
 @example
-qemu-system-i386 -drive file=file,if=scsi,bus=0,unit=6
+qemu-kvm -drive file=file,if=scsi,bus=0,unit=6
 @end example
 Instead of @option{-fda}, @option{-fdb}, you can use:
 @example
-qemu-system-i386 -drive file=file,index=0,if=floppy
-qemu-system-i386 -drive file=file,index=1,if=floppy
+qemu-kvm -drive file=file,index=0,if=floppy
+qemu-kvm -drive file=file,index=1,if=floppy
 @end example
 By default, @var{interface} is "ide" and @var{index} is automatically
 incremented:
 @example
-qemu-system-i386 -drive file=a -drive file=b"
+qemu-kvm -drive file=a -drive file=b"
 @end example
 is interpreted like:
 @example
-qemu-system-i386 -hda a -hdb b
+qemu-kvm -hda a -hdb b
 @end example
 ETEXI
@@ -1477,7 +1477,7 @@ can not be resolved.
 Example:
 @example
-qemu -net user,dnssearch=mgmt.example.org,dnssearch=example.org [...]
+qemu-kvm -net user,dnssearch=mgmt.example.org,dnssearch=example.org [...]
 @end example
 @item tftp=@var{dir}
@@ -1493,7 +1493,7 @@ a guest from a local directory.
 Example (using pxelinux):
 @example
-qemu-system-i386 -hda linux.img -boot n -net user,tftp=/path/to/tftp/files,bootfile=/pxelinux.0
+qemu-kvm -hda linux.img -boot n -net user,tftp=/path/to/tftp/files,bootfile=/pxelinux.0
 @end example
 @item smb=@var{dir}[,smbserver=@var{addr}]
@@ -1528,7 +1528,7 @@ screen 0, use the following:
 @example
 # on the host
-qemu-system-i386 -net user,hostfwd=tcp:127.0.0.1:6001-:6000 [...]
+qemu-kvm -net user,hostfwd=tcp:127.0.0.1:6001-:6000 [...]
 # this host xterm should open in the guest X11 server
 xterm -display :1
 @end example
@@ -1538,7 +1538,7 @@ the guest, use the following:
 @example
 # on the host
-qemu-system-i386 -net user,hostfwd=tcp::5555-:23 [...]
+qemu-kvm -net user,hostfwd=tcp::5555-:23 [...]
 telnet localhost 5555
 @end example
@@ -1557,7 +1557,7 @@ lifetime, like in the following example:
 @example
 # open 10.10.1.1:4321 on bootup, connect 10.0.2.100:1234 to it whenever
 # the guest accesses it
-qemu -net user,guestfwd=tcp:10.0.2.100:1234-tcp:10.10.1.1:4321 [...]
+qemu-kvm -net user,guestfwd=tcp:10.0.2.100:1234-tcp:10.10.1.1:4321 [...]
 @end example
 Or you can execute a command on every TCP connection established by the guest,
@@ -1566,7 +1566,7 @@ so that QEMU behaves similar to an inetd process for that virtual server:
 @example
 # call "netcat 10.10.1.1 4321" on every TCP connection to 10.0.2.100:1234
 # and connect the TCP stream to its stdin/stdout
-qemu -net 'user,guestfwd=tcp:10.0.2.100:1234-cmd:netcat 10.10.1.1 4321'
+qemu-kvm -net 'user,guestfwd=tcp:10.0.2.100:1234-cmd:netcat 10.10.1.1 4321'
 @end example
 @end table
@@ -1598,13 +1598,13 @@ Examples:
 @example
 #launch a QEMU instance with the default network script
-qemu-system-i386 linux.img -net nic -net tap
+qemu-kvm linux.img -net nic -net tap
 @end example
 @example
 #launch a QEMU instance with two NICs, each one connected
 #to a TAP device
-qemu-system-i386 linux.img \
+qemu-kvm linux.img \
                  -net nic,vlan=0 -net tap,vlan=0,ifname=tap0 \
                  -net nic,vlan=1 -net tap,vlan=1,ifname=tap1
 @end example
@@ -1612,7 +1612,7 @@ qemu-system-i386 linux.img \
 @example
 #launch a QEMU instance with the default network helper to
 #connect a TAP device to bridge br0
-qemu-system-i386 linux.img \
+qemu-kvm linux.img \
                  -net nic -net tap,"helper=/path/to/qemu-bridge-helper"
 @end example
@@ -1630,13 +1630,13 @@ Examples:
 @example
 #launch a QEMU instance with the default network helper to
 #connect a TAP device to bridge br0
-qemu-system-i386 linux.img -net bridge -net nic,model=virtio
+qemu-kvm linux.img -net bridge -net nic,model=virtio
 @end example
 @example
 #launch a QEMU instance with the default network helper to
 #connect a TAP device to bridge qemubr0
-qemu-system-i386 linux.img -net bridge,br=qemubr0 -net nic,model=virtio
+qemu-kvm linux.img -net bridge,br=qemubr0 -net nic,model=virtio
 @end example
 @item -netdev socket,id=@var{id}[,fd=@var{h}][,listen=[@var{host}]:@var{port}][,connect=@var{host}:@var{port}]
@@ -1652,12 +1652,12 @@ specifies an already opened TCP socket.
 Example:
 @example
 # launch a first QEMU instance
-qemu-system-i386 linux.img \
+qemu-kvm linux.img \
                  -net nic,macaddr=52:54:00:12:34:56 \
                  -net socket,listen=:1234
 # connect the VLAN 0 of this instance to the VLAN 0
 # of the first instance
-qemu-system-i386 linux.img \
+qemu-kvm linux.img \
                  -net nic,macaddr=52:54:00:12:34:57 \
                  -net socket,connect=127.0.0.1:1234
 @end example
@@ -1683,15 +1683,15 @@ Use @option{fd=h} to specify an already opened UDP multicast socket.
 Example:
 @example
 # launch one QEMU instance
-qemu-system-i386 linux.img \
+qemu-kvm linux.img \
                  -net nic,macaddr=52:54:00:12:34:56 \
                  -net socket,mcast=230.0.0.1:1234
 # launch another QEMU instance on same "bus"
-qemu-system-i386 linux.img \
+qemu-kvm linux.img \
                  -net nic,macaddr=52:54:00:12:34:57 \
                  -net socket,mcast=230.0.0.1:1234
 # launch yet another QEMU instance on same "bus"
-qemu-system-i386 linux.img \
+qemu-kvm linux.img \
                  -net nic,macaddr=52:54:00:12:34:58 \
                  -net socket,mcast=230.0.0.1:1234
 @end example
@@ -1700,7 +1700,7 @@ Example (User Mode Linux compat.):
 @example
 # launch QEMU instance (note mcast address selected
 # is UML's default)
-qemu-system-i386 linux.img \
+qemu-kvm linux.img \
                  -net nic,macaddr=52:54:00:12:34:56 \
                  -net socket,mcast=239.192.168.1:1102
 # launch UML
@@ -1709,7 +1709,7 @@ qemu-system-i386 linux.img \
 Example (send packets from host's 1.2.3.4):
 @example
-qemu-system-i386 linux.img \
+qemu-kvm linux.img \
                  -net nic,macaddr=52:54:00:12:34:56 \
                  -net socket,mcast=239.192.168.1:1102,localaddr=1.2.3.4
 @end example
@@ -1727,7 +1727,7 @@ Example:
 # launch vde switch
 vde_switch -F -sock /tmp/myswitch
 # launch QEMU instance
-qemu-system-i386 linux.img -net nic -net vde,sock=/tmp/myswitch
+qemu-kvm linux.img -net nic -net vde,sock=/tmp/myswitch
 @end example
 @item -netdev hubport,id=@var{id},hubid=@var{hubid}
@@ -2043,28 +2043,28 @@ images for the guest storage. Both disk and cdrom images are supported.
 Syntax for specifying iSCSI LUNs is
 ``iscsi://<target-ip>[:<port>]/<target-iqn>/<lun>''
-By default qemu will use the iSCSI initiator-name
+By default qemu-kvm will use the iSCSI initiator-name
 'iqn.2008-11.org.linux-kvm[:<name>]' but this can also be set from the command
 line or a configuration file.
 Example (without authentication):
 @example
-qemu-system-i386 -iscsi initiator-name=iqn.2001-04.com.example:my-initiator \
+qemu-kvm -iscsi initiator-name=iqn.2001-04.com.example:my-initiator \
                  -cdrom iscsi://192.0.2.1/iqn.2001-04.com.example/2 \
                  -drive file=iscsi://192.0.2.1/iqn.2001-04.com.example/1
 @end example
 Example (CHAP username/password via URL):
 @example
-qemu-system-i386 -drive file=iscsi://user%password@@192.0.2.1/iqn.2001-04.com.example/1
+qemu-kvm -drive file=iscsi://user%password@@192.0.2.1/iqn.2001-04.com.example/1
 @end example
 Example (CHAP username/password via environment variables):
 @example
 LIBISCSI_CHAP_USERNAME="user" \
 LIBISCSI_CHAP_PASSWORD="password" \
-qemu-system-i386 -drive file=iscsi://192.0.2.1/iqn.2001-04.com.example/1
+qemu-kvm -drive file=iscsi://192.0.2.1/iqn.2001-04.com.example/1
 @end example
 iSCSI support is an optional feature of QEMU and only available when
@@ -2093,12 +2093,12 @@ Syntax for specifying a NBD device using Unix Domain Sockets
 Example for TCP
 @example
-qemu-system-i386 --drive file=nbd:192.0.2.1:30000
+qemu-kvm --drive file=nbd:192.0.2.1:30000
 @end example
 Example for Unix Domain Sockets
 @example
-qemu-system-i386 --drive file=nbd:unix:/tmp/nbd-socket
+qemu-kvm --drive file=nbd:unix:/tmp/nbd-socket
 @end example
 @item SSH
@@ -2106,8 +2106,8 @@ QEMU supports SSH (Secure Shell) access to remote disks.
 Examples:
 @example
-qemu-system-i386 -drive file=ssh://user@@host/path/to/disk.img
-qemu-system-i386 -drive file.driver=ssh,file.user=user,file.host=host,file.port=22,file.path=/path/to/disk.img
+qemu-kvm -drive file=ssh://user@@host/path/to/disk.img
+qemu-kvm -drive file.driver=ssh,file.user=user,file.host=host,file.port=22,file.path=/path/to/disk.img
 @end example
 Currently authentication must be done using ssh-agent.  Other
@@ -2125,7 +2125,7 @@ sheepdog[+tcp|+unix]://[host:port]/vdiname[?socket=path][#snapid|#tag]
 Example
 @example
-qemu-system-i386 --drive file=sheepdog://192.0.2.1:30000/MyVirtualMachine
+qemu-kvm --drive file=sheepdog://192.0.2.1:30000/MyVirtualMachine
 @end example
 See also @url{http://http://www.osrg.net/sheepdog/}.
@@ -2143,7 +2143,7 @@ gluster[+transport]://[server[:port]]/volname/image[?socket=...]
 Example
 @example
-qemu-system-x86_64 --drive file=gluster://192.0.2.1/testvol/a.img
+qemu-kvm --drive file=gluster://192.0.2.1/testvol/a.img
 @end example
 See also @url{http://www.gluster.org}.
@@ -2209,7 +2209,7 @@ and communicate.  Requires the Linux @code{vhci} driver installed.  Can
 be used as following:
 @example
-qemu-system-i386 [...OPTIONS...] -bt hci,vlan=5 -bt vhci,vlan=5
+qemu-kvm [...OPTIONS...] -bt hci,vlan=5 -bt vhci,vlan=5
 @end example
 @item -bt device:@var{dev}[,vlan=@var{n}]
@@ -2255,7 +2255,7 @@ Options to each backend are described below.
 Use 'help' to print all available TPM backend types.
 @example
-qemu -tpmdev help
+qemu-kvm -tpmdev help
 @end example
 @item -tpmdev passthrough, id=@var{id}, path=@var{path}, cancel-path=@var{cancel-path}
@@ -2579,14 +2579,14 @@ ETEXI
 DEF("realtime", HAS_ARG, QEMU_OPTION_realtime,
     "-realtime [mlock=on|off]\n"
-    "                run qemu with realtime features\n"
+    "                run qemu-kvm with realtime features\n"
     "                mlock=on|off controls mlock support (default: on)\n",
     QEMU_ARCH_ALL)
 STEXI
 @item -realtime mlock=on|off
 @findex -realtime
-Run qemu with realtime features.
-mlocking qemu and guest memory can be enabled via @option{mlock=on}
+Run qemu-kvm with realtime features.
+mlocking qemu-kvm and guest memory can be enabled via @option{mlock=on}
 (enabled by default).
 ETEXI
@@ -2600,7 +2600,7 @@ connections will likely be TCP-based, but also UDP, pseudo TTY, or even
 stdio are reasonable use case. The latter is allowing to start QEMU from
 within gdb and establish the connection via a pipe:
 @example
-(gdb) target remote | exec qemu-system-i386 -gdb stdio ...
+(gdb) target remote | exec qemu-kvm -gdb stdio ...
 @end example
 ETEXI
--
1.8.3.1
SOURCES/kvm-XBZRLE-Fix-one-XBZRLE-corruption-issues.patch
@@ -1,13 +1,13 @@
From a00bde30c0730d3434d9f4556a9cb119f3f8d68d Mon Sep 17 00:00:00 2001
From c66cd34696f1f7f04b367a5f8b4d79802cddafb4 Mon Sep 17 00:00:00 2001
From: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
Date: Thu, 8 May 2014 10:58:42 +0200
Subject: [PATCH 20/30] XBZRLE: Fix one XBZRLE corruption issues
Subject: [PATCH 07/31] XBZRLE: Fix one XBZRLE corruption issues
RH-Author: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
Message-id: <1399546722-6350-5-git-send-email-dgilbert@redhat.com>
Patchwork-id: 58744
O-Subject: [RHEL7.1/RHEL7.0.z qemu-kvm PATCH 4/4] XBZRLE: Fix one XBZRLE corruption issues
Bugzilla: 1110191
Bugzilla: 1066338
RH-Acked-by: Juan Quintela <quintela@redhat.com>
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
RH-Acked-by: Amit Shah <amit.shah@redhat.com>
SOURCES/kvm-XBZRLE-Fix-qemu-crash-when-resize-the-xbzrle-cache.patch
@@ -1,13 +1,13 @@
From e30b7a4a8810a49a1b8a915a9ed174b9b254c999 Mon Sep 17 00:00:00 2001
From 600b6421fd97881aad2471ea0a6f465a2d55e9d6 Mon Sep 17 00:00:00 2001
From: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
Date: Thu, 8 May 2014 10:58:39 +0200
Subject: [PATCH 17/30] XBZRLE: Fix qemu crash when resize the xbzrle cache
Subject: [PATCH 04/31] XBZRLE: Fix qemu crash when resize the xbzrle cache
RH-Author: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
Message-id: <1399546722-6350-2-git-send-email-dgilbert@redhat.com>
Patchwork-id: 58741
O-Subject: [RHEL7.1/RHEL7.0.z qemu-kvm PATCH 1/4] XBZRLE: Fix qemu crash when resize the xbzrle cache
Bugzilla: 1110191
Bugzilla: 1066338
RH-Acked-by: Juan Quintela <quintela@redhat.com>
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
RH-Acked-by: Amit Shah <amit.shah@redhat.com>
SOURCES/kvm-ac97-register-reset-via-qom.patch
New file
@@ -0,0 +1,60 @@
From ce4b6f19e7e027480606076804cc6da2cccf99ba Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Mon, 27 Oct 2014 11:45:22 +0100
Subject: [PATCH 14/19] ac97: register reset via qom
Message-id: <1414410322-25041-2-git-send-email-kraxel@redhat.com>
Patchwork-id: 61905
O-Subject: [RHEL-7.1 qemu-kvm PATCH 1/1] ac97: register reset via qom
Bugzilla: 1141667
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
RH-Acked-by: Marcel Apfelbaum <marcel.a@redhat.com>
RH-Acked-by: Amos Kong <akong@redhat.com>
So it gets properly unregistered on hot-unplug.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit 133771477c39f3716d9a85609aca0d3e5a77c55c)
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 hw/audio/ac97.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/audio/ac97.c b/hw/audio/ac97.c
index 8455a96..7f6763f 100644
--- a/hw/audio/ac97.c
+++ b/hw/audio/ac97.c
@@ -1323,9 +1323,9 @@ static const MemoryRegionOps ac97_io_nabm_ops = {
     .endianness = DEVICE_LITTLE_ENDIAN,
 };
-static void ac97_on_reset (void *opaque)
+static void ac97_on_reset (DeviceState *dev)
 {
-    AC97LinkState *s = opaque;
+    AC97LinkState *s = container_of(dev, AC97LinkState, dev.qdev);
     reset_bm_regs (s, &s->bm_regs[0]);
     reset_bm_regs (s, &s->bm_regs[1]);
@@ -1382,9 +1382,8 @@ static int ac97_initfn (PCIDevice *dev)
     memory_region_init_io (&s->io_nabm, &ac97_io_nabm_ops, s, "ac97-nabm", 256);
     pci_register_bar (&s->dev, 0, PCI_BASE_ADDRESS_SPACE_IO, &s->io_nam);
     pci_register_bar (&s->dev, 1, PCI_BASE_ADDRESS_SPACE_IO, &s->io_nabm);
-    qemu_register_reset (ac97_on_reset, s);
     AUD_register_card ("ac97", &s->card);
-    ac97_on_reset (s);
+    ac97_on_reset (&s->dev.qdev);
     return 0;
 }
@@ -1422,6 +1421,7 @@ static void ac97_class_init (ObjectClass *klass, void *data)
     dc->desc = "Intel 82801AA AC97 Audio";
     dc->vmsd = &vmstate_ac97;
     dc->props = ac97_properties;
+    dc->reset = ac97_on_reset;
 }
 static const TypeInfo ac97_info = {
--
1.8.3.1
SOURCES/kvm-acpi-fix-tables-for-no-hpet-configuration.patch
New file
@@ -0,0 +1,66 @@
From aa98e5248b83b5eed5230e582a21156373d9fc72 Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Wed, 13 Aug 2014 07:59:41 +0200
Subject: [PATCH 04/11] acpi: fix tables for no-hpet configuration
Message-id: <1407916781-22610-2-git-send-email-lersek@redhat.com>
Patchwork-id: 60549
O-Subject: [RHEL-7.1 qemu-kvm PATCH 1/1] acpi: fix tables for no-hpet configuration
Bugzilla: 1129552
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
RH-Acked-by: Marcel Apfelbaum <marcel.a@redhat.com>
From: "Michael S. Tsirkin" <mst@redhat.com>
acpi build tried to add offset of hpet table to rsdt even when hpet was
disabled.  If no tables follow hpet, this could lead to a malformed
rsdt.
Fix it up.
To avoid such errors in the future, rearrange code slightly to make it
clear that acpi_add_table stores the offset of the following table - not
of the previous one.
Reported-by: TeLeMan <geleman@gmail.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Cc: qemu-stable@nongnu.org
(cherry picked from commit 9ac1c4c07e7e6ab16a3e2149e9b32c0d092cb3f5)
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 hw/i386/acpi-build.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 hw/i386/acpi-build.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 33012c9..8be1286 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1076,15 +1076,16 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
     /* ACPI tables pointed to by RSDT */
     acpi_add_table(table_offsets, tables->table_data);
     build_fadt(tables->table_data, tables->linker, &pm, facs, dsdt);
-    acpi_add_table(table_offsets, tables->table_data);
+    acpi_add_table(table_offsets, tables->table_data);
     build_ssdt(tables->table_data, tables->linker, &cpu, &pm, &misc, &pci,
                guest_info);
-    acpi_add_table(table_offsets, tables->table_data);
-    build_madt(tables->table_data, tables->linker, &cpu, guest_info);
     acpi_add_table(table_offsets, tables->table_data);
+    build_madt(tables->table_data, tables->linker, &cpu, guest_info);
+
     if (misc.has_hpet) {
+        acpi_add_table(table_offsets, tables->table_data);
         build_hpet(tables->table_data, tables->linker);
     }
     if (guest_info->numa_nodes) {
--
1.7.1
SOURCES/kvm-aio-Fix-use-after-free-in-cancellation-path.patch
New file
@@ -0,0 +1,96 @@
From 4283e6a300b8b05f8fb32dc27dfe0bd774ef16db Mon Sep 17 00:00:00 2001
From: Fam Zheng <famz@redhat.com>
Date: Fri, 30 May 2014 03:46:55 +0200
Subject: [PATCH 08/13] aio: Fix use-after-free in cancellation path
RH-Author: Fam Zheng <famz@redhat.com>
Message-id: <1401421615-17300-1-git-send-email-famz@redhat.com>
Patchwork-id: 59078
O-Subject: [RHEL-7 qemu-kvm PATCH] aio: Fix use-after-free in cancellation path
Bugzilla: 1095877
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1095877
Brew:     https://brewweb.devel.redhat.com/taskinfo?taskID=7519118 (RHEL)
          https://brewweb.devel.redhat.com/taskinfo?taskID=7519129 (RHEV)
The current flow of canceling a thread from THREAD_ACTIVE state is:
  1) Caller wants to cancel a request, so it calls thread_pool_cancel.
  2) thread_pool_cancel waits on the conditional variable
     elem->check_cancel.
  3) The worker thread changes state to THREAD_DONE once the task is
     done, and notifies elem->check_cancel to allow thread_pool_cancel
     to continue execution, and signals the notifier (pool->notifier) to
     allow callback function to be called later. But because of the
     global mutex, the notifier won't get processed until step 4) and 5)
     are done.
  4) thread_pool_cancel continues, leaving the notifier signaled, it
     just returns to caller.
  5) Caller thinks the request is already canceled successfully, so it
     releases any related data, such as freeing elem->common.opaque.
  6) In the next main loop iteration, the notifier handler,
     event_notifier_ready, is called. It finds the canceled thread in
     THREAD_DONE state, so calls elem->common.cb, with an (likely)
     dangling opaque pointer. This is a use-after-free.
Fix it by calling event_notifier_ready before leaving
thread_pool_cancel.
Test case update: This change will let cancel complete earlier than
test-thread-pool.c expects, so update the code to check this case: if
it's already done, done_cb sets .aiocb to NULL, skip calling
bdrv_aio_cancel on them.
Reported-by: Ulrich Obergfell <uobergfe@redhat.com>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit 271c0f68b4eae72691721243a1c37f46a3232d61)
Signed-off-by: Fam Zheng <famz@redhat.com>
---
 tests/test-thread-pool.c | 2 +-
 thread-pool.c            | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 tests/test-thread-pool.c |    2 +-
 thread-pool.c            |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/tests/test-thread-pool.c b/tests/test-thread-pool.c
index b62338f..1be970d 100644
--- a/tests/test-thread-pool.c
+++ b/tests/test-thread-pool.c
@@ -181,7 +181,7 @@ static void test_cancel(void)
     /* Canceling the others will be a blocking operation.  */
     for (i = 0; i < 100; i++) {
-        if (data[i].n != 3) {
+        if (data[i].aiocb && data[i].n != 3) {
             bdrv_aio_cancel(data[i].aiocb);
         }
     }
diff --git a/thread-pool.c b/thread-pool.c
index 0ebd4c2..fc6a33b 100644
--- a/thread-pool.c
+++ b/thread-pool.c
@@ -229,6 +229,7 @@ static void thread_pool_cancel(BlockDriverAIOCB *acb)
         pool->pending_cancellations--;
     }
     qemu_mutex_unlock(&pool->lock);
+    event_notifier_ready(&pool->notifier);
 }
 static const AIOCBInfo thread_pool_aiocb_info = {
--
1.7.1
SOURCES/kvm-aio-fix-qemu_bh_schedule-bh-ctx-race-condition.patch
New file
@@ -0,0 +1,80 @@
From 068000dc97228f85b878634e3d49d3354f5cbafe Mon Sep 17 00:00:00 2001
From: John Snow <jsnow@redhat.com>
Date: Fri, 11 Jul 2014 19:07:24 -0500
Subject: [CHANGE 20/29] aio: fix qemu_bh_schedule() bh->ctx race condition
To: rhvirt-patches@redhat.com,
    jen@redhat.com
RH-Author: John Snow <jsnow@redhat.com>
Message-id: <1405105644-21039-1-git-send-email-jsnow@redhat.com>
Patchwork-id: 59866
O-Subject: [RHEL-7.1 qemu-kvm PATCH] aio: fix qemu_bh_schedule() bh->ctx race condition
Bugzilla: 1116728
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
RH-Acked-by: Fam Zheng <famz@redhat.com>
From: Stefan Hajnoczi <stefanha@redhat.com>
bz: https://bugzilla.redhat.com/show_bug.cgi?id=1116728
brew: https://brewweb.devel.redhat.com/taskinfo?taskID=7690195
upstream: 924fe1293c3e7a3c787bbdfb351e7f168caee3e9
qemu_bh_schedule() is supposed to be thread-safe at least the first time
it is called.  Unfortunately this is not quite true:
  bh->scheduled = 1;
  aio_notify(bh->ctx);
Since another thread may run the BH callback once it has been scheduled,
there is a race condition if the callback frees the BH before
aio_notify(bh->ctx) has a chance to run.
Reported-by: Stefan Priebe <s.priebe@profihost.ag>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Tested-by: Stefan Priebe <s.priebe@profihost.ag>
(cherry picked from commit 924fe1293c3e7a3c787bbdfb351e7f168caee3e9)
Signed-off-by: John Snow <jsnow@redhat.com>
---
 async.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
Signed-off-by: jen <jen@redhat.com>
---
 async.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/async.c b/async.c
index 5ce3633..d7ec1ea 100644
--- a/async.c
+++ b/async.c
@@ -117,15 +117,21 @@ void qemu_bh_schedule_idle(QEMUBH *bh)
 void qemu_bh_schedule(QEMUBH *bh)
 {
+    AioContext *ctx;
+
     if (bh->scheduled)
         return;
+    ctx = bh->ctx;
     bh->idle = 0;
-    /* Make sure that idle & any writes needed by the callback are done
-     * before the locations are read in the aio_bh_poll.
+    /* Make sure that:
+     * 1. idle & any writes needed by the callback are done before the
+     *    locations are read in the aio_bh_poll.
+     * 2. ctx is loaded before scheduled is set and the callback has a chance
+     *    to execute.
      */
-    smp_wmb();
+    smp_mb();
     bh->scheduled = 1;
-    aio_notify(bh->ctx);
+    aio_notify(ctx);
 }
--
1.9.3
SOURCES/kvm-block-Add-errp-to-bdrv_new.patch
New file
@@ -0,0 +1,308 @@
From bfec9b88263e72c7425df04601bfcae5c06dca23 Mon Sep 17 00:00:00 2001
From: Kevin Wolf <kwolf@redhat.com>
Date: Thu, 23 Oct 2014 10:10:06 +0200
Subject: [PATCH 06/19] block: Add errp to bdrv_new()
Message-id: <1414059011-15516-4-git-send-email-kwolf@redhat.com>
Patchwork-id: 61837
O-Subject: [RHEL-7.1 qemu-kvm PATCH v2 3/8] block: Add errp to bdrv_new()
Bugzilla: 1088176
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
RH-Acked-by: Max Reitz <mreitz@redhat.com>
This patch adds an errp parameter to bdrv_new() and updates all its
callers. The next patches will make use of this in order to check for
duplicate IDs. Most of the callers know that their ID is fine, so they
can simply assert that there is no error.
Behaviour doesn't change with this patch yet as bdrv_new() doesn't
actually assign errors to errp.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit 98522f63f40adaebc412481e1d2e9170160d4539)
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
Conflicts:
    block.c
    qemu-img.c
    qemu-io.c
In RHEL 7, we have a different set of bdrv_new() callers. Fortunately,
the additional ones compared to upstream are trivial: Either we know
for sure that their name is unique  (e.g. fixed names used in qemu-img)
and therefore bdrv_new() will never fail even after the final patch of
this series ('block: Catch duplicate IDs in bdrv_new()'), or they use an
empty name "" which can't conflict either.
This patch leaks local_err in xen_disk, which was fixed in upstream
commit cedccf13. Downstream, we don't care about Xen, so it will remain
unfixed.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 block.c               | 10 +++++-----
 block/blkverify.c     |  2 +-
 block/iscsi.c         |  2 +-
 block/vmdk.c          |  2 +-
 block/vvfat.c         |  4 ++--
 blockdev.c            | 13 +++++++++----
 hw/block/xen_disk.c   |  7 +++++--
 include/block/block.h |  2 +-
 qemu-img.c            |  6 +++---
 qemu-io.c             |  2 +-
 qemu-nbd.c            |  3 ++-
 11 files changed, 31 insertions(+), 22 deletions(-)
diff --git a/block.c b/block.c
index 496eb72..eb0810e 100644
--- a/block.c
+++ b/block.c
@@ -300,7 +300,7 @@ void bdrv_register(BlockDriver *bdrv)
 }
 /* create a new block device (by default it is empty) */
-BlockDriverState *bdrv_new(const char *device_name)
+BlockDriverState *bdrv_new(const char *device_name, Error **errp)
 {
     BlockDriverState *bs;
@@ -892,7 +892,7 @@ int bdrv_file_open(BlockDriverState **pbs, const char *filename,
         options = qdict_new();
     }
-    bs = bdrv_new("");
+    bs = bdrv_new("", &error_abort);
     bs->options = options;
     options = qdict_clone_shallow(options);
@@ -1014,7 +1014,7 @@ int bdrv_open_backing_file(BlockDriverState *bs, QDict *options, Error **errp)
                                        sizeof(backing_filename));
     }
-    bs->backing_hd = bdrv_new("");
+    bs->backing_hd = bdrv_new("", &error_abort);
     if (bs->backing_format[0] != '\0') {
         back_drv = bdrv_find_format(bs->backing_format);
@@ -1111,7 +1111,7 @@ int bdrv_open(BlockDriverState *bs, const char *filename, QDict *options,
            instead of opening 'filename' directly */
         /* if there is a backing file, use it */
-        bs1 = bdrv_new("");
+        bs1 = bdrv_new("", &error_abort);
         ret = bdrv_open(bs1, filename, NULL, 0, drv, &local_err);
         if (ret < 0) {
             bdrv_unref(bs1);
@@ -5273,7 +5273,7 @@ void bdrv_img_create(const char *filename, const char *fmt,
             back_flags =
                 flags & ~(BDRV_O_RDWR | BDRV_O_SNAPSHOT | BDRV_O_NO_BACKING);
-            bs = bdrv_new("");
+            bs = bdrv_new("", &error_abort);
             ret = bdrv_open(bs, backing_file->value.s, NULL, back_flags,
                             backing_drv, &local_err);
diff --git a/block/blkverify.c b/block/blkverify.c
index 4ff7688..e623f6e 100644
--- a/block/blkverify.c
+++ b/block/blkverify.c
@@ -155,7 +155,7 @@ static int blkverify_open(BlockDriverState *bs, QDict *options, int flags,
         goto fail;
     }
-    s->test_file = bdrv_new("");
+    s->test_file = bdrv_new("", &error_abort);
     ret = bdrv_open(s->test_file, filename, NULL, flags, NULL, &local_err);
     if (ret < 0) {
         error_propagate(errp, local_err);
diff --git a/block/iscsi.c b/block/iscsi.c
index 9fe3be8..4f42f29 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -1576,7 +1576,7 @@ static int iscsi_create(const char *filename, QEMUOptionParameter *options,
     IscsiLun *iscsilun = NULL;
     QDict *bs_options;
-    bs = bdrv_new("");
+    bs = bdrv_new("", &error_abort);
     /* Read out options */
     while (options && options->name) {
diff --git a/block/vmdk.c b/block/vmdk.c
index eff0663..a5b1f1c 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -1745,7 +1745,7 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options,
         goto exit;
     }
     if (backing_file) {
-        BlockDriverState *bs = bdrv_new("");
+        BlockDriverState *bs = bdrv_new("", &error_abort);
         ret = bdrv_open(bs, backing_file, NULL, 0, NULL, errp);
         if (ret != 0) {
             bdrv_unref(bs);
diff --git a/block/vvfat.c b/block/vvfat.c
index 3ddaa0b..6fd52df 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -2935,7 +2935,7 @@ static int enable_write_target(BDRVVVFATState *s)
         goto err;
     }
-    s->qcow = bdrv_new("");
+    s->qcow = bdrv_new("", &error_abort);
     ret = bdrv_open(s->qcow, s->qcow_filename, NULL,
             BDRV_O_RDWR | BDRV_O_CACHE_WB | BDRV_O_NO_FLUSH, bdrv_qcow,
@@ -2951,7 +2951,7 @@ static int enable_write_target(BDRVVVFATState *s)
     unlink(s->qcow_filename);
 #endif
-    s->bs->backing_hd = bdrv_new("");
+    s->bs->backing_hd = bdrv_new("", &error_abort);
     s->bs->backing_hd->drv = &vvfat_write_target;
     s->bs->backing_hd->opaque = g_malloc(sizeof(void*));
     *(void**)s->bs->backing_hd->opaque = s;
diff --git a/blockdev.c b/blockdev.c
index 1ac8804..b5792a2 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -471,7 +471,11 @@ static DriveInfo *blockdev_init(QDict *bs_opts,
     /* init */
     dinfo = g_malloc0(sizeof(*dinfo));
     dinfo->id = g_strdup(qemu_opts_id(opts));
-    dinfo->bdrv = bdrv_new(dinfo->id);
+    dinfo->bdrv = bdrv_new(dinfo->id, &error);
+    if (error) {
+        error_propagate(errp, error);
+        goto bdrv_new_err;
+    }
     dinfo->bdrv->open_flags = snapshot ? BDRV_O_SNAPSHOT : 0;
     dinfo->bdrv->read_only = ro;
     dinfo->type = type;
@@ -531,8 +535,9 @@ static DriveInfo *blockdev_init(QDict *bs_opts,
 err:
     bdrv_unref(dinfo->bdrv);
-    g_free(dinfo->id);
     QTAILQ_REMOVE(&drives, dinfo, next);
+bdrv_new_err:
+    g_free(dinfo->id);
     g_free(dinfo);
 early_err:
     QDECREF(bs_opts);
@@ -1056,7 +1061,7 @@ static void external_snapshot_prepare(BlkTransactionStates *common,
     }
     /* We will manually add the backing_hd field to the bs later */
-    states->new_bs = bdrv_new("");
+    states->new_bs = bdrv_new("", &error_abort);
     /* TODO Inherit bs->options or only take explicit options with an
      * extended QMP command? */
     ret = bdrv_open(states->new_bs, new_image_file, NULL,
@@ -1678,7 +1683,7 @@ void qmp_drive_mirror(const char *device, const char *target,
     /* Mirroring takes care of copy-on-write using the source's backing
      * file.
      */
-    target_bs = bdrv_new("");
+    target_bs = bdrv_new("", &error_abort);
     ret = bdrv_open(target_bs, target, NULL, flags | BDRV_O_NO_BACKING, drv,
                     &local_err);
     if (ret < 0) {
diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
index a2653b2..fc45f36 100644
--- a/hw/block/xen_disk.c
+++ b/hw/block/xen_disk.c
@@ -793,11 +793,14 @@ static int blk_connect(struct XenDevice *xendev)
     index = (blkdev->xendev.dev - 202 * 256) / 16;
     blkdev->dinfo = drive_get(IF_XEN, 0, index);
     if (!blkdev->dinfo) {
+        Error *local_err = NULL;
         /* setup via xenbus -> create new block driver instance */
         xen_be_printf(&blkdev->xendev, 2, "create new bdrv (xenbus setup)\n");
-        blkdev->bs = bdrv_new(blkdev->dev);
+        blkdev->bs = bdrv_new(blkdev->dev, &local_err);
+        if (local_err) {
+            blkdev->bs = NULL;
+        }
         if (blkdev->bs) {
-            Error *local_err = NULL;
             BlockDriver *drv = bdrv_find_whitelisted_format(blkdev->fileproto,
                                                            readonly);
             if (bdrv_open(blkdev->bs,
diff --git a/include/block/block.h b/include/block/block.h
index 03b7960..3651bd9 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -178,7 +178,7 @@ int bdrv_create(BlockDriver *drv, const char* filename,
     QEMUOptionParameter *options, Error **errp);
 int bdrv_create_file(const char* filename, QEMUOptionParameter *options,
                      Error **errp);
-BlockDriverState *bdrv_new(const char *device_name);
+BlockDriverState *bdrv_new(const char *device_name, Error **errp);
 void bdrv_make_anon(BlockDriverState *bs);
 void bdrv_swap(BlockDriverState *bs_new, BlockDriverState *bs_old);
 void bdrv_append(BlockDriverState *bs_new, BlockDriverState *bs_top);
diff --git a/qemu-img.c b/qemu-img.c
index ed1799c..5c2f36a 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -274,7 +274,7 @@ static BlockDriverState *bdrv_new_open(const char *filename,
     Error *local_err = NULL;
     int ret;
-    bs = bdrv_new("image");
+    bs = bdrv_new("image", &error_abort);
     if (fmt) {
         drv = bdrv