* Tue May 14 2024 Miroslav Rezanina <mrezanin@redhat.com> - 9.0.0-1

- Rebase to QEMU 9.0.0 [RHEL-28852]
- Resolves: RHEL-28852
  (Rebase qemu-kvm to QEMU 9.0.0 for RHEL 10.0 beta)
- Resolves: RHEL-23771
  ([qemu-kvm] Disable passthrough of pmem device)
- Resolves: RHEL-34024
  (Remove RDMA migration support
- Resolves: RHEL-30366
  (Check/fix machine type compatibility for QEMU 9.0.0 [x86_64][rhel-10.0 Beta])
- Resolves: RHEL-30367
  (Check/fix machine type compatibility for QEMU 9.0.0 [aarch64][rhel-10.0 Beta])
This commit is contained in:
Miroslav Rezanina 2024-05-14 02:50:03 -04:00
parent 26bb5fd826
commit 94823a58de
20 changed files with 1847 additions and 6485 deletions

1
.gitignore vendored
View File

@ -28,3 +28,4 @@
/qemu-8.0.0.tar.xz /qemu-8.0.0.tar.xz
/qemu-8.1.0.tar.xz /qemu-8.1.0.tar.xz
/qemu-8.2.0.tar.xz /qemu-8.2.0.tar.xz
/qemu-9.0.0.tar.xz

View File

@ -1,4 +1,4 @@
From faae70a870156f86a5cf55ca967b15d7612941ff Mon Sep 17 00:00:00 2001 From 91262ecfbd218a95dab8491e4226674f79debf5a Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com> From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Wed, 26 May 2021 10:56:02 +0200 Date: Wed, 26 May 2021 10:56:02 +0200
Subject: Initial redhat build Subject: Initial redhat build
@ -13,194 +13,14 @@ several issues are fixed in QEMU tree:
We disable make check due to issues with some of the tests. We disable make check due to issues with some of the tests.
This rebase is based on qemu-kvm-8.1.0-5.el9
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
--
Rebase changes (6.1.0):
- Move build to .distro
- Move changes for support file to related commit
- Added dependency for python3-sphinx-rtd_theme
- Removed --disable-sheepdog configure option
- Added new hw-display modules
- SASL initialization moved to ui/vnc-auth-sasl.c
- Add accel-qtest-<arch> and accel-tcg-x86_64 libraries
- Added hw-usb-host module
- Disable new configure options (bpf, nvmm, slirp-smbd)
- Use -pie for ksmctl build (annocheck complain fix)
Rebase changes (6.2.0):
- 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
- Add -Wno-string-plus-int to extra flags
- Updated configure options
Rebase changes (7.0.0):
- Do not use -mlittle CFLAG on ppc64le
- Used upstream handling issue with ui/clipboard.c
- Use -mlittle-endian on ppc64le instead of deleteing it in configure
- Drop --disable-libxml2 option for configure (upstream)
- Remove vof roms
- Disable AVX2 support
- Use internal meson
- Disable new configure options (dbus-display and qga-vss)
- Change permissions on installing tests/Makefile.include
- Remove ssh block driver
Rebase changes (7.1.0):
- --disable-vnc-png renamed to --disable-png (upstream)
- removed --disable-vhost-vsock and --disable-vhost-scsi
- capstone submodule removed
- Temporary include capstone build
Rebase changes (7.2.0):
- Switch --enable-slirp=system to --enable-slirp
- Added new configure options (blkio and sndio, both disabled)
Rebase changes (7.2.0):
- Fix SRPM name generation to work on Fedora 37
- Switch back to system meson
Rebase changes (8.0.0):
- use enable-dtrace-backands instead of enable-dtrace-backend
- Removed qemu virtiofsd bits
- test/check-block.sh removed (upstream)
- Add new --disable-* options for configure
Rebase changes (8.1.0):
- qmp-spec.txt installed by make
- Removed --meson configure option
- Add --disable-pypi
- Removed --with-git and -with-gitsubmodules
- Renamed --disable-pypi to --disable-downloads
- Minor updates in README.tests
Rebase changes (8.2.0):
- Removed --disable-hax (upstream)
- Added --disable-plugins configure option
- Fixing frh.py strings
Merged patches (6.0.0):
- 605758c902 Limit build on Power to qemu-img and qemu-ga only
Merged patches (6.1.0):
- f04f91751f Use cached tarballs
- 6581165c65 Remove message with running VM count
- 03c3cac9fc spec-file: build qemu-kvm without SPICE and QXL
- e0ae6c1f6c spec-file: Obsolete qemu-kvm-ui-spice
- 9d2e9f9ecf spec: Do not build qemu-kvm-block-gluster
- cf470b4234 spec: Do not link pcnet and ne2k_pci roms
- e981284a6b redhat: Install the s390-netboot.img that we've built
- 24ef557f33 spec: Remove usage of Group: tag
- c40d69b4f4 spec: Drop %defattr usage
- f8e98798ce spec: Clean up BuildRequires
- 47246b43ee spec: Remove iasl BuildRequires
- 170dc1cbe0 spec: Remove redundant 0 in conditionals
- 8718f6fa11 spec: Add more have_XXX conditionals
- a001269ce9 spec: Remove binutils versioned Requires
- 34545ee641 spec: Remove diffutils BuildRequires
- c2c82beac9 spec: Remove redundant Requires:
- 9314c231f4 spec: Add XXX_version macros
- c43db0bf0f spec: Add have_block_rbd
- 3ecb0c0319 qga: drop StandardError=syslog
- 018049dc80 Remove iscsi support
- a2edf18777 redhat: Replace the kvm-setup.service with a /etc/modules-load.d config file
- 387b5fbcfe redhat: Move qemu-kvm-docs dependency to qemu-kvm
- 4ead693178 redhat: introducting qemu-kvm-hw-usbredir
- 4dc6fc3035 redhat: use the standard vhost-user JSON path
- 84757178b4 Fix local build
- 8c394227dd spec: Restrict block drivers in tools
- b6aa7c1fae Move tools to separate package
- eafd82e509 Split qemu-pr-helper to separate package
- 2c0182e2aa spec: RPM_BUILD_ROOT -> %{buildroot}
- 91bd55ca13 spec: More use of %{name} instead of 'qemu-kvm'
- 50ba299c61 spec: Use qemu-pr-helper.service from qemu.git (partial)
- ee08d4e0a3 spec: Use %{_sourcedir} for referencing sources
- 039e7f7d02 spec: Add tools_only
- 884ba71617 spec: %build: Add run_configure helper
- 8ebd864d65 spec: %build: Disable more bits with %{disable_everything} (partial)
- f23fdb53f5 spec: %build: Add macros for some 'configure' parameters
- fe951a8bd8 spec: %files: Move qemu-guest-agent and qemu-img earlier
- 353b632e37 spec: %install: Remove redundant bits
- 9d2015b752 spec: %install: Add %{modprobe_kvm_conf} macro
- 6d05134e8c spec: %install: Remove qemu-guest-agent /etc/qemu-kvm usage
- 985b226467 spec: %install: clean up qemu-ga section
- dfaf9c600d spec: %install: Use a single %{tools_only} section
- f6978ddb46 spec: Make tools_only not cross spec sections
- 071c211098 spec: %install: Limit time spent in %{qemu_kvm_build}
- 1b65c674be spec: misc syntactic merges with Fedora
- 4da16294cf spec: Use Fedora's pattern for specifying rc version
- d7ee259a79 spec: %files: don't use fine grained -docs file list
- 64cad0c60f spec: %files: Add licenses to qemu-common too
- c3de4f080a spec: %install: Drop python3 shebang fixup
- 46fc216115 Update local build to work with spec file improvements
- bab9531548 spec: Remove buildldflags
- c8360ab6a9 spec: Use %make_build macro
- f6966c66e9 spec: Drop make install sharedir and datadir usage
- 86982421bc spec: use %make_install macro
- 191c405d22 spec: parallelize `make check`
- 251a1fb958 spec: Drop explicit --build-id
- 44c7dda6c3 spec: use %{build_ldflags}
- 0009a34354 Move virtiofsd to separate package
- 34d1b200b3 Utilize --firmware configure option
- 2800e1dd03 spec: Switch toolchain to Clang/LLVM (except process-patches.sh)
- e8a70f500f spec: Use safe-stack for x86_64
- e29445d50d spec: Reenable write support for VMDK etc. in tools
- a4fe2a3e16 redhat: Disable LTO on non-x86 architectures
Merged patches (6.2.0):
- 333452440b remove sgabios dependency
- 7d3633f184 enable pulseaudio
- bd898709b0 spec: disable use of gcrypt for crypto backends in favour of gnutls
- e4f0c6dee6 spec: Remove block-curl and block-ssh dependency
- 4dc13bfe63 spec: Build the VDI block driver
- d2f2ff3c74 spec: Explicitly include compress filter
- a7d047f9c2 Move ksmtuned files to separate package
Merged patches (7.0.0):
- 098d4d08d0 spec: Rename qemu-kvm-hw-usbredir to qemu-kvm-device-usb-redirect
- c2bd0d6834 spec: Split qemu-kvm-ui-opengl
- 2c9cda805d spec: Introduce packages for virtio-gpu-* modules (changed as rhel device tree not set)
- d0414a3e0b spec: Introduce device-display-virtio-vga* packages
- 3534ec46d4 spec: Move usb-host module to separate package
- ddc14d4737 spec: Move qtest accel module to tests package
- 6f2c4befa6 spec: Extend qemu-kvm-core description
- 6f11866e4e (rhel/rhel-9.0.0) Update to qemu-kvm-6.2.0-6.el9
- da0a28758f ui/clipboard: fix use-after-free regression
- 895d4d52eb spec: Remove qemu-virtiofsd
- c8c8c8bd84 spec: Fix obsolete for spice subpackages
- d46d2710b2 spec: Obsolete old usb redir subpackage
- 6f52a50b68 spec: Obsolete ssh driver
Merged patches (7.2.0):
- 8c6834feb6 Remove opengl display device subpackages (C9S MR 124)
- 0ecc97f29e spec: Add requires for packages with additional virtio-gpu variants (C9S MR 124)
Merged patches (8.0.0):
- 7754f6ba78 Minor packaging fixes
- 401af56187 spec: Disable VDUSE
Merged patches (8.1.0):
- 0c2306676f Enable Linux io_uring
- b7fa6426d5 Enable libblkio block drivers
- 19f6d7a6f4 Fix virtio-blk-vhost-vdpa typo in spec file
- f356cae88f spec: Build DBUS display
- 77b763efd5 Provide elf2dmp binary in qemu-tools
Merged patches (8.2.0):
- cd9efa221d Enable qemu-kvm-device-usb-redirec for aarch64
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com> Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
--- ---
.distro/Makefile | 100 + .distro/Makefile | 101 ++
.distro/Makefile.common | 42 + .distro/Makefile.common | 42 +
.distro/README.tests | 39 + .distro/README.tests | 39 +
.distro/modules-load.conf | 4 + .distro/modules-load.conf | 4 +
.distro/qemu-guest-agent.service | 1 - .distro/qemu-guest-agent.service | 1 -
.distro/qemu-kvm.spec.template | 4909 +++++++++++++++++++++++ .distro/qemu-kvm.spec.template | 1250 +++++++++++++++++++++++
.distro/rpminspect.yaml | 6 +- .distro/rpminspect.yaml | 6 +-
.distro/scripts/extract_build_cmd.py | 12 + .distro/scripts/extract_build_cmd.py | 12 +
.distro/scripts/frh.py | 4 +- .distro/scripts/frh.py | 4 +-
@ -211,7 +31,7 @@ Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
scripts/systemtap/conf.d/qemu_kvm.conf | 4 + scripts/systemtap/conf.d/qemu_kvm.conf | 4 +
scripts/systemtap/script.d/qemu_kvm.stp | 1 + scripts/systemtap/script.d/qemu_kvm.stp | 1 +
ui/vnc-auth-sasl.c | 2 +- ui/vnc-auth-sasl.c | 2 +-
16 files changed, 5168 insertions(+), 6 deletions(-) 16 files changed, 1510 insertions(+), 6 deletions(-)
create mode 100644 .distro/Makefile create mode 100644 .distro/Makefile
create mode 100644 .distro/Makefile.common create mode 100644 .distro/Makefile.common
create mode 100644 .distro/README.tests create mode 100644 .distro/README.tests

View File

@ -1,4 +1,4 @@
From 048067b4618ba1fa7c8c517185d4cd3a675eba72 Mon Sep 17 00:00:00 2001 From 8e767ade83e18995692d3554b6b71c9e15b51d89 Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com> From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Wed, 7 Dec 2022 03:05:48 -0500 Date: Wed, 7 Dec 2022 03:05:48 -0500
Subject: Enable/disable devices for RHEL Subject: Enable/disable devices for RHEL
@ -6,104 +6,34 @@ Subject: Enable/disable devices for RHEL
This commit adds all changes related to changes in supported devices. This commit adds all changes related to changes in supported devices.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com> Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
--
Rebase notes (6.1.0):
- Added CONFIG_TPM (except s390x)
- default-configs moved to configs
- Use --with-device-<ARCH> configure option to use rhel configs
Rebase notes (6.2.0):
- Add CONFIG_ISA_FDC
- Do not remove -no-hpet documentation
Rebase notes (7.0.0):
- Added CONFIG_ARM_GIC_TCG option for aarch64
- Fixes necessary for layout change fixes
- Renamed CONFIG_ARM_GIC_TCG to CONFIG_ARM_GICV3_TCG
- Removed upstream devices
Rebase notes (7.1.0):
- Added CONFIG_VHOST_VSOCK and CONFIG_VHOST_USER_VSOCK configs
- Added CONFIG_CXL and CONFIG_CXL_MEM_DEVICE for aarch64 and x86_64
- Added CONFIG_VHOST_USER_FS option (all archs)
Rebase notes (7.2.0):
- Removed disabling a15mpcore.c as no longer needed
Rebase notes (8.0.0):
- Rename CONFIG_ACPI_X86_ICH to CONFIG_ACPI_ICH9
- Inlude qemu/error-report.h in hw/display/cirrus_vga.c
- Change virtiofsd dependency version
Rebase notes (8.1.0):
- Added CONFIG_PCIE_PCI_BRIDGE for x86_64
- Disabling tcg cpus for aarch64
- Disable CONFIG_ARM_V7M and remove related hack
- Moved aarch64 tcg cpu disabling from arm machine type commit
Rebase notes (8.2.0):
- Disabled new a710 arm64 tcg cpu
- No longer needed hack for removal of i2c-echo
- Disable new neoverse-v2
- Removed CONFIG_OPENGL from x86_64 config file
Merged patches (6.1.0):
- c51bf45304 Remove SPICE and QXL from x86_64-rh-devices.mak
- 02fc745601 aarch64-rh-devices: add CONFIG_PVPANIC_PCI
- f2fe835153 aarch64-rh-devices: add CONFIG_PXB
- b5431733ad disable CONFIG_USB_STORAGE_BOT
- 478ba0cdf6 Disable TPM passthrough
- 2504d68a7c aarch64: Add USB storage devices
- 51c2a3253c disable ac97 audio
Merged patches (6.2.0):
- 9f2f9fa2ba disable sga device
Merged patches (7.0.0):
- fd7c45a5a8 redhat: Enable virtio-mem as tech-preview on x86-64
- c9e68ea451 Enable SGX -- RH Only
Merged patches (7.1.0):
- 38b89dc245 pc: Move s3/s4 suspend disabling to compat (only hw/acpi/ich9.c chunk)
- 8f663466c6 configs/devices/aarch64-softmmu: Enable CONFIG_VIRTIO_MEM
- 1bf372717a Enable virtio-iommu-pci on aarch64
- ae3f269458 Enable virtio-iommu-pci on x86_64
Merged patches (8.1.0):
- 8173d2eaba Disable unwanted new devices
Merged patches (8.2.0):
- b29f66431f Enable igb on x86_64
--- ---
.distro/qemu-kvm.spec.template | 18 +-- .distro/qemu-kvm.spec.template | 18 +--
.../aarch64-softmmu/aarch64-rh-devices.mak | 41 +++++++ .../aarch64-softmmu/aarch64-rh-devices.mak | 42 +++++++
.../ppc64-softmmu/ppc64-rh-devices.mak | 37 ++++++ .../ppc64-softmmu/ppc64-rh-devices.mak | 37 ++++++
configs/devices/rh-virtio.mak | 10 ++ configs/devices/rh-virtio.mak | 10 ++
.../s390x-softmmu/s390x-rh-devices.mak | 18 +++ .../s390x-softmmu/s390x-rh-devices.mak | 19 +++
.../x86_64-softmmu/x86_64-rh-devices.mak | 110 ++++++++++++++++++ .../x86_64-softmmu/x86_64-rh-devices.mak | 112 ++++++++++++++++++
hw/arm/virt.c | 2 + hw/arm/virt.c | 2 +
hw/block/fdc.c | 10 ++ hw/block/fdc.c | 10 ++
hw/cpu/meson.build | 3 +- hw/cpu/meson.build | 3 +-
hw/cxl/meson.build | 3 +- hw/cxl/meson.build | 3 +-
hw/display/cirrus_vga.c | 4 + hw/display/cirrus_vga.c | 4 +
hw/ide/piix.c | 5 +- hw/ide/piix.c | 5 +-
hw/ide/qdev.c | 9 ++
hw/input/pckbd.c | 2 + hw/input/pckbd.c | 2 +
hw/net/e1000.c | 2 + hw/net/e1000.c | 2 +
hw/ppc/spapr_cpu_core.c | 2 +
hw/usb/meson.build | 2 +- hw/usb/meson.build | 2 +-
hw/virtio/meson.build | 5 +- hw/virtio/meson.build | 6 +-
target/arm/arm-qmp-cmds.c | 2 + target/arm/arm-qmp-cmds.c | 2 +
target/arm/cpu.c | 4 + target/arm/cpu.c | 4 +
target/arm/cpu.h | 3 + target/arm/cpu.h | 3 +
target/arm/cpu64.c | 12 +- target/arm/cpu64.c | 12 +-
target/arm/tcg/cpu32.c | 2 + target/arm/tcg/cpu32.c | 2 +
target/arm/tcg/cpu64.c | 8 ++ target/arm/tcg/cpu64.c | 8 ++
target/ppc/cpu-models.c | 9 ++ target/arm/tcg/meson.build | 2 +-
target/s390x/cpu_models_sysemu.c | 3 + target/s390x/cpu_models_sysemu.c | 3 +
target/s390x/kvm/kvm.c | 8 ++ target/s390x/kvm/kvm.c | 8 ++
tests/qtest/arm-cpu-features.c | 4 + tests/qtest/arm-cpu-features.c | 4 +
28 files changed, 323 insertions(+), 15 deletions(-) 26 files changed, 309 insertions(+), 16 deletions(-)
create mode 100644 configs/devices/aarch64-softmmu/aarch64-rh-devices.mak create mode 100644 configs/devices/aarch64-softmmu/aarch64-rh-devices.mak
create mode 100644 configs/devices/ppc64-softmmu/ppc64-rh-devices.mak create mode 100644 configs/devices/ppc64-softmmu/ppc64-rh-devices.mak
create mode 100644 configs/devices/rh-virtio.mak create mode 100644 configs/devices/rh-virtio.mak
@ -112,10 +42,10 @@ Merged patches (8.2.0):
diff --git a/configs/devices/aarch64-softmmu/aarch64-rh-devices.mak b/configs/devices/aarch64-softmmu/aarch64-rh-devices.mak diff --git a/configs/devices/aarch64-softmmu/aarch64-rh-devices.mak b/configs/devices/aarch64-softmmu/aarch64-rh-devices.mak
new file mode 100644 new file mode 100644
index 0000000000..aec1831199 index 0000000000..b0191d3c69
--- /dev/null --- /dev/null
+++ b/configs/devices/aarch64-softmmu/aarch64-rh-devices.mak +++ b/configs/devices/aarch64-softmmu/aarch64-rh-devices.mak
@@ -0,0 +1,41 @@ @@ -0,0 +1,42 @@
+include ../rh-virtio.mak +include ../rh-virtio.mak
+ +
+CONFIG_ARM_GIC_KVM=y +CONFIG_ARM_GIC_KVM=y
@ -157,6 +87,7 @@ index 0000000000..aec1831199
+CONFIG_VHOST_VSOCK=y +CONFIG_VHOST_VSOCK=y
+CONFIG_VHOST_USER_VSOCK=y +CONFIG_VHOST_USER_VSOCK=y
+CONFIG_VHOST_USER_FS=y +CONFIG_VHOST_USER_FS=y
+CONFIG_IOMMUFD=y
diff --git a/configs/devices/ppc64-softmmu/ppc64-rh-devices.mak b/configs/devices/ppc64-softmmu/ppc64-rh-devices.mak diff --git a/configs/devices/ppc64-softmmu/ppc64-rh-devices.mak b/configs/devices/ppc64-softmmu/ppc64-rh-devices.mak
new file mode 100644 new file mode 100644
index 0000000000..dbb7d30829 index 0000000000..dbb7d30829
@ -218,10 +149,10 @@ index 0000000000..94ede1b5f6
+CONFIG_VIRTIO_SERIAL=y +CONFIG_VIRTIO_SERIAL=y
diff --git a/configs/devices/s390x-softmmu/s390x-rh-devices.mak b/configs/devices/s390x-softmmu/s390x-rh-devices.mak diff --git a/configs/devices/s390x-softmmu/s390x-rh-devices.mak b/configs/devices/s390x-softmmu/s390x-rh-devices.mak
new file mode 100644 new file mode 100644
index 0000000000..69a799adbd index 0000000000..24cf6dbd03
--- /dev/null --- /dev/null
+++ b/configs/devices/s390x-softmmu/s390x-rh-devices.mak +++ b/configs/devices/s390x-softmmu/s390x-rh-devices.mak
@@ -0,0 +1,18 @@ @@ -0,0 +1,19 @@
+include ../rh-virtio.mak +include ../rh-virtio.mak
+ +
+CONFIG_PCI=y +CONFIG_PCI=y
@ -240,12 +171,13 @@ index 0000000000..69a799adbd
+CONFIG_VHOST_VSOCK=y +CONFIG_VHOST_VSOCK=y
+CONFIG_VHOST_USER_VSOCK=y +CONFIG_VHOST_USER_VSOCK=y
+CONFIG_VHOST_USER_FS=y +CONFIG_VHOST_USER_FS=y
+CONFIG_IOMMUFD=y
diff --git a/configs/devices/x86_64-softmmu/x86_64-rh-devices.mak b/configs/devices/x86_64-softmmu/x86_64-rh-devices.mak diff --git a/configs/devices/x86_64-softmmu/x86_64-rh-devices.mak b/configs/devices/x86_64-softmmu/x86_64-rh-devices.mak
new file mode 100644 new file mode 100644
index 0000000000..ce5be73633 index 0000000000..d60ff1bcfc
--- /dev/null --- /dev/null
+++ b/configs/devices/x86_64-softmmu/x86_64-rh-devices.mak +++ b/configs/devices/x86_64-softmmu/x86_64-rh-devices.mak
@@ -0,0 +1,110 @@ @@ -0,0 +1,112 @@
+include ../rh-virtio.mak +include ../rh-virtio.mak
+ +
+CONFIG_ACPI=y +CONFIG_ACPI=y
@ -283,7 +215,8 @@ index 0000000000..ce5be73633
+CONFIG_IDE_CORE=y +CONFIG_IDE_CORE=y
+CONFIG_IDE_PCI=y +CONFIG_IDE_PCI=y
+CONFIG_IDE_PIIX=y +CONFIG_IDE_PIIX=y
+CONFIG_IDE_QDEV=y +CONFIG_IDE_DEV=y
+CONFIG_IDE_BUS=y
+CONFIG_IGB_PCI_EXPRESS=y +CONFIG_IGB_PCI_EXPRESS=y
+CONFIG_IOAPIC=y +CONFIG_IOAPIC=y
+CONFIG_IOH3420=y +CONFIG_IOH3420=y
@ -356,28 +289,29 @@ index 0000000000..ce5be73633
+CONFIG_VHOST_VSOCK=y +CONFIG_VHOST_VSOCK=y
+CONFIG_VHOST_USER_VSOCK=y +CONFIG_VHOST_USER_VSOCK=y
+CONFIG_VHOST_USER_FS=y +CONFIG_VHOST_USER_FS=y
+CONFIG_IOMMUFD=y
diff --git a/hw/arm/virt.c b/hw/arm/virt.c diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index be2856c018..af9ea4dd1c 100644 index a9a913aead..6c6d155002 100644
--- a/hw/arm/virt.c --- a/hw/arm/virt.c
+++ b/hw/arm/virt.c +++ b/hw/arm/virt.c
@@ -205,6 +205,7 @@ static const int a15irqmap[] = { @@ -2954,6 +2954,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
}; MachineClass *mc = MACHINE_CLASS(oc);
HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(oc);
static const char *valid_cpus[] = { static const char * const valid_cpu_types[] = {
+#if 0 /* Disabled for Red Hat Enterprise Linux */ +#if 0 /* Disabled for Red Hat Enterprise Linux */
#ifdef CONFIG_TCG #ifdef CONFIG_TCG
ARM_CPU_TYPE_NAME("cortex-a7"), ARM_CPU_TYPE_NAME("cortex-a7"),
ARM_CPU_TYPE_NAME("cortex-a15"), ARM_CPU_TYPE_NAME("cortex-a15"),
@@ -219,6 +220,7 @@ static const char *valid_cpus[] = { @@ -2971,6 +2972,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
ARM_CPU_TYPE_NAME("neoverse-n2"), #endif /* CONFIG_TCG */
#endif #ifdef TARGET_AARCH64
ARM_CPU_TYPE_NAME("cortex-a53"), ARM_CPU_TYPE_NAME("cortex-a53"),
+#endif /* disabled for RHEL */ +#endif /* disabled for RHEL */
ARM_CPU_TYPE_NAME("cortex-a57"), ARM_CPU_TYPE_NAME("cortex-a57"),
#if defined(CONFIG_KVM) || defined(CONFIG_HVF)
ARM_CPU_TYPE_NAME("host"), ARM_CPU_TYPE_NAME("host"),
ARM_CPU_TYPE_NAME("max"),
diff --git a/hw/block/fdc.c b/hw/block/fdc.c diff --git a/hw/block/fdc.c b/hw/block/fdc.c
index d7cc4d3ec1..12d0a60905 100644 index 6dd94e98bc..a05757fc9a 100644
--- a/hw/block/fdc.c --- a/hw/block/fdc.c
+++ b/hw/block/fdc.c +++ b/hw/block/fdc.c
@@ -49,6 +49,8 @@ @@ -49,6 +49,8 @@
@ -405,7 +339,7 @@ index d7cc4d3ec1..12d0a60905 100644
error_setg(errp, "Cannot choose a fallback FDrive type of 'auto'"); error_setg(errp, "Cannot choose a fallback FDrive type of 'auto'");
return; return;
diff --git a/hw/cpu/meson.build b/hw/cpu/meson.build diff --git a/hw/cpu/meson.build b/hw/cpu/meson.build
index 6d319947ca..91962fd863 100644 index 38cdcfbe57..e588ecfd42 100644
--- a/hw/cpu/meson.build --- a/hw/cpu/meson.build
+++ b/hw/cpu/meson.build +++ b/hw/cpu/meson.build
@@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
@ -416,7 +350,7 @@ index 6d319947ca..91962fd863 100644
system_ss.add(when: 'CONFIG_ARM11MPCORE', if_true: files('arm11mpcore.c')) system_ss.add(when: 'CONFIG_ARM11MPCORE', if_true: files('arm11mpcore.c'))
system_ss.add(when: 'CONFIG_REALVIEW', if_true: files('realview_mpcore.c')) system_ss.add(when: 'CONFIG_REALVIEW', if_true: files('realview_mpcore.c'))
diff --git a/hw/cxl/meson.build b/hw/cxl/meson.build diff --git a/hw/cxl/meson.build b/hw/cxl/meson.build
index ea0aebf6e3..6878f06974 100644 index 3e375f61a9..613adb3ebb 100644
--- a/hw/cxl/meson.build --- a/hw/cxl/meson.build
+++ b/hw/cxl/meson.build +++ b/hw/cxl/meson.build
@@ -6,7 +6,8 @@ system_ss.add(when: 'CONFIG_CXL', @@ -6,7 +6,8 @@ system_ss.add(when: 'CONFIG_CXL',
@ -430,7 +364,7 @@ index ea0aebf6e3..6878f06974 100644
if_false: files( if_false: files(
'cxl-host-stubs.c', 'cxl-host-stubs.c',
diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
index b80f98b6c4..0370cf8a64 100644 index 150883a971..497365bd80 100644
--- a/hw/display/cirrus_vga.c --- a/hw/display/cirrus_vga.c
+++ b/hw/display/cirrus_vga.c +++ b/hw/display/cirrus_vga.c
@@ -36,6 +36,7 @@ @@ -36,6 +36,7 @@
@ -452,10 +386,10 @@ index b80f98b6c4..0370cf8a64 100644
* Follow real hardware, cirrus card emulated has 4 MB video memory. * Follow real hardware, cirrus card emulated has 4 MB video memory.
* Also accept 8 MB/16 MB for backward compatibility. * Also accept 8 MB/16 MB for backward compatibility.
diff --git a/hw/ide/piix.c b/hw/ide/piix.c diff --git a/hw/ide/piix.c b/hw/ide/piix.c
index 4e5e12935f..03ca06bb17 100644 index 80efc633d3..9cb82b8eea 100644
--- a/hw/ide/piix.c --- a/hw/ide/piix.c
+++ b/hw/ide/piix.c +++ b/hw/ide/piix.c
@@ -190,7 +190,8 @@ static void piix3_ide_class_init(ObjectClass *klass, void *data) @@ -191,7 +191,8 @@ static void piix3_ide_class_init(ObjectClass *klass, void *data)
k->device_id = PCI_DEVICE_ID_INTEL_82371SB_1; k->device_id = PCI_DEVICE_ID_INTEL_82371SB_1;
k->class_id = PCI_CLASS_STORAGE_IDE; k->class_id = PCI_CLASS_STORAGE_IDE;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
@ -465,7 +399,7 @@ index 4e5e12935f..03ca06bb17 100644
} }
static const TypeInfo piix3_ide_info = { static const TypeInfo piix3_ide_info = {
@@ -214,6 +215,8 @@ static void piix4_ide_class_init(ObjectClass *klass, void *data) @@ -215,6 +216,8 @@ static void piix4_ide_class_init(ObjectClass *klass, void *data)
k->class_id = PCI_CLASS_STORAGE_IDE; k->class_id = PCI_CLASS_STORAGE_IDE;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
dc->hotpluggable = false; dc->hotpluggable = false;
@ -474,57 +408,11 @@ index 4e5e12935f..03ca06bb17 100644
} }
static const TypeInfo piix4_ide_info = { static const TypeInfo piix4_ide_info = {
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
index 1b3b4da01d..454bfa5783 100644
--- a/hw/ide/qdev.c
+++ b/hw/ide/qdev.c
@@ -283,10 +283,13 @@ static void ide_cd_realize(IDEDevice *dev, Error **errp)
ide_dev_initfn(dev, IDE_CD, errp);
}
+/* Disabled for Red Hat Enterprise Linux */
+#if 0
static void ide_cf_realize(IDEDevice *dev, Error **errp)
{
ide_dev_initfn(dev, IDE_CFATA, errp);
}
+#endif
#define DEFINE_IDE_DEV_PROPERTIES() \
DEFINE_BLOCK_PROPERTIES(IDEDrive, dev.conf), \
@@ -346,6 +349,8 @@ static const TypeInfo ide_cd_info = {
.class_init = ide_cd_class_init,
};
+/* Disabled for Red Hat Enterprise Linux */
+#if 0
static Property ide_cf_properties[] = {
DEFINE_IDE_DEV_PROPERTIES(),
DEFINE_BLOCK_CHS_PROPERTIES(IDEDrive, dev.conf),
@@ -371,6 +376,7 @@ static const TypeInfo ide_cf_info = {
.instance_size = sizeof(IDEDrive),
.class_init = ide_cf_class_init,
};
+#endif
static void ide_device_class_init(ObjectClass *klass, void *data)
{
@@ -396,7 +402,10 @@ static void ide_register_types(void)
type_register_static(&ide_bus_info);
type_register_static(&ide_hd_info);
type_register_static(&ide_cd_info);
+/* Disabled for Red Hat Enterprise Linux */
+#if 0
type_register_static(&ide_cf_info);
+#endif
type_register_static(&ide_device_type_info);
}
diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
index b92b63bedc..3b6235dde6 100644 index 74f10b640f..2e85ecf476 100644
--- a/hw/input/pckbd.c --- a/hw/input/pckbd.c
+++ b/hw/input/pckbd.c +++ b/hw/input/pckbd.c
@@ -957,6 +957,8 @@ static void i8042_class_initfn(ObjectClass *klass, void *data) @@ -952,6 +952,8 @@ static void i8042_class_initfn(ObjectClass *klass, void *data)
dc->vmsd = &vmstate_kbd_isa; dc->vmsd = &vmstate_kbd_isa;
adevc->build_dev_aml = i8042_build_aml; adevc->build_dev_aml = i8042_build_aml;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories); set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
@ -534,7 +422,7 @@ index b92b63bedc..3b6235dde6 100644
static const TypeInfo i8042_info = { static const TypeInfo i8042_info = {
diff --git a/hw/net/e1000.c b/hw/net/e1000.c diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index 8ffe1077f1..b3dfeeca4f 100644 index 43f3a4a701..267f182883 100644
--- a/hw/net/e1000.c --- a/hw/net/e1000.c
+++ b/hw/net/e1000.c +++ b/hw/net/e1000.c
@@ -1746,6 +1746,7 @@ static const E1000Info e1000_devices[] = { @@ -1746,6 +1746,7 @@ static const E1000Info e1000_devices[] = {
@ -553,28 +441,11 @@ index 8ffe1077f1..b3dfeeca4f 100644
}; };
static void e1000_register_types(void) static void e1000_register_types(void)
diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
index 91fae56573..33e0c8724c 100644
--- a/hw/ppc/spapr_cpu_core.c
+++ b/hw/ppc/spapr_cpu_core.c
@@ -386,10 +386,12 @@ static const TypeInfo spapr_cpu_core_type_infos[] = {
.instance_size = sizeof(SpaprCpuCore),
.class_size = sizeof(SpaprCpuCoreClass),
},
+#if 0 /* Disabled for Red Hat Enterprise Linux */
DEFINE_SPAPR_CPU_CORE_TYPE("970_v2.2"),
DEFINE_SPAPR_CPU_CORE_TYPE("970mp_v1.0"),
DEFINE_SPAPR_CPU_CORE_TYPE("970mp_v1.1"),
DEFINE_SPAPR_CPU_CORE_TYPE("power5+_v2.1"),
+#endif
DEFINE_SPAPR_CPU_CORE_TYPE("power7_v2.3"),
DEFINE_SPAPR_CPU_CORE_TYPE("power7+_v2.1"),
DEFINE_SPAPR_CPU_CORE_TYPE("power8_v2.0"),
diff --git a/hw/usb/meson.build b/hw/usb/meson.build diff --git a/hw/usb/meson.build b/hw/usb/meson.build
index e94149ebde..4a8adbf3dc 100644 index aac3bb35f2..5411ff35df 100644
--- a/hw/usb/meson.build --- a/hw/usb/meson.build
+++ b/hw/usb/meson.build +++ b/hw/usb/meson.build
@@ -52,7 +52,7 @@ system_ss.add(when: 'CONFIG_USB_SMARTCARD', if_true: files('dev-smartcard-reader @@ -55,7 +55,7 @@ system_ss.add(when: 'CONFIG_USB_SMARTCARD', if_true: files('dev-smartcard-reader
if cacard.found() if cacard.found()
usbsmartcard_ss = ss.source_set() usbsmartcard_ss = ss.source_set()
usbsmartcard_ss.add(when: 'CONFIG_USB_SMARTCARD', usbsmartcard_ss.add(when: 'CONFIG_USB_SMARTCARD',
@ -584,26 +455,34 @@ index e94149ebde..4a8adbf3dc 100644
endif endif
diff --git a/hw/virtio/meson.build b/hw/virtio/meson.build diff --git a/hw/virtio/meson.build b/hw/virtio/meson.build
index c0055a7832..12e1d6c67e 100644 index d7f18c96e6..aaabbb8b0b 100644
--- a/hw/virtio/meson.build --- a/hw/virtio/meson.build
+++ b/hw/virtio/meson.build +++ b/hw/virtio/meson.build
@@ -17,8 +17,9 @@ if have_vhost @@ -20,7 +20,8 @@ if have_vhost
if have_vhost_user system_virtio_ss.add(files('vhost-user-base.c'))
# fixme - this really should be generic
specific_virtio_ss.add(files('vhost-user.c')) # MMIO Stubs
- system_virtio_ss.add(files('vhost-user-device.c')) - system_virtio_ss.add(files('vhost-user-device.c'))
- system_virtio_ss.add(when: 'CONFIG_VIRTIO_PCI', if_true: files('vhost-user-device-pci.c'))
+# Disabled for 8.2.0 rebase for RHEL 9.4.0 +# Disabled for 8.2.0 rebase for RHEL 9.4.0
+# system_virtio_ss.add(files('vhost-user-device.c')) +# system_virtio_ss.add(files('vhost-user-device.c'))
system_virtio_ss.add(when: 'CONFIG_VHOST_USER_GPIO', if_true: files('vhost-user-gpio.c'))
system_virtio_ss.add(when: 'CONFIG_VHOST_USER_I2C', if_true: files('vhost-user-i2c.c'))
system_virtio_ss.add(when: 'CONFIG_VHOST_USER_RNG', if_true: files('vhost-user-rng.c'))
@@ -28,7 +29,8 @@ if have_vhost
system_virtio_ss.add(when: 'CONFIG_VHOST_USER_INPUT', if_true: files('vhost-user-input.c'))
# PCI Stubs
- system_virtio_ss.add(when: 'CONFIG_VIRTIO_PCI', if_true: files('vhost-user-device-pci.c'))
+# Disabled for 8.2.0 rebase for RHEL 9.4.0
+# system_virtio_ss.add(when: 'CONFIG_VIRTIO_PCI', if_true: files('vhost-user-device-pci.c')) +# system_virtio_ss.add(when: 'CONFIG_VIRTIO_PCI', if_true: files('vhost-user-device-pci.c'))
endif system_virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_GPIO'],
if have_vhost_vdpa if_true: files('vhost-user-gpio-pci.c'))
system_virtio_ss.add(files('vhost-vdpa.c')) system_virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_I2C'],
diff --git a/target/arm/arm-qmp-cmds.c b/target/arm/arm-qmp-cmds.c diff --git a/target/arm/arm-qmp-cmds.c b/target/arm/arm-qmp-cmds.c
index b53d5efe13..64989a02d1 100644 index 3cc8cc738b..6f21fea1f5 100644
--- a/target/arm/arm-qmp-cmds.c --- a/target/arm/arm-qmp-cmds.c
+++ b/target/arm/arm-qmp-cmds.c +++ b/target/arm/arm-qmp-cmds.c
@@ -231,6 +231,7 @@ CpuModelExpansionInfo *qmp_query_cpu_model_expansion(CpuModelExpansionType type, @@ -223,6 +223,7 @@ CpuModelExpansionInfo *qmp_query_cpu_model_expansion(CpuModelExpansionType type,
static void arm_cpu_add_definition(gpointer data, gpointer user_data) static void arm_cpu_add_definition(gpointer data, gpointer user_data)
{ {
ObjectClass *oc = data; ObjectClass *oc = data;
@ -611,19 +490,19 @@ index b53d5efe13..64989a02d1 100644
CpuDefinitionInfoList **cpu_list = user_data; CpuDefinitionInfoList **cpu_list = user_data;
CpuDefinitionInfo *info; CpuDefinitionInfo *info;
const char *typename; const char *typename;
@@ -240,6 +241,7 @@ static void arm_cpu_add_definition(gpointer data, gpointer user_data) @@ -231,6 +232,7 @@ static void arm_cpu_add_definition(gpointer data, gpointer user_data)
info->name = g_strndup(typename, info = g_malloc0(sizeof(*info));
strlen(typename) - strlen("-" TYPE_ARM_CPU)); info->name = cpu_model_from_type(typename);
info->q_typename = g_strdup(typename); info->q_typename = g_strdup(typename);
+ info->deprecated = !!cc->deprecation_note; + info->deprecated = !!cc->deprecation_note;
QAPI_LIST_PREPEND(*cpu_list, info); QAPI_LIST_PREPEND(*cpu_list, info);
} }
diff --git a/target/arm/cpu.c b/target/arm/cpu.c diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index efb22a87f9..a32521ada9 100644 index ab8d007a86..e5dce20f19 100644
--- a/target/arm/cpu.c --- a/target/arm/cpu.c
+++ b/target/arm/cpu.c +++ b/target/arm/cpu.c
@@ -2524,6 +2524,10 @@ static void cpu_register_class_init(ObjectClass *oc, void *data) @@ -2546,6 +2546,10 @@ static void cpu_register_class_init(ObjectClass *oc, void *data)
acc->info = data; acc->info = data;
cc->gdb_core_xml_file = "arm-core.xml"; cc->gdb_core_xml_file = "arm-core.xml";
@ -635,10 +514,10 @@ index efb22a87f9..a32521ada9 100644
void arm_cpu_register(const ARMCPUInfo *info) void arm_cpu_register(const ARMCPUInfo *info)
diff --git a/target/arm/cpu.h b/target/arm/cpu.h diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index a0282e0d28..7e0f0dfea7 100644 index bc0c84873f..e9472c8bb8 100644
--- a/target/arm/cpu.h --- a/target/arm/cpu.h
+++ b/target/arm/cpu.h +++ b/target/arm/cpu.h
@@ -34,6 +34,8 @@ @@ -37,6 +37,8 @@
#define KVM_HAVE_MCE_INJECTION 1 #define KVM_HAVE_MCE_INJECTION 1
#endif #endif
@ -647,7 +526,7 @@ index a0282e0d28..7e0f0dfea7 100644
#define EXCP_UDEF 1 /* undefined instruction */ #define EXCP_UDEF 1 /* undefined instruction */
#define EXCP_SWI 2 /* software interrupt */ #define EXCP_SWI 2 /* software interrupt */
#define EXCP_PREFETCH_ABORT 3 #define EXCP_PREFETCH_ABORT 3
@@ -1120,6 +1122,7 @@ typedef struct ARMCPUInfo { @@ -1092,6 +1094,7 @@ typedef struct ARMCPUInfo {
const char *name; const char *name;
void (*initfn)(Object *obj); void (*initfn)(Object *obj);
void (*class_init)(ObjectClass *oc, void *data); void (*class_init)(ObjectClass *oc, void *data);
@ -656,7 +535,7 @@ index a0282e0d28..7e0f0dfea7 100644
/** /**
diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
index 1e9c6c85ae..10be900803 100644 index 985b1efe16..46a4e80171 100644
--- a/target/arm/cpu64.c --- a/target/arm/cpu64.c
+++ b/target/arm/cpu64.c +++ b/target/arm/cpu64.c
@@ -648,6 +648,7 @@ static void aarch64_a57_initfn(Object *obj) @@ -648,6 +648,7 @@ static void aarch64_a57_initfn(Object *obj)
@ -688,7 +567,7 @@ index 1e9c6c85ae..10be900803 100644
{ .name = "max", .initfn = aarch64_max_initfn }, { .name = "max", .initfn = aarch64_max_initfn },
#if defined(CONFIG_KVM) || defined(CONFIG_HVF) #if defined(CONFIG_KVM) || defined(CONFIG_HVF)
{ .name = "host", .initfn = aarch64_host_initfn }, { .name = "host", .initfn = aarch64_host_initfn },
@@ -815,8 +820,13 @@ static void aarch64_cpu_instance_init(Object *obj) @@ -814,8 +819,13 @@ static void aarch64_cpu_instance_init(Object *obj)
static void cpu_register_class_init(ObjectClass *oc, void *data) static void cpu_register_class_init(ObjectClass *oc, void *data)
{ {
ARMCPUClass *acc = ARM_CPU_CLASS(oc); ARMCPUClass *acc = ARM_CPU_CLASS(oc);
@ -703,24 +582,24 @@ index 1e9c6c85ae..10be900803 100644
void aarch64_cpu_register(const ARMCPUInfo *info) void aarch64_cpu_register(const ARMCPUInfo *info)
diff --git a/target/arm/tcg/cpu32.c b/target/arm/tcg/cpu32.c diff --git a/target/arm/tcg/cpu32.c b/target/arm/tcg/cpu32.c
index d9e0e2a4dd..c5c639a6ea 100644 index de8f2be941..8896295ae3 100644
--- a/target/arm/tcg/cpu32.c --- a/target/arm/tcg/cpu32.c
+++ b/target/arm/tcg/cpu32.c +++ b/target/arm/tcg/cpu32.c
@@ -98,6 +98,7 @@ void aa32_max_features(ARMCPU *cpu) @@ -92,6 +92,7 @@ void aa32_max_features(ARMCPU *cpu)
cpu->isar.id_dfr1 = t;
}
+#if 0 /* Disabled for Red Hat Enterprise Linux */
/* CPU models. These are not needed for the AArch64 linux-user build. */ /* CPU models. These are not needed for the AArch64 linux-user build. */
#if !defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64) #if !defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64)
+#if 0 /* Disabled for Red Hat Enterprise Linux */ @@ -1037,3 +1038,4 @@ static void arm_tcg_cpu_register_types(void)
#if !defined(CONFIG_USER_ONLY)
static bool arm_v7m_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
{
@@ -1189,3 +1190,4 @@ static void arm_tcg_cpu_register_types(void)
type_init(arm_tcg_cpu_register_types) type_init(arm_tcg_cpu_register_types)
#endif /* !CONFIG_USER_ONLY || !TARGET_AARCH64 */ #endif /* !CONFIG_USER_ONLY || !TARGET_AARCH64 */
+#endif /* disabled for RHEL */ +#endif /* disabled for RHEL */
diff --git a/target/arm/tcg/cpu64.c b/target/arm/tcg/cpu64.c diff --git a/target/arm/tcg/cpu64.c b/target/arm/tcg/cpu64.c
index fcda99e158..bd5a993ff8 100644 index 9f7a9f3d2c..7ec6851c9c 100644
--- a/target/arm/tcg/cpu64.c --- a/target/arm/tcg/cpu64.c
+++ b/target/arm/tcg/cpu64.c +++ b/target/arm/tcg/cpu64.c
@@ -29,6 +29,7 @@ @@ -29,6 +29,7 @@
@ -755,7 +634,7 @@ index fcda99e158..bd5a993ff8 100644
/* /*
* -cpu max: a CPU with as many features enabled as our emulation supports. * -cpu max: a CPU with as many features enabled as our emulation supports.
@@ -1259,6 +1263,7 @@ void aarch64_max_tcg_initfn(Object *obj) @@ -1271,6 +1275,7 @@ void aarch64_max_tcg_initfn(Object *obj)
qdev_property_add_static(DEVICE(obj), &arm_cpu_lpa2_property); qdev_property_add_static(DEVICE(obj), &arm_cpu_lpa2_property);
} }
@ -763,7 +642,7 @@ index fcda99e158..bd5a993ff8 100644
static const ARMCPUInfo aarch64_cpus[] = { static const ARMCPUInfo aarch64_cpus[] = {
{ .name = "cortex-a35", .initfn = aarch64_a35_initfn }, { .name = "cortex-a35", .initfn = aarch64_a35_initfn },
{ .name = "cortex-a55", .initfn = aarch64_a55_initfn }, { .name = "cortex-a55", .initfn = aarch64_a55_initfn },
@@ -1270,14 +1275,17 @@ static const ARMCPUInfo aarch64_cpus[] = { @@ -1282,14 +1287,17 @@ static const ARMCPUInfo aarch64_cpus[] = {
{ .name = "neoverse-v1", .initfn = aarch64_neoverse_v1_initfn }, { .name = "neoverse-v1", .initfn = aarch64_neoverse_v1_initfn },
{ .name = "neoverse-n2", .initfn = aarch64_neoverse_n2_initfn }, { .name = "neoverse-n2", .initfn = aarch64_neoverse_n2_initfn },
}; };
@ -781,73 +660,22 @@ index fcda99e158..bd5a993ff8 100644
} }
type_init(aarch64_cpu_register_types) type_init(aarch64_cpu_register_types)
diff --git a/target/ppc/cpu-models.c b/target/ppc/cpu-models.c diff --git a/target/arm/tcg/meson.build b/target/arm/tcg/meson.build
index 7dbb47de64..69fddb05bc 100644 index 3b1a9f0fc5..6c95d99181 100644
--- a/target/ppc/cpu-models.c --- a/target/arm/tcg/meson.build
+++ b/target/ppc/cpu-models.c +++ b/target/arm/tcg/meson.build
@@ -66,6 +66,7 @@ @@ -56,5 +56,5 @@ arm_system_ss.add(files(
#define POWERPC_DEF(_name, _pvr, _type, _desc) \ 'psci.c',
POWERPC_DEF_SVR(_name, _desc, _pvr, POWERPC_SVR_NONE, _type) ))
+#if 0 /* Embedded and 32-bit CPUs disabled for Red Hat Enterprise Linux */ -arm_system_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('cpu-v7m.c'))
/* Embedded PowerPC */ +#arm_system_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('cpu-v7m.c'))
/* PowerPC 405 family */ arm_user_ss.add(when: 'TARGET_AARCH64', if_false: files('cpu-v7m.c'))
/* PowerPC 405 cores */
@@ -698,8 +699,10 @@
"PowerPC 7447A v1.2 (G4)")
POWERPC_DEF("7457a_v1.2", CPU_POWERPC_74x7A_v12, 7455,
"PowerPC 7457A v1.2 (G4)")
+#endif
/* 64 bits PowerPC */
#if defined(TARGET_PPC64)
+#if 0 /* Disabled for Red Hat Enterprise Linux */
POWERPC_DEF("970_v2.2", CPU_POWERPC_970_v22, 970,
"PowerPC 970 v2.2")
POWERPC_DEF("970fx_v1.0", CPU_POWERPC_970FX_v10, 970,
@@ -718,6 +721,7 @@
"PowerPC 970MP v1.1")
POWERPC_DEF("power5+_v2.1", CPU_POWERPC_POWER5P_v21, POWER5P,
"POWER5+ v2.1")
+#endif
POWERPC_DEF("power7_v2.3", CPU_POWERPC_POWER7_v23, POWER7,
"POWER7 v2.3")
POWERPC_DEF("power7+_v2.1", CPU_POWERPC_POWER7P_v21, POWER7,
@@ -898,12 +902,15 @@ PowerPCCPUAlias ppc_cpu_aliases[] = {
{ "7447a", "7447a_v1.2" },
{ "7457a", "7457a_v1.2" },
{ "apollo7pm", "7457a_v1.0" },
+#endif
#if defined(TARGET_PPC64)
+#if 0 /* Disabled for Red Hat Enterprise Linux */
{ "970", "970_v2.2" },
{ "970fx", "970fx_v3.1" },
{ "970mp", "970mp_v1.1" },
{ "power5+", "power5+_v2.1" },
{ "power5gs", "power5+_v2.1" },
+#endif
{ "power7", "power7_v2.3" },
{ "power7+", "power7+_v2.1" },
{ "power8e", "power8e_v2.1" },
@@ -913,12 +920,14 @@ PowerPCCPUAlias ppc_cpu_aliases[] = {
{ "power10", "power10_v2.0" },
#endif
+#if 0 /* Disabled for Red Hat Enterprise Linux */
/* Generic PowerPCs */
#if defined(TARGET_PPC64)
{ "ppc64", "970fx_v3.1" },
#endif
{ "ppc32", "604" },
{ "ppc", "604" },
+#endif
{ NULL, NULL }
};
diff --git a/target/s390x/cpu_models_sysemu.c b/target/s390x/cpu_models_sysemu.c diff --git a/target/s390x/cpu_models_sysemu.c b/target/s390x/cpu_models_sysemu.c
index 63981bf36b..87a4480c05 100644 index 2d99218069..0728bfcc20 100644
--- a/target/s390x/cpu_models_sysemu.c --- a/target/s390x/cpu_models_sysemu.c
+++ b/target/s390x/cpu_models_sysemu.c +++ b/target/s390x/cpu_models_sysemu.c
@@ -35,6 +35,9 @@ static void check_unavailable_features(const S390CPUModel *max_model, @@ -34,6 +34,9 @@ static void check_unavailable_features(const S390CPUModel *max_model,
(max_model->def->gen == model->def->gen && (max_model->def->gen == model->def->gen &&
max_model->def->ec_ga < model->def->ec_ga)) { max_model->def->ec_ga < model->def->ec_ga)) {
list_add_feat("type", unavailable); list_add_feat("type", unavailable);
@ -858,10 +686,10 @@ index 63981bf36b..87a4480c05 100644
/* detect missing features if any to properly report them */ /* detect missing features if any to properly report them */
diff --git a/target/s390x/kvm/kvm.c b/target/s390x/kvm/kvm.c diff --git a/target/s390x/kvm/kvm.c b/target/s390x/kvm/kvm.c
index 33ab3551f4..912e493951 100644 index 4ce809c5d4..55fb4855b1 100644
--- a/target/s390x/kvm/kvm.c --- a/target/s390x/kvm/kvm.c
+++ b/target/s390x/kvm/kvm.c +++ b/target/s390x/kvm/kvm.c
@@ -2567,6 +2567,14 @@ void kvm_s390_apply_cpu_model(const S390CPUModel *model, Error **errp) @@ -2565,6 +2565,14 @@ void kvm_s390_apply_cpu_model(const S390CPUModel *model, Error **errp)
error_setg(errp, "KVM doesn't support CPU models"); error_setg(errp, "KVM doesn't support CPU models");
return; return;
} }
@ -877,10 +705,10 @@ index 33ab3551f4..912e493951 100644
prop.ibc = s390_ibc_from_cpu_model(model); prop.ibc = s390_ibc_from_cpu_model(model);
/* configure cpu features indicated via STFL(e) */ /* configure cpu features indicated via STFL(e) */
diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c
index a8a4c668ad..2458cc527c 100644 index 9d6e6190d5..f822526acb 100644
--- a/tests/qtest/arm-cpu-features.c --- a/tests/qtest/arm-cpu-features.c
+++ b/tests/qtest/arm-cpu-features.c +++ b/tests/qtest/arm-cpu-features.c
@@ -451,8 +451,10 @@ static void test_query_cpu_model_expansion(const void *data) @@ -452,8 +452,10 @@ static void test_query_cpu_model_expansion(const void *data)
assert_error(qts, "host", "The CPU type 'host' requires KVM", NULL); assert_error(qts, "host", "The CPU type 'host' requires KVM", NULL);
/* Test expected feature presence/absence for some cpu types */ /* Test expected feature presence/absence for some cpu types */
@ -891,7 +719,7 @@ index a8a4c668ad..2458cc527c 100644
/* Enabling and disabling pmu should always work. */ /* Enabling and disabling pmu should always work. */
assert_has_feature_enabled(qts, "max", "pmu"); assert_has_feature_enabled(qts, "max", "pmu");
@@ -469,6 +471,7 @@ static void test_query_cpu_model_expansion(const void *data) @@ -470,6 +472,7 @@ static void test_query_cpu_model_expansion(const void *data)
assert_has_feature_enabled(qts, "cortex-a57", "pmu"); assert_has_feature_enabled(qts, "cortex-a57", "pmu");
assert_has_feature_enabled(qts, "cortex-a57", "aarch64"); assert_has_feature_enabled(qts, "cortex-a57", "aarch64");
@ -899,7 +727,7 @@ index a8a4c668ad..2458cc527c 100644
assert_has_feature_enabled(qts, "a64fx", "pmu"); assert_has_feature_enabled(qts, "a64fx", "pmu");
assert_has_feature_enabled(qts, "a64fx", "aarch64"); assert_has_feature_enabled(qts, "a64fx", "aarch64");
/* /*
@@ -481,6 +484,7 @@ static void test_query_cpu_model_expansion(const void *data) @@ -482,6 +485,7 @@ static void test_query_cpu_model_expansion(const void *data)
"{ 'sve384': true }"); "{ 'sve384': true }");
assert_error(qts, "a64fx", "cannot enable sve640", assert_error(qts, "a64fx", "cannot enable sve640",
"{ 'sve640': true }"); "{ 'sve640': true }");

View File

@ -1,4 +1,4 @@
From d9ff466c980d219ebf230ea24becce294c196f1f Mon Sep 17 00:00:00 2001 From 802da738d5231ef56d25f4ffcfa6e7d97698ee72 Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com> From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Fri, 11 Jan 2019 09:54:45 +0100 Date: Fri, 11 Jan 2019 09:54:45 +0100
Subject: Machine type related general changes Subject: Machine type related general changes
@ -8,77 +8,24 @@ split to allow easier review. It contains changes not related to any
architecture. architecture.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com> Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
--
Rebase notes (6.2.0):
- Do not duplicate minimal_version_id for piix4_pm
- Remove empty line chunks in serial.c
- Remove migration.h include in serial.c
- Update hw_compat_rhel_8_5 (from MR 66)
Rebase notes (7.0.0):
- Remove downstream changes leftovers in hw/rtc/mc146818rtc.c
- Remove unnecessary change in hw/usb/hcd-uhci.c
Rebase notes (7.1.0):
- Moved adding rhel_old_machine_deprecation variable from s390x to general machine types commit
- Moved adding hw_compat_rhel_8_6 struct from x86_64 to general machine types commit
Rebase notes (8.1.0):
- Do not modify unused vga-isa.c
Merged patches (6.1.0):
- f2fb42a3c6 redhat: add missing entries in hw_compat_rhel_8_4
- 1949ec258e hw/arm/virt: Disable PL011 clock migration through hw_compat_rhel_8_3
- a3995e2eff Remove RHEL 7.0.0 machine type (only generic changes)
- ad3190a79b Remove RHEL 7.1.0 machine type (only generic changes)
- 84bbe15d4e Remove RHEL 7.2.0 machine type (only generic changes)
- 0215eb3356 Remove RHEL 7.3.0 machine types (only generic changes)
- af69d1ca6e Remove RHEL 7.4.0 machine types (only generic changes)
- 8f7a74ab78 Remove RHEL 7.5.0 machine types (only generic changes)
Merged patches (6.2.0):
- d687ac13d2 redhat: Define hw_compat_rhel_8_5
Merged patches (7.0.0):
- ef5afcc86d Fix virtio-net-pci* "vectors" compat
- 168f0d56e3 compat: Update hw_compat_rhel_8_5 with 6.2.0 RC2 changes
Merged patches (7.1.0):
- 38b89dc245 pc: Move s3/s4 suspend disabling to compat (only hw/acpi/piix4.c chunk)
- 1d6439527a WRB: Introduce RHEL 9.0.0 hw compat structure (only hw/core/machine.c and include/hw/boards.h chunk)
Merged patches (7.2.0):
- 0be2889fa2 Introduce upstream 7.0 compat changes (only applicable parts)
Merged patches (8.0.0):
- 21ed34787b Addd 7.2 compat bits for RHEL 9.1 machine type
- e5c8d5d603 virtio-rng-pci: fix migration compat for vectors
- 5a5fa77059 virtio-rng-pci: fix transitional migration compat for vectors
Merged patches (8.1.0):
- bd5d81d286 Add RHEL 9.2.0 compat structure (general part)
- 1165e24c6b hw/pci: Disable PCI_ERR_UNCOR_MASK reg for machine type <= pc-q35-rhel9.2.0
Merged patches (8.2.0):
- 4ee284aca9 Add machine types compat bits. (partial)
--- ---
hw/acpi/piix4.c | 2 +- hw/acpi/piix4.c | 2 +-
hw/arm/virt.c | 2 +- hw/arm/virt.c | 2 +-
hw/core/machine.c | 267 +++++++++++++++++++++++++++++++++++ hw/core/machine.c | 269 +++++++++++++++++++++++++++++++++++
hw/i386/pc_piix.c | 2 + hw/i386/fw_cfg.c | 3 +-
hw/i386/pc_q35.c | 2 +
hw/net/rtl8139.c | 4 +- hw/net/rtl8139.c | 4 +-
hw/smbios/smbios.c | 46 +++++- hw/smbios/smbios.c | 46 +++++-
hw/timer/i8254_common.c | 2 +- hw/timer/i8254_common.c | 2 +-
hw/usb/hcd-xhci-pci.c | 59 ++++++-- hw/usb/hcd-xhci-pci.c | 59 ++++++--
hw/usb/hcd-xhci-pci.h | 1 + hw/usb/hcd-xhci-pci.h | 1 +
hw/virtio/virtio-mem.c | 3 +-
include/hw/boards.h | 40 ++++++ include/hw/boards.h | 40 ++++++
include/hw/firmware/smbios.h | 5 +- include/hw/firmware/smbios.h | 4 +-
include/hw/i386/pc.h | 3 + include/hw/i386/pc.h | 3 +
13 files changed, 413 insertions(+), 22 deletions(-) 13 files changed, 414 insertions(+), 24 deletions(-)
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index dd523d2e4c..5050c0ba97 100644 index debe1adb84..e8ddcd716e 100644
--- a/hw/acpi/piix4.c --- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c
@@ -245,7 +245,7 @@ static bool vmstate_test_migrate_acpi_index(void *opaque, int version_id) @@ -245,7 +245,7 @@ static bool vmstate_test_migrate_acpi_index(void *opaque, int version_id)
@ -88,28 +35,28 @@ index dd523d2e4c..5050c0ba97 100644
- .minimum_version_id = 3, - .minimum_version_id = 3,
+ .minimum_version_id = 2, + .minimum_version_id = 2,
.post_load = vmstate_acpi_post_load, .post_load = vmstate_acpi_post_load,
.fields = (VMStateField[]) { .fields = (const VMStateField[]) {
VMSTATE_PCI_DEVICE(parent_obj, PIIX4PMState), VMSTATE_PCI_DEVICE(parent_obj, PIIX4PMState),
diff --git a/hw/arm/virt.c b/hw/arm/virt.c diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index af9ea4dd1c..62f0f7d4d6 100644 index 6c6d155002..36e9b4b4e9 100644
--- a/hw/arm/virt.c --- a/hw/arm/virt.c
+++ b/hw/arm/virt.c +++ b/hw/arm/virt.c
@@ -1638,7 +1638,7 @@ static void virt_build_smbios(VirtMachineState *vms) @@ -1651,7 +1651,7 @@ static void virt_build_smbios(VirtMachineState *vms)
smbios_set_defaults("QEMU", product, smbios_set_defaults("QEMU", product,
vmc->smbios_old_sys_ver ? "1.0" : mc->name, false, vmc->smbios_old_sys_ver ? "1.0" : mc->name,
- true, SMBIOS_ENTRY_POINT_TYPE_64); - true);
+ true, NULL, NULL, SMBIOS_ENTRY_POINT_TYPE_64); + true, NULL, NULL);
/* build the array of physical mem area from base_memmap */ /* build the array of physical mem area from base_memmap */
mem_array.address = vms->memmap[VIRT_MEM].base; mem_array.address = vms->memmap[VIRT_MEM].base;
diff --git a/hw/core/machine.c b/hw/core/machine.c diff --git a/hw/core/machine.c b/hw/core/machine.c
index 0c17398141..446601ee30 100644 index 37ede0e7d4..695cb89a46 100644
--- a/hw/core/machine.c --- a/hw/core/machine.c
+++ b/hw/core/machine.c +++ b/hw/core/machine.c
@@ -57,6 +57,273 @@ GlobalProperty hw_compat_7_2[] = { @@ -296,6 +296,275 @@ GlobalProperty hw_compat_2_1[] = {
}; };
const size_t hw_compat_7_2_len = G_N_ELEMENTS(hw_compat_7_2); const size_t hw_compat_2_1_len = G_N_ELEMENTS(hw_compat_2_1);
+/* +/*
+ * RHEL only: machine types for previous major releases are deprecated + * RHEL only: machine types for previous major releases are deprecated
@ -132,6 +79,8 @@ index 0c17398141..446601ee30 100644
+ { "vfio-pci-nohotplug", "x-ramfb-migrate", "off" }, + { "vfio-pci-nohotplug", "x-ramfb-migrate", "off" },
+ /* hw_compat_rhel_9_4 from hw_compat_8_1 */ + /* hw_compat_rhel_9_4 from hw_compat_8_1 */
+ { "igb", "x-pcie-flr-init", "off" }, + { "igb", "x-pcie-flr-init", "off" },
+ /* hw_compat_rhel_9_4 jira RHEL-24045 */
+ { "virtio-mem", "dynamic-memslots", "off" },
+}; +};
+const size_t hw_compat_rhel_9_4_len = G_N_ELEMENTS(hw_compat_rhel_9_4); +const size_t hw_compat_rhel_9_4_len = G_N_ELEMENTS(hw_compat_rhel_9_4);
+ +
@ -378,37 +327,25 @@ index 0c17398141..446601ee30 100644
+}; +};
+const size_t hw_compat_rhel_7_6_len = G_N_ELEMENTS(hw_compat_rhel_7_6); +const size_t hw_compat_rhel_7_6_len = G_N_ELEMENTS(hw_compat_rhel_7_6);
+ +
GlobalProperty hw_compat_7_1[] = { MachineState *current_machine;
{ "virtio-device", "queue_reset", "false" },
{ "virtio-rng-pci", "vectors", "0" }, static char *machine_get_kernel(Object *obj, Error **errp)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c
index eace854335..2a9f465619 100644 index d802d2787f..c7aa39a13e 100644
--- a/hw/i386/pc_piix.c --- a/hw/i386/fw_cfg.c
+++ b/hw/i386/pc_piix.c +++ b/hw/i386/fw_cfg.c
@@ -238,6 +238,8 @@ static void pc_init1(MachineState *machine, @@ -64,7 +64,8 @@ void fw_cfg_build_smbios(PCMachineState *pcms, FWCfgState *fw_cfg,
smbios_set_defaults("QEMU", mc->desc, if (pcmc->smbios_defaults) {
mc->name, pcmc->smbios_legacy_mode, /* These values are guest ABI, do not change */
pcmc->smbios_uuid_encoded, smbios_set_defaults("QEMU", mc->desc, mc->name,
+ pcmc->smbios_stream_product, - pcmc->smbios_uuid_encoded);
+ pcmc->smbios_stream_version, + pcmc->smbios_uuid_encoded,
pcms->smbios_entry_point_type); + pcmc->smbios_stream_product, pcmc->smbios_stream_version);
}
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 4f3e5412f6..912cb0c0dc 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -206,6 +206,8 @@ static void pc_q35_init(MachineState *machine)
smbios_set_defaults("QEMU", mc->desc,
mc->name, pcmc->smbios_legacy_mode,
pcmc->smbios_uuid_encoded,
+ pcmc->smbios_stream_product,
+ pcmc->smbios_stream_version,
pcms->smbios_entry_point_type);
} }
/* tell smbios about cpuid version and features */
diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c
index 4af8c66266..7dc12907ab 100644 index 897c86ec41..2d0db43f49 100644
--- a/hw/net/rtl8139.c --- a/hw/net/rtl8139.c
+++ b/hw/net/rtl8139.c +++ b/hw/net/rtl8139.c
@@ -3169,7 +3169,7 @@ static int rtl8139_pre_save(void *opaque) @@ -3169,7 +3169,7 @@ static int rtl8139_pre_save(void *opaque)
@ -431,20 +368,21 @@ index 4af8c66266..7dc12907ab 100644
VMSTATE_UINT16(tally_counters.TxUndrn, RTL8139State), VMSTATE_UINT16(tally_counters.TxUndrn, RTL8139State),
diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c
index 2a90601ac5..7bde23e59d 100644 index eed5787b15..68608a3403 100644
--- a/hw/smbios/smbios.c --- a/hw/smbios/smbios.c
+++ b/hw/smbios/smbios.c +++ b/hw/smbios/smbios.c
@@ -58,6 +58,9 @@ static bool smbios_legacy = true; @@ -39,6 +39,10 @@ size_t usr_blobs_len;
static bool smbios_uuid_encoded = true; static unsigned usr_table_max;
/* end: legacy structures & constants for <= 2.0 machines */ static unsigned usr_table_cnt;
+/* Set to true for modern Windows 10 HardwareID-6 compat */ +/* Set to true for modern Windows 10 HardwareID-6 compat */
+static bool smbios_type2_required; +static bool smbios_type2_required;
+ +
+
uint8_t *smbios_tables; uint8_t *smbios_tables;
size_t smbios_tables_len; size_t smbios_tables_len;
@@ -670,7 +673,7 @@ static void smbios_build_type_1_table(void) unsigned smbios_table_max;
@@ -629,7 +633,7 @@ static void smbios_build_type_1_table(void)
static void smbios_build_type_2_table(void) static void smbios_build_type_2_table(void)
{ {
@ -453,21 +391,17 @@ index 2a90601ac5..7bde23e59d 100644
SMBIOS_TABLE_SET_STR(2, manufacturer_str, type2.manufacturer); SMBIOS_TABLE_SET_STR(2, manufacturer_str, type2.manufacturer);
SMBIOS_TABLE_SET_STR(2, product_str, type2.product); SMBIOS_TABLE_SET_STR(2, product_str, type2.product);
@@ -985,7 +988,10 @@ void smbios_set_cpuid(uint32_t version, uint32_t features) @@ -1018,16 +1022,52 @@ void smbios_set_default_processor_family(uint16_t processor_family)
void smbios_set_defaults(const char *manufacturer, const char *product, void smbios_set_defaults(const char *manufacturer, const char *product,
const char *version, bool legacy_mode, const char *version,
- bool uuid_encoded, SmbiosEntryPointType ep_type) - bool uuid_encoded)
+ bool uuid_encoded, + bool uuid_encoded,
+ const char *stream_product, + const char *stream_product,
+ const char *stream_version, + const char *stream_version)
+ SmbiosEntryPointType ep_type)
{ {
smbios_have_defaults = true; smbios_have_defaults = true;
smbios_legacy = legacy_mode; smbios_uuid_encoded = uuid_encoded;
@@ -1006,11 +1012,45 @@ void smbios_set_defaults(const char *manufacturer, const char *product,
g_free(smbios_entries);
}
+ /* + /*
+ * If @stream_product & @stream_version are non-NULL, then + * If @stream_product & @stream_version are non-NULL, then
@ -494,12 +428,12 @@ index 2a90601ac5..7bde23e59d 100644
+ * + *
+ * We get 'System Manufacturer' and 'Baseboard Manufacturer' + * We get 'System Manufacturer' and 'Baseboard Manufacturer'
+ */ + */
SMBIOS_SET_DEFAULT(type1.manufacturer, manufacturer); SMBIOS_SET_DEFAULT(smbios_type1.manufacturer, manufacturer);
SMBIOS_SET_DEFAULT(type1.product, product); SMBIOS_SET_DEFAULT(smbios_type1.product, product);
SMBIOS_SET_DEFAULT(type1.version, version); SMBIOS_SET_DEFAULT(smbios_type1.version, version);
+ SMBIOS_SET_DEFAULT(type1.family, "Red Hat Enterprise Linux"); + SMBIOS_SET_DEFAULT(smbios_type1.family, "Red Hat Enterprise Linux");
+ if (stream_version != NULL) { + if (stream_version != NULL) {
+ SMBIOS_SET_DEFAULT(type1.sku, stream_version); + SMBIOS_SET_DEFAULT(smbios_type1.sku, stream_version);
+ } + }
SMBIOS_SET_DEFAULT(type2.manufacturer, manufacturer); SMBIOS_SET_DEFAULT(type2.manufacturer, manufacturer);
- SMBIOS_SET_DEFAULT(type2.product, product); - SMBIOS_SET_DEFAULT(type2.product, product);
@ -513,20 +447,20 @@ index 2a90601ac5..7bde23e59d 100644
SMBIOS_SET_DEFAULT(type3.manufacturer, manufacturer); SMBIOS_SET_DEFAULT(type3.manufacturer, manufacturer);
SMBIOS_SET_DEFAULT(type3.version, version); SMBIOS_SET_DEFAULT(type3.version, version);
diff --git a/hw/timer/i8254_common.c b/hw/timer/i8254_common.c diff --git a/hw/timer/i8254_common.c b/hw/timer/i8254_common.c
index b25da448c8..0331e84398 100644 index 28fdabc321..bad13ec224 100644
--- a/hw/timer/i8254_common.c --- a/hw/timer/i8254_common.c
+++ b/hw/timer/i8254_common.c +++ b/hw/timer/i8254_common.c
@@ -229,7 +229,7 @@ static const VMStateDescription vmstate_pit_common = { @@ -229,7 +229,7 @@ static const VMStateDescription vmstate_pit_common = {
.pre_save = pit_dispatch_pre_save, .pre_save = pit_dispatch_pre_save,
.post_load = pit_dispatch_post_load, .post_load = pit_dispatch_post_load,
.fields = (VMStateField[]) { .fields = (const VMStateField[]) {
- VMSTATE_UINT32_V(channels[0].irq_disabled, PITCommonState, 3), - VMSTATE_UINT32_V(channels[0].irq_disabled, PITCommonState, 3),
+ VMSTATE_UINT32(channels[0].irq_disabled, PITCommonState), /* qemu-kvm's v2 had 'flags' here */ + VMSTATE_UINT32(channels[0].irq_disabled, PITCommonState), /* qemu-kvm's v2 had 'flags' here */
VMSTATE_STRUCT_ARRAY(channels, PITCommonState, 3, 2, VMSTATE_STRUCT_ARRAY(channels, PITCommonState, 3, 2,
vmstate_pit_channel, PITChannelState), vmstate_pit_channel, PITChannelState),
VMSTATE_INT64(channels[0].next_transition_time, VMSTATE_INT64(channels[0].next_transition_time,
diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c
index 643d4643e4..529bad9366 100644 index 4423983308..43b4b71fdf 100644
--- a/hw/usb/hcd-xhci-pci.c --- a/hw/usb/hcd-xhci-pci.c
+++ b/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) @@ -104,6 +104,33 @@ static int xhci_pci_vmstate_post_load(void *opaque, int version_id)
@ -636,11 +570,26 @@ index 08f70ce97c..1be7527c1b 100644
} XHCIPciState; } XHCIPciState;
#endif #endif
diff --git a/hw/virtio/virtio-mem.c b/hw/virtio/virtio-mem.c
index ffd119ebac..0e2be2219c 100644
--- a/hw/virtio/virtio-mem.c
+++ b/hw/virtio/virtio-mem.c
@@ -1694,8 +1694,9 @@ static Property virtio_mem_properties[] = {
#endif
DEFINE_PROP_BOOL(VIRTIO_MEM_EARLY_MIGRATION_PROP, VirtIOMEM,
early_migration, true),
+ /* RHEL: default-enable "dynamic-memslots" (jira RHEL-24045) */
DEFINE_PROP_BOOL(VIRTIO_MEM_DYNAMIC_MEMSLOTS_PROP, VirtIOMEM,
- dynamic_memslots, false),
+ dynamic_memslots, true),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/include/hw/boards.h b/include/hw/boards.h diff --git a/include/hw/boards.h b/include/hw/boards.h
index da85f86efb..4a21eddbf9 100644 index 8b8f6d5c00..0466f9d0f3 100644
--- a/include/hw/boards.h --- a/include/hw/boards.h
+++ b/include/hw/boards.h +++ b/include/hw/boards.h
@@ -503,4 +503,44 @@ extern const size_t hw_compat_2_2_len; @@ -512,4 +512,44 @@ extern const size_t hw_compat_2_2_len;
extern GlobalProperty hw_compat_2_1[]; extern GlobalProperty hw_compat_2_1[];
extern const size_t hw_compat_2_1_len; extern const size_t hw_compat_2_1_len;
@ -686,26 +635,25 @@ index da85f86efb..4a21eddbf9 100644
+extern const char *rhel_old_machine_deprecation; +extern const char *rhel_old_machine_deprecation;
#endif #endif
diff --git a/include/hw/firmware/smbios.h b/include/hw/firmware/smbios.h diff --git a/include/hw/firmware/smbios.h b/include/hw/firmware/smbios.h
index 7f3259a630..d24b3ccd32 100644 index 8d3fb2fb3b..d9d6d7a169 100644
--- a/include/hw/firmware/smbios.h --- a/include/hw/firmware/smbios.h
+++ b/include/hw/firmware/smbios.h +++ b/include/hw/firmware/smbios.h
@@ -294,7 +294,10 @@ void smbios_entry_add(QemuOpts *opts, Error **errp); @@ -332,7 +332,9 @@ void smbios_entry_add(QemuOpts *opts, Error **errp);
void smbios_set_cpuid(uint32_t version, uint32_t features); void smbios_set_cpuid(uint32_t version, uint32_t features);
void smbios_set_defaults(const char *manufacturer, const char *product, void smbios_set_defaults(const char *manufacturer, const char *product,
const char *version, bool legacy_mode, const char *version,
- bool uuid_encoded, SmbiosEntryPointType ep_type); - bool uuid_encoded);
+ bool uuid_encoded, + bool uuid_encoded,
+ const char *stream_product, + const char *stream_product,
+ const char *stream_version, + const char *stream_version);
+ SmbiosEntryPointType ep_type); void smbios_set_default_processor_family(uint16_t processor_family);
uint8_t *smbios_get_table_legacy(MachineState *ms, size_t *length); uint8_t *smbios_get_table_legacy(size_t *length, Error **errp);
void smbios_get_tables(MachineState *ms, 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 diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index a10ceeabbf..037942d233 100644 index 27a68071d7..ebd8f973f2 100644
--- a/include/hw/i386/pc.h --- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h
@@ -113,6 +113,9 @@ struct PCMachineClass { @@ -112,6 +112,9 @@ struct PCMachineClass {
bool smbios_legacy_mode; bool smbios_legacy_mode;
bool smbios_uuid_encoded; bool smbios_uuid_encoded;
SmbiosEntryPointType default_smbios_ep_type; SmbiosEntryPointType default_smbios_ep_type;

View File

@ -1,4 +1,4 @@
From 23f614ab0b79ec1c6f65a7f0d6993bfdfc53fd23 Mon Sep 17 00:00:00 2001 From 3afc6e4cb6725d01b8f89207701bca199c9ecc9f Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com> From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Fri, 19 Oct 2018 12:53:31 +0200 Date: Fri, 19 Oct 2018 12:53:31 +0200
Subject: Add aarch64 machine types Subject: Add aarch64 machine types
@ -7,91 +7,61 @@ Adding changes to add RHEL machine types for aarch64 architecture.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com> Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
--- ---
Rebase notes (6.1.0): hw/arm/virt.c | 299 +++++++++++++++++++++++++++++++++++++++++-
- Use CONFIG_TPM check when using TPM structures
- Add support for default_bus_bypass_iommu
- ea4c0b32d9 arm/virt: Register highmem and gic-version as class properties
- 895e1fa86a hw/arm/virt: Add 8.5 and 9.0 machine types and remove older ones
Rebase notes (7.0.0):
- Added dtb-kaslr-seed option
- Set no_tcg_lpa2 to true
Rebase notes (7.1.0):
- replace dtb_kaslr_seed by dtb_randomness
- Updated dtb_randomness comment
Rebase notes (7.2.0):
- Disabled cortex-a35
Rebase notes (8.0.0):
- Moved changed code from target/arm/helper.c to target/arm/arm-qmp-cmds.c
Rebase notes (8.1.0):
- Added setting default_nic
Merged patches (6.2.0):
- 9a3d4fde0e hw/arm/virt: Remove 9.0 machine type
- f7d04d6695 hw: arm: virt: Add hw_compat_rhel_8_5 to 8.5 machine type
Merged patches (7.0.0):
- 3b82be3dd3 redhat: virt-rhel8.5.0: Update machine type compatibility for QEMU 6.2.0 update
- c354a86c9b hw/arm/virt: Register "iommu" as a class property
- c1a2630dc9 hw/arm/virt: Register "its" as a class property
- 9d8c61dc93 hw/arm/virt: Rename default_bus_bypass_iommu
- a1d1b6eeb6 hw/arm/virt: Expose the 'RAS' option
- 47f8fe1b82 hw/arm/virt: Add 9.0 machine type and remove 8.5 one
- ed2346788f hw/arm/virt: Check no_tcg_its and minor style changes
Merged patches (7.0.0):
- f79b31bdef hw/arm/virt: Remove the dtb-kaslr-seed machine option
- b6fca85f4a hw/arm/virt: Fix missing initialization in instance/class_init()
Merged patches (7.1.0):
- ac97dd4f9f RHEL-only: AArch64: Drop unsupported CPU types
- e9c0a70664 target/arm: deprecate named CPU models
Merged patches (7.2.0):
- 0be2889fa2 Introduce upstream 7.0 compat changes (only applicable parts)
Merged patches (8.0.0):
- c1a21266d8 redhat: aarch64: add rhel9.2.0 virt machine type
- d97cd7c513 redhat: fix virt-rhel9.2.0 compat props
Merged patches (8.1.0):
- bd5d81d286 Add RHEL 9.2.0 compat structure (arm part)
- c07f666086 hw/arm/virt: Validate cluster and NUMA node boundary for RHEL machines
Merged patches (8.2.0):
- 4ee284aca9 Add machine types compat bits. (partial)
---
hw/arm/virt.c | 250 +++++++++++++++++++++++++++++++++++++++++-
include/hw/arm/virt.h | 8 ++ include/hw/arm/virt.h | 8 ++
2 files changed, 257 insertions(+), 1 deletion(-) 2 files changed, 306 insertions(+), 1 deletion(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 62f0f7d4d6..c541efee5e 100644 index 36e9b4b4e9..22bc345137 100644
--- a/hw/arm/virt.c --- a/hw/arm/virt.c
+++ b/hw/arm/virt.c +++ b/hw/arm/virt.c
@@ -82,6 +82,7 @@ @@ -101,6 +101,7 @@ static void arm_virt_compat_set(MachineClass *mc)
#include "hw/char/pl011.h" arm_virt_compat_len);
#include "qemu/guest-random.h" }
+#if 0 /* Disabled for Red Hat Enterprise Linux */ +#if 0 /* Disabled for Red Hat Enterprise Linux */
#define DEFINE_VIRT_MACHINE_LATEST(major, minor, latest) \ #define DEFINE_VIRT_MACHINE_LATEST(major, minor, latest) \
static void virt_##major##_##minor##_class_init(ObjectClass *oc, \ static void virt_##major##_##minor##_class_init(ObjectClass *oc, \
void *data) \ void *data) \
@@ -108,7 +109,48 @@ @@ -128,7 +129,63 @@ static void arm_virt_compat_set(MachineClass *mc)
DEFINE_VIRT_MACHINE_LATEST(major, minor, true) DEFINE_VIRT_MACHINE_LATEST(major, minor, true)
#define DEFINE_VIRT_MACHINE(major, minor) \ #define DEFINE_VIRT_MACHINE(major, minor) \
DEFINE_VIRT_MACHINE_LATEST(major, minor, false) DEFINE_VIRT_MACHINE_LATEST(major, minor, false)
+#endif /* disabled for RHEL */ +#endif /* disabled for RHEL */
+
+/*
+ * This variable is for changes to properties that are RHEL specific,
+ * different to the current upstream and to be applied to the latest
+ * machine type. They may be overriden by older machine compats.
+ *
+ * virtio-net-pci variant romfiles are not needed because edk2 does
+ * fully support the pxe boot. Besides virtio romfiles are not shipped
+ * on rhel/aarch64.
+ */
+GlobalProperty arm_rhel_compat[] = {
+ {"virtio-net-pci", "romfile", "" },
+ {"virtio-net-pci-transitional", "romfile", "" },
+ {"virtio-net-pci-non-transitional", "romfile", "" },
+};
+const size_t arm_rhel_compat_len = G_N_ELEMENTS(arm_rhel_compat);
+/*
+ * This cannot be called from the rhel_virt_class_init() because
+ * TYPE_RHEL_MACHINE is abstract and mc->compat_props g_ptr_array_new()
+ * only is called on virt-rhelm.n.s non abstract class init.
+ */
+static void arm_rhel_compat_set(MachineClass *mc)
+{
+ compat_props_add(mc->compat_props, arm_rhel_compat,
+ arm_rhel_compat_len);
+}
+
+#define DEFINE_RHEL_MACHINE_LATEST(m, n, s, latest) \ +#define DEFINE_RHEL_MACHINE_LATEST(m, n, s, latest) \
+ static void rhel##m##n##s##_virt_class_init(ObjectClass *oc, \ + static void rhel##m##n##s##_virt_class_init(ObjectClass *oc, \
+ void *data) \ + void *data) \
+ { \ + { \
+ MachineClass *mc = MACHINE_CLASS(oc); \ + MachineClass *mc = MACHINE_CLASS(oc); \
+ arm_rhel_compat_set(mc); \
+ rhel##m##n##s##_virt_options(mc); \ + rhel##m##n##s##_virt_options(mc); \
+ mc->desc = "RHEL " # m "." # n "." # s " ARM Virtual Machine"; \ + mc->desc = "RHEL " # m "." # n "." # s " ARM Virtual Machine"; \
+ if (latest) { \ + if (latest) { \
@ -114,23 +84,10 @@ index 62f0f7d4d6..c541efee5e 100644
+ DEFINE_RHEL_MACHINE_LATEST(major, minor, subminor, true) + DEFINE_RHEL_MACHINE_LATEST(major, minor, subminor, true)
+#define DEFINE_RHEL_MACHINE(major, minor, subminor) \ +#define DEFINE_RHEL_MACHINE(major, minor, subminor) \
+ DEFINE_RHEL_MACHINE_LATEST(major, minor, subminor, false) + DEFINE_RHEL_MACHINE_LATEST(major, minor, subminor, false)
+
+/* This variable is for changes to properties that are RHEL specific,
+ * different to the current upstream and to be applied to the latest
+ * machine type.
+ */
+GlobalProperty arm_rhel_compat[] = {
+ {
+ .driver = "virtio-net-pci",
+ .property = "romfile",
+ .value = "",
+ },
+};
+const size_t arm_rhel_compat_len = G_N_ELEMENTS(arm_rhel_compat);
/* Number of external interrupt lines to configure the GIC with */ /* Number of external interrupt lines to configure the GIC with */
#define NUM_IRQS 256 #define NUM_IRQS 256
@@ -2341,6 +2383,7 @@ static void machvirt_init(MachineState *machine) @@ -2355,6 +2412,7 @@ static void machvirt_init(MachineState *machine)
qemu_add_machine_init_done_notifier(&vms->machine_done); qemu_add_machine_init_done_notifier(&vms->machine_done);
} }
@ -138,7 +95,7 @@ index 62f0f7d4d6..c541efee5e 100644
static bool virt_get_secure(Object *obj, Error **errp) static bool virt_get_secure(Object *obj, Error **errp)
{ {
VirtMachineState *vms = VIRT_MACHINE(obj); VirtMachineState *vms = VIRT_MACHINE(obj);
@@ -2368,6 +2411,7 @@ static void virt_set_virt(Object *obj, bool value, Error **errp) @@ -2382,6 +2440,7 @@ static void virt_set_virt(Object *obj, bool value, Error **errp)
vms->virt = value; vms->virt = value;
} }
@ -146,7 +103,7 @@ index 62f0f7d4d6..c541efee5e 100644
static bool virt_get_highmem(Object *obj, Error **errp) static bool virt_get_highmem(Object *obj, Error **errp)
{ {
@@ -2383,6 +2427,7 @@ static void virt_set_highmem(Object *obj, bool value, Error **errp) @@ -2397,6 +2456,7 @@ static void virt_set_highmem(Object *obj, bool value, Error **errp)
vms->highmem = value; vms->highmem = value;
} }
@ -154,16 +111,23 @@ index 62f0f7d4d6..c541efee5e 100644
static bool virt_get_compact_highmem(Object *obj, Error **errp) static bool virt_get_compact_highmem(Object *obj, Error **errp)
{ {
VirtMachineState *vms = VIRT_MACHINE(obj); VirtMachineState *vms = VIRT_MACHINE(obj);
@@ -2438,7 +2483,7 @@ static void virt_set_highmem_mmio(Object *obj, bool value, Error **errp) @@ -2410,6 +2470,7 @@ static void virt_set_compact_highmem(Object *obj, bool value, Error **errp)
vms->highmem_mmio = value; vms->highmem_compact = value;
} }
-
+#endif /* disabled for RHEL */ +#endif /* disabled for RHEL */
static bool virt_get_highmem_redists(Object *obj, Error **errp)
{
@@ -2453,7 +2514,6 @@ static void virt_set_highmem_mmio(Object *obj, bool value, Error **errp)
vms->highmem_mmio = value;
}
-
static bool virt_get_its(Object *obj, Error **errp) static bool virt_get_its(Object *obj, Error **errp)
{ {
@@ -2454,6 +2499,7 @@ static void virt_set_its(Object *obj, bool value, Error **errp) VirtMachineState *vms = VIRT_MACHINE(obj);
@@ -2468,6 +2528,7 @@ static void virt_set_its(Object *obj, bool value, Error **errp)
vms->its = value; vms->its = value;
} }
@ -171,7 +135,7 @@ index 62f0f7d4d6..c541efee5e 100644
static bool virt_get_dtb_randomness(Object *obj, Error **errp) static bool virt_get_dtb_randomness(Object *obj, Error **errp)
{ {
VirtMachineState *vms = VIRT_MACHINE(obj); VirtMachineState *vms = VIRT_MACHINE(obj);
@@ -2467,6 +2513,7 @@ static void virt_set_dtb_randomness(Object *obj, bool value, Error **errp) @@ -2481,6 +2542,7 @@ static void virt_set_dtb_randomness(Object *obj, bool value, Error **errp)
vms->dtb_randomness = value; vms->dtb_randomness = value;
} }
@ -179,7 +143,7 @@ index 62f0f7d4d6..c541efee5e 100644
static char *virt_get_oem_id(Object *obj, Error **errp) static char *virt_get_oem_id(Object *obj, Error **errp)
{ {
@@ -2550,6 +2597,7 @@ static void virt_set_ras(Object *obj, bool value, Error **errp) @@ -2564,6 +2626,7 @@ static void virt_set_ras(Object *obj, bool value, Error **errp)
vms->ras = value; vms->ras = value;
} }
@ -187,7 +151,7 @@ index 62f0f7d4d6..c541efee5e 100644
static bool virt_get_mte(Object *obj, Error **errp) static bool virt_get_mte(Object *obj, Error **errp)
{ {
VirtMachineState *vms = VIRT_MACHINE(obj); VirtMachineState *vms = VIRT_MACHINE(obj);
@@ -2563,6 +2611,7 @@ static void virt_set_mte(Object *obj, bool value, Error **errp) @@ -2577,6 +2640,7 @@ static void virt_set_mte(Object *obj, bool value, Error **errp)
vms->mte = value; vms->mte = value;
} }
@ -195,7 +159,7 @@ index 62f0f7d4d6..c541efee5e 100644
static char *virt_get_gic_version(Object *obj, Error **errp) static char *virt_get_gic_version(Object *obj, Error **errp)
{ {
@@ -2935,6 +2984,7 @@ static int virt_kvm_type(MachineState *ms, const char *type_str) @@ -2949,6 +3013,7 @@ static int virt_kvm_type(MachineState *ms, const char *type_str)
return fixed_ipa ? 0 : requested_pa_size; return fixed_ipa ? 0 : requested_pa_size;
} }
@ -203,7 +167,7 @@ index 62f0f7d4d6..c541efee5e 100644
static void virt_machine_class_init(ObjectClass *oc, void *data) static void virt_machine_class_init(ObjectClass *oc, void *data)
{ {
MachineClass *mc = MACHINE_CLASS(oc); MachineClass *mc = MACHINE_CLASS(oc);
@@ -3405,3 +3455,201 @@ static void virt_machine_2_6_options(MachineClass *mc) @@ -3463,3 +3528,235 @@ static void virt_machine_2_6_options(MachineClass *mc)
vmc->no_pmu = true; vmc->no_pmu = true;
} }
DEFINE_VIRT_MACHINE(2, 6) DEFINE_VIRT_MACHINE(2, 6)
@ -213,6 +177,7 @@ index 62f0f7d4d6..c541efee5e 100644
+{ +{
+ MachineClass *mc = MACHINE_CLASS(oc); + MachineClass *mc = MACHINE_CLASS(oc);
+ HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(oc); + HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(oc);
+ arm_virt_compat_set(mc);
+ +
+ mc->family = "virt-rhel-Z"; + mc->family = "virt-rhel-Z";
+ mc->init = machvirt_init; + mc->init = machvirt_init;
@ -258,6 +223,28 @@ index 62f0f7d4d6..c541efee5e 100644
+ "Set on/off to enable/disable using " + "Set on/off to enable/disable using "
+ "physical address space above 32 bits"); + "physical address space above 32 bits");
+ +
+ object_class_property_add_bool(oc, "highmem-redists",
+ virt_get_highmem_redists,
+ virt_set_highmem_redists);
+ object_class_property_set_description(oc, "highmem-redists",
+ "Set on/off to enable/disable high "
+ "memory region for GICv3 or GICv4 "
+ "redistributor");
+
+ object_class_property_add_bool(oc, "highmem-ecam",
+ virt_get_highmem_ecam,
+ virt_set_highmem_ecam);
+ object_class_property_set_description(oc, "highmem-ecam",
+ "Set on/off to enable/disable high "
+ "memory region for PCI ECAM");
+
+ object_class_property_add_bool(oc, "highmem-mmio",
+ virt_get_highmem_mmio,
+ virt_set_highmem_mmio);
+ object_class_property_set_description(oc, "highmem-mmio",
+ "Set on/off to enable/disable high "
+ "memory region for PCI MMIO");
+
+ object_class_property_add_str(oc, "gic-version", virt_get_gic_version, + object_class_property_add_str(oc, "gic-version", virt_get_gic_version,
+ virt_set_gic_version); + virt_set_gic_version);
+ object_class_property_set_description(oc, "gic-version", + object_class_property_set_description(oc, "gic-version",
@ -382,14 +369,24 @@ index 62f0f7d4d6..c541efee5e 100644
+} +}
+type_init(rhel_machine_init); +type_init(rhel_machine_init);
+ +
+static void rhel940_virt_options(MachineClass *mc)
+{
+}
+DEFINE_RHEL_MACHINE_AS_LATEST(9, 4, 0)
+
+static void rhel920_virt_options(MachineClass *mc) +static void rhel920_virt_options(MachineClass *mc)
+{ +{
+ compat_props_add(mc->compat_props, arm_rhel_compat, arm_rhel_compat_len); + rhel940_virt_options(mc);
+
+ compat_props_add(mc->compat_props, hw_compat_rhel_9_4, hw_compat_rhel_9_4_len); + compat_props_add(mc->compat_props, hw_compat_rhel_9_4, hw_compat_rhel_9_4_len);
+ compat_props_add(mc->compat_props, hw_compat_rhel_9_3, hw_compat_rhel_9_3_len); + compat_props_add(mc->compat_props, hw_compat_rhel_9_3, hw_compat_rhel_9_3_len);
+ compat_props_add(mc->compat_props, hw_compat_rhel_9_2, hw_compat_rhel_9_2_len); + compat_props_add(mc->compat_props, hw_compat_rhel_9_2, hw_compat_rhel_9_2_len);
+
+ /* RHEL 9.4 is the first supported release */
+ mc->deprecation_reason =
+ "machine types for versions prior to 9.4 are deprecated";
+} +}
+DEFINE_RHEL_MACHINE_AS_LATEST(9, 2, 0) +DEFINE_RHEL_MACHINE(9, 2, 0)
+ +
+static void rhel900_virt_options(MachineClass *mc) +static void rhel900_virt_options(MachineClass *mc)
+{ +{
@ -398,6 +395,7 @@ index 62f0f7d4d6..c541efee5e 100644
+ rhel920_virt_options(mc); + rhel920_virt_options(mc);
+ +
+ compat_props_add(mc->compat_props, hw_compat_rhel_9_1, hw_compat_rhel_9_1_len); + compat_props_add(mc->compat_props, hw_compat_rhel_9_1, hw_compat_rhel_9_1_len);
+ compat_props_add(mc->compat_props, hw_compat_rhel_9_0, hw_compat_rhel_9_0_len);
+ +
+ /* Disable FEAT_LPA2 since old kernels (<= v5.12) don't boot with that feature */ + /* Disable FEAT_LPA2 since old kernels (<= v5.12) don't boot with that feature */
+ vmc->no_tcg_lpa2 = true; + vmc->no_tcg_lpa2 = true;
@ -406,10 +404,10 @@ index 62f0f7d4d6..c541efee5e 100644
+} +}
+DEFINE_RHEL_MACHINE(9, 0, 0) +DEFINE_RHEL_MACHINE(9, 0, 0)
diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
index f69239850e..7b8abe5645 100644 index bb486d36b1..237fc77bda 100644
--- a/include/hw/arm/virt.h --- a/include/hw/arm/virt.h
+++ b/include/hw/arm/virt.h +++ b/include/hw/arm/virt.h
@@ -177,9 +177,17 @@ struct VirtMachineState { @@ -179,9 +179,17 @@ struct VirtMachineState {
#define VIRT_ECAM_ID(high) (high ? VIRT_HIGH_PCIE_ECAM : VIRT_PCIE_ECAM) #define VIRT_ECAM_ID(high) (high ? VIRT_HIGH_PCIE_ECAM : VIRT_PCIE_ECAM)

View File

@ -1,544 +0,0 @@
From d03cff85f5f1b69b1a66011ebaa974ece81d31bc Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Fri, 19 Oct 2018 13:27:13 +0200
Subject: Add ppc64 machine types
Adding changes to add RHEL machine types for ppc64 architecture.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
Rebase notes (6.2.0):
- Fixed rebase conflict relicts
- Update machine type compat for 6.2 (from MR 66)
Merged patches (6.1.0):
- c438c25ac3 redhat: Define pseries-rhel8.5.0 machine type
- a3995e2eff Remove RHEL 7.0.0 machine type (only ppc64 changes)
- ad3190a79b Remove RHEL 7.1.0 machine type (only ppc64 changes)
- 84bbe15d4e Remove RHEL 7.2.0 machine type (only ppc64 changes)
- 0215eb3356 Remove RHEL 7.3.0 machine types (only ppc64 changes)
- af69d1ca6e Remove RHEL 7.4.0 machine types (only ppc64 changes)
- 8f7a74ab78 Remove RHEL 7.5.0 machine types (only ppc64 changes)
Merged patches (7.1.0):
- baa6790171 target/ppc/cpu-models: Fix ppc_cpu_aliases list for RHEL
---
hw/ppc/spapr.c | 243 ++++++++++++++++++++++++++++++++++++++++
hw/ppc/spapr_cpu_core.c | 13 +++
include/hw/ppc/spapr.h | 4 +
target/ppc/compat.c | 13 ++-
target/ppc/cpu-models.c | 1 +
target/ppc/cpu.h | 1 +
target/ppc/kvm.c | 27 +++++
target/ppc/kvm_ppc.h | 13 +++
8 files changed, 314 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index df09aa9d6a..ff459e1a46 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1689,6 +1689,9 @@ static void spapr_machine_reset(MachineState *machine, ShutdownCause reason)
pef_kvm_reset(machine->cgs, &error_fatal);
spapr_caps_apply(spapr);
+ if (spapr->svm_allowed) {
+ kvmppc_svm_allow(&error_fatal);
+ }
first_ppc_cpu = POWERPC_CPU(first_cpu);
if (kvm_enabled() && kvmppc_has_cap_mmu_radix() &&
@@ -3397,6 +3400,20 @@ static void spapr_set_host_serial(Object *obj, const char *value, Error **errp)
spapr->host_serial = g_strdup(value);
}
+static bool spapr_get_svm_allowed(Object *obj, Error **errp)
+{
+ SpaprMachineState *spapr = SPAPR_MACHINE(obj);
+
+ return spapr->svm_allowed;
+}
+
+static void spapr_set_svm_allowed(Object *obj, bool value, Error **errp)
+{
+ SpaprMachineState *spapr = SPAPR_MACHINE(obj);
+
+ spapr->svm_allowed = value;
+}
+
static void spapr_instance_init(Object *obj)
{
SpaprMachineState *spapr = SPAPR_MACHINE(obj);
@@ -3475,6 +3492,12 @@ static void spapr_instance_init(Object *obj)
spapr_get_host_serial, spapr_set_host_serial);
object_property_set_description(obj, "host-serial",
"Host serial number to advertise in guest device tree");
+ object_property_add_bool(obj, "x-svm-allowed",
+ spapr_get_svm_allowed,
+ spapr_set_svm_allowed);
+ object_property_set_description(obj, "x-svm-allowed",
+ "Allow the guest to become a Secure Guest"
+ " (experimental only)");
}
static void spapr_machine_finalizefn(Object *obj)
@@ -4734,6 +4757,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data)
vmc->client_architecture_support = spapr_vof_client_architecture_support;
vmc->quiesce = spapr_vof_quiesce;
vmc->setprop = spapr_vof_setprop;
+ smc->has_power9_support = true;
}
static const TypeInfo spapr_machine_info = {
@@ -4785,6 +4809,7 @@ static void spapr_machine_latest_class_options(MachineClass *mc)
} \
type_init(spapr_machine_register_##suffix)
+#if 0 /* Disabled for Red Hat Enterprise Linux */
/*
* pseries-8.2
*/
@@ -4967,6 +4992,7 @@ static void spapr_machine_4_1_class_options(MachineClass *mc)
}
DEFINE_SPAPR_MACHINE(4_1, "4.1", false);
+#endif
/*
* pseries-4.0
@@ -4982,6 +5008,8 @@ static bool phb_placement_4_0(SpaprMachineState *spapr, uint32_t index,
}
return true;
}
+
+#if 0 /* Disabled for Red Hat Enterprise Linux */
static void spapr_machine_4_0_class_options(MachineClass *mc)
{
SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
@@ -5306,6 +5334,221 @@ static void spapr_machine_2_1_class_options(MachineClass *mc)
compat_props_add(mc->compat_props, hw_compat_2_1, hw_compat_2_1_len);
}
DEFINE_SPAPR_MACHINE(2_1, "2.1", false);
+#endif
+
+static void spapr_machine_rhel_default_class_options(MachineClass *mc)
+{
+ /*
+ * Defaults for the latest behaviour inherited from the base class
+ * can be overriden here for all pseries-rhel* machines.
+ */
+
+ /* Maximum supported VCPU count */
+ mc->max_cpus = 384;
+}
+
+/*
+ * pseries-rhel8.5.0
+ * like pseries-6.0
+ */
+
+static void spapr_machine_rhel850_class_options(MachineClass *mc)
+{
+ SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
+
+ /* The default machine type must apply the RHEL specific defaults */
+ spapr_machine_rhel_default_class_options(mc);
+ compat_props_add(mc->compat_props, hw_compat_rhel_8_5,
+ hw_compat_rhel_8_5_len);
+ smc->pre_6_2_numa_affinity = true;
+ mc->smp_props.prefer_sockets = true;
+}
+
+DEFINE_SPAPR_MACHINE(rhel850, "rhel8.5.0", true);
+
+/*
+ * pseries-rhel8.4.0
+ * like pseries-5.2
+ */
+
+static void spapr_machine_rhel840_class_options(MachineClass *mc)
+{
+ spapr_machine_rhel850_class_options(mc);
+ compat_props_add(mc->compat_props, hw_compat_rhel_8_4,
+ hw_compat_rhel_8_4_len);
+}
+
+DEFINE_SPAPR_MACHINE(rhel840, "rhel8.4.0", false);
+
+/*
+ * pseries-rhel8.3.0
+ * like pseries-5.1
+ */
+
+static void spapr_machine_rhel830_class_options(MachineClass *mc)
+{
+ SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
+
+ spapr_machine_rhel840_class_options(mc);
+ compat_props_add(mc->compat_props, hw_compat_rhel_8_3,
+ hw_compat_rhel_8_3_len);
+
+ /* from pseries-5.1 */
+ smc->pre_5_2_numa_associativity = true;
+}
+
+DEFINE_SPAPR_MACHINE(rhel830, "rhel8.3.0", false);
+
+/*
+ * pseries-rhel8.2.0
+ * like pseries-4.2 + pseries-5.0
+ * except SPAPR_CAP_CCF_ASSIST that has been backported to pseries-rhel8.1.0
+ */
+
+static void spapr_machine_rhel820_class_options(MachineClass *mc)
+{
+ SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
+ /* from pseries-5.0 */
+ static GlobalProperty compat[] = {
+ { TYPE_SPAPR_PCI_HOST_BRIDGE, "pre-5.1-associativity", "on" },
+ };
+
+ spapr_machine_rhel830_class_options(mc);
+ compat_props_add(mc->compat_props, hw_compat_rhel_8_2,
+ hw_compat_rhel_8_2_len);
+ compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat));
+
+ /* from pseries-4.2 */
+ smc->default_caps.caps[SPAPR_CAP_FWNMI] = SPAPR_CAP_OFF;
+ smc->rma_limit = 16 * GiB;
+ mc->nvdimm_supported = false;
+
+ /* from pseries-5.0 */
+ mc->numa_mem_supported = true;
+ smc->pre_5_1_assoc_refpoints = true;
+}
+
+DEFINE_SPAPR_MACHINE(rhel820, "rhel8.2.0", false);
+
+/*
+ * pseries-rhel8.1.0
+ * like pseries-4.1
+ */
+
+static void spapr_machine_rhel810_class_options(MachineClass *mc)
+{
+ SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
+ static GlobalProperty compat[] = {
+ /* Only allow 4kiB and 64kiB IOMMU pagesizes */
+ { TYPE_SPAPR_PCI_HOST_BRIDGE, "pgsz", "0x11000" },
+ };
+
+ spapr_machine_rhel820_class_options(mc);
+
+ /* from pseries-4.1 */
+ smc->linux_pci_probe = false;
+ smc->smp_threads_vsmt = false;
+ compat_props_add(mc->compat_props, hw_compat_rhel_8_1,
+ hw_compat_rhel_8_1_len);
+ compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat));
+
+ /* from pseries-4.2 */
+ smc->default_caps.caps[SPAPR_CAP_CCF_ASSIST] = SPAPR_CAP_OFF;
+}
+
+DEFINE_SPAPR_MACHINE(rhel810, "rhel8.1.0", false);
+
+/*
+ * pseries-rhel8.0.0
+ * like pseries-3.1 and pseries-4.0
+ * except SPAPR_CAP_CFPC, SPAPR_CAP_SBBC and SPAPR_CAP_IBS
+ * that have been backported to pseries-rhel8.0.0
+ */
+
+static void spapr_machine_rhel800_class_options(MachineClass *mc)
+{
+ SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
+
+ spapr_machine_rhel810_class_options(mc);
+ compat_props_add(mc->compat_props, hw_compat_rhel_8_0,
+ hw_compat_rhel_8_0_len);
+
+ /* pseries-4.0 */
+ smc->phb_placement = phb_placement_4_0;
+ smc->irq = &spapr_irq_xics;
+ smc->pre_4_1_migration = true;
+
+ /* pseries-3.1 */
+ mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power8_v2.0");
+ smc->update_dt_enabled = false;
+ smc->dr_phb_enabled = false;
+ smc->broken_host_serial_model = true;
+ smc->default_caps.caps[SPAPR_CAP_LARGE_DECREMENTER] = SPAPR_CAP_OFF;
+}
+
+DEFINE_SPAPR_MACHINE(rhel800, "rhel8.0.0", false);
+
+/*
+ * pseries-rhel7.6.0
+ * like spapr_compat_2_12 and spapr_compat_3_0
+ * spapr_compat_0 is empty
+ */
+GlobalProperty spapr_compat_rhel7_6[] = {
+ { TYPE_POWERPC_CPU, "pre-3.0-migration", "on" },
+ { TYPE_SPAPR_CPU_CORE, "pre-3.0-migration", "on" },
+};
+const size_t spapr_compat_rhel7_6_len = G_N_ELEMENTS(spapr_compat_rhel7_6);
+
+
+static void spapr_machine_rhel760_class_options(MachineClass *mc)
+{
+ SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
+
+ spapr_machine_rhel800_class_options(mc);
+ compat_props_add(mc->compat_props, hw_compat_rhel_7_6, hw_compat_rhel_7_6_len);
+ compat_props_add(mc->compat_props, spapr_compat_rhel7_6, spapr_compat_rhel7_6_len);
+
+ /* from spapr_machine_3_0_class_options() */
+ smc->legacy_irq_allocation = true;
+ smc->nr_xirqs = 0x400;
+ smc->irq = &spapr_irq_xics_legacy;
+
+ /* from spapr_machine_2_12_class_options() */
+ /* We depend on kvm_enabled() to choose a default value for the
+ * hpt-max-page-size capability. Of course we can't do it here
+ * because this is too early and the HW accelerator isn't initialzed
+ * yet. Postpone this to machine init (see default_caps_with_cpu()).
+ */
+ smc->default_caps.caps[SPAPR_CAP_HPT_MAXPAGESIZE] = 0;
+
+ /* SPAPR_CAP_WORKAROUND enabled in pseries-rhel800 by
+ * f21757edc554
+ * "Enable mitigations by default for pseries-4.0 machine type")
+ */
+ smc->default_caps.caps[SPAPR_CAP_CFPC] = SPAPR_CAP_BROKEN;
+ smc->default_caps.caps[SPAPR_CAP_SBBC] = SPAPR_CAP_BROKEN;
+ smc->default_caps.caps[SPAPR_CAP_IBS] = SPAPR_CAP_BROKEN;
+}
+
+DEFINE_SPAPR_MACHINE(rhel760, "rhel7.6.0", false);
+
+/*
+ * pseries-rhel7.6.0-sxxm
+ *
+ * pseries-rhel7.6.0 with speculative execution exploit mitigations enabled by default
+ */
+
+static void spapr_machine_rhel760sxxm_class_options(MachineClass *mc)
+{
+ SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
+
+ spapr_machine_rhel760_class_options(mc);
+ smc->default_caps.caps[SPAPR_CAP_CFPC] = SPAPR_CAP_WORKAROUND;
+ smc->default_caps.caps[SPAPR_CAP_SBBC] = SPAPR_CAP_WORKAROUND;
+ smc->default_caps.caps[SPAPR_CAP_IBS] = SPAPR_CAP_FIXED_CCD;
+}
+
+DEFINE_SPAPR_MACHINE(rhel760sxxm, "rhel7.6.0-sxxm", false);
static void spapr_machine_register_types(void)
{
diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
index 33e0c8724c..9d01663f43 100644
--- a/hw/ppc/spapr_cpu_core.c
+++ b/hw/ppc/spapr_cpu_core.c
@@ -25,6 +25,7 @@
#include "sysemu/reset.h"
#include "sysemu/hw_accel.h"
#include "qemu/error-report.h"
+#include "cpu-models.h"
static void spapr_reset_vcpu(PowerPCCPU *cpu)
{
@@ -261,6 +262,7 @@ static bool spapr_realize_vcpu(PowerPCCPU *cpu, SpaprMachineState *spapr,
{
CPUPPCState *env = &cpu->env;
CPUState *cs = CPU(cpu);
+ SpaprMachineClass *smc = SPAPR_MACHINE_GET_CLASS(spapr);
if (!qdev_realize(DEVICE(cpu), NULL, errp)) {
return false;
@@ -277,6 +279,17 @@ static bool spapr_realize_vcpu(PowerPCCPU *cpu, SpaprMachineState *spapr,
/* Set time-base frequency to 512 MHz. vhyp must be set first. */
cpu_ppc_tb_init(env, SPAPR_TIMEBASE_FREQ);
+ if (!smc->has_power9_support &&
+ (((spapr->max_compat_pvr &&
+ ppc_compat_cmp(spapr->max_compat_pvr,
+ CPU_POWERPC_LOGICAL_3_00) >= 0)) ||
+ (!spapr->max_compat_pvr &&
+ ppc_check_compat(cpu, CPU_POWERPC_LOGICAL_3_00, 0, 0)))) {
+ error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND,
+ "POWER9 CPU is not supported by this machine class");
+ return false;
+ }
+
if (spapr_irq_cpu_intc_create(spapr, cpu, errp) < 0) {
qdev_unrealize(DEVICE(cpu));
return false;
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index e91791a1a9..1951d8a2a0 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -154,6 +154,7 @@ struct SpaprMachineClass {
bool pre_5_2_numa_associativity;
bool pre_6_2_numa_affinity;
+ bool has_power9_support;
bool (*phb_placement)(SpaprMachineState *spapr, uint32_t index,
uint64_t *buid, hwaddr *pio,
hwaddr *mmio32, hwaddr *mmio64,
@@ -256,6 +257,9 @@ struct SpaprMachineState {
/* Set by -boot */
char *boot_device;
+ /* Secure Guest support via x-svm-allowed */
+ bool svm_allowed;
+
/*< public >*/
char *kvm_type;
char *host_model;
diff --git a/target/ppc/compat.c b/target/ppc/compat.c
index ebef2cccec..ff2c00c60e 100644
--- a/target/ppc/compat.c
+++ b/target/ppc/compat.c
@@ -114,8 +114,19 @@ static const CompatInfo *compat_by_pvr(uint32_t pvr)
return NULL;
}
+long ppc_compat_cmp(uint32_t pvr1, uint32_t pvr2)
+{
+ const CompatInfo *compat1 = compat_by_pvr(pvr1);
+ const CompatInfo *compat2 = compat_by_pvr(pvr2);
+
+ g_assert(compat1);
+ g_assert(compat2);
+
+ return compat1 - compat2;
+}
+
static bool pcc_compat(PowerPCCPUClass *pcc, uint32_t compat_pvr,
- uint32_t min_compat_pvr, uint32_t max_compat_pvr)
+ uint32_t min_compat_pvr, uint32_t max_compat_pvr)
{
const CompatInfo *compat = compat_by_pvr(compat_pvr);
const CompatInfo *min = compat_by_pvr(min_compat_pvr);
diff --git a/target/ppc/cpu-models.c b/target/ppc/cpu-models.c
index 69fddb05bc..64a05aaef3 100644
--- a/target/ppc/cpu-models.c
+++ b/target/ppc/cpu-models.c
@@ -748,6 +748,7 @@
/* PowerPC CPU aliases */
PowerPCCPUAlias ppc_cpu_aliases[] = {
+#if 0 /* Disabled for Red Hat Enterprise Linux */
{ "405", "405d4" },
{ "405cr", "405crc" },
{ "405gp", "405gpd" },
diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
index f8101ffa29..e799a2bee6 100644
--- a/target/ppc/cpu.h
+++ b/target/ppc/cpu.h
@@ -1635,6 +1635,7 @@ static inline int cpu_mmu_index(CPUPPCState *env, bool ifetch)
/* Compatibility modes */
#if defined(TARGET_PPC64)
+long ppc_compat_cmp(uint32_t pvr1, uint32_t pvr2);
bool ppc_check_compat(PowerPCCPU *cpu, uint32_t compat_pvr,
uint32_t min_compat_pvr, uint32_t max_compat_pvr);
bool ppc_type_check_compat(const char *cputype, uint32_t compat_pvr,
diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
index 9b1abe2fc4..56f1c46e8e 100644
--- a/target/ppc/kvm.c
+++ b/target/ppc/kvm.c
@@ -89,6 +89,7 @@ static int cap_large_decr;
static int cap_fwnmi;
static int cap_rpt_invalidate;
static int cap_ail_mode_3;
+static int cap_ppc_secure_guest;
static uint32_t debug_inst_opcode;
@@ -141,6 +142,7 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
cap_resize_hpt = kvm_vm_check_extension(s, KVM_CAP_SPAPR_RESIZE_HPT);
kvmppc_get_cpu_characteristics(s);
cap_ppc_nested_kvm_hv = kvm_vm_check_extension(s, KVM_CAP_PPC_NESTED_HV);
+ cap_ppc_secure_guest = kvm_vm_check_extension(s, KVM_CAP_PPC_SECURE_GUEST);
cap_large_decr = kvmppc_get_dec_bits();
cap_fwnmi = kvm_vm_check_extension(s, KVM_CAP_PPC_FWNMI);
/*
@@ -2579,6 +2581,16 @@ bool kvmppc_supports_ail_3(void)
return cap_ail_mode_3;
}
+bool kvmppc_has_cap_secure_guest(void)
+{
+ return !!cap_ppc_secure_guest;
+}
+
+int kvmppc_enable_cap_secure_guest(void)
+{
+ return kvm_vm_enable_cap(kvm_state, KVM_CAP_PPC_SECURE_GUEST, 0, 1);
+}
+
PowerPCCPUClass *kvm_ppc_get_host_cpu_class(void)
{
uint32_t host_pvr = mfpvr();
@@ -2979,3 +2991,18 @@ bool kvm_arch_cpu_check_are_resettable(void)
void kvm_arch_accel_class_init(ObjectClass *oc)
{
}
+
+void kvmppc_svm_allow(Error **errp)
+{
+ if (!kvm_enabled()) {
+ error_setg(errp, "No PEF support in tcg, try x-svm-allowed=off");
+ return;
+ }
+
+ if (!kvmppc_has_cap_secure_guest()) {
+ error_setg(errp, "KVM implementation does not support secure guests, "
+ "try x-svm-allowed=off");
+ } else if (kvmppc_enable_cap_secure_guest() < 0) {
+ error_setg(errp, "Error enabling x-svm-allowed, try x-svm-allowed=off");
+ }
+}
diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h
index 1975fb5ee6..d1017f98be 100644
--- a/target/ppc/kvm_ppc.h
+++ b/target/ppc/kvm_ppc.h
@@ -46,6 +46,7 @@ int kvmppc_booke_watchdog_enable(PowerPCCPU *cpu);
target_ulong kvmppc_configure_v3_mmu(PowerPCCPU *cpu,
bool radix, bool gtse,
uint64_t proc_tbl);
+void kvmppc_svm_allow(Error **errp);
bool kvmppc_spapr_use_multitce(void);
int kvmppc_spapr_enable_inkernel_multitce(void);
void *kvmppc_create_spapr_tce(uint32_t liobn, uint32_t page_shift,
@@ -79,6 +80,8 @@ int kvmppc_enable_cap_large_decr(PowerPCCPU *cpu, int enable);
int kvmppc_has_cap_rpt_invalidate(void);
bool kvmppc_supports_ail_3(void);
int kvmppc_enable_hwrng(void);
+bool kvmppc_has_cap_secure_guest(void);
+int kvmppc_enable_cap_secure_guest(void);
int kvmppc_put_books_sregs(PowerPCCPU *cpu);
PowerPCCPUClass *kvm_ppc_get_host_cpu_class(void);
void kvmppc_check_papr_resize_hpt(Error **errp);
@@ -427,6 +430,16 @@ static inline bool kvmppc_supports_ail_3(void)
return false;
}
+static inline bool kvmppc_has_cap_secure_guest(void)
+{
+ return false;
+}
+
+static inline int kvmppc_enable_cap_secure_guest(void)
+{
+ return -1;
+}
+
static inline int kvmppc_enable_hwrng(void)
{
return -1;
--
2.39.3

View File

@ -1,4 +1,4 @@
From 3623043d4a923bf9f541d439c76e7874cf0fa81d Mon Sep 17 00:00:00 2001 From fa1d70b9a9cfe020e7ebe7798ebb70314658ccf7 Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com> From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Fri, 19 Oct 2018 13:47:32 +0200 Date: Fri, 19 Oct 2018 13:47:32 +0200
Subject: Add s390x machine types Subject: Add s390x machine types
@ -6,41 +6,6 @@ Subject: Add s390x machine types
Adding changes to add RHEL machine types for s390x architecture. Adding changes to add RHEL machine types for s390x architecture.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com> Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
--
Rebase changes (7.1.0):
- Moved adding rhel_old_machine_deprecation variable to general machine types commit
Merged patches (6.1.0):
- 64a9a5c971 hw/s390x: Remove the RHEL7-only machine type
- 395516d62b redhat: s390x: add rhel-8.5.0 compat machine
Merged patches (6.2.0):
- 3bf66f4520 redhat: Add s390x machine type compatibility update for 6.1 rebase
Merged patches (7.0.0):
- e6ff4de4f7 redhat: Add s390x machine type compatibility handling for the rebase to v6.2
- 4b0efa7e21 redhat: Add rhel8.6.0 and rhel9.0.0 machine types for s390x
- dcc64971bf RHEL: mark old machine types as deprecated (partialy)
Merged patches (7.1.0):
- 1d6439527a WRB: Introduce RHEL 9.0.0 hw compat structure (only hw/s390x/s390-virtio-ccw.c chunk)
- c8ad21ca31 redhat: Update s390x machine type compatibility for rebase to QEMU 7.0.0
- 5bcf8d874c target/s390x: deprecate CPUs older than z14
Merged patches (7.2.0):
- 0be2889fa2 Introduce upstream 7.0 compat changes (only applicable parts)
Merged patches (8.0.0):
- 27c188c6a4 redhat: Update s390x machine type compatibility for QEMU 7.2.0 update
- a932b8d429 redhat: Add new rhel-9.2.0 s390x machine type
- ac88104bad s390x/s390-virtio-ccw: Activate zPCI features on s390-ccw-virtio-rhel8.6.0
Merged patches (8.1.0):
- bd5d81d286 Add RHEL 9.2.0 compat structure (s390x part)
Merged patches (8.2.0):
- 4ee284aca9 Add machine types compat bits. (partial)
--- ---
hw/s390x/s390-virtio-ccw.c | 159 +++++++++++++++++++++++++++++++ hw/s390x/s390-virtio-ccw.c | 159 +++++++++++++++++++++++++++++++
target/s390x/cpu_models.c | 11 +++ target/s390x/cpu_models.c | 11 +++
@ -49,18 +14,18 @@ Merged patches (8.2.0):
4 files changed, 174 insertions(+) 4 files changed, 174 insertions(+)
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 7262725d2e..984891b82a 100644 index b1dcb3857f..ff753a29e0 100644
--- a/hw/s390x/s390-virtio-ccw.c --- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c
@@ -855,6 +855,7 @@ bool css_migration_enabled(void) @@ -859,6 +859,7 @@ bool css_migration_enabled(void)
} \ } \
type_init(ccw_machine_register_##suffix) type_init(ccw_machine_register_##suffix)
+#if 0 /* Disabled for Red Hat Enterprise Linux */ +#if 0 /* Disabled for Red Hat Enterprise Linux */
static void ccw_machine_8_2_instance_options(MachineState *machine) static void ccw_machine_9_0_instance_options(MachineState *machine)
{ {
} }
@@ -1256,6 +1257,164 @@ static void ccw_machine_2_4_class_options(MachineClass *mc) @@ -1272,6 +1273,164 @@ static void ccw_machine_2_4_class_options(MachineClass *mc)
compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat)); compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat));
} }
DEFINE_CCW_MACHINE(2_4, "2.4", false); DEFINE_CCW_MACHINE(2_4, "2.4", false);
@ -226,7 +191,7 @@ index 7262725d2e..984891b82a 100644
static void ccw_machine_register_types(void) static void ccw_machine_register_types(void)
{ {
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
index a63d990e4e..198b81f2c0 100644 index 8ed3bb6a27..370b3b3065 100644
--- a/target/s390x/cpu_models.c --- a/target/s390x/cpu_models.c
+++ b/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c
@@ -46,6 +46,9 @@ @@ -46,6 +46,9 @@
@ -239,7 +204,7 @@ index a63d990e4e..198b81f2c0 100644
static S390CPUDef s390_cpu_defs[] = { static S390CPUDef s390_cpu_defs[] = {
CPUDEF_INIT(0x2064, 7, 1, 38, 0x00000000U, "z900", "IBM zSeries 900 GA1"), CPUDEF_INIT(0x2064, 7, 1, 38, 0x00000000U, "z900", "IBM zSeries 900 GA1"),
CPUDEF_INIT(0x2064, 7, 2, 38, 0x00000000U, "z900.2", "IBM zSeries 900 GA2"), CPUDEF_INIT(0x2064, 7, 2, 38, 0x00000000U, "z900.2", "IBM zSeries 900 GA2"),
@@ -856,22 +859,30 @@ static void s390_host_cpu_model_class_init(ObjectClass *oc, void *data) @@ -866,22 +869,30 @@ static void s390_host_cpu_model_class_init(ObjectClass *oc, void *data)
static void s390_base_cpu_model_class_init(ObjectClass *oc, void *data) static void s390_base_cpu_model_class_init(ObjectClass *oc, void *data)
{ {
S390CPUClass *xcc = S390_CPU_CLASS(oc); S390CPUClass *xcc = S390_CPU_CLASS(oc);
@ -284,10 +249,10 @@ index d7b8912989..1a806a97c4 100644
/* CPU model based on a CPU definition */ /* CPU model based on a CPU definition */
diff --git a/target/s390x/cpu_models_sysemu.c b/target/s390x/cpu_models_sysemu.c diff --git a/target/s390x/cpu_models_sysemu.c b/target/s390x/cpu_models_sysemu.c
index 87a4480c05..28c1b0486c 100644 index 0728bfcc20..ca2e5d91e2 100644
--- a/target/s390x/cpu_models_sysemu.c --- a/target/s390x/cpu_models_sysemu.c
+++ b/target/s390x/cpu_models_sysemu.c +++ b/target/s390x/cpu_models_sysemu.c
@@ -60,6 +60,7 @@ static void create_cpu_model_list(ObjectClass *klass, void *opaque) @@ -59,6 +59,7 @@ static void create_cpu_model_list(ObjectClass *klass, void *opaque)
CpuDefinitionInfo *info; CpuDefinitionInfo *info;
char *name = g_strdup(object_class_get_name(klass)); char *name = g_strdup(object_class_get_name(klass));
S390CPUClass *scc = S390_CPU_CLASS(klass); S390CPUClass *scc = S390_CPU_CLASS(klass);
@ -295,7 +260,7 @@ index 87a4480c05..28c1b0486c 100644
/* strip off the -s390x-cpu */ /* strip off the -s390x-cpu */
g_strrstr(name, "-" TYPE_S390_CPU)[0] = 0; g_strrstr(name, "-" TYPE_S390_CPU)[0] = 0;
@@ -69,6 +70,7 @@ static void create_cpu_model_list(ObjectClass *klass, void *opaque) @@ -68,6 +69,7 @@ static void create_cpu_model_list(ObjectClass *klass, void *opaque)
info->migration_safe = scc->is_migration_safe; info->migration_safe = scc->is_migration_safe;
info->q_static = scc->is_static; info->q_static = scc->is_static;
info->q_typename = g_strdup(object_class_get_name(klass)); info->q_typename = g_strdup(object_class_get_name(klass));

View File

@ -1,4 +1,4 @@
From b432505cb28bc3b9b0c1849210ac6c63bca3fe37 Mon Sep 17 00:00:00 2001 From ec10588d2f5d748005e0dca42b299ae15868a900 Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com> From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Fri, 19 Oct 2018 13:10:31 +0200 Date: Fri, 19 Oct 2018 13:10:31 +0200
Subject: Add x86_64 machine types Subject: Add x86_64 machine types
@ -6,74 +6,37 @@ Subject: Add x86_64 machine types
Adding changes to add RHEL machine types for x86_64 architecture. Adding changes to add RHEL machine types for x86_64 architecture.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com> Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
Rebase notes (6.1.0):
- Update qemu64 cpu spec
Rebase notes (7.0.0):
- Reset alias for all machine-types except latest one
Rebase notes (8.0.0):
- remove legacy_no_rng_seed usage (removed upstream)
Rebase notes (8.1.0):
- default_nic_model to default_nic
Merged patches (6.1.0):
- 59c284ad3b x86: Add x86 rhel8.5 machine types
- a8868b42fe redhat: x86: Enable 'kvm-asyncpf-int' by default
- a3995e2eff Remove RHEL 7.0.0 machine type (only x86_64 changes)
- ad3190a79b Remove RHEL 7.1.0 machine type (only x86_64 changes)
- 84bbe15d4e Remove RHEL 7.2.0 machine type (only x86_64 changes)
- 0215eb3356 Remove RHEL 7.3.0 machine types (only x86_64 changes)
- af69d1ca6e Remove RHEL 7.4.0 machine types (only x86_64 changes)
- 8f7a74ab78 Remove RHEL 7.5.0 machine types (only x86_64 changes)
Merged patches (7.0.0):
- eae7d8dd3c x86/rhel machine types: Add pc_rhel_8_5_compat
- 6762f56469 x86/rhel machine types: Wire compat into q35 and i440fx
- 5762101438 rhel machine types/x86: set prefer_sockets
- 9ba9ddc632 x86: Add q35 RHEL 8.6.0 machine type
- 6110d865e5 x86: Add q35 RHEL 9.0.0 machine type
- dcc64971bf RHEL: mark old machine types as deprecated (partialy)
- 6b396f182b RHEL: disable "seqpacket" for "vhost-vsock-device" in rhel8.6.0
Merged patches (7.1.0):
- 38b89dc245 pc: Move s3/s4 suspend disabling to compat (only hw/i386/pc.c chunk)
- 1d6439527a WRB: Introduce RHEL 9.0.0 hw compat structure (x86_64 specific changes)
- 35b5c8554f target/i386: deprecate CPUs older than x86_64-v2 ABI
Merged patches (7.2.0):
- 0be2889fa2 Introduce upstream 7.0 compat changes (only applicable parts)
Merged patches (8.0.0):
- f33ca8aed4 x86: rhel 9.2.0 machine type
Merged patches (8.1.0):
- bd5d81d286 Add RHEL 9.2.0 compat structure (x86_64 part)
- c6eaf73add redhat: hw/i386/pc: Update x86 machine type compatibility for QEMU 8.0.0 update
- 6cbf496e5e hw/acpi: Mark acpi blobs as resizable on RHEL pc machines version 7.6 and above
Merged patches (8.2.0):
- 4ee284aca9 Add machine types compat bits. (partial)
- 719e2ac147 Fix x86 machine type compatibility for qemu-kvm 8.1.0
--- ---
hw/i386/fw_cfg.c | 2 +-
hw/i386/pc.c | 159 ++++++++++++++++++++- hw/i386/pc.c | 159 ++++++++++++++++++++-
hw/i386/pc_piix.c | 112 ++++++++++++++- hw/i386/pc_piix.c | 109 ++++++++++++++
hw/i386/pc_q35.c | 285 ++++++++++++++++++++++++++++++++++++- hw/i386/pc_q35.c | 285 +++++++++++++++++++++++++++++++++++++
include/hw/boards.h | 2 + include/hw/boards.h | 2 +
include/hw/i386/pc.h | 33 +++++ include/hw/i386/pc.h | 33 +++++
target/i386/cpu.c | 21 +++ target/i386/cpu.c | 21 +++
target/i386/kvm/kvm-cpu.c | 1 + target/i386/kvm/kvm-cpu.c | 1 +
target/i386/kvm/kvm.c | 4 + target/i386/kvm/kvm.c | 4 +
tests/qtest/pvpanic-test.c | 5 +- tests/qtest/pvpanic-test.c | 5 +-
9 files changed, 615 insertions(+), 7 deletions(-) 10 files changed, 617 insertions(+), 4 deletions(-)
diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c
index c7aa39a13e..283c3f4c16 100644
--- a/hw/i386/fw_cfg.c
+++ b/hw/i386/fw_cfg.c
@@ -63,7 +63,7 @@ void fw_cfg_build_smbios(PCMachineState *pcms, FWCfgState *fw_cfg,
if (pcmc->smbios_defaults) {
/* These values are guest ABI, do not change */
- smbios_set_defaults("QEMU", mc->desc, mc->name,
+ smbios_set_defaults("Red Hat", "KVM", mc->desc,
pcmc->smbios_uuid_encoded,
pcmc->smbios_stream_product, pcmc->smbios_stream_version);
}
diff --git a/hw/i386/pc.c b/hw/i386/pc.c diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 29b9964733..a1faa9e92c 100644 index 5c21b0c4db..4a154c1a9a 100644
--- a/hw/i386/pc.c --- a/hw/i386/pc.c
+++ b/hw/i386/pc.c +++ b/hw/i386/pc.c
@@ -323,6 +323,161 @@ GlobalProperty pc_compat_2_0[] = { @@ -326,6 +326,161 @@ GlobalProperty pc_compat_2_0[] = {
}; };
const size_t pc_compat_2_0_len = G_N_ELEMENTS(pc_compat_2_0); const size_t pc_compat_2_0_len = G_N_ELEMENTS(pc_compat_2_0);
@ -235,15 +198,15 @@ index 29b9964733..a1faa9e92c 100644
GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled)
{ {
GSIState *s; GSIState *s;
@@ -1826,6 +1981,7 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) @@ -1813,6 +1968,7 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
pcmc->kvmclock_create_always = true;
pcmc->resizable_acpi_blob = true; pcmc->resizable_acpi_blob = true;
x86mc->apic_xrupt_override = true;
assert(!mc->get_hotplug_handler); assert(!mc->get_hotplug_handler);
+ mc->async_pf_vmexit_disable = false; + mc->async_pf_vmexit_disable = false;
mc->get_hotplug_handler = pc_get_hotplug_handler; mc->get_hotplug_handler = pc_get_hotplug_handler;
mc->hotplug_allowed = pc_hotplug_allowed; mc->hotplug_allowed = pc_hotplug_allowed;
mc->cpu_index_to_instance_props = x86_cpu_index_to_props; mc->cpu_index_to_instance_props = x86_cpu_index_to_props;
@@ -1836,7 +1992,8 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) @@ -1823,7 +1979,8 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
mc->has_hotpluggable_cpus = true; mc->has_hotpluggable_cpus = true;
mc->default_boot_order = "cad"; mc->default_boot_order = "cad";
mc->block_default_type = IF_IDE; mc->block_default_type = IF_IDE;
@ -254,10 +217,10 @@ index 29b9964733..a1faa9e92c 100644
mc->wakeup = pc_machine_wakeup; mc->wakeup = pc_machine_wakeup;
hc->pre_plug = pc_machine_device_pre_plug_cb; hc->pre_plug = pc_machine_device_pre_plug_cb;
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 2a9f465619..44038391fb 100644 index 18ba076609..a647262d63 100644
--- a/hw/i386/pc_piix.c --- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c
@@ -53,6 +53,7 @@ @@ -52,6 +52,7 @@
#include "qapi/error.h" #include "qapi/error.h"
#include "qemu/error-report.h" #include "qemu/error-report.h"
#include "sysemu/xen.h" #include "sysemu/xen.h"
@ -265,18 +228,7 @@ index 2a9f465619..44038391fb 100644
#ifdef CONFIG_XEN #ifdef CONFIG_XEN
#include <xen/hvm/hvm_info_table.h> #include <xen/hvm/hvm_info_table.h>
#include "hw/xen/xen_pt.h" #include "hw/xen/xen_pt.h"
@@ -235,8 +236,8 @@ static void pc_init1(MachineState *machine, @@ -422,6 +423,7 @@ static void pc_set_south_bridge(Object *obj, int value, Error **errp)
if (pcmc->smbios_defaults) {
MachineClass *mc = MACHINE_GET_CLASS(machine);
/* These values are guest ABI, do not change */
- smbios_set_defaults("QEMU", mc->desc,
- mc->name, pcmc->smbios_legacy_mode,
+ smbios_set_defaults("Red Hat", "KVM",
+ mc->desc, pcmc->smbios_legacy_mode,
pcmc->smbios_uuid_encoded,
pcmc->smbios_stream_product,
pcmc->smbios_stream_version,
@@ -453,6 +454,7 @@ static void pc_set_south_bridge(Object *obj, int value, Error **errp)
* hw_compat_*, pc_compat_*, or * pc_*_machine_options(). * hw_compat_*, pc_compat_*, or * pc_*_machine_options().
*/ */
@ -284,7 +236,7 @@ index 2a9f465619..44038391fb 100644
static void pc_compat_2_3_fn(MachineState *machine) static void pc_compat_2_3_fn(MachineState *machine)
{ {
X86MachineState *x86ms = X86_MACHINE(machine); X86MachineState *x86ms = X86_MACHINE(machine);
@@ -970,3 +972,109 @@ static void xenfv_3_1_machine_options(MachineClass *m) @@ -951,3 +953,110 @@ static void xenfv_3_1_machine_options(MachineClass *m)
DEFINE_PC_MACHINE(xenfv, "xenfv-3.1", pc_xen_hvm_init, DEFINE_PC_MACHINE(xenfv, "xenfv-3.1", pc_xen_hvm_init,
xenfv_3_1_machine_options); xenfv_3_1_machine_options);
#endif #endif
@ -314,8 +266,7 @@ index 2a9f465619..44038391fb 100644
+ +
+static void pc_init_rhel760(MachineState *machine) +static void pc_init_rhel760(MachineState *machine)
+{ +{
+ pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \ + pc_init1(machine, TYPE_I440FX_PCI_DEVICE);
+ TYPE_I440FX_PCI_DEVICE);
+} +}
+ +
+static void pc_machine_rhel760_options(MachineClass *m) +static void pc_machine_rhel760_options(MachineClass *m)
@ -339,6 +290,8 @@ index 2a9f465619..44038391fb 100644
+ pcmc->enforce_amd_1tb_hole = false; + pcmc->enforce_amd_1tb_hole = false;
+ /* From pc_i440fx_8_0_machine_options() */ + /* From pc_i440fx_8_0_machine_options() */
+ pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_32; + pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_32;
+ /* From pc_i440fx_8_1_machine_options() */
+ pcmc->broken_32bit_mem_addr_check = true;
+ /* Introduced in QEMU 8.2 */ + /* Introduced in QEMU 8.2 */
+ pcmc->default_south_bridge = TYPE_PIIX3_DEVICE; + pcmc->default_south_bridge = TYPE_PIIX3_DEVICE;
+ +
@ -395,21 +348,10 @@ index 2a9f465619..44038391fb 100644
+DEFINE_PC_MACHINE(rhel760, "pc-i440fx-rhel7.6.0", pc_init_rhel760, +DEFINE_PC_MACHINE(rhel760, "pc-i440fx-rhel7.6.0", pc_init_rhel760,
+ pc_machine_rhel760_options); + pc_machine_rhel760_options);
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 912cb0c0dc..6387df97c8 100644 index c7bc8a2041..e872dc7e46 100644
--- a/hw/i386/pc_q35.c --- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c
@@ -203,8 +203,8 @@ static void pc_q35_init(MachineState *machine) @@ -341,6 +341,7 @@ static void pc_q35_init(MachineState *machine)
if (pcmc->smbios_defaults) {
/* These values are guest ABI, do not change */
- smbios_set_defaults("QEMU", mc->desc,
- mc->name, pcmc->smbios_legacy_mode,
+ smbios_set_defaults("Red Hat", "KVM",
+ mc->desc, pcmc->smbios_legacy_mode,
pcmc->smbios_uuid_encoded,
pcmc->smbios_stream_product,
pcmc->smbios_stream_version,
@@ -363,6 +363,7 @@ static void pc_q35_init(MachineState *machine)
DEFINE_PC_MACHINE(suffix, name, pc_init_##suffix, optionfn) DEFINE_PC_MACHINE(suffix, name, pc_init_##suffix, optionfn)
@ -417,7 +359,7 @@ index 912cb0c0dc..6387df97c8 100644
static void pc_q35_machine_options(MachineClass *m) static void pc_q35_machine_options(MachineClass *m)
{ {
PCMachineClass *pcmc = PC_MACHINE_CLASS(m); PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
@@ -699,3 +700,283 @@ static void pc_q35_2_4_machine_options(MachineClass *m) @@ -693,3 +694,287 @@ static void pc_q35_2_4_machine_options(MachineClass *m)
DEFINE_Q35_MACHINE(v2_4, "pc-q35-2.4", NULL, DEFINE_Q35_MACHINE(v2_4, "pc-q35-2.4", NULL,
pc_q35_2_4_machine_options); pc_q35_2_4_machine_options);
@ -444,6 +386,8 @@ index 912cb0c0dc..6387df97c8 100644
+ m->alias = "q35"; + m->alias = "q35";
+ m->max_cpus = 710; + m->max_cpus = 710;
+ compat_props_add(m->compat_props, pc_rhel_compat, pc_rhel_compat_len); + compat_props_add(m->compat_props, pc_rhel_compat, pc_rhel_compat_len);
+ compat_props_add(m->compat_props,
+ pc_q35_compat_defaults, pc_q35_compat_defaults_len);
+} +}
+ +
+static void pc_q35_init_rhel940(MachineState *machine) +static void pc_q35_init_rhel940(MachineState *machine)
@ -480,6 +424,8 @@ index 912cb0c0dc..6387df97c8 100644
+ +
+ /* From pc_q35_8_0_machine_options() */ + /* From pc_q35_8_0_machine_options() */
+ pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_32; + pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_32;
+ /* From pc_q35_8_1_machine_options() */
+ pcmc->broken_32bit_mem_addr_check = true;
+ +
+ compat_props_add(m->compat_props, hw_compat_rhel_9_4, + compat_props_add(m->compat_props, hw_compat_rhel_9_4,
+ hw_compat_rhel_9_4_len); + hw_compat_rhel_9_4_len);
@ -702,10 +648,10 @@ index 912cb0c0dc..6387df97c8 100644
+DEFINE_PC_MACHINE(q35_rhel760, "pc-q35-rhel7.6.0", pc_q35_init_rhel760, +DEFINE_PC_MACHINE(q35_rhel760, "pc-q35-rhel7.6.0", pc_q35_init_rhel760,
+ pc_q35_machine_rhel760_options); + pc_q35_machine_rhel760_options);
diff --git a/include/hw/boards.h b/include/hw/boards.h diff --git a/include/hw/boards.h b/include/hw/boards.h
index 4a21eddbf9..4edfdb0ddb 100644 index 0466f9d0f3..46b8725c41 100644
--- a/include/hw/boards.h --- a/include/hw/boards.h
+++ b/include/hw/boards.h +++ b/include/hw/boards.h
@@ -277,6 +277,8 @@ struct MachineClass { @@ -283,6 +283,8 @@ struct MachineClass {
strList *allowed_dynamic_sysbus_devices; strList *allowed_dynamic_sysbus_devices;
bool auto_enable_numa_with_memhp; bool auto_enable_numa_with_memhp;
bool auto_enable_numa_with_memdev; bool auto_enable_numa_with_memdev;
@ -715,12 +661,12 @@ index 4a21eddbf9..4edfdb0ddb 100644
bool smbus_no_migration_support; bool smbus_no_migration_support;
bool nvdimm_supported; bool nvdimm_supported;
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 037942d233..37644ede7e 100644 index ebd8f973f2..a984c951ad 100644
--- a/include/hw/i386/pc.h --- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h
@@ -314,6 +314,39 @@ extern const size_t pc_compat_1_4_len; @@ -291,6 +291,39 @@ extern const size_t pc_compat_2_1_len;
extern GlobalProperty pc_compat_2_0[];
int pc_machine_kvm_type(MachineState *machine, const char *vm_type); extern const size_t pc_compat_2_0_len;
+extern GlobalProperty pc_rhel_compat[]; +extern GlobalProperty pc_rhel_compat[];
+extern const size_t pc_rhel_compat_len; +extern const size_t pc_rhel_compat_len;
@ -759,7 +705,7 @@ index 037942d233..37644ede7e 100644
static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \
{ \ { \
diff --git a/target/i386/cpu.c b/target/i386/cpu.c diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index cd16cb893d..93203d9b91 100644 index 33760a2ee1..be7b0663cd 100644
--- a/target/i386/cpu.c --- a/target/i386/cpu.c
+++ b/target/i386/cpu.c +++ b/target/i386/cpu.c
@@ -2190,9 +2190,13 @@ static const CPUCaches epyc_genoa_cache_info = { @@ -2190,9 +2190,13 @@ static const CPUCaches epyc_genoa_cache_info = {
@ -925,10 +871,10 @@ index 9c791b7b05..b91af5051f 100644
}; };
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index 4ce80555b4..9d41edf01e 100644 index e68cbe9293..739f33db47 100644
--- a/target/i386/kvm/kvm.c --- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c
@@ -3711,6 +3711,7 @@ static int kvm_get_msrs(X86CPU *cpu) @@ -3715,6 +3715,7 @@ static int kvm_get_msrs(X86CPU *cpu)
struct kvm_msr_entry *msrs = cpu->kvm_msr_buf->entries; struct kvm_msr_entry *msrs = cpu->kvm_msr_buf->entries;
int ret, i; int ret, i;
uint64_t mtrr_top_bits; uint64_t mtrr_top_bits;
@ -936,7 +882,7 @@ index 4ce80555b4..9d41edf01e 100644
kvm_msr_buf_reset(cpu); kvm_msr_buf_reset(cpu);
@@ -4065,6 +4066,9 @@ static int kvm_get_msrs(X86CPU *cpu) @@ -4069,6 +4070,9 @@ static int kvm_get_msrs(X86CPU *cpu)
break; break;
case MSR_KVM_ASYNC_PF_EN: case MSR_KVM_ASYNC_PF_EN:
env->async_pf_en_msr = msrs[i].data; env->async_pf_en_msr = msrs[i].data;

View File

@ -1,4 +1,4 @@
From 66a0510405e5142a1f9e38e0770aa0f10aed3e03 Mon Sep 17 00:00:00 2001 From 241ad69d849fce983685fc754fc0572c5b737cbe Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com> From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Wed, 2 Sep 2020 09:39:41 +0200 Date: Wed, 2 Sep 2020 09:39:41 +0200
Subject: Enable make check Subject: Enable make check
@ -7,45 +7,6 @@ Fixing tests after device disabling and machine types changes and enabling
make check run during build. make check run during build.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com> Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
Rebase changes (6.1.0):
- removed unnecessary test changes
Rebase changes (6.2.0):
- new way of disabling bios-table-test
Rebase changes (7.0.0):
- Disable testing virtio-iommu-pci
- Rename default_bus_bypass_iommu property to default-bus-bypass-iommu
- Disable qtest-bios-table for aarch64
- Removed redhat chunks for boot-serial-test.c, cdrom-test.c and cpu-plug-test.c qtests
- Do not disable boot-order-test, prom-env-test and boot-serial-test qtests
- Use rhel machine type for new intel hda qtest
- Remove unnecessary changes in iotest 051
- Remove changes in bios-tables-test.c and prom-env-test.c qtests
Rebase changes (7.1.0):
- Disable bcm2835-dma-test (added upstream)
Rebase changes (8.0.0):
- Removed chunks for disabling bios-table-test (protected upstream)
- Disable new qemu-iotests execution
- Revert change in tco qtest (blocking test run)
Rebase changes (8.1.0):
- Do not disable device-plug-test for s390x
Rebase changes (8.2.0 rc1):
- Remove unneeded hack in qtest/usb-hcd-xhci-test.c
Merged patches (6.1.0):
- 2f129df7d3 redhat: Enable the 'test-block-iothread' test again
Merged patches (7.1.0):
- 64d736640e RHEL-only: tests/avocado: Switch aarch64 tests from a53 to a57
Merged patches (8.1.0):
- f468163234 iotests: Use alternative CPU type that is not deprecated in RHEL
--- ---
.distro/qemu-kvm.spec.template | 4 ++-- .distro/qemu-kvm.spec.template | 4 ++--
tests/avocado/replay_kernel.py | 2 +- tests/avocado/replay_kernel.py | 2 +-
@ -63,10 +24,10 @@ Merged patches (8.1.0):
13 files changed, 33 insertions(+), 30 deletions(-) 13 files changed, 33 insertions(+), 30 deletions(-)
diff --git a/tests/avocado/replay_kernel.py b/tests/avocado/replay_kernel.py diff --git a/tests/avocado/replay_kernel.py b/tests/avocado/replay_kernel.py
index c37afa662c..61c95a2198 100644 index 10d99403a4..c3422ea1e4 100644
--- a/tests/avocado/replay_kernel.py --- a/tests/avocado/replay_kernel.py
+++ b/tests/avocado/replay_kernel.py +++ b/tests/avocado/replay_kernel.py
@@ -153,7 +153,7 @@ def test_aarch64_virt(self): @@ -166,7 +166,7 @@ def test_aarch64_virt(self):
""" """
:avocado: tags=arch:aarch64 :avocado: tags=arch:aarch64
:avocado: tags=machine:virt :avocado: tags=machine:virt
@ -76,7 +37,7 @@ index c37afa662c..61c95a2198 100644
kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora' kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
'/linux/releases/29/Everything/aarch64/os/images/pxeboot' '/linux/releases/29/Everything/aarch64/os/images/pxeboot'
diff --git a/tests/avocado/reverse_debugging.py b/tests/avocado/reverse_debugging.py diff --git a/tests/avocado/reverse_debugging.py b/tests/avocado/reverse_debugging.py
index 4cce5a5598..e9248a04a2 100644 index 92855a02a5..87822074b6 100644
--- a/tests/avocado/reverse_debugging.py --- a/tests/avocado/reverse_debugging.py
+++ b/tests/avocado/reverse_debugging.py +++ b/tests/avocado/reverse_debugging.py
@@ -230,7 +230,7 @@ def test_aarch64_virt(self): @@ -230,7 +230,7 @@ def test_aarch64_virt(self):
@ -120,7 +81,7 @@ index 15fd87b2c1..f0d9d89c93 100644
kernel_path = self._grab_aarch64_kernel() kernel_path = self._grab_aarch64_kernel()
kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build
index 53847cb98f..a2abdb650e 100644 index fad340ad59..3c0d5241f6 100644
--- a/tests/qemu-iotests/meson.build --- a/tests/qemu-iotests/meson.build
+++ b/tests/qemu-iotests/meson.build +++ b/tests/qemu-iotests/meson.build
@@ -51,21 +51,21 @@ foreach format, speed: qemu_iotests_formats @@ -51,21 +51,21 @@ foreach format, speed: qemu_iotests_formats
@ -163,7 +124,7 @@ index 53847cb98f..a2abdb650e 100644
+# endforeach +# endforeach
endforeach endforeach
diff --git a/tests/qemu-iotests/testenv.py b/tests/qemu-iotests/testenv.py diff --git a/tests/qemu-iotests/testenv.py b/tests/qemu-iotests/testenv.py
index 3ff38f2661..cab9a2bd6c 100644 index 588f30a4f1..3929a3634f 100644
--- a/tests/qemu-iotests/testenv.py --- a/tests/qemu-iotests/testenv.py
+++ b/tests/qemu-iotests/testenv.py +++ b/tests/qemu-iotests/testenv.py
@@ -244,6 +244,9 @@ def __init__(self, source_dir: str, build_dir: str, @@ -244,6 +244,9 @@ def __init__(self, source_dir: str, build_dir: str,
@ -177,7 +138,7 @@ index 3ff38f2661..cab9a2bd6c 100644
self.qemu_default_machine = get_default_machine(self.qemu_prog) self.qemu_default_machine = get_default_machine(self.qemu_prog)
diff --git a/tests/qtest/fuzz-e1000e-test.c b/tests/qtest/fuzz-e1000e-test.c diff --git a/tests/qtest/fuzz-e1000e-test.c b/tests/qtest/fuzz-e1000e-test.c
index 5052883fb6..b5286f4b12 100644 index 5052883fb6..8242190170 100644
--- a/tests/qtest/fuzz-e1000e-test.c --- a/tests/qtest/fuzz-e1000e-test.c
+++ b/tests/qtest/fuzz-e1000e-test.c +++ b/tests/qtest/fuzz-e1000e-test.c
@@ -17,7 +17,7 @@ static void test_lp1879531_eth_get_rss_ex_dst_addr(void) @@ -17,7 +17,7 @@ static void test_lp1879531_eth_get_rss_ex_dst_addr(void)
@ -185,12 +146,12 @@ index 5052883fb6..b5286f4b12 100644
QTestState *s; QTestState *s;
- s = qtest_init("-nographic -monitor none -serial none -M pc-q35-5.0"); - s = qtest_init("-nographic -monitor none -serial none -M pc-q35-5.0");
+ s = qtest_init("-nographic -monitor none -serial none -M pc-q35-rhel8.4.0"); + s = qtest_init("-nographic -monitor none -serial none -M pc-q35-rhel9.4.0");
qtest_outl(s, 0xcf8, 0x80001010); qtest_outl(s, 0xcf8, 0x80001010);
qtest_outl(s, 0xcfc, 0xe1020000); qtest_outl(s, 0xcfc, 0xe1020000);
diff --git a/tests/qtest/fuzz-virtio-scsi-test.c b/tests/qtest/fuzz-virtio-scsi-test.c diff --git a/tests/qtest/fuzz-virtio-scsi-test.c b/tests/qtest/fuzz-virtio-scsi-test.c
index e37b48b2cc..88647da054 100644 index e37b48b2cc..9f1965b530 100644
--- a/tests/qtest/fuzz-virtio-scsi-test.c --- a/tests/qtest/fuzz-virtio-scsi-test.c
+++ b/tests/qtest/fuzz-virtio-scsi-test.c +++ b/tests/qtest/fuzz-virtio-scsi-test.c
@@ -19,7 +19,7 @@ static void test_mmio_oob_from_memory_region_cache(void) @@ -19,7 +19,7 @@ static void test_mmio_oob_from_memory_region_cache(void)
@ -198,7 +159,7 @@ index e37b48b2cc..88647da054 100644
QTestState *s; QTestState *s;
- s = qtest_init("-M pc-q35-5.2 -m 512M " - s = qtest_init("-M pc-q35-5.2 -m 512M "
+ s = qtest_init("-M pc-q35-rhel8.4.0 -m 512M " + s = qtest_init("-M pc-q35-rhel9.4.0 -m 512M "
"-device virtio-scsi,num_queues=8,addr=03.0 "); "-device virtio-scsi,num_queues=8,addr=03.0 ");
qtest_outl(s, 0xcf8, 0x80001811); qtest_outl(s, 0xcf8, 0x80001811);
@ -216,7 +177,7 @@ index 663bb6c485..2efc43e3f7 100644
"-device intel-hda,id=" HDA_ID CODEC_DEVICES); "-device intel-hda,id=" HDA_ID CODEC_DEVICES);
diff --git a/tests/qtest/libqos/meson.build b/tests/qtest/libqos/meson.build diff --git a/tests/qtest/libqos/meson.build b/tests/qtest/libqos/meson.build
index 90aae42a22..9bc4e41af0 100644 index 3aed6efcb8..119613237e 100644
--- a/tests/qtest/libqos/meson.build --- a/tests/qtest/libqos/meson.build
+++ b/tests/qtest/libqos/meson.build +++ b/tests/qtest/libqos/meson.build
@@ -44,7 +44,7 @@ libqos_srcs = files( @@ -44,7 +44,7 @@ libqos_srcs = files(
@ -229,7 +190,7 @@ index 90aae42a22..9bc4e41af0 100644
'virtio-scmi.c', 'virtio-scmi.c',
'generic-pcihost.c', 'generic-pcihost.c',
diff --git a/tests/qtest/lpc-ich9-test.c b/tests/qtest/lpc-ich9-test.c diff --git a/tests/qtest/lpc-ich9-test.c b/tests/qtest/lpc-ich9-test.c
index 8ac95b89f7..cd2102555c 100644 index 8ac95b89f7..0e118b76eb 100644
--- a/tests/qtest/lpc-ich9-test.c --- a/tests/qtest/lpc-ich9-test.c
+++ b/tests/qtest/lpc-ich9-test.c +++ b/tests/qtest/lpc-ich9-test.c
@@ -15,7 +15,7 @@ static void test_lp1878642_pci_bus_get_irq_level_assert(void) @@ -15,7 +15,7 @@ static void test_lp1878642_pci_bus_get_irq_level_assert(void)
@ -237,15 +198,15 @@ index 8ac95b89f7..cd2102555c 100644
QTestState *s; QTestState *s;
- s = qtest_init("-M pc-q35-5.0 " - s = qtest_init("-M pc-q35-5.0 "
+ s = qtest_init("-M pc-q35-rhel8.4.0 " + s = qtest_init("-M pc-q35-rhel9.4.0 "
"-nographic -monitor none -serial none"); "-nographic -monitor none -serial none");
qtest_outl(s, 0xcf8, 0x8000f840); /* PMBASE */ qtest_outl(s, 0xcf8, 0x8000f840); /* PMBASE */
diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
index 47dabf91d0..0bdfa3a821 100644 index 36c5c13a7b..a2887d6057 100644
--- a/tests/qtest/meson.build --- a/tests/qtest/meson.build
+++ b/tests/qtest/meson.build +++ b/tests/qtest/meson.build
@@ -97,7 +97,6 @@ qtests_i386 = \ @@ -101,7 +101,6 @@ qtests_i386 = \
'drive_del-test', 'drive_del-test',
'tco-test', 'tco-test',
'cpu-plug-test', 'cpu-plug-test',
@ -254,7 +215,7 @@ index 47dabf91d0..0bdfa3a821 100644
'migration-test', 'migration-test',
'test-x86-cpuid-compat', 'test-x86-cpuid-compat',
diff --git a/tests/qtest/virtio-net-failover.c b/tests/qtest/virtio-net-failover.c diff --git a/tests/qtest/virtio-net-failover.c b/tests/qtest/virtio-net-failover.c
index 0d40bc1f2d..4c633c1584 100644 index 73dfabc272..a9dd304781 100644
--- a/tests/qtest/virtio-net-failover.c --- a/tests/qtest/virtio-net-failover.c
+++ b/tests/qtest/virtio-net-failover.c +++ b/tests/qtest/virtio-net-failover.c
@@ -26,6 +26,7 @@ @@ -26,6 +26,7 @@

View File

@ -1,17 +1,8 @@
From a27cfa0b407bd806ce389a7c69d0130bcfd35244 Mon Sep 17 00:00:00 2001 From 8ba1a6d1a432e2ae82ae532253c2b254e6ce82a7 Mon Sep 17 00:00:00 2001
From: Bandan Das <bsd@redhat.com> From: Bandan Das <bsd@redhat.com>
Date: Tue, 3 Dec 2013 20:05:13 +0100 Date: Tue, 3 Dec 2013 20:05:13 +0100
Subject: vfio: cap number of devices that can be assigned Subject: vfio: cap number of devices that can be assigned
RH-Author: Bandan Das <bsd@redhat.com>
Message-id: <1386101113-31560-3-git-send-email-bsd@redhat.com>
Patchwork-id: 55984
O-Subject: [PATCH RHEL7 qemu-kvm v2 2/2] vfio: cap number of devices that can be assigned
Bugzilla: 678368
RH-Acked-by: Alex Williamson <alex.williamson@redhat.com>
RH-Acked-by: Marcelo Tosatti <mtosatti@redhat.com>
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
Go through all groups to get count of total number of devices Go through all groups to get count of total number of devices
active to enforce limit active to enforce limit
@ -26,19 +17,16 @@ Count of slots increased to 509 later so we could increase limit
to 64 as some usecases require more than 32 devices. to 64 as some usecases require more than 32 devices.
Signed-off-by: Bandan Das <bsd@redhat.com> Signed-off-by: Bandan Das <bsd@redhat.com>
Rebase changes (231025):
- Update to upstream changes
--- ---
hw/vfio/pci.c | 31 ++++++++++++++++++++++++++++++- hw/vfio/pci.c | 31 ++++++++++++++++++++++++++++++-
hw/vfio/pci.h | 1 + hw/vfio/pci.h | 1 +
2 files changed, 31 insertions(+), 1 deletion(-) 2 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index c62c02f7b6..ec98080f28 100644 index 64780d1b79..57ac63c10c 100644
--- a/hw/vfio/pci.c --- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c +++ b/hw/vfio/pci.c
@@ -48,6 +48,9 @@ @@ -50,6 +50,9 @@
/* Protected by BQL */ /* Protected by BQL */
static KVMRouteChange vfio_route_change; static KVMRouteChange vfio_route_change;
@ -48,15 +36,14 @@ index c62c02f7b6..ec98080f28 100644
static void vfio_disable_interrupts(VFIOPCIDevice *vdev); static void vfio_disable_interrupts(VFIOPCIDevice *vdev);
static void vfio_mmap_set_enabled(VFIOPCIDevice *vdev, bool enabled); static void vfio_mmap_set_enabled(VFIOPCIDevice *vdev, bool enabled);
static void vfio_msi_disable_common(VFIOPCIDevice *vdev); static void vfio_msi_disable_common(VFIOPCIDevice *vdev);
@@ -3076,14 +3079,37 @@ static void vfio_realize(PCIDevice *pdev, Error **errp) @@ -2946,13 +2949,36 @@ static void vfio_realize(PCIDevice *pdev, Error **errp)
{ ERRP_GUARD();
VFIOPCIDevice *vdev = VFIO_PCI(pdev); VFIOPCIDevice *vdev = VFIO_PCI(pdev);
VFIODevice *vbasedev = &vdev->vbasedev; VFIODevice *vbasedev = &vdev->vbasedev;
+ VFIODevice *vbasedev_iter; + VFIODevice *vbasedev_iter;
+ VFIOGroup *group; + VFIOGroup *group;
char *tmp, *subsys; char *tmp, *subsys;
Error *err = NULL; Error *err = NULL;
struct stat st;
- int i, ret; - int i, ret;
+ int ret, i = 0; + int ret, i = 0;
bool is_mdev; bool is_mdev;
@ -84,10 +71,10 @@ index c62c02f7b6..ec98080f28 100644
+ return; + return;
+ } + }
+ +
if (!vbasedev->sysfsdev) { if (vbasedev->fd < 0 && !vbasedev->sysfsdev) {
if (!(~vdev->host.domain || ~vdev->host.bus || if (!(~vdev->host.domain || ~vdev->host.bus ||
~vdev->host.slot || ~vdev->host.function)) { ~vdev->host.slot || ~vdev->host.function)) {
@@ -3501,6 +3527,9 @@ static Property vfio_pci_dev_properties[] = { @@ -3370,6 +3396,9 @@ static Property vfio_pci_dev_properties[] = {
DEFINE_PROP_BOOL("x-no-kvm-msix", VFIOPCIDevice, no_kvm_msix, false), DEFINE_PROP_BOOL("x-no-kvm-msix", VFIOPCIDevice, no_kvm_msix, false),
DEFINE_PROP_BOOL("x-no-geforce-quirks", VFIOPCIDevice, DEFINE_PROP_BOOL("x-no-geforce-quirks", VFIOPCIDevice,
no_geforce_quirks, false), no_geforce_quirks, false),
@ -98,7 +85,7 @@ index c62c02f7b6..ec98080f28 100644
false), false),
DEFINE_PROP_BOOL("x-no-vfio-ioeventfd", VFIOPCIDevice, no_vfio_ioeventfd, DEFINE_PROP_BOOL("x-no-vfio-ioeventfd", VFIOPCIDevice, no_vfio_ioeventfd,
diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h
index fba8737ab2..eb74d9de2d 100644 index 6e64a2654e..b7de39c010 100644
--- a/hw/vfio/pci.h --- a/hw/vfio/pci.h
+++ b/hw/vfio/pci.h +++ b/hw/vfio/pci.h
@@ -142,6 +142,7 @@ struct VFIOPCIDevice { @@ -142,6 +142,7 @@ struct VFIOPCIDevice {

View File

@ -1,17 +1,8 @@
From 424f14d123fe1043518758605d94ed5ba50e52ad Mon Sep 17 00:00:00 2001 From 7bc7a2d39bb2c00bcc8e573f05e629f5f21edc35 Mon Sep 17 00:00:00 2001
From: Eduardo Habkost <ehabkost@redhat.com> From: Eduardo Habkost <ehabkost@redhat.com>
Date: Wed, 4 Dec 2013 18:53:17 +0100 Date: Wed, 4 Dec 2013 18:53:17 +0100
Subject: Add support statement to -help output Subject: Add support statement to -help output
RH-Author: Eduardo Habkost <ehabkost@redhat.com>
Message-id: <1386183197-27761-1-git-send-email-ehabkost@redhat.com>
Patchwork-id: 55994
O-Subject: [qemu-kvm RHEL7 PATCH] Add support statement to -help output
Bugzilla: 972773
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
RH-Acked-by: knoel@redhat.com
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Add support statement to -help output, reporting direct qemu-kvm usage Add support statement to -help output, reporting direct qemu-kvm usage
as unsupported by Red Hat, and advising users to use libvirt instead. as unsupported by Red Hat, and advising users to use libvirt instead.
@ -21,10 +12,10 @@ Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
1 file changed, 9 insertions(+) 1 file changed, 9 insertions(+)
diff --git a/system/vl.c b/system/vl.c diff --git a/system/vl.c b/system/vl.c
index 2bcd9efb9a..93635ffc5b 100644 index c644222982..03c3b0aa94 100644
--- a/system/vl.c --- a/system/vl.c
+++ b/system/vl.c +++ b/system/vl.c
@@ -870,9 +870,17 @@ static void version(void) @@ -869,9 +869,17 @@ static void version(void)
QEMU_COPYRIGHT "\n"); QEMU_COPYRIGHT "\n");
} }
@ -42,7 +33,7 @@ index 2bcd9efb9a..93635ffc5b 100644
printf("usage: %s [options] [disk_image]\n\n" printf("usage: %s [options] [disk_image]\n\n"
"'disk_image' is a raw hard disk image for IDE hard disk 0\n\n", "'disk_image' is a raw hard disk image for IDE hard disk 0\n\n",
g_get_prgname()); g_get_prgname());
@@ -898,6 +906,7 @@ static void help(int exitcode) @@ -897,6 +905,7 @@ static void help(int exitcode)
"\n" "\n"
QEMU_HELP_BOTTOM "\n"); QEMU_HELP_BOTTOM "\n");

View File

@ -1,17 +1,8 @@
From c683ff4a770b77dbe707413840918a46f67fa825 Mon Sep 17 00:00:00 2001 From ec651d300d350a37219b09f5baab827ae6891006 Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com> From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Wed, 8 Jul 2020 08:35:50 +0200 Date: Wed, 8 Jul 2020 08:35:50 +0200
Subject: Use qemu-kvm in documentation instead of qemu-system-<arch> Subject: Use qemu-kvm in documentation instead of qemu-system-<arch>
Patchwork-id: 62380
O-Subject: [RHEV-7.1 qemu-kvm-rhev PATCHv4] Use qemu-kvm in documentation instead of qemu-system-i386
Bugzilla: 1140620
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>
We change the name and location of qemu-kvm binaries. Update documentation We change the name and location of qemu-kvm binaries. Update documentation
to reflect this change. Only architectures available in RHEL are updated. to reflect this change. Only architectures available in RHEL are updated.
@ -36,10 +27,10 @@ index 52d6454b93..d74dbdeca9 100644
.. |I2C| replace:: I\ :sup:`2`\ C .. |I2C| replace:: I\ :sup:`2`\ C
.. |I2S| replace:: I\ :sup:`2`\ S .. |I2S| replace:: I\ :sup:`2`\ S
diff --git a/qemu-options.hx b/qemu-options.hx diff --git a/qemu-options.hx b/qemu-options.hx
index 42fd09e4de..557118cb1f 100644 index 8ce85d4559..4fc27ee2e2 100644
--- a/qemu-options.hx --- a/qemu-options.hx
+++ b/qemu-options.hx +++ b/qemu-options.hx
@@ -3469,11 +3469,11 @@ SRST @@ -3493,11 +3493,11 @@ SRST
:: ::

View File

@ -1,19 +1,7 @@
From 776bff1be5e98982a9bbc8345ff27274ff5b8c0f Mon Sep 17 00:00:00 2001 From 080f22d8fb8ca63996f1b6ecb3637033529d8016 Mon Sep 17 00:00:00 2001
From: Kevin Wolf <kwolf@redhat.com> From: Kevin Wolf <kwolf@redhat.com>
Date: Fri, 20 Aug 2021 18:25:12 +0200 Date: Fri, 20 Aug 2021 18:25:12 +0200
Subject: qcow2: Deprecation warning when opening v2 images rw Subject: qcow2: Deprecation warning when opening v2 images rw
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
RH-Author: Kevin Wolf <kwolf@redhat.com>
RH-MergeRequest: 37: qcow2: Deprecation warning when opening v2 images rw
RH-Commit: [1/1] f450d0ae32d35063b28c72c4f2d2ebb9e6d8db3e (kmwolf/centos-qemu-kvm)
RH-Bugzilla: 1951814
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
RH-Acked-by: Hanna Reitz <hreitz@redhat.com>
RH-Acked-by: Thomas Huth <thuth@redhat.com>
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
qcow2 v3 has been around for a long time (since QEMU 1.1/RHEL 7), so qcow2 v3 has been around for a long time (since QEMU 1.1/RHEL 7), so
there is no real reason any more to use it. People still using it might there is no real reason any more to use it. People still using it might
@ -31,20 +19,13 @@ but it's what is available and the same function qcow2_do_open() already
uses it this way for another warning. uses it this way for another warning.
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
patch_name: kvm-qcow2-Deprecation-warning-when-opening-v2-images-rw.patch
present_in_specfile: true
location_in_specfile: 116
---
Rebase notes (6.1.0):
- Replace bs->read_only with bdrv_is_read_only
--- ---
block/qcow2.c | 6 ++++++ block/qcow2.c | 6 ++++++
tests/qemu-iotests/common.filter | 1 + tests/qemu-iotests/common.filter | 1 +
2 files changed, 7 insertions(+) 2 files changed, 7 insertions(+)
diff --git a/block/qcow2.c b/block/qcow2.c diff --git a/block/qcow2.c b/block/qcow2.c
index 13e032bd5e..7968735346 100644 index 956128b409..0e8b2f7518 100644
--- a/block/qcow2.c --- a/block/qcow2.c
+++ b/block/qcow2.c +++ b/block/qcow2.c
@@ -1358,6 +1358,12 @@ qcow2_do_open(BlockDriverState *bs, QDict *options, int flags, @@ -1358,6 +1358,12 @@ qcow2_do_open(BlockDriverState *bs, QDict *options, int flags,

View File

@ -0,0 +1,145 @@
From 043ad5ce9789dbbfe1a888de58f6039ea7ae47a4 Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Wed, 20 Mar 2024 05:34:32 -0400
Subject: Add upstream compatibility bits
Adding new compats structure for changes introduced during rebase to QEMU 9.0.0.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
Rebase notes (9.0.0 rc2):
- Add aw-bits setting for aarch compat record (overwritten for 9.4 and older)
---
hw/arm/virt.c | 6 ++++--
hw/core/machine.c | 10 ++++++++++
hw/i386/pc_piix.c | 3 ++-
hw/i386/pc_q35.c | 3 +++
hw/s390x/s390-virtio-ccw.c | 1 +
include/hw/boards.h | 3 +++
6 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 22bc345137..3f0496cdb9 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -85,6 +85,7 @@
#include "hw/char/pl011.h"
#include "qemu/guest-random.h"
+#if 0 /* Disabled for Red Hat Enterprise Linux */
static GlobalProperty arm_virt_compat[] = {
{ TYPE_VIRTIO_IOMMU_PCI, "aw-bits", "48" },
};
@@ -101,7 +102,6 @@ static void arm_virt_compat_set(MachineClass *mc)
arm_virt_compat_len);
}
-#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) \
@@ -144,6 +144,8 @@ GlobalProperty arm_rhel_compat[] = {
{"virtio-net-pci", "romfile", "" },
{"virtio-net-pci-transitional", "romfile", "" },
{"virtio-net-pci-non-transitional", "romfile", "" },
+ /* arm_rhel_compat from arm_virt_compat, added for 9.0.0 rebase */
+ { TYPE_VIRTIO_IOMMU_PCI, "aw-bits", "48" },
};
const size_t arm_rhel_compat_len = G_N_ELEMENTS(arm_rhel_compat);
@@ -3534,7 +3536,6 @@ static void rhel_machine_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(oc);
- arm_virt_compat_set(mc);
mc->family = "virt-rhel-Z";
mc->init = machvirt_init;
@@ -3728,6 +3729,7 @@ type_init(rhel_machine_init);
static void rhel940_virt_options(MachineClass *mc)
{
+ compat_props_add(mc->compat_props, hw_compat_rhel_9_5, hw_compat_rhel_9_5_len);
}
DEFINE_RHEL_MACHINE_AS_LATEST(9, 4, 0)
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 695cb89a46..0f256d9633 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -302,6 +302,16 @@ const size_t hw_compat_2_1_len = G_N_ELEMENTS(hw_compat_2_1);
const char *rhel_old_machine_deprecation =
"machine types for previous major releases are deprecated";
+GlobalProperty hw_compat_rhel_9_5[] = {
+ /* hw_compat_rhel_9_5 from hw_compat_8_2 */
+ { "migration", "zero-page-detection", "legacy"},
+ /* hw_compat_rhel_9_5 from hw_compat_8_2 */
+ { TYPE_VIRTIO_IOMMU_PCI, "granule", "4k" },
+ /* hw_compat_rhel_9_5 from hw_compat_8_2 */
+ { TYPE_VIRTIO_IOMMU_PCI, "aw-bits", "64" },
+};
+const size_t hw_compat_rhel_9_5_len = G_N_ELEMENTS(hw_compat_rhel_9_5);
+
GlobalProperty hw_compat_rhel_9_4[] = {
/* hw_compat_rhel_9_4 from hw_compat_8_0 */
{ TYPE_VIRTIO_NET, "host_uso", "off"},
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index a647262d63..6b260682eb 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -1015,7 +1015,8 @@ static void pc_machine_rhel760_options(MachineClass *m)
object_class_property_set_description(oc, "x-south-bridge",
"Use a different south bridge than PIIX3");
-
+ compat_props_add(m->compat_props, hw_compat_rhel_9_5,
+ hw_compat_rhel_9_5_len);
compat_props_add(m->compat_props, hw_compat_rhel_9_4,
hw_compat_rhel_9_4_len);
compat_props_add(m->compat_props, hw_compat_rhel_9_3,
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index e872dc7e46..2b54944c0f 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -733,6 +733,9 @@ static void pc_q35_machine_rhel940_options(MachineClass *m)
m->desc = "RHEL-9.4.0 PC (Q35 + ICH9, 2009)";
pcmc->smbios_stream_product = "RHEL";
pcmc->smbios_stream_version = "9.4.0";
+
+ compat_props_add(m->compat_props, hw_compat_rhel_9_5,
+ hw_compat_rhel_9_5_len);
}
DEFINE_PC_MACHINE(q35_rhel940, "pc-q35-rhel9.4.0", pc_q35_init_rhel940,
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index ff753a29e0..9ad54682c6 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -1282,6 +1282,7 @@ static void ccw_machine_rhel940_instance_options(MachineState *machine)
static void ccw_machine_rhel940_class_options(MachineClass *mc)
{
+ compat_props_add(mc->compat_props, hw_compat_rhel_9_5, hw_compat_rhel_9_5_len);
}
DEFINE_CCW_MACHINE(rhel940, "rhel9.4.0", true);
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 46b8725c41..cca62f906b 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -514,6 +514,9 @@ extern const size_t hw_compat_2_2_len;
extern GlobalProperty hw_compat_2_1[];
extern const size_t hw_compat_2_1_len;
+extern GlobalProperty hw_compat_rhel_9_5[];
+extern const size_t hw_compat_rhel_9_5_len;
+
extern GlobalProperty hw_compat_rhel_9_4[];
extern const size_t hw_compat_rhel_9_4_len;
--
2.39.3

View File

@ -0,0 +1,29 @@
From f24c7a1feef2a6f153582c06f10871b78a014bf1 Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Fri, 26 Apr 2024 05:58:31 -0400
Subject: Disable FDC devices
---
configs/devices/x86_64-softmmu/x86_64-rh-devices.mak | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/configs/devices/x86_64-softmmu/x86_64-rh-devices.mak b/configs/devices/x86_64-softmmu/x86_64-rh-devices.mak
index d60ff1bcfc..ee75bb4c21 100644
--- a/configs/devices/x86_64-softmmu/x86_64-rh-devices.mak
+++ b/configs/devices/x86_64-softmmu/x86_64-rh-devices.mak
@@ -19,9 +19,9 @@ CONFIG_DIMM=y
CONFIG_E1000E_PCI_EXPRESS=y
CONFIG_E1000_PCI=y
CONFIG_EDU=y
-CONFIG_FDC=y
-CONFIG_FDC_SYSBUS=y
-CONFIG_FDC_ISA=y
+#CONFIG_FDC=y
+#CONFIG_FDC_SYSBUS=y
+#CONFIG_FDC_ISA=y
CONFIG_FW_CFG_DMA=y
CONFIG_HDA=y
CONFIG_HYPERV=y
--
2.39.3

View File

@ -1,44 +0,0 @@
From 3b9b38339346ebfaf3e8ddf0822eba1cc9e78408 Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Thu, 14 Dec 2023 04:42:01 -0500
Subject: Introduce RHEL 9.4.0 qemu-kvm machine type for aarch64
Jira: https://issues.redhat.com/browse/RHEL-17168
Adding new machine type to support enabling new features.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
hw/arm/virt.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index c541efee5e..0b17c94ad7 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -3630,14 +3630,21 @@ static void rhel_machine_init(void)
}
type_init(rhel_machine_init);
+static void rhel940_virt_options(MachineClass *mc)
+{
+}
+DEFINE_RHEL_MACHINE_AS_LATEST(9, 4, 0)
+
static void rhel920_virt_options(MachineClass *mc)
{
+ rhel940_virt_options(mc);
+
compat_props_add(mc->compat_props, arm_rhel_compat, arm_rhel_compat_len);
compat_props_add(mc->compat_props, hw_compat_rhel_9_4, hw_compat_rhel_9_4_len);
compat_props_add(mc->compat_props, hw_compat_rhel_9_3, hw_compat_rhel_9_3_len);
compat_props_add(mc->compat_props, hw_compat_rhel_9_2, hw_compat_rhel_9_2_len);
}
-DEFINE_RHEL_MACHINE_AS_LATEST(9, 2, 0)
+DEFINE_RHEL_MACHINE(9, 2, 0)
static void rhel900_virt_options(MachineClass *mc)
{
--
2.39.3

View File

@ -0,0 +1,24 @@
From fe8c6cb1cecb3cde16871c4ec7368e4d004fa42a Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Fri, 26 Apr 2024 05:59:53 -0400
Subject: Disable vga-cirrus device
---
configs/devices/x86_64-softmmu/x86_64-rh-devices.mak | 1 -
1 file changed, 1 deletion(-)
diff --git a/configs/devices/x86_64-softmmu/x86_64-rh-devices.mak b/configs/devices/x86_64-softmmu/x86_64-rh-devices.mak
index ee75bb4c21..fe69f04ead 100644
--- a/configs/devices/x86_64-softmmu/x86_64-rh-devices.mak
+++ b/configs/devices/x86_64-softmmu/x86_64-rh-devices.mak
@@ -87,7 +87,6 @@ CONFIG_USB_XHCI_PCI=y
CONFIG_VFIO=y
CONFIG_VFIO_PCI=y
CONFIG_VGA=y
-CONFIG_VGA_CIRRUS=y
CONFIG_VGA_PCI=y
CONFIG_VHOST_USER=y
CONFIG_VHOST_USER_BLK=y
--
2.39.3

1278
qemu-kvm.spec Normal file

File diff suppressed because it is too large Load Diff

4943
qemu.spec

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
SHA512 (qemu-8.2.0.tar.xz) = 92ec41196ff145cdbb98948f6b6e43214fa4b4419554a8a1927fb4527080c8212ccb703e184baf8ee0bdfa50ad7a84689e8f5a69eba1bd7bbbdfd69e3b91256c SHA512 (qemu-9.0.0.tar.xz) = 1603517cd4c93632ba60ad7261eb67374f12a744bf58f10b0e8686e46d3a02d8b6bf58a0c617f23a1868084aaba6386c24341894f75539e0b816091718721427