Browse Source

import qemu-kvm-6.2.0-11.module+el8.6.0+14707+5aa4b42d

c8-stream-rhel imports/c8-stream-rhel/qemu-kvm-6.2.0-11.module+el8.6.0+14707+5aa4b42d
CentOS Sources 7 months ago
committed by Stepan Oksanichenko
parent
commit
fdc6cbd41b
  1. 2
      .gitignore
  2. 2
      .qemu-kvm.metadata
  3. 17931
      SOURCES/0001-redhat-Adding-slirp-to-the-exploded-tree.patch
  4. 350
      SOURCES/0005-Initial-redhat-build.patch
  5. 897
      SOURCES/0006-Enable-disable-devices-for-RHEL.patch
  6. 606
      SOURCES/0007-Machine-type-related-general-changes.patch
  7. 301
      SOURCES/0008-Add-aarch64-machine-types.patch
  8. 339
      SOURCES/0009-Add-ppc64-machine-types.patch
  9. 65
      SOURCES/0010-Add-s390x-machine-types.patch
  10. 571
      SOURCES/0011-Add-x86_64-machine-types.patch
  11. 420
      SOURCES/0012-Enable-make-check.patch
  12. 20
      SOURCES/0013-vfio-cap-number-of-devices-that-can-be-assigned.patch
  13. 21
      SOURCES/0014-Add-support-statement-to-help-output.patch
  14. 109
      SOURCES/0015-globally-limit-the-maximum-number-of-CPUs.patch
  15. 121
      SOURCES/0016-Add-support-for-simpletrace.patch
  16. 126
      SOURCES/0016-Use-qemu-kvm-in-documentation-instead-of-qemu-system.patch
  17. 118
      SOURCES/0017-Use-qemu-kvm-in-documentation-instead-of-qemu-system.patch
  18. 13
      SOURCES/0017-virtio-scsi-Reject-scsi-cd-if-data-plane-enabled-RHE.patch
  19. 8
      SOURCES/0018-BZ1653590-Require-at-least-64kiB-pages-for-downstrea.patch
  20. 96
      SOURCES/0018-usb-xhci-Fix-PCI-capability-order.patch
  21. 53
      SOURCES/0019-compat-Update-hw_compat_rhel_8_5.patch
  22. 43
      SOURCES/0020-redhat-Update-pseries-rhel8.5.0-machine-type.patch
  23. 61
      SOURCES/0021-Using-ip_deq-after-m_free-might-read-pointers-from-a.patch
  24. 51
      SOURCES/0021-redhat-virt-rhel8.5.0-Update-machine-type-compatibil.patch
  25. 45
      SOURCES/0022-Fix-virtio-net-pci-vectors-compat.patch
  26. 73
      SOURCES/0023-x86-rhel-machine-types-Add-pc_rhel_8_5_compat.patch
  27. 54
      SOURCES/0024-x86-rhel-machine-types-Wire-compat-into-q35-and-i440.patch
  28. 58
      SOURCES/0025-redhat-Add-s390x-machine-type-compatibility-handling.patch
  29. 41
      SOURCES/kvm-ACPI-add-expected-files-for-HMAT-tests-acpihmat.patch
  30. 68
      SOURCES/kvm-Add-mtod_check.patch
  31. 242
      SOURCES/kvm-Compress-lines-for-immediate-return.patch
  32. 58
      SOURCES/kvm-Don-t-leak-memory-when-reallocation-fails.patch
  33. 51
      SOURCES/kvm-Drop-bogus-IPv6-messages.patch
  34. 28
      SOURCES/kvm-Enable-SGX-RH-Only.patch
  35. 59
      SOURCES/kvm-Fix-DHCP-broken-in-libslirp-v4.6.0.patch
  36. 60
      SOURCES/kvm-Fix-use-afte-free-in-ip_reass-CVE-2020-1983.patch
  37. 55
      SOURCES/kvm-MAINTAINERS-fix-qcow2-bitmap.c-under-Dirty-Bitmaps-h.patch
  38. 53
      SOURCES/kvm-RHEL-hw-i386-disable-nested-PERF_GLOBAL_CTRL-MSR-sup.patch
  39. 115
      SOURCES/kvm-Reallocate-dirty_bmap-when-we-change-a-slot.patch
  40. 118
      SOURCES/kvm-Replace-remaining-malloc-free-user-with-glib.patch
  41. 58
      SOURCES/kvm-Revert-RHEL-disable-hostmem-memfd.patch
  42. 121
      SOURCES/kvm-Revert-mirror-Don-t-let-an-operation-wait-for-itself.patch
  43. 81
      SOURCES/kvm-Revert-redhat-Add-hw_compat_4_2_extra-and-apply-to-u.patch
  44. 41
      SOURCES/kvm-Revert-redhat-Enable-FDC-device-for-upstream-machine.patch
  45. 180
      SOURCES/kvm-Revert-redhat-Expose-upstream-machines-pc-4.2-and-pc.patch
  46. 63
      SOURCES/kvm-Virtiofsd-fix-memory-leak-on-fuse-queueinfo.patch
  47. 82
      SOURCES/kvm-acpi-accept-byte-and-word-access-to-core-ACPI-regist.patch
  48. 70
      SOURCES/kvm-acpi-fix-OEM-ID-OEM-Table-ID-padding.patch
  49. 99
      SOURCES/kvm-acpi-fix-QEMU-crash-when-started-with-SLIC-table.patch
  50. 130
      SOURCES/kvm-acpi-pcihp-pcie-set-power-on-cap-on-parent-slot.patch
  51. 51
      SOURCES/kvm-acpi-validate-hotplug-selector-on-access.patch
  52. 104
      SOURCES/kvm-aio-posix-completely-stop-polling-when-disabled.patch
  53. 132
      SOURCES/kvm-aio-wait-delegate-polling-of-main-AioContext-if-BQL-.patch
  54. 62
      SOURCES/kvm-apic-Use-32bit-APIC-ID-for-migration-instance-ID.patch
  55. 183
      SOURCES/kvm-async-use-explicit-memory-barriers.patch
  56. 53
      SOURCES/kvm-audio-audio_generic_get_buffer_in-should-honor-size.patch
  57. 51
      SOURCES/kvm-backup-Improve-error-for-bdrv_getlength-failure.patch
  58. 124
      SOURCES/kvm-backup-Make-sure-that-source-and-target-size-match.patch
  59. 57
      SOURCES/kvm-backup-don-t-acquire-aio_context-in-backup_clean.patch
  60. 56
      SOURCES/kvm-backup-top-Begin-drain-earlier.patch
  61. 116
      SOURCES/kvm-block-Activate-recursively-even-for-already-active-n.patch
  62. 283
      SOURCES/kvm-block-Add-flags-to-BlockDriver.bdrv_co_truncate.patch
  63. 353
      SOURCES/kvm-block-Add-flags-to-bdrv-_co-_truncate.patch
  64. 105
      SOURCES/kvm-block-Call-attention-to-truncation-of-long-NBD-expor.patch
  65. 84
      SOURCES/kvm-block-Fix-blk-in_flight-during-blk_wait_while_draine.patch
  66. 91
      SOURCES/kvm-block-Fix-cross-AioContext-blockdev-snapshot.patch
  67. 60
      SOURCES/kvm-block-Fix-leak-in-bdrv_create_file_fallback.patch
  68. 227
      SOURCES/kvm-block-Generic-file-creation-fallback.patch
  69. 295
      SOURCES/kvm-block-Increase-BB.in_flight-for-coroutine-and-sync-i.patch
  70. 65
      SOURCES/kvm-block-Introduce-bdrv_reopen_commit_post-step.patch
  71. 67
      SOURCES/kvm-block-Make-bdrv_get_cumulative_perm-public.patch
  72. 145
      SOURCES/kvm-block-Make-it-easier-to-learn-which-BDS-support-bitm.patch
  73. 117
      SOURCES/kvm-block-Relax-restrictions-for-blockdev-snapshot.patch
  74. 77
      SOURCES/kvm-block-Require-aligned-image-size-to-avoid-assertion-.patch
  75. 57
      SOURCES/kvm-block-Versioned-x-blockdev-reopen-API-with-feature-f.patch
  76. 308
      SOURCES/kvm-block-always-fill-entire-LUKS-header-space-with-zero.patch
  77. 294
      SOURCES/kvm-block-backend-Add-flags-to-blk_truncate.patch
  78. 158
      SOURCES/kvm-block-backend-Reorder-flush-pdiscard-function-defini.patch
  79. 129
      SOURCES/kvm-block-backend-prevent-dangling-BDS-pointers-across-a.patch
  80. 130
      SOURCES/kvm-block-backup-top-Don-t-acquire-context-while-droppin.patch
  81. 114
      SOURCES/kvm-block-bdrv_reopen-with-backing-file-in-different-Aio.patch
  82. 55
      SOURCES/kvm-block-curl-HTTP-header-field-names-are-case-insensit.patch
  83. 76
      SOURCES/kvm-block-curl-HTTP-header-fields-allow-whitespace-aroun.patch
  84. 76
      SOURCES/kvm-block-file-posix-Fix-problem-with-fallocate-PUNCH_HO.patch
  85. 99
      SOURCES/kvm-block-introducing-bdrv_co_delete_file-interface.patch
  86. 56
      SOURCES/kvm-block-io-Update-BSC-only-if-want_zero-is-true.patch
  87. 100
      SOURCES/kvm-block-iscsi-fix-heap-buffer-overflow-in-iscsi_aio_io.patch
  88. 52
      SOURCES/kvm-block-nbd-Assert-there-are-no-timers-when-closed.patch
  89. 54
      SOURCES/kvm-block-nbd-Delete-reconnect-delay-timer-when-done.patch
  90. 78
      SOURCES/kvm-block-nbd-Fix-hang-in-.bdrv_close.patch
  91. 107
      SOURCES/kvm-block-nbd-Move-s-ioc-on-AioContext-change.patch
  92. 328
      SOURCES/kvm-block-pass-BlockDriver-reference-to-the-.bdrv_co_cre.patch
  93. 78
      SOURCES/kvm-block-qcow2-Move-bitmap-reopen-into-bdrv_reopen_comm.patch
  94. 59
      SOURCES/kvm-block-rbd-fix-handling-of-holes-in-.bdrv_co_block_st.patch
  95. 103
      SOURCES/kvm-block-rbd-workaround-for-ceph-issue-53784.patch
  96. 296
      SOURCES/kvm-block-trickle-down-the-fallback-image-creation-funct.patch
  97. 94
      SOURCES/kvm-block-truncate-Don-t-make-backing-file-data-visible.patch
  98. 92
      SOURCES/kvm-block.c-adding-bdrv_co_delete_file.patch
  99. 176
      SOURCES/kvm-blockdev-Acquire-AioContext-on-dirty-bitmap-function.patch
  100. 179
      SOURCES/kvm-blockdev-Promote-several-bitmap-functions-to-non-sta.patch

2
.gitignore

@ -1 +1 @@
SOURCES/qemu-4.2.0.tar.xz
SOURCES/qemu-6.2.0.tar.xz

2
.qemu-kvm.metadata

@ -1 +1 @@
b27aa828a8457bd8551ae3c81b80cc365e1f6bfe SOURCES/qemu-4.2.0.tar.xz
68cd61a466170115b88817e2d52db2cd7a92f43a SOURCES/qemu-6.2.0.tar.xz

17931
SOURCES/0001-redhat-Adding-slirp-to-the-exploded-tree.patch
File diff suppressed because it is too large
View File

350
SOURCES/0005-Initial-redhat-build.patch

@ -1,4 +1,4 @@
From 4df157781801c50224373be57fa3c8c3741c0535 Mon Sep 17 00:00:00 2001
From 19ce5ff93ddd6b8a998348f2a5f59f603c5e11b7 Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Fri, 12 Oct 2018 07:31:11 +0200
Subject: Initial redhat build
@ -10,10 +10,8 @@ several issues are fixed in QEMU tree:
- As we use qemu-kvm as name in all places, this is updated to be consistent
- Man page renamed from qemu to qemu-kvm
- man page is installed using make install so we have to fix it in qemu tree
- Use "/share/qemu-kvm" as SHARE_SUFFIX
- We reconfigured our share to qemu-kvm to be consistent with used name
This rebase includes changes up to qemu-kvm-4.1.0-18.el8
This rebase includes changes up to qemu-kvm-6.1.0-5.el9
Rebase notes (3.1.0):
- added new configure options
@ -49,6 +47,86 @@ Rebase notes (4.2.0):
- Removed spapr-rtas.bin (upstream)
- Require newer SLOF (20191022)
Rebase notes (5.1.0):
- Use python3 for virtio_seg_max_adjust.py test
- Removed qemu-trace-stap shebang from spec file
- Added virtiofsd.1 (upstream)
- Use out-of-tree build
- New documentation structure (upstream)
- Update local build
- Removing installed qemu-storage-daemon (added upstream)
- Removing opensbi-riscv32-sifive_u-fw_jump.bin (added upstream)
- Disable iotests (moved from Enable make check commit)
- Added missing configure options
- Reorder configure options
- qemu-pr-helper moved to /usr/libexec/ (upstream)
- Added submodules for usb-redir, smartcard-reader and qxl display (upstream)
- Added setting rc version in Makefile for build
- removed --disable-vxhs configure option (removed upstream)
- bumped required libusbx-devel version to 1.0.23
- bumped libfdt version to 1.6.0
Rebase notes (5.2.0 rc0):
- Move libfdt dependency to qemu-kvm-core
- Move manpage rename from Makefile to spec file
- rename with-confsuffix configure option to with-suffix (upstream)
- Bump libusbx Requires version to 1.0.234
- Manual copy of keymaps in spec file (BZ 1875217)
- Removed /usr/share/qemu-kvm/npcm7xx_bootrom.bin, considering it
unpackaged for now.
- Removed /usr/share/qemu-kvm/qboot.rom, considering unpackaged.
- Added build dependency for meson and ninja-build
- hw/s390/s390-pci-vfio.c hack - set NULL for g_autofree variables
- Removed Chanelog (upstream)
- Fix in directory used for docs (upstream add %name so we do not pass it in configure)
- Package various .so as part of qemu-kvm-core package.
Rebase notes (5.2.0 rc2):
- Added fix for dtrace build on RHEL 8.4.0
Rebase notes (5.2.0 rc3):
- Added man page for qemu-pr-helper
- Added new configure options
- Update qemu-kiwi patches to v4
Rebase notes (6.0.0):
- update tracetool usage in spec file
- remove qemu-storage-daemon-qmp-ref man page
- remove qemu-storage-daemon man page
- Added devel documentation
- do not package virtfs-proxy-helper files
- Use --with-git-submodules instead of --(enable|disable)-git-update
- Minor build fixes for sending upstream
- g_autofree initialization fixed upstream
- Updated rc information usage
- do not package package hw-s390x-virtio-gpu-ccw.so
- Disable new switch options
Rebase notes (6.1.0):
- Fix warning issue in block.c
- Download tarball from dist-git cache
- Removed sheepdog driver
- Added new display modules:
- hw-display-virtio-gpu-gl.so
- hw-display-virtio-gpu-pci-gl.so
- hw-display-virtio-vga-gl.so
- sasl fix moved from ui/vnc.c to ui/vnc-auth-sasl.c
- Added accel-qtest-%{kvm_target} and accel-tcg-%{kvm_target}
- Added about docs
- Use -q option for setup
- Added hw-usb-host.so
- Disable new options (bpf, nvmm, slirp-smbd)
Rebase notes (6.2.0):
- Using internal meson
- removed --disable-jemalloc and --disable-tcmalloc configure options
- added audio-oss.so
- added fdt requirement for x86_64
- tests/acceptance renamed to tests/avocado
- added multiboot_dma.bin
- Removed conflict relics
- Updated configure options
Merged patches (3.1.0):
- 01f0c9f RHEL8: Add disable configure options to qemu spec file
- Spec file cleanups
@ -71,97 +149,203 @@ Merged patches (4.2.0):
- 69e1fb2 enable virgla
- d4f6115 enable virgl, for real this time ...
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
Merged patches (5.1.0):
- 5edf6bd Add support for rh-brew-module
- f77d52d redhat: ship virtiofsd vhost-user device backend
- 63f12d4 redhat: Always use module build target for rh-brew (modified)
- 9b1e140 redhat: updating the modular target
- 44b8bd0 spec: Fix python shenigans for tests
Merged patches (5.2.0 rc0):
- 9238ce7 Add support for simpletrace
- 5797cff Remove explicit glusterfs-api dependency
- fd62478 disable virgl
- 0205018 redhat: link /etc/qemu-ga/fsfreeze-hook to /etc/qemu-kvm/
- 3645097 redhat: Make all generated so files executable (not only block-*)
Merged patches (5.2.0 rc2):
- pjw 99657 redhat: introduces disable_everything macro into the configure call
- pjw 99659 redhat: scripts/extract_build_cmd.py - Avoid listing empty lines
- pjw 99658 redhat: Fixing rh-local build
- pjw 99660 redhat: Add qemu-kiwi subpackage
- d2e59ce redhat: add (un/pre)install systemd hooks for qemu-ga
Merged patches (5.2.0 rc3):
- pjw 99887 - redhat: allow Makefile rh-prep builddep to fail
- pjw 99885 - redhat: adding rh-rpm target
Merged patches (6.0.0):
- 5ab9954a3b spec: find system python via meson
- cd0f7db11f build-system: use b_staticpic=false
- 80d2dec42c udev-kvm-check: remove the "exceeded subscription limit" message
- 38959d51c0 redhat: Allow make to inherit params from parent make for rh-local
- 1e0cfe458f redhat: moving all documentation files to qemu-kvm-docs
- d7a594d02b redhat: makes qemu respect system's crypto profile
- e2bbf1572b spec: Package qemu-storage-daemon
- 92f10993ba spec: ui-spice sub-package
- 8931e46069 spec: ui-opengl sub-package
Merged patches (6.1.0):
- 7bb57541b3 redhat: Install the s390-netboot.img that we've built
- b4a8531f41 redhat: Fix "unversioned Obsoletes" warning
- 141a1693c7 redhat: Move qemu-kvm-docs dependency to qemu-kvm
- d75f59c6f9 redhat: introducting qemu-kvm-hw-usbredir
- a934d8bf44 redhat: use the standard vhost-user JSON path
Merged patches (6.2.0):
- 4f3f04bbb6 spec: Remove qemu-kiwi build
---
.gitignore | 1 +
Makefile | 3 +-
configure | 1 +
os-posix.c | 2 +-
redhat/Makefile | 82 +
redhat/Makefile.common | 51 +
redhat/README.tests | 39 +
redhat/qemu-kvm.spec.template | 2434 +++++++++++++++++++++++++++++
redhat/scripts/process-patches.sh | 7 +-
tests/Makefile.include | 2 +-
ui/vnc.c | 2 +-
11 files changed, 2615 insertions(+), 9 deletions(-)
.gitignore | 1 +
.gitlab-ci.yml | 24 -
.gitlab/issue_templates/bug.md | 64 -
.gitlab/issue_templates/feature_request.md | 32 -
README.systemtap | 43 +
meson.build | 4 +-
redhat/Makefile | 90 +
redhat/Makefile.common | 48 +
redhat/README.tests | 39 +
redhat/qemu-kvm.spec.template | 3896 ++++++++++++++++++++
redhat/scripts/extract_build_cmd.py | 5 +-
redhat/scripts/process-patches.sh | 20 +-
redhat/scripts/tarball_checksum.sh | 2 +-
redhat/udev-kvm-check.c | 19 +-
scripts/qemu-guest-agent/fsfreeze-hook | 2 +-
scripts/systemtap/conf.d/qemu_kvm.conf | 4 +
scripts/systemtap/script.d/qemu_kvm.stp | 1 +
tests/check-block.sh | 2 +
ui/vnc-auth-sasl.c | 2 +-
19 files changed, 4142 insertions(+), 156 deletions(-)
delete mode 100644 .gitlab-ci.yml
delete mode 100644 .gitlab/issue_templates/bug.md
delete mode 100644 .gitlab/issue_templates/feature_request.md
create mode 100644 README.systemtap
create mode 100644 redhat/Makefile
create mode 100644 redhat/Makefile.common
create mode 100644 redhat/README.tests
create mode 100644 redhat/qemu-kvm.spec.template
create mode 100644 scripts/systemtap/conf.d/qemu_kvm.conf
create mode 100644 scripts/systemtap/script.d/qemu_kvm.stp
diff --git a/Makefile b/Makefile
index b437a346d7..086727dbb9 100644
--- a/Makefile
+++ b/Makefile
@@ -512,6 +512,7 @@ CAP_CFLAGS += -DCAPSTONE_HAS_ARM
CAP_CFLAGS += -DCAPSTONE_HAS_ARM64
CAP_CFLAGS += -DCAPSTONE_HAS_POWERPC
CAP_CFLAGS += -DCAPSTONE_HAS_X86
+CAP_CFLAGS += -Wp,-D_GLIBCXX_ASSERTIONS
diff --git a/README.systemtap b/README.systemtap
new file mode 100644
index 0000000000..ad913fc990
--- /dev/null
+++ b/README.systemtap
@@ -0,0 +1,43 @@
+QEMU tracing using systemtap-initscript
+---------------------------------------
+
+You can capture QEMU trace data all the time using systemtap-initscript. This
+uses SystemTap's flight recorder mode to trace all running guests to a
+fixed-size buffer on the host. Old trace entries are overwritten by new
+entries when the buffer size wraps.
+
+1. Install the systemtap-initscript package:
+ # yum install systemtap-initscript
+
+2. Install the systemtap scripts and the conf file:
+ # cp /usr/share/qemu-kvm/systemtap/script.d/qemu_kvm.stp /etc/systemtap/script.d/
+ # cp /usr/share/qemu-kvm/systemtap/conf.d/qemu_kvm.conf /etc/systemtap/conf.d/
+
+The set of trace events to enable is given in qemu_kvm.stp. This SystemTap
+script can be customized to add or remove trace events provided in
+/usr/share/systemtap/tapset/qemu-kvm-simpletrace.stp.
+
+SystemTap customizations can be made to qemu_kvm.conf to control the flight
+recorder buffer size and whether to store traces in memory only or disk too.
+See stap(1) for option documentation.
+
+3. Start the systemtap service.
+ # service systemtap start qemu_kvm
+
+4. Make the service start at boot time.
+ # chkconfig systemtap on
+
+5. Confirm that the service works.
+ # service systemtap status qemu_kvm
+ qemu_kvm is running...
+
+When you want to inspect the trace buffer, perform the following steps:
+
+1. Dump the trace buffer.
+ # staprun -A qemu_kvm >/tmp/trace.log
+
+2. Start the systemtap service because the preceding step stops the service.
+ # service systemtap start qemu_kvm
+
+3. Translate the trace record to readable format.
+ # /usr/share/qemu-kvm/simpletrace.py --no-header /usr/share/qemu-kvm/trace-events /tmp/trace.log
diff --git a/meson.build b/meson.build
index 96de1a6ef9..5f6ba86dbb 100644
--- a/meson.build
+++ b/meson.build
@@ -2108,7 +2108,9 @@ if capstone_opt == 'internal'
# Include all configuration defines via a header file, which will wind up
# as a dependency on the object file, and thus changes here will result
# in a rebuild.
- '-include', 'capstone-defs.h'
+ '-include', 'capstone-defs.h',
+
+ '-Wp,-D_GLIBCXX_ASSERTIONS',
]
libcapstone = static_library('capstone',
diff --git a/scripts/qemu-guest-agent/fsfreeze-hook b/scripts/qemu-guest-agent/fsfreeze-hook
index 13aafd4845..e9b84ec028 100755
--- a/scripts/qemu-guest-agent/fsfreeze-hook
+++ b/scripts/qemu-guest-agent/fsfreeze-hook
@@ -8,7 +8,7 @@
# request, it is issued with "thaw" argument after filesystem is thawed.
LOGFILE=/var/log/qga-fsfreeze-hook.log
-FSFREEZE_D=$(dirname -- "$0")/fsfreeze-hook.d
+FSFREEZE_D=$(dirname -- "$(realpath $0)")/fsfreeze-hook.d
.PHONY: capstone/all
capstone/all: .git-submodule-status
@@ -826,7 +827,7 @@ install-doc: $(DOCS) install-sphinxdocs
$(INSTALL_DATA) docs/interop/qemu-qmp-ref.txt "$(DESTDIR)$(qemu_docdir)"
ifdef CONFIG_POSIX
$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
- $(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1"
+ $(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1/qemu-kvm.1"
$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man7"
$(INSTALL_DATA) docs/interop/qemu-qmp-ref.7 "$(DESTDIR)$(mandir)/man7"
$(INSTALL_DATA) docs/qemu-block-drivers.7 "$(DESTDIR)$(mandir)/man7"
diff --git a/configure b/configure
index 6099be1d84..16564f8ccc 100755
--- a/configure
+++ b/configure
@@ -2424,6 +2424,7 @@ if test "$seccomp" != "no" ; then
seccomp="no"
# Check whether file $1 is a backup or rpm-generated file and should be ignored
is_ignored_file() {
diff --git a/scripts/systemtap/conf.d/qemu_kvm.conf b/scripts/systemtap/conf.d/qemu_kvm.conf
new file mode 100644
index 0000000000..372d8160a4
--- /dev/null
+++ b/scripts/systemtap/conf.d/qemu_kvm.conf
@@ -0,0 +1,4 @@
+# Force load uprobes (see BZ#1118352)
+stap -e 'probe process("/usr/libexec/qemu-kvm").function("main") { printf("") }' -c true
+
+qemu_kvm_OPT="-s4" # per-CPU buffer size, in megabytes
diff --git a/scripts/systemtap/script.d/qemu_kvm.stp b/scripts/systemtap/script.d/qemu_kvm.stp
new file mode 100644
index 0000000000..c04abf9449
--- /dev/null
+++ b/scripts/systemtap/script.d/qemu_kvm.stp
@@ -0,0 +1 @@
+probe qemu.kvm.simpletrace.handle_qmp_command,qemu.kvm.simpletrace.monitor_protocol_*,qemu.kvm.simpletrace.migrate_set_state {}
diff --git a/tests/check-block.sh b/tests/check-block.sh
index f86cb863de..6d38340d49 100755
--- a/tests/check-block.sh
+++ b/tests/check-block.sh
@@ -69,6 +69,8 @@ else
fi
fi
+exit 0
+
##########################################
# xen probe
cd tests/qemu-iotests
diff --git a/os-posix.c b/os-posix.c
index 86cffd2c7d..1c9f86768d 100644
--- a/os-posix.c
+++ b/os-posix.c
@@ -83,7 +83,7 @@ void os_setup_signal_handling(void)
/* Find a likely location for support files using the location of the binary.
For installed binaries this will be "$bindir/../share/qemu". When
running from the build tree this will be "$bindir/../pc-bios". */
-#define SHARE_SUFFIX "/share/qemu"
+#define SHARE_SUFFIX "/share/qemu-kvm"
#define BUILD_SUFFIX "/pc-bios"
char *os_find_datadir(void)
{
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 8566f5f119..b483790cf3 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -1194,7 +1194,7 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR)
check-qapi-schema: check-tests/qapi-schema/frontend check-tests/qapi-schema/doc-good.texi
check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS))
check-block: $(patsubst %,check-%, $(check-block-y))
-check: check-block check-qapi-schema check-unit check-softfloat check-qtest check-decodetree
+check: check-qapi-schema check-unit check-softfloat check-qtest check-decodetree
check-clean:
rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(target)-y)) $(check-qtest-generic-y))
diff --git a/ui/vnc.c b/ui/vnc.c
index 87b8045afe..ecf6276f5b 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -3987,7 +3987,7 @@ void vnc_display_open(const char *id, Error **errp)
# QEMU_CHECK_BLOCK_AUTO is used to disable some unstable sub-tests
diff --git a/ui/vnc-auth-sasl.c b/ui/vnc-auth-sasl.c
index 47fdae5b21..2a950caa2a 100644
--- a/ui/vnc-auth-sasl.c
+++ b/ui/vnc-auth-sasl.c
@@ -42,7 +42,7 @@
#ifdef CONFIG_VNC_SASL
if (sasl) {
- int saslErr = sasl_server_init(NULL, "qemu");
+ int saslErr = sasl_server_init(NULL, "qemu-kvm");
bool vnc_sasl_server_init(Error **errp)
{
- int saslErr = sasl_server_init(NULL, "qemu");
+ int saslErr = sasl_server_init(NULL, "qemu-kvm");
if (saslErr != SASL_OK) {
error_setg(errp, "Failed to initialize SASL auth: %s",
if (saslErr != SASL_OK) {
error_setg(errp, "Failed to initialize SASL auth: %s",
--
2.21.0
2.27.0

897
SOURCES/0006-Enable-disable-devices-for-RHEL.patch
File diff suppressed because it is too large
View File

606
SOURCES/0007-Machine-type-related-general-changes.patch

@ -1,4 +1,4 @@
From 113078b23a4747b07eb363719d7cbc0af403dd2a Mon Sep 17 00:00:00 2001
From adca046d9db670637b9bf2b24f7a4349a9fe2628 Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Fri, 11 Jan 2019 09:54:45 +0100
Subject: Machine type related general changes
@ -20,6 +20,12 @@ Rebase changes (4.1.0):
- Use one format for compat scructures
- Added compat for virtio-balloon-pci.any_layout for rhel71
Rebase changes (weekly-210303):
- Added rhel 8.4.0 compat based on 5.2 compat
Rebase changes (weekly-211103):
- Do not duplicate minimal_version_id for piix4_pm
Merged patches (4.0.0):
- d4c0957 compat: Generic HW_COMPAT_RHEL7_6
- cbac773 virtio: Make disable-legacy/disable-modern compat properties optional
@ -33,34 +39,61 @@ Merged patches (4.2.0):
- ca4a5e8 virtio: Make disable-legacy/disable-modern compat properties optional
- compat: Generic hw_compat_rhel_8_1 (patch 93040/92956)
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
Merged patches (5.1.0):
- e6c3fbf hw/smbios: set new default SMBIOS fields for Windows driver support (partialy)
- 8f9f4d8 compat: disable 'edid' for virtio-gpu-ccw
Merged patches (5.2.0 rc0):
- 8348642 redhat: define hw_compat_8_2
- 45b8402 redhat: define hw_compat_8_2
- 4effa71 redhat: Update hw_compat_8_2
- 0e84dff virtio: skip legacy support check on machine types less than 5.1 (partialy)
Merged patches (6.0.0):
- fa0063ba67 redhat: Define hw_compat_8_3
- d98e328c8d usb/hcd-xhci-pci: Fixup capabilities ordering (again)
- b8a2578117 virtio: move 'use-disabled-flag' property to hw_compat_4_2
- f7940b04c8 virtio-pci: compat page aligned ATS
Merged patches (weekly-210602):
- 26f25108c1 redhat: add missing entries in hw_compat_rhel_8_4
Merged patches (weekly-211006):
- 43c4b9bea6 redhat: Define hw_compat_rhel_8_5
---
hw/acpi/ich9.c | 16 ++++
hw/acpi/piix4.c | 5 +-
hw/char/serial.c | 16 ++++
hw/core/machine.c | 170 ++++++++++++++++++++++++++++++++++++++++
hw/display/vga-isa.c | 2 +-
hw/net/e1000e.c | 21 +++++
hw/net/rtl8139.c | 4 +-
hw/rtc/mc146818rtc.c | 6 ++
hw/smbios/smbios.c | 1 +
hw/timer/i8254_common.c | 2 +-
hw/usb/hcd-uhci.c | 4 +-
hw/usb/hcd-xhci.c | 20 +++++
hw/usb/hcd-xhci.h | 2 +
include/hw/acpi/ich9.h | 3 +
include/hw/boards.h | 24 ++++++
include/hw/usb.h | 4 +
migration/migration.c | 2 +
migration/migration.h | 5 ++
18 files changed, 301 insertions(+), 6 deletions(-)
hw/acpi/ich9.c | 15 ++
hw/acpi/piix4.c | 6 +-
hw/arm/virt.c | 2 +-
hw/char/serial.c | 16 +++
hw/core/machine.c | 272 +++++++++++++++++++++++++++++++++++
hw/display/vga-isa.c | 2 +-
hw/i386/pc_piix.c | 2 +
hw/i386/pc_q35.c | 2 +
hw/net/e1000e.c | 22 +++
hw/net/rtl8139.c | 4 +-
hw/rtc/mc146818rtc.c | 6 +
hw/smbios/smbios.c | 46 +++++-
hw/timer/i8254_common.c | 2 +-
hw/usb/hcd-uhci.c | 4 +-
hw/usb/hcd-xhci-pci.c | 59 ++++++--
hw/usb/hcd-xhci-pci.h | 1 +
hw/usb/hcd-xhci.c | 20 +++
hw/usb/hcd-xhci.h | 2 +
include/hw/acpi/ich9.h | 3 +
include/hw/boards.h | 36 +++++
include/hw/firmware/smbios.h | 5 +-
include/hw/i386/pc.h | 3 +
include/hw/usb.h | 3 +
migration/migration.c | 2 +
migration/migration.h | 5 +
25 files changed, 514 insertions(+), 26 deletions(-)
diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
index ab203ad448..7ec26884e8 100644
index 381ef2ddcf..82bd805b55 100644
--- a/hw/acpi/ich9.c
+++ b/hw/acpi/ich9.c
@@ -444,6 +444,18 @@ static void ich9_pm_set_enable_tco(Object *obj, bool value, Error **errp)
s->pm.enable_tco = value;
@@ -433,6 +433,18 @@ static void ich9_pm_set_keep_pci_slot_hpc(Object *obj, bool value, Error **errp)
s->pm.keep_pci_slot_hpc = value;
}
+static bool ich9_pm_get_force_rev1_fadt(Object *obj, Error **errp)
@ -75,33 +108,33 @@ index ab203ad448..7ec26884e8 100644
+ s->pm.force_rev1_fadt = value;
+}
+
void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm, Error **errp)
void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm)
{
static const uint32_t gpe0_len = ICH9_PMIO_GPE0_LEN;
@@ -468,6 +480,10 @@ void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm, Error **errp)
@@ -457,6 +469,9 @@ void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm)
object_property_add_bool(obj, "cpu-hotplug-legacy",
ich9_pm_get_cpu_hotplug_legacy,
ich9_pm_set_cpu_hotplug_legacy,
NULL);
ich9_pm_set_cpu_hotplug_legacy);
+ object_property_add_bool(obj, "__com.redhat_force-rev1-fadt",
+ ich9_pm_get_force_rev1_fadt,
+ ich9_pm_set_force_rev1_fadt,
+ NULL);
object_property_add(obj, ACPI_PM_PROP_S3_DISABLED, "uint8",
ich9_pm_get_disable_s3,
ich9_pm_set_disable_s3,
+ ich9_pm_set_force_rev1_fadt);
object_property_add_uint8_ptr(obj, ACPI_PM_PROP_S3_DISABLED,
&pm->disable_s3, OBJ_PROP_FLAG_READWRITE);
object_property_add_uint8_ptr(obj, ACPI_PM_PROP_S4_DISABLED,
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index 93aec2dd2c..3a26193cbe 100644
index f0b5fac44a..8d6011c0a3 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -274,6 +274,7 @@ static const VMStateDescription vmstate_acpi = {
@@ -278,7 +278,7 @@ static bool piix4_vmstate_need_smbus(void *opaque, int version_id)
static const VMStateDescription vmstate_acpi = {
.name = "piix4_pm",
.version_id = 3,
.minimum_version_id = 3,
- .minimum_version_id = 3,
+ .minimum_version_id = 2,
.post_load = vmstate_acpi_post_load,
.fields = (VMStateField[]) {
VMSTATE_PCI_DEVICE(parent_obj, PIIX4PMState),
@@ -627,8 +628,8 @@ static void piix4_send_gpe(AcpiDeviceIf *adev, AcpiEventStatusBits ev)
@@ -644,8 +644,8 @@ static void piix4_send_gpe(AcpiDeviceIf *adev, AcpiEventStatusBits ev)
static Property piix4_pm_properties[] = {
DEFINE_PROP_UINT32("smb_io_base", PIIX4PMState, smb_io_base, 0),
@ -110,21 +143,34 @@ index 93aec2dd2c..3a26193cbe 100644
+ DEFINE_PROP_UINT8(ACPI_PM_PROP_S3_DISABLED, PIIX4PMState, disable_s3, 1),
+ DEFINE_PROP_UINT8(ACPI_PM_PROP_S4_DISABLED, PIIX4PMState, disable_s4, 1),
DEFINE_PROP_UINT8(ACPI_PM_PROP_S4_VAL, PIIX4PMState, s4_val, 2),
DEFINE_PROP_BOOL("acpi-pci-hotplug-with-bridge-support", PIIX4PMState,
use_acpi_pci_hotplug, true),
DEFINE_PROP_BOOL(ACPI_PM_PROP_ACPI_PCIHP_BRIDGE, PIIX4PMState,
use_acpi_hotplug_bridge, true),
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 30da05dfe0..5de4d9d73b 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -1590,7 +1590,7 @@ static void virt_build_smbios(VirtMachineState *vms)
smbios_set_defaults("QEMU", product,
vmc->smbios_old_sys_ver ? "1.0" : mc->name, false,
- true, SMBIOS_ENTRY_POINT_30);
+ true, NULL, NULL, SMBIOS_ENTRY_POINT_30);
smbios_get_tables(MACHINE(vms), NULL, 0,
&smbios_tables, &smbios_tables_len,
diff --git a/hw/char/serial.c b/hw/char/serial.c
index b4aa250950..0012f0e44d 100644
index 7061aacbce..fe8d0afbb0 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -34,6 +34,7 @@
#include "sysemu/runstate.h"
#include "qemu/error-report.h"
@@ -37,6 +37,7 @@
#include "trace.h"
#include "hw/qdev-properties.h"
#include "hw/qdev-properties-system.h"
+#include "migration/migration.h"
//#define DEBUG_SERIAL
#define UART_LCR_DLAB 0x80 /* Divisor latch access bit */
@@ -703,6 +704,9 @@ static int serial_post_load(void *opaque, int version_id)
@@ -689,6 +690,9 @@ static int serial_post_load(void *opaque, int version_id)
static bool serial_thr_ipending_needed(void *opaque)
{
SerialState *s = opaque;
@ -134,7 +180,7 @@ index b4aa250950..0012f0e44d 100644
if (s->ier & UART_IER_THRI) {
bool expected_value = ((s->iir & UART_IIR_ID) == UART_IIR_THRI);
@@ -784,6 +788,10 @@ static const VMStateDescription vmstate_serial_xmit_fifo = {
@@ -770,6 +774,10 @@ static const VMStateDescription vmstate_serial_xmit_fifo = {
static bool serial_fifo_timeout_timer_needed(void *opaque)
{
SerialState *s = (SerialState *)opaque;
@ -145,7 +191,7 @@ index b4aa250950..0012f0e44d 100644
return timer_pending(s->fifo_timeout_timer);
}
@@ -801,6 +809,10 @@ static const VMStateDescription vmstate_serial_fifo_timeout_timer = {
@@ -787,6 +795,10 @@ static const VMStateDescription vmstate_serial_fifo_timeout_timer = {
static bool serial_timeout_ipending_needed(void *opaque)
{
SerialState *s = (SerialState *)opaque;
@ -156,7 +202,7 @@ index b4aa250950..0012f0e44d 100644
return s->timeout_ipending != 0;
}
@@ -818,6 +830,10 @@ static const VMStateDescription vmstate_serial_timeout_ipending = {
@@ -804,6 +816,10 @@ static const VMStateDescription vmstate_serial_timeout_ipending = {
static bool serial_poll_needed(void *opaque)
{
SerialState *s = (SerialState *)opaque;
@ -168,13 +214,115 @@ index b4aa250950..0012f0e44d 100644
}
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 1689ad3bf8..e0e0eec8bf 100644
index 53a99abc56..be4f9864cd 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -27,6 +27,176 @@
#include "hw/pci/pci.h"
#include "hw/mem/nvdimm.h"
@@ -37,6 +37,278 @@
#include "hw/virtio/virtio.h"
#include "hw/virtio/virtio-pci.h"
+/*
+ * Mostly the same as hw_compat_6_0
+ */
+GlobalProperty hw_compat_rhel_8_5[] = {
+ /* hw_compat_rhel_8_5 from hw_compat_6_0 */
+ { "gpex-pcihost", "allow-unmapped-accesses", "false" },
+ /* hw_compat_rhel_8_5 from hw_compat_6_0 */
+ { "i8042", "extended-state", "false"},
+ /* hw_compat_rhel_8_5 from hw_compat_6_0 */
+ { "nvme-ns", "eui64-default", "off"},
+ /* hw_compat_rhel_8_5 from hw_compat_6_0 */
+ { "e1000", "init-vet", "off" },
+ /* hw_compat_rhel_8_5 from hw_compat_6_0 */
+ { "e1000e", "init-vet", "off" },
+};
+const size_t hw_compat_rhel_8_5_len = G_N_ELEMENTS(hw_compat_rhel_8_5);
+
+/*
+ * Mostly the same as hw_compat_5_2
+ */
+GlobalProperty hw_compat_rhel_8_4[] = {
+ /* hw_compat_rhel_8_4 from hw_compat_5_2 */
+ { "ICH9-LPC", "smm-compat", "on"},
+ /* hw_compat_rhel_8_4 from hw_compat_5_2 */
+ { "PIIX4_PM", "smm-compat", "on"},
+ /* hw_compat_rhel_8_4 from hw_compat_5_2 */
+ { "virtio-blk-device", "report-discard-granularity", "off" },
+ /* hw_compat_rhel_8_4 from hw_compat_5_2 */
+ { "virtio-net-pci", "vectors", "3"},
+};
+const size_t hw_compat_rhel_8_4_len = G_N_ELEMENTS(hw_compat_rhel_8_4);
+
+/*
+ * Mostly the same as hw_compat_5_1
+ */
+GlobalProperty hw_compat_rhel_8_3[] = {
+ /* hw_compat_rhel_8_3 from hw_compat_5_1 */
+ { "vhost-scsi", "num_queues", "1"},
+ /* hw_compat_rhel_8_3 from hw_compat_5_1 */
+ { "vhost-user-blk", "num-queues", "1"},
+ /* hw_compat_rhel_8_3 from hw_compat_5_1 */
+ { "vhost-user-scsi", "num_queues", "1"},
+ /* hw_compat_rhel_8_3 from hw_compat_5_1 */
+ { "virtio-blk-device", "num-queues", "1"},
+ /* hw_compat_rhel_8_3 from hw_compat_5_1 */
+ { "virtio-scsi-device", "num_queues", "1"},
+ /* hw_compat_rhel_8_3 from hw_compat_5_1 */
+ { "nvme", "use-intel-id", "on"},
+ /* hw_compat_rhel_8_3 from hw_compat_5_1 */
+ { "pvpanic", "events", "1"}, /* PVPANIC_PANICKED */
+ /* hw_compat_rhel_8_3 bz 1912846 */
+ { "pci-xhci", "x-rh-late-msi-cap", "off" },
+ /* hw_compat_rhel_8_3 from hw_compat_5_1 */
+ { "virtio-pci", "x-ats-page-aligned", "off"},
+};
+const size_t hw_compat_rhel_8_3_len = G_N_ELEMENTS(hw_compat_rhel_8_3);
+
+/*
+ * The same as hw_compat_4_2 + hw_compat_5_0
+ */
+GlobalProperty hw_compat_rhel_8_2[] = {
+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */
+ { "virtio-blk-device", "queue-size", "128"},
+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */
+ { "virtio-scsi-device", "virtqueue_size", "128"},
+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */
+ { "virtio-blk-device", "x-enable-wce-if-config-wce", "off" },
+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */
+ { "virtio-blk-device", "seg-max-adjust", "off"},
+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */
+ { "virtio-scsi-device", "seg_max_adjust", "off"},
+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */
+ { "vhost-blk-device", "seg_max_adjust", "off"},
+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */
+ { "usb-host", "suppress-remote-wake", "off" },
+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */
+ { "usb-redir", "suppress-remote-wake", "off" },
+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */
+ { "qxl", "revision", "4" },
+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */
+ { "qxl-vga", "revision", "4" },
+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */
+ { "fw_cfg", "acpi-mr-restore", "false" },
+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */
+ { "virtio-device", "use-disabled-flag", "false" },
+ /* hw_compat_rhel_8_2 from hw_compat_5_0 */
+ { "pci-host-bridge", "x-config-reg-migration-enabled", "off" },
+ /* hw_compat_rhel_8_2 from hw_compat_5_0 */
+ { "virtio-balloon-device", "page-poison", "false" },
+ /* hw_compat_rhel_8_2 from hw_compat_5_0 */
+ { "vmport", "x-read-set-eax", "off" },
+ /* hw_compat_rhel_8_2 from hw_compat_5_0 */
+ { "vmport", "x-signal-unsupported-cmd", "off" },
+ /* hw_compat_rhel_8_2 from hw_compat_5_0 */
+ { "vmport", "x-report-vmx-type", "off" },
+ /* hw_compat_rhel_8_2 from hw_compat_5_0 */
+ { "vmport", "x-cmds-v2", "off" },
+ /* hw_compat_rhel_8_2 from hw_compat_5_0 */
+ { "virtio-device", "x-disable-legacy-check", "true" },
+};
+const size_t hw_compat_rhel_8_2_len = G_N_ELEMENTS(hw_compat_rhel_8_2);
+
+/*
+ * The same as hw_compat_4_1
+ */
@ -220,7 +368,7 @@ index 1689ad3bf8..e0e0eec8bf 100644
+ /* hw_compat_rhel_8_0 from hw_compat_4_0 */
+ { "virtio-vga", "edid", "false" },
+ /* hw_compat_rhel_8_0 from hw_compat_4_0 */
+ { "virtio-gpu-pci", "edid", "false" },
+ { "virtio-gpu-device", "edid", "false" },
+ /* hw_compat_rhel_8_0 from hw_compat_4_0 */
+ { "virtio-device", "use-started", "false" },
+ /* hw_compat_rhel_8_0 from hw_compat_3_1 - that was added in 4.1 */
@ -345,14 +493,14 @@ index 1689ad3bf8..e0e0eec8bf 100644
+};
+const size_t hw_compat_rhel_7_1_len = G_N_ELEMENTS(hw_compat_rhel_7_1);
+
GlobalProperty hw_compat_4_1[] = {
{ "virtio-pci", "x-pcie-flr-init", "off" },
};
GlobalProperty hw_compat_6_1[] = {
{ "vhost-user-vsock-device", "seqpacket", "off" },
{ "nvme-ns", "shared", "off" },
diff --git a/hw/display/vga-isa.c b/hw/display/vga-isa.c
index 873e5e9706..d1a2efe47e 100644
index 90851e730b..a91c5d7467 100644
--- a/hw/display/vga-isa.c
+++ b/hw/display/vga-isa.c
@@ -82,7 +82,7 @@ static void vga_isa_realizefn(DeviceState *dev, Error **errp)
@@ -85,7 +85,7 @@ static void vga_isa_realizefn(DeviceState *dev, Error **errp)
}
static Property vga_isa_properties[] = {
@ -361,23 +509,50 @@ index 873e5e9706..d1a2efe47e 100644
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 223dd3e05d..dda3f64f19 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -177,6 +177,8 @@ static void pc_init1(MachineState *machine,
smbios_set_defaults("QEMU", "Standard PC (i440FX + PIIX, 1996)",
mc->name, pcmc->smbios_legacy_mode,
pcmc->smbios_uuid_encoded,
+ pcmc->smbios_stream_product,
+ pcmc->smbios_stream_version,
SMBIOS_ENTRY_POINT_21);
}
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index e1e100316d..235054a643 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -200,6 +200,8 @@ static void pc_q35_init(MachineState *machine)
smbios_set_defaults("QEMU", "Standard PC (Q35 + ICH9, 2009)",
mc->name, pcmc->smbios_legacy_mode,
pcmc->smbios_uuid_encoded,
+ pcmc->smbios_stream_product,
+ pcmc->smbios_stream_version,
SMBIOS_ENTRY_POINT_21);
}
diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c
index b69fd7d8ad..d8be50a1ce 100644
index ac96f7665a..d35bc1f0b0 100644
--- a/hw/net/e1000e.c
+++ b/hw/net/e1000e.c
@@ -79,6 +79,11 @@ typedef struct E1000EState {
@@ -81,6 +81,12 @@ struct E1000EState {
E1000ECore core;
bool init_vet;
+
+ /* 7.3 had the intr_state field that was in the original e1000e code
+ * but that was removed prior to 2.7's release
+ */
+ bool redhat_7_3_intr_state_enable;
+ uint32_t redhat_7_3_intr_state;
} E1000EState;
};
#define E1000E_MMIO_IDX 0
@@ -94,6 +99,10 @@ typedef struct E1000EState {
@@ -96,6 +102,10 @@ struct E1000EState {
#define E1000E_MSIX_TABLE (0x0000)
#define E1000E_MSIX_PBA (0x2000)
@ -388,7 +563,7 @@ index b69fd7d8ad..d8be50a1ce 100644
static uint64_t
e1000e_mmio_read(void *opaque, hwaddr addr, unsigned size)
{
@@ -305,6 +314,8 @@ e1000e_init_msix(E1000EState *s)
@@ -307,6 +317,8 @@ e1000e_init_msix(E1000EState *s)
} else {
if (!e1000e_use_msix_vectors(s, E1000E_MSIX_VEC_NUM)) {
msix_uninit(d, &s->msix, &s->msix);
@ -397,7 +572,7 @@ index b69fd7d8ad..d8be50a1ce 100644
}
}
}
@@ -476,6 +487,8 @@ static void e1000e_pci_realize(PCIDevice *pci_dev, Error **errp)
@@ -478,6 +490,8 @@ static void e1000e_pci_realize(PCIDevice *pci_dev, Error **errp)
ret = msi_init(PCI_DEVICE(s), 0xD0, 1, true, false, NULL);
if (ret) {
trace_e1000e_msi_init_fail(ret);
@ -406,7 +581,7 @@ index b69fd7d8ad..d8be50a1ce 100644
}
if (e1000e_add_pm_capability(pci_dev, e1000e_pmrb_offset,
@@ -599,6 +612,11 @@ static const VMStateDescription e1000e_vmstate_intr_timer = {
@@ -605,6 +619,11 @@ static const VMStateDescription e1000e_vmstate_intr_timer = {
VMSTATE_STRUCT_ARRAY(_f, _s, _num, 0, \
e1000e_vmstate_intr_timer, E1000IntrDelayTimer)
@ -418,7 +593,7 @@ index b69fd7d8ad..d8be50a1ce 100644
static const VMStateDescription e1000e_vmstate = {
.name = "e1000e",
.version_id = 1,
@@ -610,6 +628,7 @@ static const VMStateDescription e1000e_vmstate = {
@@ -616,6 +635,7 @@ static const VMStateDescription e1000e_vmstate = {
VMSTATE_MSIX(parent_obj, E1000EState),
VMSTATE_UINT32(ioaddr, E1000EState),
@ -426,7 +601,7 @@ index b69fd7d8ad..d8be50a1ce 100644
VMSTATE_UINT32(core.rxbuf_min_shift, E1000EState),
VMSTATE_UINT8(core.rx_desc_len, E1000EState),
VMSTATE_UINT32_ARRAY(core.rxbuf_sizes, E1000EState,
@@ -658,6 +677,8 @@ static PropertyInfo e1000e_prop_disable_vnet,
@@ -664,6 +684,8 @@ static PropertyInfo e1000e_prop_disable_vnet,
static Property e1000e_properties[] = {
DEFINE_NIC_PROPERTIES(E1000EState, conf),
@ -436,10 +611,10 @@ index b69fd7d8ad..d8be50a1ce 100644
e1000e_prop_disable_vnet, bool),
DEFINE_PROP_SIGNED("subsys_ven", E1000EState, subsys_ven,
diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c
index 88a97d756d..21d80e96cf 100644
index 90b4fc63ce..3ffb9dd22c 100644
--- a/hw/net/rtl8139.c
+++ b/hw/net/rtl8139.c
@@ -3177,7 +3177,7 @@ static int rtl8139_pre_save(void *opaque)
@@ -3179,7 +3179,7 @@ static int rtl8139_pre_save(void *opaque)
static const VMStateDescription vmstate_rtl8139 = {
.name = "rtl8139",
@ -448,7 +623,7 @@ index 88a97d756d..21d80e96cf 100644
.minimum_version_id = 3,
.post_load = rtl8139_post_load,
.pre_save = rtl8139_pre_save,
@@ -3258,7 +3258,9 @@ static const VMStateDescription vmstate_rtl8139 = {
@@ -3260,7 +3260,9 @@ static const VMStateDescription vmstate_rtl8139 = {
VMSTATE_UINT32(tally_counters.TxMCol, RTL8139State),
VMSTATE_UINT64(tally_counters.RxOkPhy, RTL8139State),
VMSTATE_UINT64(tally_counters.RxOkBrd, RTL8139State),
@ -459,18 +634,18 @@ index 88a97d756d..21d80e96cf 100644
VMSTATE_UINT16(tally_counters.TxUndrn, RTL8139State),
diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c
index 74ae74bc5c..73820517df 100644
index 4fbafddb22..2f120c6e70 100644
--- a/hw/rtc/mc146818rtc.c
+++ b/hw/rtc/mc146818rtc.c
@@ -42,6 +42,7 @@
@@ -43,6 +43,7 @@
#include "qapi/qapi-events-misc-target.h"
#include "qapi/visitor.h"
#include "exec/address-spaces.h"
#include "hw/rtc/mc146818rtc_regs.h"
+#include "migration/migration.h"
#ifdef TARGET_I386
#include "qapi/qapi-commands-misc-target.h"
@@ -820,6 +821,11 @@ static int rtc_post_load(void *opaque, int version_id)
@@ -821,6 +822,11 @@ static int rtc_post_load(void *opaque, int version_id)
static bool rtc_irq_reinject_on_ack_count_needed(void *opaque)
{
RTCState *s = (RTCState *)opaque;
@ -483,17 +658,87 @@ index 74ae74bc5c..73820517df 100644
}
diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c
index 11d476c4a2..e6e9355384 100644
index 7397e56737..3a4bb894ba 100644
--- a/hw/smbios/smbios.c
+++ b/hw/smbios/smbios.c
@@ -777,6 +777,7 @@ void smbios_set_defaults(const char *manufacturer, const char *product,
@@ -57,6 +57,9 @@ static bool smbios_legacy = true;
static bool smbios_uuid_encoded = true;
/* end: legacy structures & constants for <= 2.0 machines */
+/* Set to true for modern Windows 10 HardwareID-6 compat */
+static bool smbios_type2_required;
+
uint8_t *smbios_tables;
size_t smbios_tables_len;
@@ -619,7 +622,7 @@ static void smbios_build_type_1_table(void)
static void smbios_build_type_2_table(void)
{
- SMBIOS_BUILD_TABLE_PRE(2, 0x200, false); /* optional */
+ SMBIOS_BUILD_TABLE_PRE(2, 0x200, smbios_type2_required);
SMBIOS_TABLE_SET_STR(2, manufacturer_str, type2.manufacturer);
SMBIOS_TABLE_SET_STR(2, product_str, type2.product);
@@ -888,7 +891,10 @@ void smbios_set_cpuid(uint32_t version, uint32_t features)
void smbios_set_defaults(const char *manufacturer, const char *product,
const char *version, bool legacy_mode,
- bool uuid_encoded, SmbiosEntryPointType ep_type)
+ bool uuid_encoded,
+ const char *stream_product,
+ const char *stream_version,
+ SmbiosEntryPointType ep_type)
{
smbios_have_defaults = true;
smbios_legacy = legacy_mode;
@@ -909,11 +915,45 @@ void smbios_set_defaults(const char *manufacturer, const char *product,
g_free(smbios_entries);
}
+ /*
+ * If @stream_product & @stream_version are non-NULL, then
+ * we're following rules for new Windows driver support.
+ * The data we have to report is defined in this doc:
+ *
+ * https://docs.microsoft.com/en-us/windows-hardware/drivers/install/specifying-hardware-ids-for-a-computer
+ *
+ * The Windows drivers are written to expect use of the
+ * scheme documented as "HardwareID-6" against Windows 10,
+ * which uses SMBIOS System (Type 1) and Base Board (Type 2)
+ * tables and will match on
+ *
+ * System Manufacturer = Red Hat (@manufacturer)
+ * System SKU Number = 8.2.0 (@stream_version)
+ * Baseboard Manufacturer = Red Hat (@manufacturer)
+ * Baseboard Product = RHEL-AV (@stream_product)
+ *
+ * NB, SKU must be changed with each RHEL-AV release
+ *
+ * Other fields can be freely used by applications using
+ * QEMU. For example apps can use the "System product"
+ * and "System version" to identify themselves.
+ *
+ * We get 'System Manufacturer' and 'Baseboard Manufacturer'
+ */
SMBIOS_SET_DEFAULT(type1.manufacturer, manufacturer);
SMBIOS_SET_DEFAULT(type1.product, product);
SMBIOS_SET_DEFAULT(type1.version, version);
+ SMBIOS_SET_DEFAULT(type1.family, "Red Hat Enterprise Linux");
+ if (stream_version != NULL) {
+ SMBIOS_SET_DEFAULT(type1.sku, stream_version);
+ }
SMBIOS_SET_DEFAULT(type2.manufacturer, manufacturer);
SMBIOS_SET_DEFAULT(type2.product, product);
- SMBIOS_SET_DEFAULT(type2.product, product);
+ if (stream_product != NULL) {
+ SMBIOS_SET_DEFAULT(type2.product, stream_product);
+ smbios_type2_required = true;
+ } else {
+ SMBIOS_SET_DEFAULT(type2.product, product);
+ }
SMBIOS_SET_DEFAULT(type2.version, version);
SMBIOS_SET_DEFAULT(type3.manufacturer, manufacturer);
SMBIOS_SET_DEFAULT(type3.version, version);
diff --git a/hw/timer/i8254_common.c b/hw/timer/i8254_common.c
index 050875b497..32935da46c 100644
--- a/hw/timer/i8254_common.c
@ -508,10 +753,10 @@ index 050875b497..32935da46c 100644
vmstate_pit_channel, PITChannelState),
VMSTATE_INT64(channels[0].next_transition_time,
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
index 23507ad3b5..9fd87a7ad9 100644
index d1b5657d72..7930b868fa 100644
--- a/hw/usb/hcd-uhci.c
+++ b/hw/usb/hcd-uhci.c
@@ -1219,12 +1219,14 @@ static void usb_uhci_common_realize(PCIDevice *dev, Error **errp)
@@ -1166,11 +1166,13 @@ void usb_uhci_common_realize(PCIDevice *dev, Error **errp)
UHCIState *s = UHCI(dev);
uint8_t *pci_conf = s->dev.config;
int i;
@ -519,19 +764,129 @@ index 23507ad3b5..9fd87a7ad9 100644
pci_conf[PCI_CLASS_PROG] = 0x00;
/* TODO: reset value should be 0. */
pci_conf[USB_SBRN] = USB_RELEASE_1; // release number
pci_conf[USB_SBRN] = USB_RELEASE_1; /* release number */
- pci_config_set_interrupt_pin(pci_conf, u->info.irq_pin + 1);
+ irq_pin = u->info.irq_pin;
+ pci_config_set_interrupt_pin(pci_conf, irq_pin + 1);
s->irq = pci_allocate_irq(dev);
if (s->masterbus) {
USBPort *ports[NB_PORTS];
diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c
index e934b1a5b1..e18b05e528 100644
--- a/hw/usb/hcd-xhci-pci.c
+++ b/hw/usb/hcd-xhci-pci.c
@@ -104,6 +104,33 @@ static int xhci_pci_vmstate_post_load(void *opaque, int version_id)
return 0;
}
+/* RH bz 1912846 */
+static bool usb_xhci_pci_add_msi(struct PCIDevice *dev, Error **errp)
+{
+ int ret;
+ Error *err = NULL;
+ XHCIPciState *s = XHCI_PCI(dev);
+
+ ret = msi_init(dev, 0x70, s->xhci.numintrs, true, false, &err);
+ /*
+ * Any error other than -ENOTSUP(board's MSI support is broken)
+ * is a programming error
+ */
+ assert(!ret || ret == -ENOTSUP);
+ if (ret && s->msi == ON_OFF_AUTO_ON) {
+ /* Can't satisfy user's explicit msi=on request, fail */
+ error_append_hint(&err, "You have to use msi=auto (default) or "
+ "msi=off with this machine type.\n");
+ error_propagate(errp, err);
+ return true;
+ }
+ assert(!err || s->msi == ON_OFF_AUTO_AUTO);
+ /* With msi=auto, we fall back to MSI off silently */
+ error_free(err);
+
+ return false;
+}
+
static void usb_xhci_pci_realize(struct PCIDevice *dev, Error **errp)
{
int ret;
@@ -125,23 +152,12 @@ static void usb_xhci_pci_realize(struct PCIDevice *dev, Error **errp)
s->xhci.nec_quirks = true;
}
- if (s->msi != ON_OFF_AUTO_OFF) {
- ret = msi_init(dev, 0x70, s->xhci.numintrs, true, false, &err);
- /*
- * Any error other than -ENOTSUP(board's MSI support is broken)
- * is a programming error
- */
- assert(!ret || ret == -ENOTSUP);
- if (ret && s->msi == ON_OFF_AUTO_ON) {
- /* Can't satisfy user's explicit msi=on request, fail */
- error_append_hint(&err, "You have to use msi=auto (default) or "
- "msi=off with this machine type.\n");
+ if (s->msi != ON_OFF_AUTO_OFF && s->rh_late_msi_cap) {
+ /* This gives the behaviour from 5.2.0 onwards, lspci shows 90,a0,70 */
+ if (usb_xhci_pci_add_msi(dev, &err)) {
error_propagate(errp, err);
return;
}
- assert(!err || s->msi == ON_OFF_AUTO_AUTO);
- /* With msi=auto, we fall back to MSI off silently */
- error_free(err);
}
pci_register_bar(dev, 0,
PCI_BASE_ADDRESS_SPACE_MEMORY |
@@ -154,6 +170,14 @@ static void usb_xhci_pci_realize(struct PCIDevice *dev, Error **errp)
assert(ret > 0);
}
+ /* RH bz 1912846 */
+ if (s->msi != ON_OFF_AUTO_OFF && !s->rh_late_msi_cap) {
+ /* This gives the older RH machine behaviour, lspci shows 90,70,a0 */
+ if (usb_xhci_pci_add_msi(dev, &err)) {
+ error_propagate(errp, err);
+ return;
+ }
+ }
if (s->msix != ON_OFF_AUTO_OFF) {
/* TODO check for errors, and should fail when msix=on */
msix_init(dev, s->xhci.numintrs,
@@ -198,11 +222,18 @@ static void xhci_instance_init(Object *obj)
qdev_alias_all_properties(DEVICE(&s->xhci), obj);
}
+static Property xhci_pci_properties[] = {
+ /* RH bz 1912846 */
+ DEFINE_PROP_BOOL("x-rh-late-msi-cap", XHCIPciState, rh_late_msi_cap, true),
+ DEFINE_PROP_END_OF_LIST()
+};
+
static void xhci_class_init(ObjectClass *klass, void *data)
{
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
DeviceClass *dc = DEVICE_CLASS(klass);
+ device_class_set_props(dc, xhci_pci_properties);
dc->reset = xhci_pci_reset;
dc->vmsd = &vmstate_xhci_pci;
set_bit(DEVICE_CATEGORY_USB, dc->categories);
diff --git a/hw/usb/hcd-xhci-pci.h b/hw/usb/hcd-xhci-pci.h
index c193f79443..086a1feb1e 100644
--- a/hw/usb/hcd-xhci-pci.h
+++ b/hw/usb/hcd-xhci-pci.h
@@ -39,6 +39,7 @@ typedef struct XHCIPciState {
XHCIState xhci;
OnOffAuto msi;
OnOffAuto msix;
+ bool rh_late_msi_cap; /* bz 1912846 */
} XHCIPciState;
#endif
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 80988bb305..8fed2eedd6 100644
index e01700039b..d5ea13356c 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -3590,9 +3590,27 @@ static const VMStateDescription vmstate_xhci_slot = {
@@ -3494,9 +3494,27 @@ static const VMStateDescription vmstate_xhci_slot = {
}
};
@ -559,7 +914,7 @@ index 80988bb305..8fed2eedd6 100644
.fields = (VMStateField[]) {
VMSTATE_UINT32(type, XHCIEvent),
VMSTATE_UINT32(ccode, XHCIEvent),
@@ -3601,6 +3619,8 @@ static const VMStateDescription vmstate_xhci_event = {
@@ -3505,6 +3523,8 @@ static const VMStateDescription vmstate_xhci_event = {
VMSTATE_UINT32(flags, XHCIEvent),
VMSTATE_UINT8(slotid, XHCIEvent),
VMSTATE_UINT8(epid, XHCIEvent),
@ -569,10 +924,10 @@ index 80988bb305..8fed2eedd6 100644
}
};
diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h
index 2fad4df2a7..f554b671e3 100644
index 98f598382a..50a7b6f6c4 100644
--- a/hw/usb/hcd-xhci.h
+++ b/hw/usb/hcd-xhci.h
@@ -157,6 +157,8 @@ typedef struct XHCIEvent {
@@ -149,6 +149,8 @@ typedef struct XHCIEvent {
uint32_t flags;
uint8_t slotid;
uint8_t epid;
@ -582,11 +937,11 @@ index 2fad4df2a7..f554b671e3 100644
typedef struct XHCIInterrupter {
diff --git a/include/hw/acpi/ich9.h b/include/hw/acpi/ich9.h
index 41568d1837..1a23ccc412 100644
index 7ca92843c6..21abfd8447 100644
--- a/include/hw/acpi/ich9.h
+++ b/include/hw/acpi/ich9.h
@@ -61,6 +61,9 @@ typedef struct ICH9LPCPMRegs {
uint8_t smm_enabled;
@@ -68,6 +68,9 @@ typedef struct ICH9LPCPMRegs {
bool smm_compat;
bool enable_tco;
TCOIORegs tco_regs;
+
@ -596,13 +951,25 @@ index 41568d1837..1a23ccc412 100644
#define ACPI_PM_PROP_TCO_ENABLED "enable_tco"
diff --git a/include/hw/boards.h b/include/hw/boards.h
index de45087f34..6f85a0e032 100644
index 9c1c190104..8bba96ef2b 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -377,4 +377,28 @@ extern const size_t hw_compat_2_2_len;
@@ -441,4 +441,40 @@ extern const size_t hw_compat_2_2_len;
extern GlobalProperty hw_compat_2_1[];
extern const size_t hw_compat_2_1_len;
+extern GlobalProperty hw_compat_rhel_8_5[];
+extern const size_t hw_compat_rhel_8_5_len;
+
+extern GlobalProperty hw_compat_rhel_8_4[];
+extern const size_t hw_compat_rhel_8_4_len;
+
+extern GlobalProperty hw_compat_rhel_8_3[];
+extern const size_t hw_compat_rhel_8_3_len;
+
+extern GlobalProperty hw_compat_rhel_8_2[];
+extern const size_t hw_compat_rhel_8_2_len;
+
+extern GlobalProperty hw_compat_rhel_8_1[];
+extern const size_t hw_compat_rhel_8_1_len;
+
@ -628,26 +995,55 @@ index de45087f34..6f85a0e032 100644
+extern const size_t hw_compat_rhel_7_1_len;
+
#endif
diff --git a/include/hw/firmware/smbios.h b/include/hw/firmware/smbios.h
index 5a0dd0c8cf..2cb1ec2bab 100644
--- a/include/hw/firmware/smbios.h
+++ b/include/hw/firmware/smbios.h
@@ -278,7 +278,10 @@ void smbios_entry_add(QemuOpts *opts, Error **errp);
void smbios_set_cpuid(uint32_t version, uint32_t features);
void smbios_set_defaults(const char *manufacturer, const char *product,
const char *version, bool legacy_mode,
- bool uuid_encoded, SmbiosEntryPointType ep_type);
+ bool uuid_encoded,
+ const char *stream_product,
+ const char *stream_version,
+ SmbiosEntryPointType ep_type);
uint8_t *smbios_get_table_legacy(MachineState *ms, size_t *length);
void smbios_get_tables(MachineState *ms,
const struct smbios_phys_mem_area *mem_array,
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 9ab39e428f..7ccc9a1a07 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -107,6 +107,9 @@ struct PCMachineClass {
bool smbios_defaults;
bool smbios_legacy_mode;
bool smbios_uuid_encoded;
+ /* New fields needed for Windows HardwareID-6 matching */
+ const char *smbios_stream_product;
+ const char *smbios_stream_version;
/* RAM / address space compat: */
bool gigabyte_align;
diff --git a/include/hw/usb.h b/include/hw/usb.h
index c24d968a19..b353438ea0 100644
index 33668dd0a9..e6b2fe72da 100644
--- a/include/hw/usb.h
+++ b/include/hw/usb.h
@@ -605,4 +605,8 @@ int usb_get_quirks(uint16_t vendor_id, uint16_t product_id,
uint8_t interface_class, uint8_t interface_subclass,
uint8_t interface_protocol);
@@ -582,4 +582,7 @@ void usb_pcap_init(FILE *fp);
void usb_pcap_ctrl(USBPacket *p, bool setup);
void usb_pcap_data(USBPacket *p, bool setup);
+
+/* hcd-xhci.c -- rhel7.0.0 machine type compatibility */
+extern bool migrate_cve_2014_5263_xhci_fields;
+
#endif
diff --git a/migration/migration.c b/migration/migration.c
index 354ad072fa..30c53c623b 100644
index abaf6f9e3d..a87ff01b81 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -121,6 +121,8 @@ enum mig_rp_message_type {
MIG_RP_MSG_MAX
};
@@ -164,6 +164,8 @@ INITIALIZE_MIGRATE_CAPS_SET(check_caps_background_snapshot,
MIGRATION_CAPABILITY_X_COLO,
MIGRATION_CAPABILITY_VALIDATE_UUID);
+bool migrate_pre_2_2;
+
@ -655,10 +1051,10 @@ index 354ad072fa..30c53c623b 100644
migrations at once. For now we don't need to add
dynamic creation of migration */
diff --git a/migration/migration.h b/migration/migration.h
index 79b3dda146..0b1b0d4df5 100644
index 8130b703eb..d016cedd9d 100644
--- a/migration/migration.h
+++ b/migration/migration.h
@@ -335,6 +335,11 @@ void init_dirty_bitmap_incoming_migration(void);
@@ -381,6 +381,11 @@ bool check_dirty_bitmap_mig_alias_map(const BitmapMigrationNodeAliasList *bbm,
void migrate_add_address(SocketAddress *address);
int foreach_not_ignored_block(RAMBlockIterFunc func, void *opaque);
@ -671,5 +1067,5 @@ index 79b3dda146..0b1b0d4df5 100644
#define qemu_ram_foreach_block \
#warning "Use foreach_not_ignored_block in migration code"
--
2.21.0
2.27.0

301
SOURCES/0008-Add-aarch64-machine-types.patch

@ -1,4 +1,4 @@
From 49164264d9928f73961acbbe4d56d8dfa23d8099 Mon Sep 17 00:00:00 2001
From 670e90f5cbd92189155e079b8c6e2aafdf82d162 Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Fri, 19 Oct 2018 12:53:31 +0200
Subject: Add aarch64 machine types
@ -7,14 +7,14 @@ Adding changes to add RHEL machine types for aarch64 architecture.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
Rebase changes (4.0.0):
Rebase notes (4.0.0):
- Use upstream compat handling
Rebase changes (4.1.0-rc0):
Rebase notes (4.1.0-rc0):
- Removed a15memmap (upstream)
- Use virt_flash_create in rhel800_virt_instance_init
Rebase changes (4.2.0-rc0):
Rebase notes (4.2.0-rc0):
- Set numa_mem_supported
Rebase notes (4.2.0-rc3):
@ -23,6 +23,30 @@ Rebase notes (4.2.0-rc3):
- aarch64: virt: Allow PCDIMM instantiation (patch 92247)
- aarch64: virt: Enhance the comment related to gic-version (patch 92248)
Rebase notes (5.0.0):
- Set default_ram_id in rhel_machine_class_init
- Added setting acpi properties
Rebase notes (5.1.0):
- Added ras property
- Added to virt_machine_device_unplug_cb to machine type (upstream)
- added mte property (upstream)
Rebase notes (weekly-210210):
- Added support for oem fields to machine type
Rebase notes (weekly-210303):
- Use rhel-8.4.0 hw compat
Rebase notes (6.0.0-rc2):
- renamed oem-id and oem-table-id to x-oem-id and x-oem-table-id
Rebase notes (210623):
- Protect TPM functions by CONFIG_TPM ifdef
Rebase notes (6.1.0-rc0):
- Add support for default_bus_bypass_iommu
Merged patches (4.0.0):
- 7bfdb4c aarch64: Add virt-rhel8.0.0 machine type for ARM
- 3433e69 aarch64: Set virt-rhel8.0.0 max_cpus to 512
@ -32,25 +56,45 @@ Merged patches (4.1.0):
- c3e39ef aarch64: Add virt-rhel8.1.0 machine type for ARM
- 59a46d1 aarch64: Allow ARM VIRT iommu option in RHEL8.1 machine
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
Merged patches (5.2.0 rc0):
- 12990ad hw/arm: Changes to rhel820 machine
- 46d5a79 hw/arm: Introduce rhel_virt_instance_init() helper
- 098954a hw/arm: Add rhel830 machine type
- ee8e99d arm: Set correct max_cpus value on virt-rhel* machine types
- e5edd38 RHEL-only: arm/virt: Allow the TPM_TIS_SYSBUS device dynamic allocation in machvirt
- 6d7ba66 machine types/numa: set numa_mem_supported on old machine types (partialy)
- 25c5644 machine_types/numa: compatibility for auto_enable_numa_with_memdev (partialy)
Merged patches (6.0):
- 078fadb5da AArch64 machine types cleanup
- ea7b7425fa hw/arm/virt: Add 8.4 Machine type
Merged patches (weekly-210609):
- 73b1578882 hw/arm/virt: Add 8.5 machine type
- 5333038d11 hw/arm/virt: Disable PL011 clock migration through hw_compat_rhel_8_3
- 63adb8ae86 arm/virt: Register highmem and gic-version as class properties
Merged patches (weekly-211027):
- 86e3057c0a hw: arm: virt: Add hw_compat_rhel_8_5 to 8.5 machine type
---
hw/arm/virt.c | 161 +++++++++++++++++++++++++++++++++++++++++-
include/hw/arm/virt.h | 11 +++
2 files changed, 171 insertions(+), 1 deletion(-)
hw/arm/virt.c | 226 +++++++++++++++++++++++++++++++++++++++++-
hw/core/machine.c | 2 +
include/hw/arm/virt.h | 8 ++
3 files changed, 235 insertions(+), 1 deletion(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index d4bedc2607..e10839100e 100644
index 5de4d9d73b..c77d26ab13 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -72,6 +72,7 @@
#include "hw/mem/nvdimm.h"
#include "hw/acpi/generic_event_device.h"
@@ -79,6 +79,7 @@
#include "hw/char/pl011.h"
#include "qemu/guest-random.h"
+#if 0 /* Disabled for Red Hat Enterprise Linux */
#define DEFINE_VIRT_MACHINE_LATEST(major, minor, latest) \
static void virt_##major##_##minor##_class_init(ObjectClass *oc, \
void *data) \
@@ -98,7 +99,49 @@
@@ -105,7 +106,48 @@
DEFINE_VIRT_MACHINE_LATEST(major, minor, true)
#define DEFINE_VIRT_MACHINE(major, minor) \
DEFINE_VIRT_MACHINE_LATEST(major, minor, false)
@ -72,7 +116,6 @@ index d4bedc2607..e10839100e 100644
+ static const TypeInfo rhel##m##n##s##_machvirt_info = { \
+ .name = MACHINE_TYPE_NAME("virt-rhel" # m "." # n "." # s), \
+ .parent = TYPE_RHEL_MACHINE, \
+ .instance_init = rhel##m##n##s##_virt_instance_init, \
+ .class_init = rhel##m##n##s##_virt_class_init, \
+ }; \
+ static void rhel##m##n##s##_machvirt_init(void) \
@ -101,7 +144,7 @@ index d4bedc2607..e10839100e 100644
/* Number of external interrupt lines to configure the GIC with */
#define NUM_IRQS 256
@@ -1763,6 +1806,7 @@ static void machvirt_init(MachineState *machine)
@@ -2180,6 +2222,7 @@ static void machvirt_init(MachineState *machine)
qemu_add_machine_init_done_notifier(&vms->machine_done);
}
@ -109,23 +152,39 @@ index d4bedc2607..e10839100e 100644
static bool virt_get_secure(Object *obj, Error **errp)
{
VirtMachineState *vms = VIRT_MACHINE(obj);
@@ -1791,6 +1835,7 @@ static void virt_set_virt(Object *obj, bool value, Error **errp)
@@ -2207,6 +2250,7 @@ static void virt_set_virt(Object *obj, bool value, Error **errp)
vms->virt = value;
}
+#endif /* disabled for RHEL */
static bool virt_get_highmem(Object *obj, Error **errp)
{
@@ -2304,6 +2348,7 @@ static void virt_set_acpi(Object *obj, Visitor *v, const char *name,
visit_type_OnOffAuto(v, name, &vms->acpi, errp);
}
+#if 0 /* Disabled for Red Hat Enterprise Linux */
static bool virt_get_ras(Object *obj, Error **errp)
{
VirtMachineState *vms = VIRT_MACHINE(obj);
@@ -2022,6 +2067,7 @@ static int virt_kvm_type(MachineState *ms, const char *type_str)
return requested_pa_size > 40 ? requested_pa_size : 0;
@@ -2331,6 +2376,7 @@ static void virt_set_mte(Object *obj, bool value, Error **errp)
vms->mte = value;
}
+#endif /* disabled for RHEL */
static char *virt_get_gic_version(Object *obj, Error **errp)
{
@@ -2666,6 +2712,7 @@ static int virt_kvm_type(MachineState *ms, const char *type_str)
return fixed_ipa ? 0 : requested_pa_size;
}
+#if 0 /* Disabled for Red Hat Enterprise Linux */
static void virt_machine_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
@@ -2258,3 +2304,116 @@ static void virt_machine_2_6_options(MachineClass *mc)
@@ -3031,3 +3078,180 @@ static void virt_machine_2_6_options(MachineClass *mc)
vmc->no_pmu = true;
}
DEFINE_VIRT_MACHINE(2, 6)
@ -138,11 +197,11 @@ index d4bedc2607..e10839100e 100644
+
+ mc->family = "virt-rhel-Z";
+ mc->init = machvirt_init;
+ /* Start with max_cpus set to 512, which is the maximum supported by KVM.
+ * The value may be reduced later when we have more information about the
+ * configuration of the particular instance.
+ */
+ mc->max_cpus = 512;
+ /* Maximum supported VCPU count for all virt-rhel* machines */
+ mc->max_cpus = 384;
+#ifdef CONFIG_TPM
+ machine_class_allow_dynamic_sysbus_dev(mc, TYPE_TPM_TIS_SYSBUS);
+#endif
+ mc->block_default_type = IF_VIRTIO;
+ mc->no_cdrom = 1;
+ mc->pci_allow_0_address = true;
@ -158,57 +217,65 @@ index d4bedc2607..e10839100e 100644
+ hc->pre_plug = virt_machine_device_pre_plug_cb;
+ hc->plug = virt_machine_device_plug_cb;
+ hc->unplug_request = virt_machine_device_unplug_request_cb;
+ mc->numa_mem_supported = true;
+ hc->unplug = virt_machine_device_unplug_cb;
+ mc->nvdimm_supported = true;
+ mc->auto_enable_numa_with_memhp = true;
+}
+ mc->auto_enable_numa_with_memdev = true;
+ mc->default_ram_id = "mach-virt.ram";
+
+static const TypeInfo rhel_machine_info = {
+ .name = TYPE_RHEL_MACHINE,
+ .parent = TYPE_MACHINE,
+ .abstract = true,
+ .instance_size = sizeof(VirtMachineState),
+ .class_size = sizeof(VirtMachineClass),
+ .class_init = rhel_machine_class_init,
+ .interfaces = (InterfaceInfo[]) {
+ { TYPE_HOTPLUG_HANDLER },
+ { }
+ },
+};
+ object_class_property_add(oc, "acpi", "OnOffAuto",
+ virt_get_acpi, virt_set_acpi,
+ NULL, NULL);
+ object_class_property_set_description(oc, "acpi",
+ "Enable ACPI");
+
+ object_class_property_add_bool(oc, "highmem", virt_get_highmem,
+ virt_set_highmem);
+ object_class_property_set_description(oc, "highmem",
+ "Set on/off to enable/disable using "
+ "physical address space above 32 bits");
+
+ object_class_property_add_str(oc, "gic-version", virt_get_gic_version,
+ virt_set_gic_version);
+ object_class_property_set_description(oc, "gic-version",
+ "Set GIC version. "
+ "Valid values are 2, 3, host and max");
+
+ object_class_property_add_str(oc, "x-oem-id",
+ virt_get_oem_id,
+ virt_set_oem_id);
+ object_class_property_set_description(oc, "x-oem-id",
+ "Override the default value of field OEMID "
+ "in ACPI table header."
+ "The string may be up to 6 bytes in size");
+
+ object_class_property_add_str(oc, "x-oem-table-id",
+ virt_get_oem_table_id,
+ virt_set_oem_table_id);
+ object_class_property_set_description(oc, "x-oem-table-id",
+ "Override the default value of field OEM Table ID "
+ "in ACPI table header."
+ "The string may be up to 8 bytes in size");
+ object_class_property_add_bool(oc, "default_bus_bypass_iommu",
+ virt_get_default_bus_bypass_iommu,
+ virt_set_default_bus_bypass_iommu);
+
+static void rhel_machine_init(void)
+{
+ type_register_static(&rhel_machine_info);
+}
+type_init(rhel_machine_init);
+
+static void rhel820_virt_instance_init(Object *obj)
+static void rhel_virt_instance_init(Object *obj)
+{
+ VirtMachineState *vms = VIRT_MACHINE(obj);
+ VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
+
+ /* EL3 is disabled by default and non-configurable for RHEL */
+ vms->secure = false;
+
+ /* EL2 is disabled by default and non-configurable for RHEL */
+ vms->virt = false;
+ /* High memory is enabled by default for RHEL */
+
+ /* High memory is enabled by default */
+ vms->highmem = true;
+ object_property_add_bool(obj, "highmem", virt_get_highmem,
+ virt_set_highmem, NULL);
+ object_property_set_description(obj, "highmem",
+ "Set on/off to enable/disable using "
+ "physical address space above 32 bits",
+ NULL);
+ /*
+ * Default GIC type is still v2, but became configurable for RHEL. We
+ * keep v2 instead of max as TCG CI test cases require an MSI controller
+ * and there is no userspace ITS MSI emulation available.
+ */
+ vms->gic_version = 2;
+ object_property_add_str(obj, "gic-version", virt_get_gic_version,
+ virt_set_gic_version, NULL);
+ object_property_set_description(obj, "gic-version",
+ "Set GIC version. "
+ "Valid values are 2, 3 and host", NULL);
+ vms->gic_version = VIRT_GIC_VERSION_NOSEL;
+
+ vms->highmem_ecam = !vmc->no_highmem_ecam;
+
@ -218,59 +285,121 @@ index d4bedc2607..e10839100e 100644
+ /* Default allows ITS instantiation */
+ vms->its = true;
+ object_property_add_bool(obj, "its", virt_get_its,
+ virt_set_its, NULL);
+ virt_set_its);
+ object_property_set_description(obj, "its",
+ "Set on/off to enable/disable "
+ "ITS instantiation",
+ NULL);
+ "ITS instantiation");
+ }
+
+ /* Default disallows iommu instantiation */
+ vms->iommu = VIRT_IOMMU_NONE;
+ object_property_add_str(obj, "iommu", virt_get_iommu, virt_set_iommu, NULL);
+ object_property_add_str(obj, "iommu", virt_get_iommu, virt_set_iommu);
+ object_property_set_description(obj, "iommu",
+ "Set the IOMMU type. "
+ "Valid values are none and smmuv3",
+ NULL);
+ "Valid values are none and smmuv3");
+
+ /* Default disallows RAS instantiation and is non-configurable for RHEL */
+ vms->ras = false;
+
+ /* MTE is disabled by default and non-configurable for RHEL */
+ vms->mte = false;
+
+ vms->default_bus_bypass_iommu = false;
+ vms->irqmap = a15irqmap;
+
+ vms->irqmap=a15irqmap;
+ virt_flash_create(vms);
+ vms->oem_id = g_strndup(ACPI_BUILD_APPNAME6, 6);
+ vms->oem_table_id = g_strndup(ACPI_BUILD_APPNAME8, 8);
+
+}
+
+static void rhel820_virt_options(MachineClass *mc)
+static const TypeInfo rhel_machine_info = {
+ .name = TYPE_RHEL_MACHINE,
+ .parent = TYPE_MACHINE,
+ .abstract = true,
+ .instance_size = sizeof(VirtMachineState),
+ .class_size = sizeof(VirtMachineClass),
+ .class_init = rhel_machine_class_init,
+ .instance_init = rhel_virt_instance_init,
+ .interfaces = (InterfaceInfo[]) {
+ { TYPE_HOTPLUG_HANDLER },
+ { }
+ },
+};
+
+static void rhel_machine_init(void)
+{
+ type_register_static(&rhel_machine_info);
+}
+type_init(rhel_machine_init);
+
+static void rhel850_virt_options(MachineClass *mc)
+{
+ compat_props_add(mc->compat_props, arm_rhel_compat, arm_rhel_compat_len);
+ compat_props_add(mc->compat_props, hw_compat_rhel_8_5, hw_compat_rhel_8_5_len);
+}
+DEFINE_RHEL_MACHINE_AS_LATEST(8, 5, 0)
+
+static void rhel840_virt_options(MachineClass *mc)
+{
+ rhel850_virt_options(mc);
+ compat_props_add(mc->compat_props, hw_compat_rhel_8_4, hw_compat_rhel_8_4_len);
+}
+DEFINE_RHEL_MACHINE(8, 4, 0)
+
+static void rhel830_virt_options(MachineClass *mc)