From f5b4238033dc04c8d12563a697cd965438752225 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Tue, 17 Jan 2023 09:00:29 +0300 Subject: [PATCH] Update to 7.2.0 --- .gitignore | 2 +- .qemu.metadata | 2 +- ...gx_epc_get_section-stub-is-reachabl.patch} | 5 +- ...sts-Disable-pci_virtio_vga-for-ppc64.patch | 32 + ...er-add-more-compat-ioctl-definitions.patch | 67 ++ SOURCES/0004-Initial-redhat-build.patch | 313 -------- ...r-fix-compat-with-glibc-2.36-sys-mou.patch | 76 ++ ...0005-Enable-disable-devices-for-RHEL.patch | 629 --------------- ...Machine-type-related-general-changes.patch | 619 --------------- SOURCES/0007-Add-aarch64-machine-types.patch | 352 --------- SOURCES/0008-Add-ppc64-machine-types.patch | 380 ---------- SOURCES/0009-Add-s390x-machine-types.patch | 186 ----- SOURCES/0010-Add-x86_64-machine-types.patch | 714 ------------------ SOURCES/0011-Enable-make-check.patch | 186 ----- ...mber-of-devices-that-can-be-assigned.patch | 104 --- ...Add-support-statement-to-help-output.patch | 55 -- ...lly-limit-the-maximum-number-of-CPUs.patch | 45 -- ...documentation-instead-of-qemu-system.patch | 61 -- ...ct-scsi-cd-if-data-plane-enabled-RHE.patch | 66 -- ...e-at-least-64kiB-pages-for-downstrea.patch | 60 -- ...on-warning-when-opening-v2-images-rw.patch | 77 -- ...oduce-RHEL-9.0.0-hw-compat-structure.patch | 135 ---- ...90x-machine-type-compatibility-for-r.patch | 38 - ...ve-s3-s4-suspend-disabling-to-compat.patch | 70 -- SPECS/qemu.spec | 706 ++++++++++++----- 25 files changed, 710 insertions(+), 4270 deletions(-) rename SOURCES/{0001-sgx-stub-fix.patch => 0001-target-i386-the-sgx_epc_get_section-stub-is-reachabl.patch} (89%) create mode 100644 SOURCES/0001-tests-Disable-pci_virtio_vga-for-ppc64.patch create mode 100644 SOURCES/0003-Revert-linux-user-add-more-compat-ioctl-definitions.patch delete mode 100644 SOURCES/0004-Initial-redhat-build.patch create mode 100644 SOURCES/0004-Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch delete mode 100644 SOURCES/0005-Enable-disable-devices-for-RHEL.patch delete mode 100644 SOURCES/0006-Machine-type-related-general-changes.patch delete mode 100644 SOURCES/0007-Add-aarch64-machine-types.patch delete mode 100644 SOURCES/0008-Add-ppc64-machine-types.patch delete mode 100644 SOURCES/0009-Add-s390x-machine-types.patch delete mode 100644 SOURCES/0010-Add-x86_64-machine-types.patch delete mode 100644 SOURCES/0011-Enable-make-check.patch delete mode 100644 SOURCES/0012-vfio-cap-number-of-devices-that-can-be-assigned.patch delete mode 100644 SOURCES/0013-Add-support-statement-to-help-output.patch delete mode 100644 SOURCES/0014-globally-limit-the-maximum-number-of-CPUs.patch delete mode 100644 SOURCES/0015-Use-qemu-kvm-in-documentation-instead-of-qemu-system.patch delete mode 100644 SOURCES/0016-virtio-scsi-Reject-scsi-cd-if-data-plane-enabled-RHE.patch delete mode 100644 SOURCES/0017-BZ1653590-Require-at-least-64kiB-pages-for-downstrea.patch delete mode 100644 SOURCES/0018-qcow2-Deprecation-warning-when-opening-v2-images-rw.patch delete mode 100644 SOURCES/0019-WRB-Introduce-RHEL-9.0.0-hw-compat-structure.patch delete mode 100644 SOURCES/0020-redhat-Update-s390x-machine-type-compatibility-for-r.patch delete mode 100644 SOURCES/0021-pc-Move-s3-s4-suspend-disabling-to-compat.patch diff --git a/.gitignore b/.gitignore index 98eebcb..459c79b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/qemu-7.0.0.tar.xz +SOURCES/qemu-7.2.0.tar.xz diff --git a/.qemu.metadata b/.qemu.metadata index 75efcde..ed38614 100644 --- a/.qemu.metadata +++ b/.qemu.metadata @@ -1 +1 @@ -c3fd2403106c33d0470bc9ba4fb4b946c0402248 SOURCES/qemu-7.0.0.tar.xz +634a3e4b381cbf13085eb1568accb85cbd9d89c4 SOURCES/qemu-7.2.0.tar.xz diff --git a/SOURCES/0001-sgx-stub-fix.patch b/SOURCES/0001-target-i386-the-sgx_epc_get_section-stub-is-reachabl.patch similarity index 89% rename from SOURCES/0001-sgx-stub-fix.patch rename to SOURCES/0001-target-i386-the-sgx_epc_get_section-stub-is-reachabl.patch index ff31973..cc5ada9 100644 --- a/SOURCES/0001-sgx-stub-fix.patch +++ b/SOURCES/0001-target-i386-the-sgx_epc_get_section-stub-is-reachabl.patch @@ -1,10 +1,10 @@ -From 509b6078631ad2437e1a452f749831e401fb8afb Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 1 Feb 2022 20:09:37 +0100 Subject: [PATCH] target/i386: the sgx_epc_get_section stub is reachable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +Content-type: text/plain The sgx_epc_get_section stub is reachable from cpu_x86_cpuid. It should not assert, instead it should just return true just like @@ -13,6 +13,9 @@ the "real" sgx_epc_get_section does when SGX is disabled. Reported-by: Vladimír Beneš Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini +--- + hw/i386/sgx-stub.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/sgx-stub.c b/hw/i386/sgx-stub.c index 26833eb233..16b1dfd90b 100644 diff --git a/SOURCES/0001-tests-Disable-pci_virtio_vga-for-ppc64.patch b/SOURCES/0001-tests-Disable-pci_virtio_vga-for-ppc64.patch new file mode 100644 index 0000000..26d8ed7 --- /dev/null +++ b/SOURCES/0001-tests-Disable-pci_virtio_vga-for-ppc64.patch @@ -0,0 +1,32 @@ +From f6d5fd60f54fb9dcdc3733154637a3a214f5d5af Mon Sep 17 00:00:00 2001 +From: "Eduardo Lima (Etrunko)" +Date: Thu, 1 Sep 2022 12:43:49 -0300 +Subject: [PATCH] tests: Disable pci_virtio_vga for ppc64 + +starting QEMU: exec ./qemu-system-ppc64 -qtest unix:/tmp/qtest-2378197.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-2378197.qmp,id=char0 -mon chardev=char0,mode=control -display none -vga none -device virtio-vga -accel qtest +stderr: +qemu-system-ppc64: -device virtio-vga: 'virtio-vga' is not a valid device model name +Broken pipe +../tests/qtest/libqtest.c:156: kill_qemu() tried to terminate QEMU process but encountered exit status 1 (expected 0) + +Signed-off-by: Eduardo Lima (Etrunko) +--- + tests/qtest/display-vga-test.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/qtest/display-vga-test.c b/tests/qtest/display-vga-test.c +index ace3bb28e0..628dad4cf2 100644 +--- a/tests/qtest/display-vga-test.c ++++ b/tests/qtest/display-vga-test.c +@@ -61,7 +61,7 @@ int main(int argc, char **argv) + qtest_add_func("/display/pci/multihead", pci_multihead); + qtest_add_func("/display/pci/virtio-gpu", pci_virtio_gpu); + if (g_str_equal(arch, "i386") || g_str_equal(arch, "x86_64") || +- g_str_equal(arch, "hppa") || g_str_equal(arch, "ppc64")) { ++ g_str_equal(arch, "hppa")) { + qtest_add_func("/display/pci/virtio-vga", pci_virtio_vga); + } + +-- +2.37.2 + diff --git a/SOURCES/0003-Revert-linux-user-add-more-compat-ioctl-definitions.patch b/SOURCES/0003-Revert-linux-user-add-more-compat-ioctl-definitions.patch new file mode 100644 index 0000000..e263067 --- /dev/null +++ b/SOURCES/0003-Revert-linux-user-add-more-compat-ioctl-definitions.patch @@ -0,0 +1,67 @@ +From ebff02a43374c1138d4f8b2c07d2088a3921c288 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= +Date: Tue, 10 Jan 2023 12:37:14 -0500 +Subject: [PATCH 1/2] Revert "linux-user: add more compat ioctl definitions" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This reverts commit c5495f4ecb0cdaaf2e9dddeb48f1689cdb520ca0. + +glibc has fixed (in 2.36.9000-40-g774058d729) the problem +that caused a clash when both sys/mount.h annd linux/mount.h +are included, and backported this to the 2.36 stable release +too: + + https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E + +It is saner for QEMU to remove the workaround it applied for +glibc 2.36 and expect distros to ship the 2.36 maint release +with the fix. This avoids needing to add a further workaround +to QEMU to deal with the fact that linux/brtfs.h now also pulls +in linux/mount.h via linux/fs.h since Linux 6.1 + +Signed-off-by: Daniel P. Berrangé +--- + linux-user/syscall.c | 25 ------------------------- + 1 file changed, 25 deletions(-) + +diff --git a/linux-user/syscall.c b/linux-user/syscall.c +index 1f8c10f8ef..9c1e9555e1 100644 +--- a/linux-user/syscall.c ++++ b/linux-user/syscall.c +@@ -111,31 +111,6 @@ + #define FS_IOC32_SETFLAGS _IOW('f', 2, int) + #define FS_IOC32_GETVERSION _IOR('v', 1, int) + #define FS_IOC32_SETVERSION _IOW('v', 2, int) +- +-#define BLKGETSIZE64 _IOR(0x12,114,size_t) +-#define BLKDISCARD _IO(0x12,119) +-#define BLKIOMIN _IO(0x12,120) +-#define BLKIOOPT _IO(0x12,121) +-#define BLKALIGNOFF _IO(0x12,122) +-#define BLKPBSZGET _IO(0x12,123) +-#define BLKDISCARDZEROES _IO(0x12,124) +-#define BLKSECDISCARD _IO(0x12,125) +-#define BLKROTATIONAL _IO(0x12,126) +-#define BLKZEROOUT _IO(0x12,127) +- +-#define FIBMAP _IO(0x00,1) +-#define FIGETBSZ _IO(0x00,2) +- +-struct file_clone_range { +- __s64 src_fd; +- __u64 src_offset; +- __u64 src_length; +- __u64 dest_offset; +-}; +- +-#define FICLONE _IOW(0x94, 9, int) +-#define FICLONERANGE _IOW(0x94, 13, struct file_clone_range) +- + #else + #include + #endif +-- +2.38.1 + diff --git a/SOURCES/0004-Initial-redhat-build.patch b/SOURCES/0004-Initial-redhat-build.patch deleted file mode 100644 index 94cf91c..0000000 --- a/SOURCES/0004-Initial-redhat-build.patch +++ /dev/null @@ -1,313 +0,0 @@ -From fc113ecd7c99646a7ced0b99570b5927ae6d595f Mon Sep 17 00:00:00 2001 -From: Miroslav Rezanina -Date: Wed, 26 May 2021 10:56:02 +0200 -Subject: Initial redhat build - -This patch introduces redhat build structure in redhat subdirectory. In addition, -several issues are fixed in QEMU tree: - -- Change of app name for sasl_server_init in VNC code from qemu to qemu-kvm - - As we use qemu-kvm as name in all places, this is updated to be consistent -- Man page renamed from qemu to qemu-kvm - - man page is installed using make install so we have to fix it in qemu tree - -We disable make check due to issues with some of the tests. - -This rebase is based on qemu-kvm-6.2.0-13.el9 - -Signed-off-by: Miroslav Rezanina --- -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- 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 - -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 - -Signed-off-by: Miroslav Rezanina ---- - .distro/85-kvm.preset | 5 - - .distro/Makefile | 100 + - .distro/Makefile.common | 40 + - .distro/README.tests | 39 + - .distro/ksm.service | 13 - - .distro/ksm.sysconfig | 4 - - .distro/ksmctl.c | 77 - - .distro/ksmtuned | 139 - - .distro/ksmtuned.conf | 21 - - .distro/ksmtuned.service | 12 - - .distro/kvm-setup | 49 - - .distro/kvm-setup.service | 14 - - .distro/modules-load.conf | 4 + - .distro/qemu-guest-agent.service | 1 - - .distro/qemu-kvm.spec.template | 4034 +++++++++++++++++++++++ - .distro/rpminspect.yaml | 6 +- - .distro/scripts/extract_build_cmd.py | 12 + - .gitignore | 1 + - README.systemtap | 43 + - meson.build | 4 +- - scripts/qemu-guest-agent/fsfreeze-hook | 2 +- - scripts/systemtap/conf.d/qemu_kvm.conf | 4 + - scripts/systemtap/script.d/qemu_kvm.stp | 1 + - tests/check-block.sh | 2 + - ui/vnc-auth-sasl.c | 2 +- - 25 files changed, 4290 insertions(+), 339 deletions(-) - delete mode 100644 .distro/85-kvm.preset - create mode 100644 .distro/Makefile - create mode 100644 .distro/Makefile.common - create mode 100644 .distro/README.tests - delete mode 100644 .distro/ksm.service - delete mode 100644 .distro/ksm.sysconfig - delete mode 100644 .distro/ksmctl.c - delete mode 100644 .distro/ksmtuned - delete mode 100644 .distro/ksmtuned.conf - delete mode 100644 .distro/ksmtuned.service - delete mode 100644 .distro/kvm-setup - delete mode 100644 .distro/kvm-setup.service - create mode 100644 .distro/modules-load.conf - create mode 100644 .distro/qemu-kvm.spec.template - create mode 100644 README.systemtap - create mode 100644 scripts/systemtap/conf.d/qemu_kvm.conf - create mode 100644 scripts/systemtap/script.d/qemu_kvm.stp - -diff --git a/README.systemtap b/README.systemtap -new file mode 100644 -index 0000000000..ad913fc990 ---- /dev/null -+++ b/README.systemtap -@@ -0,0 +1,43 @@ -+QEMU tracing using systemtap-initscript -+--------------------------------------- -+ -+You can capture QEMU trace data all the time using systemtap-initscript. This -+uses SystemTap's flight recorder mode to trace all running guests to a -+fixed-size buffer on the host. Old trace entries are overwritten by new -+entries when the buffer size wraps. -+ -+1. Install the systemtap-initscript package: -+ # yum install systemtap-initscript -+ -+2. Install the systemtap scripts and the conf file: -+ # cp /usr/share/qemu-kvm/systemtap/script.d/qemu_kvm.stp /etc/systemtap/script.d/ -+ # cp /usr/share/qemu-kvm/systemtap/conf.d/qemu_kvm.conf /etc/systemtap/conf.d/ -+ -+The set of trace events to enable is given in qemu_kvm.stp. This SystemTap -+script can be customized to add or remove trace events provided in -+/usr/share/systemtap/tapset/qemu-kvm-simpletrace.stp. -+ -+SystemTap customizations can be made to qemu_kvm.conf to control the flight -+recorder buffer size and whether to store traces in memory only or disk too. -+See stap(1) for option documentation. -+ -+3. Start the systemtap service. -+ # service systemtap start qemu_kvm -+ -+4. Make the service start at boot time. -+ # chkconfig systemtap on -+ -+5. Confirm that the service works. -+ # service systemtap status qemu_kvm -+ qemu_kvm is running... -+ -+When you want to inspect the trace buffer, perform the following steps: -+ -+1. Dump the trace buffer. -+ # staprun -A qemu_kvm >/tmp/trace.log -+ -+2. Start the systemtap service because the preceding step stops the service. -+ # service systemtap start qemu_kvm -+ -+3. Translate the trace record to readable format. -+ # /usr/share/qemu-kvm/simpletrace.py --no-header /usr/share/qemu-kvm/trace-events /tmp/trace.log -diff --git a/meson.build b/meson.build -index 861de93c4f..6f7e430f0f 100644 ---- a/meson.build -+++ b/meson.build -@@ -2394,7 +2394,9 @@ if capstone_opt == 'internal' - # Include all configuration defines via a header file, which will wind up - # as a dependency on the object file, and thus changes here will result - # in a rebuild. -- '-include', 'capstone-defs.h' -+ '-include', 'capstone-defs.h', -+ -+ '-Wp,-D_GLIBCXX_ASSERTIONS', - ] - - libcapstone = static_library('capstone', -diff --git a/scripts/qemu-guest-agent/fsfreeze-hook b/scripts/qemu-guest-agent/fsfreeze-hook -index 13aafd4845..e9b84ec028 100755 ---- a/scripts/qemu-guest-agent/fsfreeze-hook -+++ b/scripts/qemu-guest-agent/fsfreeze-hook -@@ -8,7 +8,7 @@ - # request, it is issued with "thaw" argument after filesystem is thawed. - - LOGFILE=/var/log/qga-fsfreeze-hook.log --FSFREEZE_D=$(dirname -- "$0")/fsfreeze-hook.d -+FSFREEZE_D=$(dirname -- "$(realpath $0)")/fsfreeze-hook.d - - # Check whether file $1 is a backup or rpm-generated file and should be ignored - is_ignored_file() { -diff --git a/scripts/systemtap/conf.d/qemu_kvm.conf b/scripts/systemtap/conf.d/qemu_kvm.conf -new file mode 100644 -index 0000000000..372d8160a4 ---- /dev/null -+++ b/scripts/systemtap/conf.d/qemu_kvm.conf -@@ -0,0 +1,4 @@ -+# Force load uprobes (see BZ#1118352) -+stap -e 'probe process("/usr/libexec/qemu-kvm").function("main") { printf("") }' -c true -+ -+qemu_kvm_OPT="-s4" # per-CPU buffer size, in megabytes -diff --git a/scripts/systemtap/script.d/qemu_kvm.stp b/scripts/systemtap/script.d/qemu_kvm.stp -new file mode 100644 -index 0000000000..c04abf9449 ---- /dev/null -+++ b/scripts/systemtap/script.d/qemu_kvm.stp -@@ -0,0 +1 @@ -+probe qemu.kvm.simpletrace.handle_qmp_command,qemu.kvm.simpletrace.monitor_protocol_*,qemu.kvm.simpletrace.migrate_set_state {} -diff --git a/tests/check-block.sh b/tests/check-block.sh -index f59496396c..d900d8b35e 100755 ---- a/tests/check-block.sh -+++ b/tests/check-block.sh -@@ -48,6 +48,8 @@ if LANG=C bash --version | grep -q 'GNU bash, version [123]' ; then - skip "bash version too old ==> Not running the qemu-iotests." - fi - -+exit 0 -+ - cd tests/qemu-iotests - - # QEMU_CHECK_BLOCK_AUTO is used to disable some unstable sub-tests -diff --git a/ui/vnc-auth-sasl.c b/ui/vnc-auth-sasl.c -index 47fdae5b21..2a950caa2a 100644 ---- a/ui/vnc-auth-sasl.c -+++ b/ui/vnc-auth-sasl.c -@@ -42,7 +42,7 @@ - - bool vnc_sasl_server_init(Error **errp) - { -- int saslErr = sasl_server_init(NULL, "qemu"); -+ int saslErr = sasl_server_init(NULL, "qemu-kvm"); - - if (saslErr != SASL_OK) { - error_setg(errp, "Failed to initialize SASL auth: %s", --- -2.31.1 - diff --git a/SOURCES/0004-Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch b/SOURCES/0004-Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch new file mode 100644 index 0000000..08f5180 --- /dev/null +++ b/SOURCES/0004-Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch @@ -0,0 +1,76 @@ +From f0f11a1435802b5c8ee8337a7b0c0f337d8f9936 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= +Date: Tue, 10 Jan 2023 12:37:25 -0500 +Subject: [PATCH 2/2] Revert "linux-user: fix compat with glibc >= 2.36 + sys/mount.h" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This reverts commit 3cd3df2a9584e6f753bb62a0028bd67124ab5532. + +glibc has fixed (in 2.36.9000-40-g774058d729) the problem +that caused a clash when both sys/mount.h annd linux/mount.h +are included, and backported this to the 2.36 stable release +too: + + https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E + +It is saner for QEMU to remove the workaround it applied for +glibc 2.36 and expect distros to ship the 2.36 maint release +with the fix. This avoids needing to add a further workaround +to QEMU to deal with the fact that linux/brtfs.h now also pulls +in linux/mount.h via linux/fs.h since Linux 6.1 + +Signed-off-by: Daniel P. Berrangé +--- + linux-user/syscall.c | 18 ------------------ + meson.build | 2 -- + 2 files changed, 20 deletions(-) + +diff --git a/linux-user/syscall.c b/linux-user/syscall.c +index 9c1e9555e1..f2b7634f5e 100644 +--- a/linux-user/syscall.c ++++ b/linux-user/syscall.c +@@ -95,25 +95,7 @@ + #include + #include + #include +- +-#ifdef HAVE_SYS_MOUNT_FSCONFIG +-/* +- * glibc >= 2.36 linux/mount.h conflicts with sys/mount.h, +- * which in turn prevents use of linux/fs.h. So we have to +- * define the constants ourselves for now. +- */ +-#define FS_IOC_GETFLAGS _IOR('f', 1, long) +-#define FS_IOC_SETFLAGS _IOW('f', 2, long) +-#define FS_IOC_GETVERSION _IOR('v', 1, long) +-#define FS_IOC_SETVERSION _IOW('v', 2, long) +-#define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap) +-#define FS_IOC32_GETFLAGS _IOR('f', 1, int) +-#define FS_IOC32_SETFLAGS _IOW('f', 2, int) +-#define FS_IOC32_GETVERSION _IOR('v', 1, int) +-#define FS_IOC32_SETVERSION _IOW('v', 2, int) +-#else + #include +-#endif + #include + #if defined(CONFIG_FIEMAP) + #include +diff --git a/meson.build b/meson.build +index 175517eafd..32fed7ea6e 100644 +--- a/meson.build ++++ b/meson.build +@@ -2039,8 +2039,6 @@ config_host_data.set('HAVE_OPTRESET', + cc.has_header_symbol('getopt.h', 'optreset')) + config_host_data.set('HAVE_IPPROTO_MPTCP', + cc.has_header_symbol('netinet/in.h', 'IPPROTO_MPTCP')) +-config_host_data.set('HAVE_SYS_MOUNT_FSCONFIG', +- cc.has_header_symbol('sys/mount.h', 'FSCONFIG_SET_FLAG')) + + # has_member + config_host_data.set('HAVE_SIGEV_NOTIFY_THREAD_ID', +-- +2.38.1 + diff --git a/SOURCES/0005-Enable-disable-devices-for-RHEL.patch b/SOURCES/0005-Enable-disable-devices-for-RHEL.patch deleted file mode 100644 index 48c25c2..0000000 --- a/SOURCES/0005-Enable-disable-devices-for-RHEL.patch +++ /dev/null @@ -1,629 +0,0 @@ -From 51ec7495d69fe4b4d0b61642ca6c0e7fd7a1032d Mon Sep 17 00:00:00 2001 -From: Miroslav Rezanina -Date: Thu, 15 Jul 2021 03:22:36 -0400 -Subject: Enable/disable devices for RHEL - -This commit adds all changes related to changes in supported devices. - -Signed-off-by: Miroslav Rezanina --- -Rebase notes (6.1.0): -- Added CONFIG_TPM (except s390x) -- default-configs moved to configs -- Use --with-device- 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 - -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 ---- - .distro/qemu-kvm.spec.template | 18 +-- - .../aarch64-softmmu/aarch64-rh-devices.mak | 34 ++++++ - .../ppc64-softmmu/ppc64-rh-devices.mak | 35 ++++++ - configs/devices/rh-virtio.mak | 10 ++ - .../s390x-softmmu/s390x-rh-devices.mak | 15 +++ - .../x86_64-softmmu/x86_64-rh-devices.mak | 103 ++++++++++++++++++ - hw/acpi/ich9.c | 4 +- - hw/arm/meson.build | 2 +- - hw/block/fdc.c | 10 ++ - hw/cpu/meson.build | 5 +- - hw/display/cirrus_vga.c | 5 +- - hw/ide/piix.c | 5 +- - hw/input/pckbd.c | 2 + - hw/net/e1000.c | 2 + - hw/ppc/spapr_cpu_core.c | 2 + - hw/usb/meson.build | 2 +- - target/arm/cpu_tcg.c | 10 ++ - target/ppc/cpu-models.c | 9 ++ - target/s390x/cpu_models_sysemu.c | 3 + - target/s390x/kvm/kvm.c | 8 ++ - 20 files changed, 269 insertions(+), 15 deletions(-) - 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/rh-virtio.mak - create mode 100644 configs/devices/s390x-softmmu/s390x-rh-devices.mak - create mode 100644 configs/devices/x86_64-softmmu/x86_64-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 -index 0000000000..5f6ee1de5b ---- /dev/null -+++ b/configs/devices/aarch64-softmmu/aarch64-rh-devices.mak -@@ -0,0 +1,34 @@ -+include ../rh-virtio.mak -+ -+CONFIG_ARM_GIC_KVM=y -+CONFIG_ARM_GICV3_TCG=y -+CONFIG_ARM_GIC=y -+CONFIG_ARM_SMMUV3=y -+CONFIG_ARM_V7M=y -+CONFIG_ARM_VIRT=y -+CONFIG_EDID=y -+CONFIG_PCIE_PORT=y -+CONFIG_PCI_DEVICES=y -+CONFIG_PCI_TESTDEV=y -+CONFIG_PFLASH_CFI01=y -+CONFIG_SCSI=y -+CONFIG_SEMIHOSTING=y -+CONFIG_USB=y -+CONFIG_USB_XHCI=y -+CONFIG_USB_XHCI_PCI=y -+CONFIG_USB_STORAGE_CORE=y -+CONFIG_USB_STORAGE_CLASSIC=y -+CONFIG_VFIO=y -+CONFIG_VFIO_PCI=y -+CONFIG_VIRTIO_MMIO=y -+CONFIG_VIRTIO_PCI=y -+CONFIG_XIO3130=y -+CONFIG_NVDIMM=y -+CONFIG_ACPI_APEI=y -+CONFIG_TPM=y -+CONFIG_TPM_EMULATOR=y -+CONFIG_TPM_TIS_SYSBUS=y -+CONFIG_PTIMER=y -+CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y -+CONFIG_PVPANIC_PCI=y -+CONFIG_PXB=y -diff --git a/configs/devices/ppc64-softmmu/ppc64-rh-devices.mak b/configs/devices/ppc64-softmmu/ppc64-rh-devices.mak -new file mode 100644 -index 0000000000..6a3e3f0227 ---- /dev/null -+++ b/configs/devices/ppc64-softmmu/ppc64-rh-devices.mak -@@ -0,0 +1,35 @@ -+include ../rh-virtio.mak -+ -+CONFIG_DIMM=y -+CONFIG_MEM_DEVICE=y -+CONFIG_NVDIMM=y -+CONFIG_PCI=y -+CONFIG_PCI_DEVICES=y -+CONFIG_PCI_TESTDEV=y -+CONFIG_PCI_EXPRESS=y -+CONFIG_PSERIES=y -+CONFIG_SCSI=y -+CONFIG_SPAPR_VSCSI=y -+CONFIG_TEST_DEVICES=y -+CONFIG_USB=y -+CONFIG_USB_OHCI=y -+CONFIG_USB_OHCI_PCI=y -+CONFIG_USB_SMARTCARD=y -+CONFIG_USB_STORAGE_CORE=y -+CONFIG_USB_STORAGE_CLASSIC=y -+CONFIG_USB_XHCI=y -+CONFIG_USB_XHCI_NEC=y -+CONFIG_USB_XHCI_PCI=y -+CONFIG_VFIO=y -+CONFIG_VFIO_PCI=y -+CONFIG_VGA=y -+CONFIG_VGA_PCI=y -+CONFIG_VHOST_USER=y -+CONFIG_VIRTIO_PCI=y -+CONFIG_VIRTIO_VGA=y -+CONFIG_WDT_IB6300ESB=y -+CONFIG_XICS=y -+CONFIG_XIVE=y -+CONFIG_TPM=y -+CONFIG_TPM_SPAPR=y -+CONFIG_TPM_EMULATOR=y -diff --git a/configs/devices/rh-virtio.mak b/configs/devices/rh-virtio.mak -new file mode 100644 -index 0000000000..94ede1b5f6 ---- /dev/null -+++ b/configs/devices/rh-virtio.mak -@@ -0,0 +1,10 @@ -+CONFIG_VIRTIO=y -+CONFIG_VIRTIO_BALLOON=y -+CONFIG_VIRTIO_BLK=y -+CONFIG_VIRTIO_GPU=y -+CONFIG_VIRTIO_INPUT=y -+CONFIG_VIRTIO_INPUT_HOST=y -+CONFIG_VIRTIO_NET=y -+CONFIG_VIRTIO_RNG=y -+CONFIG_VIRTIO_SCSI=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 -new file mode 100644 -index 0000000000..d3b38312e1 ---- /dev/null -+++ b/configs/devices/s390x-softmmu/s390x-rh-devices.mak -@@ -0,0 +1,15 @@ -+include ../rh-virtio.mak -+ -+CONFIG_PCI=y -+CONFIG_S390_CCW_VIRTIO=y -+CONFIG_S390_FLIC=y -+CONFIG_S390_FLIC_KVM=y -+CONFIG_SCLPCONSOLE=y -+CONFIG_SCSI=y -+CONFIG_VFIO=y -+CONFIG_VFIO_AP=y -+CONFIG_VFIO_CCW=y -+CONFIG_VFIO_PCI=y -+CONFIG_VHOST_USER=y -+CONFIG_VIRTIO_CCW=y -+CONFIG_WDT_DIAG288=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 -new file mode 100644 -index 0000000000..d0c9e66641 ---- /dev/null -+++ b/configs/devices/x86_64-softmmu/x86_64-rh-devices.mak -@@ -0,0 +1,103 @@ -+include ../rh-virtio.mak -+ -+CONFIG_ACPI=y -+CONFIG_ACPI_PCI=y -+CONFIG_ACPI_CPU_HOTPLUG=y -+CONFIG_ACPI_MEMORY_HOTPLUG=y -+CONFIG_ACPI_NVDIMM=y -+CONFIG_ACPI_SMBUS=y -+CONFIG_ACPI_VMGENID=y -+CONFIG_ACPI_X86=y -+CONFIG_ACPI_X86_ICH=y -+CONFIG_AHCI=y -+CONFIG_APIC=y -+CONFIG_APM=y -+CONFIG_BOCHS_DISPLAY=y -+CONFIG_DIMM=y -+CONFIG_E1000E_PCI_EXPRESS=y -+CONFIG_E1000_PCI=y -+CONFIG_EDU=y -+CONFIG_FDC=y -+CONFIG_FDC_SYSBUS=y -+CONFIG_FDC_ISA=y -+CONFIG_FW_CFG_DMA=y -+CONFIG_HDA=y -+CONFIG_HYPERV=y -+CONFIG_HYPERV_TESTDEV=y -+CONFIG_I2C=y -+CONFIG_I440FX=y -+CONFIG_I8254=y -+CONFIG_I8257=y -+CONFIG_I8259=y -+CONFIG_I82801B11=y -+CONFIG_IDE_CORE=y -+CONFIG_IDE_PCI=y -+CONFIG_IDE_PIIX=y -+CONFIG_IDE_QDEV=y -+CONFIG_IOAPIC=y -+CONFIG_IOH3420=y -+CONFIG_ISA_BUS=y -+CONFIG_ISA_DEBUG=y -+CONFIG_ISA_TESTDEV=y -+CONFIG_LPC_ICH9=y -+CONFIG_MC146818RTC=y -+CONFIG_MEM_DEVICE=y -+CONFIG_NVDIMM=y -+CONFIG_OPENGL=y -+CONFIG_PAM=y -+CONFIG_PC=y -+CONFIG_PCI=y -+CONFIG_PCIE_PORT=y -+CONFIG_PCI_DEVICES=y -+CONFIG_PCI_EXPRESS=y -+CONFIG_PCI_EXPRESS_Q35=y -+CONFIG_PCI_I440FX=y -+CONFIG_PCI_TESTDEV=y -+CONFIG_PCKBD=y -+CONFIG_PCSPK=y -+CONFIG_PC_ACPI=y -+CONFIG_PC_PCI=y -+CONFIG_PFLASH_CFI01=y -+CONFIG_PVPANIC_ISA=y -+CONFIG_PXB=y -+CONFIG_Q35=y -+CONFIG_RTL8139_PCI=y -+CONFIG_SCSI=y -+CONFIG_SERIAL=y -+CONFIG_SERIAL_ISA=y -+CONFIG_SERIAL_PCI=y -+CONFIG_SEV=y -+CONFIG_SMBIOS=y -+CONFIG_SMBUS_EEPROM=y -+CONFIG_TEST_DEVICES=y -+CONFIG_USB=y -+CONFIG_USB_EHCI=y -+CONFIG_USB_EHCI_PCI=y -+CONFIG_USB_SMARTCARD=y -+CONFIG_USB_STORAGE_CORE=y -+CONFIG_USB_STORAGE_CLASSIC=y -+CONFIG_USB_UHCI=y -+CONFIG_USB_XHCI=y -+CONFIG_USB_XHCI_NEC=y -+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 -+CONFIG_VIRTIO_MEM=y -+CONFIG_VIRTIO_PCI=y -+CONFIG_VIRTIO_VGA=y -+CONFIG_VMMOUSE=y -+CONFIG_VMPORT=y -+CONFIG_VTD=y -+CONFIG_WDT_IB6300ESB=y -+CONFIG_WDT_IB700=y -+CONFIG_XIO3130=y -+CONFIG_TPM=y -+CONFIG_TPM_CRB=y -+CONFIG_TPM_TIS_ISA=y -+CONFIG_TPM_EMULATOR=y -+CONFIG_SGX=y -diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c -index bd9bbade70..de1e401cdf 100644 ---- a/hw/acpi/ich9.c -+++ b/hw/acpi/ich9.c -@@ -435,8 +435,8 @@ void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm) - static const uint32_t gpe0_len = ICH9_PMIO_GPE0_LEN; - pm->acpi_memory_hotplug.is_enabled = true; - pm->cpu_hotplug_legacy = true; -- pm->disable_s3 = 0; -- pm->disable_s4 = 0; -+ pm->disable_s3 = 1; -+ pm->disable_s4 = 1; - pm->s4_val = 2; - pm->use_acpi_hotplug_bridge = true; - pm->keep_pci_slot_hpc = true; -diff --git a/hw/block/fdc.c b/hw/block/fdc.c -index 347875a0cd..ca1776121f 100644 ---- a/hw/block/fdc.c -+++ b/hw/block/fdc.c -@@ -49,6 +49,8 @@ - #include "qom/object.h" - #include "fdc-internal.h" - -+#include "hw/boards.h" -+ - /********************************************************/ - /* debug Floppy devices */ - -@@ -2338,6 +2340,14 @@ void fdctrl_realize_common(DeviceState *dev, FDCtrl *fdctrl, Error **errp) - FDrive *drive; - static int command_tables_inited = 0; - -+ /* Restricted for Red Hat Enterprise Linux: */ -+ MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine()); -+ if (!strstr(mc->name, "-rhel7.")) { -+ error_setg(errp, "Device %s is not supported with machine type %s", -+ object_get_typename(OBJECT(dev)), mc->name); -+ return; -+ } -+ - if (fdctrl->fallback == FLOPPY_DRIVE_TYPE_AUTO) { - error_setg(errp, "Cannot choose a fallback FDrive type of 'auto'"); - return; -diff --git a/hw/cpu/meson.build b/hw/cpu/meson.build -index 9e52fee9e7..bb71c9f3e7 100644 ---- a/hw/cpu/meson.build -+++ b/hw/cpu/meson.build -@@ -1,6 +1,7 @@ --softmmu_ss.add(files('core.c', 'cluster.c')) -+#softmmu_ss.add(files('core.c', 'cluster.c')) -+softmmu_ss.add(files('core.c')) - - specific_ss.add(when: 'CONFIG_ARM11MPCORE', if_true: files('arm11mpcore.c')) - specific_ss.add(when: 'CONFIG_REALVIEW', if_true: files('realview_mpcore.c')) - specific_ss.add(when: 'CONFIG_A9MPCORE', if_true: files('a9mpcore.c')) --specific_ss.add(when: 'CONFIG_A15MPCORE', if_true: files('a15mpcore.c')) -+#specific_ss.add(when: 'CONFIG_A15MPCORE', if_true: files('a15mpcore.c')) -diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c -index 3bb6a58698..6447fdb02e 100644 ---- a/hw/display/cirrus_vga.c -+++ b/hw/display/cirrus_vga.c -@@ -2945,7 +2945,10 @@ static void pci_cirrus_vga_realize(PCIDevice *dev, Error **errp) - PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(dev); - int16_t device_id = pc->device_id; - -- /* -+ warn_report("'cirrus-vga' is deprecated, " -+ "please use a different VGA card instead"); -+ -+ /* - * Follow real hardware, cirrus card emulated has 4 MB video memory. - * Also accept 8 MB/16 MB for backward compatibility. - */ -diff --git a/hw/ide/piix.c b/hw/ide/piix.c -index ce89fd0aa3..fbcf802b13 100644 ---- a/hw/ide/piix.c -+++ b/hw/ide/piix.c -@@ -232,7 +232,8 @@ static void piix3_ide_class_init(ObjectClass *klass, void *data) - k->device_id = PCI_DEVICE_ID_INTEL_82371SB_1; - k->class_id = PCI_CLASS_STORAGE_IDE; - set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); -- dc->hotpluggable = false; -+ /* Disabled for Red Hat Enterprise Linux: */ -+ dc->user_creatable = false; - } - - static const TypeInfo piix3_ide_info = { -@@ -261,6 +262,8 @@ static void piix4_ide_class_init(ObjectClass *klass, void *data) - k->class_id = PCI_CLASS_STORAGE_IDE; - set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); - dc->hotpluggable = false; -+ /* Disabled for Red Hat Enterprise Linux: */ -+ dc->user_creatable = false; - } - - static const TypeInfo piix4_ide_info = { -diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c -index 4efdf75620..5143ebaa27 100644 ---- a/hw/input/pckbd.c -+++ b/hw/input/pckbd.c -@@ -814,6 +814,8 @@ static void i8042_class_initfn(ObjectClass *klass, void *data) - dc->vmsd = &vmstate_kbd_isa; - isa->build_aml = i8042_build_aml; - set_bit(DEVICE_CATEGORY_INPUT, dc->categories); -+ /* Disabled for Red Hat Enterprise Linux: */ -+ dc->user_creatable = false; - } - - static const TypeInfo i8042_info = { -diff --git a/hw/net/e1000.c b/hw/net/e1000.c -index f5bc81296d..282d01e374 100644 ---- a/hw/net/e1000.c -+++ b/hw/net/e1000.c -@@ -1821,6 +1821,7 @@ static const E1000Info e1000_devices[] = { - .revision = 0x03, - .phy_id2 = E1000_PHY_ID2_8254xx_DEFAULT, - }, -+#if 0 /* Disabled for Red Hat Enterprise Linux 7 */ - { - .name = "e1000-82544gc", - .device_id = E1000_DEV_ID_82544GC_COPPER, -@@ -1833,6 +1834,7 @@ static const E1000Info e1000_devices[] = { - .revision = 0x03, - .phy_id2 = E1000_PHY_ID2_8254xx_DEFAULT, - }, -+#endif - }; - - static void e1000_register_types(void) -diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c -index 8a4861f45a..fcb5dfe792 100644 ---- a/hw/ppc/spapr_cpu_core.c -+++ b/hw/ppc/spapr_cpu_core.c -@@ -379,10 +379,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 -index de853d780d..0776ae6a20 100644 ---- a/hw/usb/meson.build -+++ b/hw/usb/meson.build -@@ -52,7 +52,7 @@ softmmu_ss.add(when: 'CONFIG_USB_SMARTCARD', if_true: files('dev-smartcard-reade - if cacard.found() - usbsmartcard_ss = ss.source_set() - usbsmartcard_ss.add(when: 'CONFIG_USB_SMARTCARD', -- if_true: [cacard, files('ccid-card-emulated.c', 'ccid-card-passthru.c')]) -+ if_true: [cacard, files('ccid-card-passthru.c')]) - hw_usb_modules += {'smartcard': usbsmartcard_ss} - endif - -diff --git a/target/arm/cpu_tcg.c b/target/arm/cpu_tcg.c -index 13d0e9b195..3826fa5122 100644 ---- a/target/arm/cpu_tcg.c -+++ b/target/arm/cpu_tcg.c -@@ -22,6 +22,7 @@ - /* CPU models. These are not needed for the AArch64 linux-user build. */ - #if !defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64) - -+#if 0 /* Disabled for Red Hat Enterprise Linux */ - #if !defined(CONFIG_USER_ONLY) && defined(CONFIG_TCG) - static bool arm_v7m_cpu_exec_interrupt(CPUState *cs, int interrupt_request) - { -@@ -375,6 +376,7 @@ static void cortex_a9_initfn(Object *obj) - cpu->ccsidr[1] = 0x200fe019; /* 16k L1 icache. */ - define_arm_cp_regs(cpu, cortexa9_cp_reginfo); - } -+#endif /* disabled for RHEL */ - - #ifndef CONFIG_USER_ONLY - static uint64_t a15_l2ctlr_read(CPUARMState *env, const ARMCPRegInfo *ri) -@@ -400,6 +402,7 @@ static const ARMCPRegInfo cortexa15_cp_reginfo[] = { - REGINFO_SENTINEL - }; - -+#if 0 /* Disabled for Red Hat Enterprise Linux */ - static void cortex_a7_initfn(Object *obj) - { - ARMCPU *cpu = ARM_CPU(obj); -@@ -445,6 +448,7 @@ static void cortex_a7_initfn(Object *obj) - cpu->ccsidr[2] = 0x711fe07a; /* 4096K L2 unified cache */ - define_arm_cp_regs(cpu, cortexa15_cp_reginfo); /* Same as A15 */ - } -+#endif /* disabled for RHEL */ - - static void cortex_a15_initfn(Object *obj) - { -@@ -488,6 +492,7 @@ static void cortex_a15_initfn(Object *obj) - define_arm_cp_regs(cpu, cortexa15_cp_reginfo); - } - -+#if 0 /* Disabled for Red Hat Enterprise Linux */ - static void cortex_m0_initfn(Object *obj) - { - ARMCPU *cpu = ARM_CPU(obj); -@@ -928,6 +933,7 @@ static void arm_v7m_class_init(ObjectClass *oc, void *data) - - cc->gdb_core_xml_file = "arm-m-profile.xml"; - } -+#endif /* disabled for RHEL */ - - #ifndef TARGET_AARCH64 - /* -@@ -1007,6 +1013,7 @@ static void arm_max_initfn(Object *obj) - #endif /* !TARGET_AARCH64 */ - - static const ARMCPUInfo arm_tcg_cpus[] = { -+#if 0 /* Disabled for Red Hat Enterprise Linux */ - { .name = "arm926", .initfn = arm926_initfn }, - { .name = "arm946", .initfn = arm946_initfn }, - { .name = "arm1026", .initfn = arm1026_initfn }, -@@ -1022,7 +1029,9 @@ static const ARMCPUInfo arm_tcg_cpus[] = { - { .name = "cortex-a7", .initfn = cortex_a7_initfn }, - { .name = "cortex-a8", .initfn = cortex_a8_initfn }, - { .name = "cortex-a9", .initfn = cortex_a9_initfn }, -+#endif /* disabled for RHEL */ - { .name = "cortex-a15", .initfn = cortex_a15_initfn }, -+#if 0 /* Disabled for Red Hat Enterprise Linux */ - { .name = "cortex-m0", .initfn = cortex_m0_initfn, - .class_init = arm_v7m_class_init }, - { .name = "cortex-m3", .initfn = cortex_m3_initfn, -@@ -1053,6 +1062,7 @@ static const ARMCPUInfo arm_tcg_cpus[] = { - { .name = "pxa270-b1", .initfn = pxa270b1_initfn }, - { .name = "pxa270-c0", .initfn = pxa270c0_initfn }, - { .name = "pxa270-c5", .initfn = pxa270c5_initfn }, -+#endif /* disabled for RHEL */ - #ifndef TARGET_AARCH64 - { .name = "max", .initfn = arm_max_initfn }, - #endif -diff --git a/target/ppc/cpu-models.c b/target/ppc/cpu-models.c -index 976be5e0d1..dd78883410 100644 ---- a/target/ppc/cpu-models.c -+++ b/target/ppc/cpu-models.c -@@ -66,6 +66,7 @@ - #define POWERPC_DEF(_name, _pvr, _type, _desc) \ - POWERPC_DEF_SVR(_name, _desc, _pvr, POWERPC_SVR_NONE, _type) - -+#if 0 /* Embedded and 32-bit CPUs disabled for Red Hat Enterprise Linux */ - /* Embedded PowerPC */ - /* PowerPC 405 family */ - /* 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, -@@ -897,12 +901,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" }, -@@ -912,6 +919,7 @@ 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" }, -@@ -919,5 +927,6 @@ PowerPCCPUAlias ppc_cpu_aliases[] = { - { "ppc32", "604" }, - { "ppc", "604" }, - { "default", "604" }, -+#endif - { NULL, NULL } - }; -diff --git a/target/s390x/cpu_models_sysemu.c b/target/s390x/cpu_models_sysemu.c -index 05c3ccaaff..6a04ccab1b 100644 ---- a/target/s390x/cpu_models_sysemu.c -+++ b/target/s390x/cpu_models_sysemu.c -@@ -36,6 +36,9 @@ static void check_unavailable_features(const S390CPUModel *max_model, - (max_model->def->gen == model->def->gen && - max_model->def->ec_ga < model->def->ec_ga)) { - list_add_feat("type", unavailable); -+ } else if (model->def->gen < 11 && kvm_enabled()) { -+ /* Older CPU models are not supported on Red Hat Enterprise Linux */ -+ list_add_feat("type", unavailable); - } - - /* detect missing features if any to properly report them */ -diff --git a/target/s390x/kvm/kvm.c b/target/s390x/kvm/kvm.c -index 6acf14d5ec..74f089d87f 100644 ---- a/target/s390x/kvm/kvm.c -+++ b/target/s390x/kvm/kvm.c -@@ -2512,6 +2512,14 @@ void kvm_s390_apply_cpu_model(const S390CPUModel *model, Error **errp) - error_setg(errp, "KVM doesn't support CPU models"); - return; - } -+ -+ /* Older CPU models are not supported on Red Hat Enterprise Linux */ -+ if (model->def->gen < 11) { -+ error_setg(errp, "KVM: Unsupported CPU type specified: %s", -+ MACHINE(qdev_get_machine())->cpu_type); -+ return; -+ } -+ - prop.cpuid = s390_cpuid_from_cpu_model(model); - prop.ibc = s390_ibc_from_cpu_model(model); - /* configure cpu features indicated via STFL(e) */ --- -2.31.1 - diff --git a/SOURCES/0006-Machine-type-related-general-changes.patch b/SOURCES/0006-Machine-type-related-general-changes.patch deleted file mode 100644 index c3b08a4..0000000 --- a/SOURCES/0006-Machine-type-related-general-changes.patch +++ /dev/null @@ -1,619 +0,0 @@ -From a525db3951dc68c469d1f51bdc69ab6e75e72c37 Mon Sep 17 00:00:00 2001 -From: Miroslav Rezanina -Date: Fri, 11 Jan 2019 09:54:45 +0100 -Subject: Machine type related general changes - -This patch is first part of original "Add RHEL machine types" patch we -split to allow easier review. It contains changes not related to any -architecture. - -Signed-off-by: Miroslav Rezanina --- -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 - -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 ---- - hw/acpi/piix4.c | 6 +- - hw/arm/virt.c | 2 +- - hw/core/machine.c | 186 +++++++++++++++++++++++++++++++++++ - hw/display/vga-isa.c | 2 +- - hw/i386/pc_piix.c | 2 + - hw/i386/pc_q35.c | 2 + - hw/net/rtl8139.c | 4 +- - hw/smbios/smbios.c | 46 ++++++++- - hw/timer/i8254_common.c | 2 +- - hw/usb/hcd-xhci-pci.c | 59 ++++++++--- - hw/usb/hcd-xhci-pci.h | 1 + - include/hw/boards.h | 21 ++++ - include/hw/firmware/smbios.h | 5 +- - include/hw/i386/pc.h | 3 + - 14 files changed, 316 insertions(+), 25 deletions(-) - -diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c -index fe5625d07a..28544e78c3 100644 ---- a/hw/acpi/piix4.c -+++ b/hw/acpi/piix4.c -@@ -287,7 +287,7 @@ static bool vmstate_test_migrate_acpi_index(void *opaque, int version_id) - static const VMStateDescription vmstate_acpi = { - .name = "piix4_pm", - .version_id = 3, -- .minimum_version_id = 3, -+ .minimum_version_id = 2, - .post_load = vmstate_acpi_post_load, - .fields = (VMStateField[]) { - VMSTATE_PCI_DEVICE(parent_obj, PIIX4PMState), -@@ -653,8 +653,8 @@ static void piix4_send_gpe(AcpiDeviceIf *adev, AcpiEventStatusBits ev) - - static Property piix4_pm_properties[] = { - DEFINE_PROP_UINT32("smb_io_base", PIIX4PMState, smb_io_base, 0), -- DEFINE_PROP_UINT8(ACPI_PM_PROP_S3_DISABLED, PIIX4PMState, disable_s3, 0), -- DEFINE_PROP_UINT8(ACPI_PM_PROP_S4_DISABLED, PIIX4PMState, disable_s4, 0), -+ DEFINE_PROP_UINT8(ACPI_PM_PROP_S3_DISABLED, PIIX4PMState, disable_s3, 1), -+ DEFINE_PROP_UINT8(ACPI_PM_PROP_S4_DISABLED, PIIX4PMState, disable_s4, 1), - DEFINE_PROP_UINT8(ACPI_PM_PROP_S4_VAL, PIIX4PMState, s4_val, 2), - DEFINE_PROP_BOOL(ACPI_PM_PROP_ACPI_PCIHP_BRIDGE, PIIX4PMState, - use_acpi_hotplug_bridge, true), -diff --git a/hw/arm/virt.c b/hw/arm/virt.c -index d2e5ecd234..6a84031fd7 100644 ---- a/hw/arm/virt.c -+++ b/hw/arm/virt.c -@@ -1596,7 +1596,7 @@ static void virt_build_smbios(VirtMachineState *vms) - - smbios_set_defaults("QEMU", product, - vmc->smbios_old_sys_ver ? "1.0" : mc->name, false, -- true, SMBIOS_ENTRY_POINT_TYPE_64); -+ true, NULL, NULL, SMBIOS_ENTRY_POINT_TYPE_64); - - smbios_get_tables(MACHINE(vms), NULL, 0, - &smbios_tables, &smbios_tables_len, -diff --git a/hw/core/machine.c b/hw/core/machine.c -index 1e23fdc14b..ea430d844e 100644 ---- a/hw/core/machine.c -+++ b/hw/core/machine.c -@@ -37,6 +37,192 @@ - #include "hw/virtio/virtio.h" - #include "hw/virtio/virtio-pci.h" - -+/* -+ * Mostly the same as hw_compat_6_0 and hw_compat_6_1 -+ */ -+GlobalProperty hw_compat_rhel_8_5[] = { -+ /* hw_compat_rhel_8_5 from hw_compat_6_0 */ -+ { "gpex-pcihost", "allow-unmapped-accesses", "false" }, -+ /* hw_compat_rhel_8_5 from hw_compat_6_0 */ -+ { "i8042", "extended-state", "false"}, -+ /* hw_compat_rhel_8_5 from hw_compat_6_0 */ -+ { "nvme-ns", "eui64-default", "off"}, -+ /* hw_compat_rhel_8_5 from hw_compat_6_0 */ -+ { "e1000", "init-vet", "off" }, -+ /* hw_compat_rhel_8_5 from hw_compat_6_0 */ -+ { "e1000e", "init-vet", "off" }, -+ /* hw_compat_rhel_8_5 from hw_compat_6_0 */ -+ { "vhost-vsock-device", "seqpacket", "off" }, -+ /* hw_compat_rhel_8_5 from hw_compat_6_1 */ -+ { "vhost-user-vsock-device", "seqpacket", "off" }, -+ /* hw_compat_rhel_8_5 from hw_compat_6_1 */ -+ { "nvme-ns", "shared", "off" }, -+}; -+const size_t hw_compat_rhel_8_5_len = G_N_ELEMENTS(hw_compat_rhel_8_5); -+ -+/* -+ * Mostly the same as hw_compat_5_2 -+ */ -+GlobalProperty hw_compat_rhel_8_4[] = { -+ /* hw_compat_rhel_8_4 from hw_compat_5_2 */ -+ { "ICH9-LPC", "smm-compat", "on"}, -+ /* hw_compat_rhel_8_4 from hw_compat_5_2 */ -+ { "PIIX4_PM", "smm-compat", "on"}, -+ /* hw_compat_rhel_8_4 from hw_compat_5_2 */ -+ { "virtio-blk-device", "report-discard-granularity", "off" }, -+ /* hw_compat_rhel_8_4 from hw_compat_5_2 */ -+ /* -+ * Upstream incorrectly had "virtio-net-pci" instead of "virtio-net-pci-base", -+ * (https://bugzilla.redhat.com/show_bug.cgi?id=1999141) -+ */ -+ { "virtio-net-pci-base", "vectors", "3"}, -+}; -+const size_t hw_compat_rhel_8_4_len = G_N_ELEMENTS(hw_compat_rhel_8_4); -+ -+/* -+ * Mostly the same as hw_compat_5_1 -+ */ -+GlobalProperty hw_compat_rhel_8_3[] = { -+ /* hw_compat_rhel_8_3 from hw_compat_5_1 */ -+ { "vhost-scsi", "num_queues", "1"}, -+ /* hw_compat_rhel_8_3 from hw_compat_5_1 */ -+ { "vhost-user-blk", "num-queues", "1"}, -+ /* hw_compat_rhel_8_3 from hw_compat_5_1 */ -+ { "vhost-user-scsi", "num_queues", "1"}, -+ /* hw_compat_rhel_8_3 from hw_compat_5_1 */ -+ { "virtio-blk-device", "num-queues", "1"}, -+ /* hw_compat_rhel_8_3 from hw_compat_5_1 */ -+ { "virtio-scsi-device", "num_queues", "1"}, -+ /* hw_compat_rhel_8_3 from hw_compat_5_1 */ -+ { "nvme", "use-intel-id", "on"}, -+ /* hw_compat_rhel_8_3 from hw_compat_5_1 */ -+ { "pvpanic", "events", "1"}, /* PVPANIC_PANICKED */ -+ /* hw_compat_rhel_8_3 from hw_compat_5_1 */ -+ { "pl011", "migrate-clk", "off" }, -+ /* hw_compat_rhel_8_3 bz 1912846 */ -+ { "pci-xhci", "x-rh-late-msi-cap", "off" }, -+ /* hw_compat_rhel_8_3 from hw_compat_5_1 */ -+ { "virtio-pci", "x-ats-page-aligned", "off"}, -+}; -+const size_t hw_compat_rhel_8_3_len = G_N_ELEMENTS(hw_compat_rhel_8_3); -+ -+/* -+ * The same as hw_compat_4_2 + hw_compat_5_0 -+ */ -+GlobalProperty hw_compat_rhel_8_2[] = { -+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */ -+ { "virtio-blk-device", "queue-size", "128"}, -+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */ -+ { "virtio-scsi-device", "virtqueue_size", "128"}, -+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */ -+ { "virtio-blk-device", "x-enable-wce-if-config-wce", "off" }, -+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */ -+ { "virtio-blk-device", "seg-max-adjust", "off"}, -+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */ -+ { "virtio-scsi-device", "seg_max_adjust", "off"}, -+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */ -+ { "vhost-blk-device", "seg_max_adjust", "off"}, -+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */ -+ { "usb-host", "suppress-remote-wake", "off" }, -+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */ -+ { "usb-redir", "suppress-remote-wake", "off" }, -+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */ -+ { "qxl", "revision", "4" }, -+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */ -+ { "qxl-vga", "revision", "4" }, -+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */ -+ { "fw_cfg", "acpi-mr-restore", "false" }, -+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */ -+ { "virtio-device", "use-disabled-flag", "false" }, -+ /* hw_compat_rhel_8_2 from hw_compat_5_0 */ -+ { "pci-host-bridge", "x-config-reg-migration-enabled", "off" }, -+ /* hw_compat_rhel_8_2 from hw_compat_5_0 */ -+ { "virtio-balloon-device", "page-poison", "false" }, -+ /* hw_compat_rhel_8_2 from hw_compat_5_0 */ -+ { "vmport", "x-read-set-eax", "off" }, -+ /* hw_compat_rhel_8_2 from hw_compat_5_0 */ -+ { "vmport", "x-signal-unsupported-cmd", "off" }, -+ /* hw_compat_rhel_8_2 from hw_compat_5_0 */ -+ { "vmport", "x-report-vmx-type", "off" }, -+ /* hw_compat_rhel_8_2 from hw_compat_5_0 */ -+ { "vmport", "x-cmds-v2", "off" }, -+ /* hw_compat_rhel_8_2 from hw_compat_5_0 */ -+ { "virtio-device", "x-disable-legacy-check", "true" }, -+}; -+const size_t hw_compat_rhel_8_2_len = G_N_ELEMENTS(hw_compat_rhel_8_2); -+ -+/* -+ * The same as hw_compat_4_1 -+ */ -+GlobalProperty hw_compat_rhel_8_1[] = { -+ /* hw_compat_rhel_8_1 from hw_compat_4_1 */ -+ { "virtio-pci", "x-pcie-flr-init", "off" }, -+}; -+const size_t hw_compat_rhel_8_1_len = G_N_ELEMENTS(hw_compat_rhel_8_1); -+ -+/* The same as hw_compat_3_1 -+ * format of array has been changed by: -+ * 6c36bddf5340 ("machine: Use shorter format for GlobalProperty arrays") -+ */ -+GlobalProperty hw_compat_rhel_8_0[] = { -+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ -+ { "pcie-root-port", "x-speed", "2_5" }, -+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ -+ { "pcie-root-port", "x-width", "1" }, -+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ -+ { "memory-backend-file", "x-use-canonical-path-for-ramblock-id", "true" }, -+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ -+ { "memory-backend-memfd", "x-use-canonical-path-for-ramblock-id", "true" }, -+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ -+ { "tpm-crb", "ppi", "false" }, -+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ -+ { "tpm-tis", "ppi", "false" }, -+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ -+ { "usb-kbd", "serial", "42" }, -+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ -+ { "usb-mouse", "serial", "42" }, -+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ -+ { "usb-tablet", "serial", "42" }, -+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ -+ { "virtio-blk-device", "discard", "false" }, -+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */ -+ { "virtio-blk-device", "write-zeroes", "false" }, -+ /* hw_compat_rhel_8_0 from hw_compat_4_0 */ -+ { "VGA", "edid", "false" }, -+ /* hw_compat_rhel_8_0 from hw_compat_4_0 */ -+ { "secondary-vga", "edid", "false" }, -+ /* hw_compat_rhel_8_0 from hw_compat_4_0 */ -+ { "bochs-display", "edid", "false" }, -+ /* hw_compat_rhel_8_0 from hw_compat_4_0 */ -+ { "virtio-vga", "edid", "false" }, -+ /* hw_compat_rhel_8_0 from hw_compat_4_0 */ -+ { "virtio-gpu-device", "edid", "false" }, -+ /* hw_compat_rhel_8_0 from hw_compat_4_0 */ -+ { "virtio-device", "use-started", "false" }, -+ /* hw_compat_rhel_8_0 from hw_compat_3_1 - that was added in 4.1 */ -+ { "pcie-root-port-base", "disable-acs", "true" }, -+}; -+const size_t hw_compat_rhel_8_0_len = G_N_ELEMENTS(hw_compat_rhel_8_0); -+ -+/* The same as hw_compat_3_0 + hw_compat_2_12 -+ * except that -+ * there's nothing in 3_0 -+ * migration.decompress-error-check=off was in 7.5 from bz 1584139 -+ */ -+GlobalProperty hw_compat_rhel_7_6[] = { -+ /* hw_compat_rhel_7_6 from hw_compat_2_12 */ -+ { "hda-audio", "use-timer", "false" }, -+ /* hw_compat_rhel_7_6 from hw_compat_2_12 */ -+ { "cirrus-vga", "global-vmstate", "true" }, -+ /* hw_compat_rhel_7_6 from hw_compat_2_12 */ -+ { "VGA", "global-vmstate", "true" }, -+ /* hw_compat_rhel_7_6 from hw_compat_2_12 */ -+ { "vmware-svga", "global-vmstate", "true" }, -+ /* hw_compat_rhel_7_6 from hw_compat_2_12 */ -+ { "qxl-vga", "global-vmstate", "true" }, -+}; -+const size_t hw_compat_rhel_7_6_len = G_N_ELEMENTS(hw_compat_rhel_7_6); -+ - GlobalProperty hw_compat_6_2[] = { - { "PIIX4_PM", "x-not-migrate-acpi-index", "on"}, - }; -diff --git a/hw/display/vga-isa.c b/hw/display/vga-isa.c -index 46abbc5653..505467059b 100644 ---- a/hw/display/vga-isa.c -+++ b/hw/display/vga-isa.c -@@ -88,7 +88,7 @@ static void vga_isa_realizefn(DeviceState *dev, Error **errp) - } - - static Property vga_isa_properties[] = { -- DEFINE_PROP_UINT32("vgamem_mb", ISAVGAState, state.vram_size_mb, 8), -+ DEFINE_PROP_UINT32("vgamem_mb", ISAVGAState, state.vram_size_mb, 16), - DEFINE_PROP_END_OF_LIST(), - }; - -diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c -index b72c03d0a6..c797e98312 100644 ---- a/hw/i386/pc_piix.c -+++ b/hw/i386/pc_piix.c -@@ -177,6 +177,8 @@ static void pc_init1(MachineState *machine, - smbios_set_defaults("QEMU", "Standard PC (i440FX + PIIX, 1996)", - mc->name, pcmc->smbios_legacy_mode, - pcmc->smbios_uuid_encoded, -+ pcmc->smbios_stream_product, -+ pcmc->smbios_stream_version, - pcms->smbios_entry_point_type); - } - -diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c -index 1780f79bc1..b695f88c45 100644 ---- a/hw/i386/pc_q35.c -+++ b/hw/i386/pc_q35.c -@@ -200,6 +200,8 @@ static void pc_q35_init(MachineState *machine) - smbios_set_defaults("QEMU", "Standard PC (Q35 + ICH9, 2009)", - mc->name, pcmc->smbios_legacy_mode, - pcmc->smbios_uuid_encoded, -+ pcmc->smbios_stream_product, -+ pcmc->smbios_stream_version, - pcms->smbios_entry_point_type); - } - -diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c -index 6b65823b4b..75dacabc43 100644 ---- a/hw/net/rtl8139.c -+++ b/hw/net/rtl8139.c -@@ -3179,7 +3179,7 @@ static int rtl8139_pre_save(void *opaque) - - static const VMStateDescription vmstate_rtl8139 = { - .name = "rtl8139", -- .version_id = 5, -+ .version_id = 4, - .minimum_version_id = 3, - .post_load = rtl8139_post_load, - .pre_save = rtl8139_pre_save, -@@ -3260,7 +3260,9 @@ static const VMStateDescription vmstate_rtl8139 = { - VMSTATE_UINT32(tally_counters.TxMCol, RTL8139State), - VMSTATE_UINT64(tally_counters.RxOkPhy, RTL8139State), - VMSTATE_UINT64(tally_counters.RxOkBrd, RTL8139State), -+#if 0 /* Disabled for Red Hat Enterprise Linux bz 1420195 */ - VMSTATE_UINT32_V(tally_counters.RxOkMul, RTL8139State, 5), -+#endif - VMSTATE_UINT16(tally_counters.TxAbt, RTL8139State), - VMSTATE_UINT16(tally_counters.TxUndrn, RTL8139State), - -diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c -index 60349ee402..0edcc98434 100644 ---- a/hw/smbios/smbios.c -+++ b/hw/smbios/smbios.c -@@ -57,6 +57,9 @@ static bool smbios_legacy = true; - static bool smbios_uuid_encoded = true; - /* end: legacy structures & constants for <= 2.0 machines */ - -+/* Set to true for modern Windows 10 HardwareID-6 compat */ -+static bool smbios_type2_required; -+ - - uint8_t *smbios_tables; - size_t smbios_tables_len; -@@ -639,7 +642,7 @@ static void smbios_build_type_1_table(void) - - static void smbios_build_type_2_table(void) - { -- SMBIOS_BUILD_TABLE_PRE(2, T2_BASE, false); /* optional */ -+ SMBIOS_BUILD_TABLE_PRE(2, T2_BASE, smbios_type2_required); - - SMBIOS_TABLE_SET_STR(2, manufacturer_str, type2.manufacturer); - SMBIOS_TABLE_SET_STR(2, product_str, type2.product); -@@ -914,7 +917,10 @@ void smbios_set_cpuid(uint32_t version, uint32_t features) - - void smbios_set_defaults(const char *manufacturer, const char *product, - const char *version, bool legacy_mode, -- bool uuid_encoded, SmbiosEntryPointType ep_type) -+ bool uuid_encoded, -+ const char *stream_product, -+ const char *stream_version, -+ SmbiosEntryPointType ep_type) - { - smbios_have_defaults = true; - smbios_legacy = legacy_mode; -@@ -935,11 +941,45 @@ void smbios_set_defaults(const char *manufacturer, const char *product, - g_free(smbios_entries); - } - -+ /* -+ * If @stream_product & @stream_version are non-NULL, then -+ * we're following rules for new Windows driver support. -+ * The data we have to report is defined in this doc: -+ * -+ * https://docs.microsoft.com/en-us/windows-hardware/drivers/install/specifying-hardware-ids-for-a-computer -+ * -+ * The Windows drivers are written to expect use of the -+ * scheme documented as "HardwareID-6" against Windows 10, -+ * which uses SMBIOS System (Type 1) and Base Board (Type 2) -+ * tables and will match on -+ * -+ * System Manufacturer = Red Hat (@manufacturer) -+ * System SKU Number = 8.2.0 (@stream_version) -+ * Baseboard Manufacturer = Red Hat (@manufacturer) -+ * Baseboard Product = RHEL-AV (@stream_product) -+ * -+ * NB, SKU must be changed with each RHEL-AV release -+ * -+ * Other fields can be freely used by applications using -+ * QEMU. For example apps can use the "System product" -+ * and "System version" to identify themselves. -+ * -+ * We get 'System Manufacturer' and 'Baseboard Manufacturer' -+ */ - SMBIOS_SET_DEFAULT(type1.manufacturer, manufacturer); - SMBIOS_SET_DEFAULT(type1.product, product); - SMBIOS_SET_DEFAULT(type1.version, version); -+ SMBIOS_SET_DEFAULT(type1.family, "Red Hat Enterprise Linux"); -+ if (stream_version != NULL) { -+ SMBIOS_SET_DEFAULT(type1.sku, stream_version); -+ } - SMBIOS_SET_DEFAULT(type2.manufacturer, manufacturer); -- SMBIOS_SET_DEFAULT(type2.product, product); -+ if (stream_product != NULL) { -+ SMBIOS_SET_DEFAULT(type2.product, stream_product); -+ smbios_type2_required = true; -+ } else { -+ SMBIOS_SET_DEFAULT(type2.product, product); -+ } - SMBIOS_SET_DEFAULT(type2.version, version); - SMBIOS_SET_DEFAULT(type3.manufacturer, manufacturer); - SMBIOS_SET_DEFAULT(type3.version, version); -diff --git a/hw/timer/i8254_common.c b/hw/timer/i8254_common.c -index 050875b497..32935da46c 100644 ---- a/hw/timer/i8254_common.c -+++ b/hw/timer/i8254_common.c -@@ -231,7 +231,7 @@ static const VMStateDescription vmstate_pit_common = { - .pre_save = pit_dispatch_pre_save, - .post_load = pit_dispatch_post_load, - .fields = (VMStateField[]) { -- VMSTATE_UINT32_V(channels[0].irq_disabled, PITCommonState, 3), -+ VMSTATE_UINT32(channels[0].irq_disabled, PITCommonState), /* qemu-kvm's v2 had 'flags' here */ - VMSTATE_STRUCT_ARRAY(channels, PITCommonState, 3, 2, - vmstate_pit_channel, PITChannelState), - VMSTATE_INT64(channels[0].next_transition_time, -diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c -index e934b1a5b1..e18b05e528 100644 ---- a/hw/usb/hcd-xhci-pci.c -+++ b/hw/usb/hcd-xhci-pci.c -@@ -104,6 +104,33 @@ static int xhci_pci_vmstate_post_load(void *opaque, int version_id) - return 0; - } - -+/* RH bz 1912846 */ -+static bool usb_xhci_pci_add_msi(struct PCIDevice *dev, Error **errp) -+{ -+ int ret; -+ Error *err = NULL; -+ XHCIPciState *s = XHCI_PCI(dev); -+ -+ ret = msi_init(dev, 0x70, s->xhci.numintrs, true, false, &err); -+ /* -+ * Any error other than -ENOTSUP(board's MSI support is broken) -+ * is a programming error -+ */ -+ assert(!ret || ret == -ENOTSUP); -+ if (ret && s->msi == ON_OFF_AUTO_ON) { -+ /* Can't satisfy user's explicit msi=on request, fail */ -+ error_append_hint(&err, "You have to use msi=auto (default) or " -+ "msi=off with this machine type.\n"); -+ error_propagate(errp, err); -+ return true; -+ } -+ assert(!err || s->msi == ON_OFF_AUTO_AUTO); -+ /* With msi=auto, we fall back to MSI off silently */ -+ error_free(err); -+ -+ return false; -+} -+ - static void usb_xhci_pci_realize(struct PCIDevice *dev, Error **errp) - { - int ret; -@@ -125,23 +152,12 @@ static void usb_xhci_pci_realize(struct PCIDevice *dev, Error **errp) - s->xhci.nec_quirks = true; - } - -- if (s->msi != ON_OFF_AUTO_OFF) { -- ret = msi_init(dev, 0x70, s->xhci.numintrs, true, false, &err); -- /* -- * Any error other than -ENOTSUP(board's MSI support is broken) -- * is a programming error -- */ -- assert(!ret || ret == -ENOTSUP); -- if (ret && s->msi == ON_OFF_AUTO_ON) { -- /* Can't satisfy user's explicit msi=on request, fail */ -- error_append_hint(&err, "You have to use msi=auto (default) or " -- "msi=off with this machine type.\n"); -+ if (s->msi != ON_OFF_AUTO_OFF && s->rh_late_msi_cap) { -+ /* This gives the behaviour from 5.2.0 onwards, lspci shows 90,a0,70 */ -+ if (usb_xhci_pci_add_msi(dev, &err)) { - error_propagate(errp, err); - return; - } -- assert(!err || s->msi == ON_OFF_AUTO_AUTO); -- /* With msi=auto, we fall back to MSI off silently */ -- error_free(err); - } - pci_register_bar(dev, 0, - PCI_BASE_ADDRESS_SPACE_MEMORY | -@@ -154,6 +170,14 @@ static void usb_xhci_pci_realize(struct PCIDevice *dev, Error **errp) - assert(ret > 0); - } - -+ /* RH bz 1912846 */ -+ if (s->msi != ON_OFF_AUTO_OFF && !s->rh_late_msi_cap) { -+ /* This gives the older RH machine behaviour, lspci shows 90,70,a0 */ -+ if (usb_xhci_pci_add_msi(dev, &err)) { -+ error_propagate(errp, err); -+ return; -+ } -+ } - if (s->msix != ON_OFF_AUTO_OFF) { - /* TODO check for errors, and should fail when msix=on */ - msix_init(dev, s->xhci.numintrs, -@@ -198,11 +222,18 @@ static void xhci_instance_init(Object *obj) - qdev_alias_all_properties(DEVICE(&s->xhci), obj); - } - -+static Property xhci_pci_properties[] = { -+ /* RH bz 1912846 */ -+ DEFINE_PROP_BOOL("x-rh-late-msi-cap", XHCIPciState, rh_late_msi_cap, true), -+ DEFINE_PROP_END_OF_LIST() -+}; -+ - static void xhci_class_init(ObjectClass *klass, void *data) - { - PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); - DeviceClass *dc = DEVICE_CLASS(klass); - -+ device_class_set_props(dc, xhci_pci_properties); - dc->reset = xhci_pci_reset; - dc->vmsd = &vmstate_xhci_pci; - set_bit(DEVICE_CATEGORY_USB, dc->categories); -diff --git a/hw/usb/hcd-xhci-pci.h b/hw/usb/hcd-xhci-pci.h -index c193f79443..086a1feb1e 100644 ---- a/hw/usb/hcd-xhci-pci.h -+++ b/hw/usb/hcd-xhci-pci.h -@@ -39,6 +39,7 @@ typedef struct XHCIPciState { - XHCIState xhci; - OnOffAuto msi; - OnOffAuto msix; -+ bool rh_late_msi_cap; /* bz 1912846 */ - } XHCIPciState; - - #endif -diff --git a/include/hw/boards.h b/include/hw/boards.h -index c92ac8815c..c90a19b4d1 100644 ---- a/include/hw/boards.h -+++ b/include/hw/boards.h -@@ -449,4 +449,25 @@ extern const size_t hw_compat_2_2_len; - extern GlobalProperty hw_compat_2_1[]; - extern const size_t hw_compat_2_1_len; - -+extern GlobalProperty hw_compat_rhel_8_5[]; -+extern const size_t hw_compat_rhel_8_5_len; -+ -+extern GlobalProperty hw_compat_rhel_8_4[]; -+extern const size_t hw_compat_rhel_8_4_len; -+ -+extern GlobalProperty hw_compat_rhel_8_3[]; -+extern const size_t hw_compat_rhel_8_3_len; -+ -+extern GlobalProperty hw_compat_rhel_8_2[]; -+extern const size_t hw_compat_rhel_8_2_len; -+ -+extern GlobalProperty hw_compat_rhel_8_1[]; -+extern const size_t hw_compat_rhel_8_1_len; -+ -+extern GlobalProperty hw_compat_rhel_8_0[]; -+extern const size_t hw_compat_rhel_8_0_len; -+ -+extern GlobalProperty hw_compat_rhel_7_6[]; -+extern const size_t hw_compat_rhel_7_6_len; -+ - #endif -diff --git a/include/hw/firmware/smbios.h b/include/hw/firmware/smbios.h -index 4b7ad77a44..9acff96a86 100644 ---- a/include/hw/firmware/smbios.h -+++ b/include/hw/firmware/smbios.h -@@ -272,7 +272,10 @@ void smbios_entry_add(QemuOpts *opts, Error **errp); - void smbios_set_cpuid(uint32_t version, uint32_t features); - void smbios_set_defaults(const char *manufacturer, const char *product, - const char *version, bool legacy_mode, -- bool uuid_encoded, SmbiosEntryPointType ep_type); -+ bool uuid_encoded, -+ const char *stream_product, -+ const char *stream_version, -+ SmbiosEntryPointType ep_type); - uint8_t *smbios_get_table_legacy(MachineState *ms, size_t *length); - void smbios_get_tables(MachineState *ms, - const struct smbios_phys_mem_area *mem_array, -diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h -index 1a27de9c8b..91331059d9 100644 ---- a/include/hw/i386/pc.h -+++ b/include/hw/i386/pc.h -@@ -113,6 +113,9 @@ struct PCMachineClass { - bool smbios_defaults; - bool smbios_legacy_mode; - bool smbios_uuid_encoded; -+ /* New fields needed for Windows HardwareID-6 matching */ -+ const char *smbios_stream_product; -+ const char *smbios_stream_version; - - /* RAM / address space compat: */ - bool gigabyte_align; --- -2.31.1 - diff --git a/SOURCES/0007-Add-aarch64-machine-types.patch b/SOURCES/0007-Add-aarch64-machine-types.patch deleted file mode 100644 index 3c44b11..0000000 --- a/SOURCES/0007-Add-aarch64-machine-types.patch +++ /dev/null @@ -1,352 +0,0 @@ -From 697aaa43e3c0f20fc312f06be6c1093f1ba907e1 Mon Sep 17 00:00:00 2001 -From: Miroslav Rezanina -Date: Fri, 19 Oct 2018 12:53:31 +0200 -Subject: Add aarch64 machine types - -Adding changes to add RHEL machine types for aarch64 architecture. - -Signed-off-by: Miroslav Rezanina ---- -Rebase notes (6.1.0): -- 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 - -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 ---- - hw/arm/virt.c | 234 +++++++++++++++++++++++++++++++++++++++++- - include/hw/arm/virt.h | 8 ++ - 2 files changed, 241 insertions(+), 1 deletion(-) - -diff --git a/hw/arm/virt.c b/hw/arm/virt.c -index 6a84031fd7..e06862d22a 100644 ---- a/hw/arm/virt.c -+++ b/hw/arm/virt.c -@@ -80,6 +80,7 @@ - #include "hw/char/pl011.h" - #include "qemu/guest-random.h" - -+#if 0 /* Disabled for Red Hat Enterprise Linux */ - #define DEFINE_VIRT_MACHINE_LATEST(major, minor, latest) \ - static void virt_##major##_##minor##_class_init(ObjectClass *oc, \ - void *data) \ -@@ -106,7 +107,48 @@ - DEFINE_VIRT_MACHINE_LATEST(major, minor, true) - #define DEFINE_VIRT_MACHINE(major, minor) \ - DEFINE_VIRT_MACHINE_LATEST(major, minor, false) -- -+#endif /* disabled for RHEL */ -+ -+#define DEFINE_RHEL_MACHINE_LATEST(m, n, s, latest) \ -+ static void rhel##m##n##s##_virt_class_init(ObjectClass *oc, \ -+ void *data) \ -+ { \ -+ MachineClass *mc = MACHINE_CLASS(oc); \ -+ rhel##m##n##s##_virt_options(mc); \ -+ mc->desc = "RHEL " # m "." # n "." # s " ARM Virtual Machine"; \ -+ if (latest) { \ -+ mc->alias = "virt"; \ -+ mc->is_default = 1; \ -+ } \ -+ } \ -+ static const TypeInfo rhel##m##n##s##_machvirt_info = { \ -+ .name = MACHINE_TYPE_NAME("virt-rhel" # m "." # n "." # s), \ -+ .parent = TYPE_RHEL_MACHINE, \ -+ .class_init = rhel##m##n##s##_virt_class_init, \ -+ }; \ -+ static void rhel##m##n##s##_machvirt_init(void) \ -+ { \ -+ type_register_static(&rhel##m##n##s##_machvirt_info); \ -+ } \ -+ type_init(rhel##m##n##s##_machvirt_init); -+ -+#define DEFINE_RHEL_MACHINE_AS_LATEST(major, minor, subminor) \ -+ DEFINE_RHEL_MACHINE_LATEST(major, minor, subminor, true) -+#define DEFINE_RHEL_MACHINE(major, minor, subminor) \ -+ DEFINE_RHEL_MACHINE_LATEST(major, minor, subminor, false) -+ -+/* 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 */ - #define NUM_IRQS 256 -@@ -2250,6 +2292,7 @@ static void machvirt_init(MachineState *machine) - qemu_add_machine_init_done_notifier(&vms->machine_done); - } - -+#if 0 /* Disabled for Red Hat Enterprise Linux */ - static bool virt_get_secure(Object *obj, Error **errp) - { - VirtMachineState *vms = VIRT_MACHINE(obj); -@@ -2277,6 +2320,7 @@ static void virt_set_virt(Object *obj, bool value, Error **errp) - - vms->virt = value; - } -+#endif /* disabled for RHEL */ - - static bool virt_get_highmem(Object *obj, Error **errp) - { -@@ -2402,6 +2446,7 @@ static void virt_set_ras(Object *obj, bool value, Error **errp) - vms->ras = value; - } - -+#if 0 /* Disabled for Red Hat Enterprise Linux */ - static bool virt_get_mte(Object *obj, Error **errp) - { - VirtMachineState *vms = VIRT_MACHINE(obj); -@@ -2415,6 +2460,7 @@ static void virt_set_mte(Object *obj, bool value, Error **errp) - - vms->mte = value; - } -+#endif /* disabled for RHEL */ - - static char *virt_get_gic_version(Object *obj, Error **errp) - { -@@ -2818,6 +2864,7 @@ static int virt_kvm_type(MachineState *ms, const char *type_str) - return fixed_ipa ? 0 : requested_pa_size; - } - -+#if 0 /* Disabled for Red Hat Enterprise Linux */ - static void virt_machine_class_init(ObjectClass *oc, void *data) - { - MachineClass *mc = MACHINE_CLASS(oc); -@@ -3206,3 +3253,188 @@ static void virt_machine_2_6_options(MachineClass *mc) - vmc->no_pmu = true; - } - DEFINE_VIRT_MACHINE(2, 6) -+#endif /* disabled for RHEL */ -+ -+static void rhel_machine_class_init(ObjectClass *oc, void *data) -+{ -+ MachineClass *mc = MACHINE_CLASS(oc); -+ HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(oc); -+ -+ mc->family = "virt-rhel-Z"; -+ mc->init = machvirt_init; -+ /* Maximum supported VCPU count for all virt-rhel* machines */ -+ mc->max_cpus = 384; -+#ifdef CONFIG_TPM -+ machine_class_allow_dynamic_sysbus_dev(mc, TYPE_TPM_TIS_SYSBUS); -+#endif -+ mc->block_default_type = IF_VIRTIO; -+ mc->no_cdrom = 1; -+ mc->pci_allow_0_address = true; -+ /* We know we will never create a pre-ARMv7 CPU which needs 1K pages */ -+ mc->minimum_page_bits = 12; -+ mc->possible_cpu_arch_ids = virt_possible_cpu_arch_ids; -+ mc->cpu_index_to_instance_props = virt_cpu_index_to_props; -+ mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a57"); -+ mc->get_default_cpu_node_id = virt_get_default_cpu_node_id; -+ mc->kvm_type = virt_kvm_type; -+ assert(!mc->get_hotplug_handler); -+ mc->get_hotplug_handler = virt_machine_get_hotplug_handler; -+ hc->pre_plug = virt_machine_device_pre_plug_cb; -+ hc->plug = virt_machine_device_plug_cb; -+ hc->unplug_request = virt_machine_device_unplug_request_cb; -+ hc->unplug = virt_machine_device_unplug_cb; -+ mc->nvdimm_supported = true; -+ mc->auto_enable_numa_with_memhp = true; -+ mc->auto_enable_numa_with_memdev = true; -+ mc->default_ram_id = "mach-virt.ram"; -+ -+ object_class_property_add(oc, "acpi", "OnOffAuto", -+ virt_get_acpi, virt_set_acpi, -+ NULL, NULL); -+ object_class_property_set_description(oc, "acpi", -+ "Enable ACPI"); -+ -+ object_class_property_add_bool(oc, "highmem", virt_get_highmem, -+ virt_set_highmem); -+ object_class_property_set_description(oc, "highmem", -+ "Set on/off to enable/disable using " -+ "physical address space above 32 bits"); -+ -+ object_class_property_add_str(oc, "gic-version", virt_get_gic_version, -+ virt_set_gic_version); -+ object_class_property_set_description(oc, "gic-version", -+ "Set GIC version. " -+ "Valid values are 2, 3, host and max"); -+ -+ object_class_property_add_str(oc, "iommu", virt_get_iommu, virt_set_iommu); -+ object_class_property_set_description(oc, "iommu", -+ "Set the IOMMU type. " -+ "Valid values are none and smmuv3"); -+ -+ object_class_property_add_bool(oc, "default-bus-bypass-iommu", -+ virt_get_default_bus_bypass_iommu, -+ virt_set_default_bus_bypass_iommu); -+ object_class_property_set_description(oc, "default-bus-bypass-iommu", -+ "Set on/off to enable/disable " -+ "bypass_iommu for default root bus"); -+ -+ object_class_property_add_bool(oc, "ras", virt_get_ras, -+ virt_set_ras); -+ object_class_property_set_description(oc, "ras", -+ "Set on/off to enable/disable reporting host memory errors " -+ "to a KVM guest using ACPI and guest external abort exceptions"); -+ -+ object_class_property_add_bool(oc, "its", virt_get_its, -+ virt_set_its); -+ object_class_property_set_description(oc, "its", -+ "Set on/off to enable/disable " -+ "ITS instantiation"); -+ -+ object_class_property_add_str(oc, "x-oem-id", -+ virt_get_oem_id, -+ virt_set_oem_id); -+ object_class_property_set_description(oc, "x-oem-id", -+ "Override the default value of field OEMID " -+ "in ACPI table header." -+ "The string may be up to 6 bytes in size"); -+ -+ -+ object_class_property_add_str(oc, "x-oem-table-id", -+ virt_get_oem_table_id, -+ virt_set_oem_table_id); -+ object_class_property_set_description(oc, "x-oem-table-id", -+ "Override the default value of field OEM Table ID " -+ "in ACPI table header." -+ "The string may be up to 8 bytes in size"); -+ -+ object_class_property_add_bool(oc, "dtb-kaslr-seed", -+ virt_get_dtb_kaslr_seed, -+ virt_set_dtb_kaslr_seed); -+ object_class_property_set_description(oc, "dtb-kaslr-seed", -+ "Set off to disable passing of kaslr-seed " -+ "dtb node to guest"); -+} -+ -+static void rhel_virt_instance_init(Object *obj) -+{ -+ VirtMachineState *vms = VIRT_MACHINE(obj); -+ VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms); -+ -+ /* EL3 is disabled by default and non-configurable for RHEL */ -+ vms->secure = false; -+ -+ /* EL2 is disabled by default and non-configurable for RHEL */ -+ vms->virt = false; -+ -+ /* High memory is enabled by default */ -+ vms->highmem = true; -+ vms->gic_version = VIRT_GIC_VERSION_NOSEL; -+ -+ vms->highmem_ecam = !vmc->no_highmem_ecam; -+ -+ if (vmc->no_its) { -+ vms->its = false; -+ } else { -+ /* Default allows ITS instantiation */ -+ vms->its = true; -+ -+ if (vmc->no_tcg_its) { -+ vms->tcg_its = false; -+ } else { -+ vms->tcg_its = true; -+ } -+ } -+ -+ /* Default disallows iommu instantiation */ -+ vms->iommu = VIRT_IOMMU_NONE; -+ -+ /* The default root bus is attached to iommu by default */ -+ vms->default_bus_bypass_iommu = false; -+ -+ /* Default disallows RAS instantiation and is non-configurable for RHEL */ -+ vms->ras = false; -+ -+ /* MTE is disabled by default and non-configurable for RHEL */ -+ vms->mte = false; -+ -+ /* Supply a kaslr-seed by default */ -+ vms->dtb_kaslr_seed = true; -+ -+ vms->irqmap = a15irqmap; -+ -+ virt_flash_create(vms); -+ -+ vms->oem_id = g_strndup(ACPI_BUILD_APPNAME6, 6); -+ vms->oem_table_id = g_strndup(ACPI_BUILD_APPNAME8, 8); -+} -+ -+static const TypeInfo rhel_machine_info = { -+ .name = TYPE_RHEL_MACHINE, -+ .parent = TYPE_MACHINE, -+ .abstract = true, -+ .instance_size = sizeof(VirtMachineState), -+ .class_size = sizeof(VirtMachineClass), -+ .class_init = rhel_machine_class_init, -+ .instance_init = rhel_virt_instance_init, -+ .interfaces = (InterfaceInfo[]) { -+ { TYPE_HOTPLUG_HANDLER }, -+ { } -+ }, -+}; -+ -+static void rhel_machine_init(void) -+{ -+ type_register_static(&rhel_machine_info); -+} -+type_init(rhel_machine_init); -+ -+static void rhel900_virt_options(MachineClass *mc) -+{ -+ VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc)); -+ -+ compat_props_add(mc->compat_props, arm_rhel_compat, arm_rhel_compat_len); -+ -+ /* Disable FEAT_LPA2 since old kernels (<= v5.12) don't boot with that feature */ -+ vmc->no_tcg_lpa2 = true; -+} -+DEFINE_RHEL_MACHINE_AS_LATEST(9, 0, 0) -diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h -index 7e76ee2619..9b1efe8f0e 100644 ---- a/include/hw/arm/virt.h -+++ b/include/hw/arm/virt.h -@@ -179,9 +179,17 @@ struct VirtMachineState { - - #define VIRT_ECAM_ID(high) (high ? VIRT_HIGH_PCIE_ECAM : VIRT_PCIE_ECAM) - -+#if 0 /* disabled for Red Hat Enterprise Linux */ - #define TYPE_VIRT_MACHINE MACHINE_TYPE_NAME("virt") - OBJECT_DECLARE_TYPE(VirtMachineState, VirtMachineClass, VIRT_MACHINE) - -+#else -+#define TYPE_RHEL_MACHINE MACHINE_TYPE_NAME("virt-rhel") -+typedef struct VirtMachineClass VirtMachineClass; -+typedef struct VirtMachineState VirtMachineState; -+DECLARE_OBJ_CHECKERS(VirtMachineState, VirtMachineClass, VIRT_MACHINE, TYPE_RHEL_MACHINE) -+#endif -+ - void virt_acpi_setup(VirtMachineState *vms); - bool virt_is_acpi_enabled(VirtMachineState *vms); - --- -2.31.1 - diff --git a/SOURCES/0008-Add-ppc64-machine-types.patch b/SOURCES/0008-Add-ppc64-machine-types.patch deleted file mode 100644 index 103e944..0000000 --- a/SOURCES/0008-Add-ppc64-machine-types.patch +++ /dev/null @@ -1,380 +0,0 @@ -From f61b3d7dc000886e23943457ee9baf1d4cae43b4 Mon Sep 17 00:00:00 2001 -From: Miroslav Rezanina -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 - -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) ---- - 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.h | 1 + - target/ppc/kvm.c | 27 +++++ - target/ppc/kvm_ppc.h | 13 +++ - 7 files changed, 313 insertions(+), 1 deletion(-) - -diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c -index a4372ba189..5fdf8b506d 100644 ---- a/hw/ppc/spapr.c -+++ b/hw/ppc/spapr.c -@@ -4652,6 +4675,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 = { -@@ -4703,6 +4727,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-7.0 - */ -@@ -4830,6 +4855,7 @@ static void spapr_machine_4_1_class_options(MachineClass *mc) - } - - DEFINE_SPAPR_MACHINE(4_1, "4.1", false); -+#endif - - /* - * pseries-4.0 -@@ -4849,6 +4875,8 @@ static bool phb_placement_4_0(SpaprMachineState *spapr, uint32_t index, - *nv2atsd = 0; - 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); -@@ -5176,6 +5204,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 fcb5dfe792..ab8fb5bf62 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) - { -@@ -259,6 +260,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; -@@ -270,6 +272,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 f5c33dcc86..4a68e0a901 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, -diff --git a/target/ppc/compat.c b/target/ppc/compat.c -index 7949a24f5a..f207a9ba01 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.h b/target/ppc/cpu.h -index 047b24ba50..79c5ac50b9 100644 ---- a/target/ppc/cpu.h -+++ b/target/ppc/cpu.h -@@ -1462,6 +1462,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, --- -2.31.1 - diff --git a/SOURCES/0009-Add-s390x-machine-types.patch b/SOURCES/0009-Add-s390x-machine-types.patch deleted file mode 100644 index 2d8b554..0000000 --- a/SOURCES/0009-Add-s390x-machine-types.patch +++ /dev/null @@ -1,186 +0,0 @@ -From 680f343e58a50a99d17bc7dedd3ee90980912023 Mon Sep 17 00:00:00 2001 -From: Miroslav Rezanina -Date: Fri, 19 Oct 2018 13:47:32 +0200 -Subject: Add s390x machine types - -Adding changes to add RHEL machine types for s390x architecture. - -Signed-off-by: Miroslav Rezanina --- -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) ---- - hw/core/machine.c | 6 +++ - hw/s390x/s390-virtio-ccw.c | 104 ++++++++++++++++++++++++++++++++++++- - include/hw/boards.h | 2 + - 3 files changed, 111 insertions(+), 1 deletion(-) - -diff --git a/hw/core/machine.c b/hw/core/machine.c -index ea430d844e..77202a3570 100644 ---- a/hw/core/machine.c -+++ b/hw/core/machine.c -@@ -37,6 +37,12 @@ - #include "hw/virtio/virtio.h" - #include "hw/virtio/virtio-pci.h" - -+/* -+ * RHEL only: machine types for previous major releases are deprecated -+ */ -+const char *rhel_old_machine_deprecation = -+ "machine types for previous major releases are deprecated"; -+ - /* - * Mostly the same as hw_compat_6_0 and hw_compat_6_1 - */ -diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c -index 90480e7cf9..ec4176a1e0 100644 ---- a/hw/s390x/s390-virtio-ccw.c -+++ b/hw/s390x/s390-virtio-ccw.c -@@ -767,7 +767,7 @@ bool css_migration_enabled(void) - { \ - MachineClass *mc = MACHINE_CLASS(oc); \ - ccw_machine_##suffix##_class_options(mc); \ -- mc->desc = "VirtIO-ccw based S390 machine v" verstr; \ -+ mc->desc = "VirtIO-ccw based S390 machine " verstr; \ - if (latest) { \ - mc->alias = "s390-ccw-virtio"; \ - mc->is_default = true; \ -@@ -791,6 +791,7 @@ bool css_migration_enabled(void) - } \ - type_init(ccw_machine_register_##suffix) - -+#if 0 /* Disabled for Red Hat Enterprise Linux */ - static void ccw_machine_7_0_instance_options(MachineState *machine) - { - } -@@ -1115,6 +1116,107 @@ static void ccw_machine_2_4_class_options(MachineClass *mc) - compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat)); - } - DEFINE_CCW_MACHINE(2_4, "2.4", false); -+#endif -+ -+static void ccw_machine_rhel900_instance_options(MachineState *machine) -+{ -+} -+ -+static void ccw_machine_rhel900_class_options(MachineClass *mc) -+{ -+} -+DEFINE_CCW_MACHINE(rhel900, "rhel9.0.0", true); -+ -+static void ccw_machine_rhel860_instance_options(MachineState *machine) -+{ -+ /* Note: The -rhel8.6.0 and -rhel9.0.0 machines are technically identical */ -+ ccw_machine_rhel900_instance_options(machine); -+} -+ -+static void ccw_machine_rhel860_class_options(MachineClass *mc) -+{ -+ ccw_machine_rhel900_class_options(mc); -+ -+ /* All RHEL machines for prior major releases are deprecated */ -+ mc->deprecation_reason = rhel_old_machine_deprecation; -+} -+DEFINE_CCW_MACHINE(rhel860, "rhel8.6.0", false); -+ -+static void ccw_machine_rhel850_instance_options(MachineState *machine) -+{ -+ static const S390FeatInit qemu_cpu_feat = { S390_FEAT_LIST_QEMU_V6_0 }; -+ -+ ccw_machine_rhel860_instance_options(machine); -+ -+ s390_set_qemu_cpu_model(0x2964, 13, 2, qemu_cpu_feat); -+ -+ s390_cpudef_featoff_greater(16, 1, S390_FEAT_NNPA); -+ s390_cpudef_featoff_greater(16, 1, S390_FEAT_VECTOR_PACKED_DECIMAL_ENH2); -+ s390_cpudef_featoff_greater(16, 1, S390_FEAT_BEAR_ENH); -+ s390_cpudef_featoff_greater(16, 1, S390_FEAT_RDP); -+ s390_cpudef_featoff_greater(16, 1, S390_FEAT_PAI); -+} -+ -+static void ccw_machine_rhel850_class_options(MachineClass *mc) -+{ -+ ccw_machine_rhel860_class_options(mc); -+ compat_props_add(mc->compat_props, hw_compat_rhel_8_5, hw_compat_rhel_8_5_len); -+ mc->smp_props.prefer_sockets = true; -+} -+DEFINE_CCW_MACHINE(rhel850, "rhel8.5.0", false); -+ -+static void ccw_machine_rhel840_instance_options(MachineState *machine) -+{ -+ ccw_machine_rhel850_instance_options(machine); -+} -+ -+static void ccw_machine_rhel840_class_options(MachineClass *mc) -+{ -+ ccw_machine_rhel850_class_options(mc); -+ compat_props_add(mc->compat_props, hw_compat_rhel_8_4, hw_compat_rhel_8_4_len); -+} -+DEFINE_CCW_MACHINE(rhel840, "rhel8.4.0", false); -+ -+static void ccw_machine_rhel820_instance_options(MachineState *machine) -+{ -+ ccw_machine_rhel840_instance_options(machine); -+} -+ -+static void ccw_machine_rhel820_class_options(MachineClass *mc) -+{ -+ ccw_machine_rhel840_class_options(mc); -+ mc->fixup_ram_size = s390_fixup_ram_size; -+ /* we did not publish a rhel8.3.0 machine */ -+ compat_props_add(mc->compat_props, hw_compat_rhel_8_3, hw_compat_rhel_8_3_len); -+ compat_props_add(mc->compat_props, hw_compat_rhel_8_2, hw_compat_rhel_8_2_len); -+} -+DEFINE_CCW_MACHINE(rhel820, "rhel8.2.0", false); -+ -+static void ccw_machine_rhel760_instance_options(MachineState *machine) -+{ -+ static const S390FeatInit qemu_cpu_feat = { S390_FEAT_LIST_QEMU_V3_1 }; -+ -+ ccw_machine_rhel820_instance_options(machine); -+ -+ s390_set_qemu_cpu_model(0x2827, 12, 2, qemu_cpu_feat); -+ -+ /* The multiple-epoch facility was not available with rhel7.6.0 on z14GA1 */ -+ s390_cpudef_featoff(14, 1, S390_FEAT_MULTIPLE_EPOCH); -+ s390_cpudef_featoff(14, 1, S390_FEAT_PTFF_QSIE); -+ s390_cpudef_featoff(14, 1, S390_FEAT_PTFF_QTOUE); -+ s390_cpudef_featoff(14, 1, S390_FEAT_PTFF_STOE); -+ s390_cpudef_featoff(14, 1, S390_FEAT_PTFF_STOUE); -+} -+ -+static void ccw_machine_rhel760_class_options(MachineClass *mc) -+{ -+ ccw_machine_rhel820_class_options(mc); -+ /* We never published the s390x version of RHEL-AV 8.0 and 8.1, so add this here */ -+ compat_props_add(mc->compat_props, hw_compat_rhel_8_1, hw_compat_rhel_8_1_len); -+ compat_props_add(mc->compat_props, hw_compat_rhel_8_0, hw_compat_rhel_8_0_len); -+ compat_props_add(mc->compat_props, hw_compat_rhel_7_6, hw_compat_rhel_7_6_len); -+} -+DEFINE_CCW_MACHINE(rhel760, "rhel7.6.0", false); - - static void ccw_machine_register_types(void) - { -diff --git a/include/hw/boards.h b/include/hw/boards.h -index c90a19b4d1..bf59275f18 100644 ---- a/include/hw/boards.h -+++ b/include/hw/boards.h -@@ -470,4 +470,6 @@ extern const size_t hw_compat_rhel_8_0_len; - extern GlobalProperty hw_compat_rhel_7_6[]; - extern const size_t hw_compat_rhel_7_6_len; - -+extern const char *rhel_old_machine_deprecation; -+ - #endif --- -2.31.1 - diff --git a/SOURCES/0010-Add-x86_64-machine-types.patch b/SOURCES/0010-Add-x86_64-machine-types.patch deleted file mode 100644 index 7c48967..0000000 --- a/SOURCES/0010-Add-x86_64-machine-types.patch +++ /dev/null @@ -1,714 +0,0 @@ -From 427a575ca57966bc72e1ebf218081da530d435d7 Mon Sep 17 00:00:00 2001 -From: Miroslav Rezanina -Date: Fri, 19 Oct 2018 13:10:31 +0200 -Subject: Add x86_64 machine types - -Adding changes to add RHEL machine types for x86_64 architecture. - -Signed-off-by: Miroslav Rezanina - -Rebase notes (6.1.0): -- Update qemu64 cpu spec - -Rebase notes (7.0.0): -- Reset alias for all machine-types except latest one - -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 ---- - hw/core/machine.c | 10 ++ - hw/i386/pc.c | 135 +++++++++++++++++++++- - hw/i386/pc_piix.c | 79 ++++++++++++- - hw/i386/pc_q35.c | 227 ++++++++++++++++++++++++++++++++++++- - hw/s390x/s390-virtio-ccw.c | 1 + - include/hw/boards.h | 5 + - include/hw/i386/pc.h | 24 ++++ - target/i386/kvm/kvm-cpu.c | 1 + - target/i386/kvm/kvm.c | 4 + - tests/qtest/pvpanic-test.c | 5 +- - 10 files changed, 484 insertions(+), 7 deletions(-) - -diff --git a/hw/core/machine.c b/hw/core/machine.c -index 77202a3570..28989b6e7b 100644 ---- a/hw/core/machine.c -+++ b/hw/core/machine.c -@@ -43,6 +43,16 @@ - const char *rhel_old_machine_deprecation = - "machine types for previous major releases are deprecated"; - -+GlobalProperty hw_compat_rhel_8_6[] = { -+ /* hw_compat_rhel_8_6 bz 2065589 */ -+ /* -+ * vhost-vsock device in RHEL 8 kernels doesn't support seqpacket, so -+ * we need do disable it downstream on the latest hw_compat_rhel_8. -+ */ -+ { "vhost-vsock-device", "seqpacket", "off" }, -+}; -+const size_t hw_compat_rhel_8_6_len = G_N_ELEMENTS(hw_compat_rhel_8_6); -+ - /* - * Mostly the same as hw_compat_6_0 and hw_compat_6_1 - */ -diff --git a/hw/i386/pc.c b/hw/i386/pc.c -index fd55fc725c..263d882af6 100644 ---- a/hw/i386/pc.c -+++ b/hw/i386/pc.c -@@ -375,6 +375,137 @@ GlobalProperty pc_compat_1_4[] = { - }; - const size_t pc_compat_1_4_len = G_N_ELEMENTS(pc_compat_1_4); - -+/* This macro is for changes to properties that are RHEL specific, -+ * different to the current upstream and to be applied to the latest -+ * machine type. -+ */ -+GlobalProperty pc_rhel_compat[] = { -+ { TYPE_X86_CPU, "host-phys-bits", "on" }, -+ { TYPE_X86_CPU, "host-phys-bits-limit", "48" }, -+ { TYPE_X86_CPU, "vmx-entry-load-perf-global-ctrl", "off" }, -+ { TYPE_X86_CPU, "vmx-exit-load-perf-global-ctrl", "off" }, -+ /* bz 1508330 */ -+ { "vfio-pci", "x-no-geforce-quirks", "on" }, -+ /* bz 1941397 */ -+ { TYPE_X86_CPU, "kvm-asyncpf-int", "on" }, -+}; -+const size_t pc_rhel_compat_len = G_N_ELEMENTS(pc_rhel_compat); -+ -+GlobalProperty pc_rhel_8_5_compat[] = { -+ /* pc_rhel_8_5_compat from pc_compat_6_0 */ -+ { "qemu64" "-" TYPE_X86_CPU, "family", "6" }, -+ /* pc_rhel_8_5_compat from pc_compat_6_0 */ -+ { "qemu64" "-" TYPE_X86_CPU, "model", "6" }, -+ /* pc_rhel_8_5_compat from pc_compat_6_0 */ -+ { "qemu64" "-" TYPE_X86_CPU, "stepping", "3" }, -+ /* pc_rhel_8_5_compat from pc_compat_6_0 */ -+ { TYPE_X86_CPU, "x-vendor-cpuid-only", "off" }, -+ /* pc_rhel_8_5_compat from pc_compat_6_0 */ -+ { "ICH9-LPC", ACPI_PM_PROP_ACPI_PCIHP_BRIDGE, "off" }, -+ -+ /* pc_rhel_8_5_compat from pc_compat_6_1 */ -+ { TYPE_X86_CPU, "hv-version-id-build", "0x1bbc" }, -+ /* pc_rhel_8_5_compat from pc_compat_6_1 */ -+ { TYPE_X86_CPU, "hv-version-id-major", "0x0006" }, -+ /* pc_rhel_8_5_compat from pc_compat_6_1 */ -+ { TYPE_X86_CPU, "hv-version-id-minor", "0x0001" }, -+}; -+const size_t pc_rhel_8_5_compat_len = G_N_ELEMENTS(pc_rhel_8_5_compat); -+ -+GlobalProperty pc_rhel_8_4_compat[] = { -+ /* pc_rhel_8_4_compat from pc_compat_5_2 */ -+ { "ICH9-LPC", "x-smi-cpu-hotunplug", "off" }, -+ { TYPE_X86_CPU, "kvm-asyncpf-int", "off" }, -+}; -+const size_t pc_rhel_8_4_compat_len = G_N_ELEMENTS(pc_rhel_8_4_compat); -+ -+GlobalProperty pc_rhel_8_3_compat[] = { -+ /* pc_rhel_8_3_compat from pc_compat_5_1 */ -+ { "ICH9-LPC", "x-smi-cpu-hotplug", "off" }, -+}; -+const size_t pc_rhel_8_3_compat_len = G_N_ELEMENTS(pc_rhel_8_3_compat); -+ -+GlobalProperty pc_rhel_8_2_compat[] = { -+ /* pc_rhel_8_2_compat from pc_compat_4_2 */ -+ { "mch", "smbase-smram", "off" }, -+}; -+const size_t pc_rhel_8_2_compat_len = G_N_ELEMENTS(pc_rhel_8_2_compat); -+ -+/* pc_rhel_8_1_compat is empty since pc_4_1_compat is */ -+GlobalProperty pc_rhel_8_1_compat[] = { }; -+const size_t pc_rhel_8_1_compat_len = G_N_ELEMENTS(pc_rhel_8_1_compat); -+ -+GlobalProperty pc_rhel_8_0_compat[] = { -+ /* pc_rhel_8_0_compat from pc_compat_3_1 */ -+ { "intel-iommu", "dma-drain", "off" }, -+ /* pc_rhel_8_0_compat from pc_compat_3_1 */ -+ { "Opteron_G3" "-" TYPE_X86_CPU, "rdtscp", "off" }, -+ /* pc_rhel_8_0_compat from pc_compat_3_1 */ -+ { "Opteron_G4" "-" TYPE_X86_CPU, "rdtscp", "off" }, -+ /* pc_rhel_8_0_compat from pc_compat_3_1 */ -+ { "Opteron_G4" "-" TYPE_X86_CPU, "npt", "off" }, -+ /* pc_rhel_8_0_compat from pc_compat_3_1 */ -+ { "Opteron_G4" "-" TYPE_X86_CPU, "nrip-save", "off" }, -+ /* pc_rhel_8_0_compat from pc_compat_3_1 */ -+ { "Opteron_G5" "-" TYPE_X86_CPU, "rdtscp", "off" }, -+ /* pc_rhel_8_0_compat from pc_compat_3_1 */ -+ { "Opteron_G5" "-" TYPE_X86_CPU, "npt", "off" }, -+ /* pc_rhel_8_0_compat from pc_compat_3_1 */ -+ { "Opteron_G5" "-" TYPE_X86_CPU, "nrip-save", "off" }, -+ /* pc_rhel_8_0_compat from pc_compat_3_1 */ -+ { "EPYC" "-" TYPE_X86_CPU, "npt", "off" }, -+ /* pc_rhel_8_0_compat from pc_compat_3_1 */ -+ { "EPYC" "-" TYPE_X86_CPU, "nrip-save", "off" }, -+ /* pc_rhel_8_0_compat from pc_compat_3_1 */ -+ { "EPYC-IBPB" "-" TYPE_X86_CPU, "npt", "off" }, -+ /* pc_rhel_8_0_compat from pc_compat_3_1 */ -+ { "EPYC-IBPB" "-" TYPE_X86_CPU, "nrip-save", "off" }, -+ /** The mpx=on entries from pc_compat_3_1 are in pc_rhel_7_6_compat **/ -+ /* pc_rhel_8_0_compat from pc_compat_3_1 */ -+ { "Cascadelake-Server" "-" TYPE_X86_CPU, "stepping", "5" }, -+ /* pc_rhel_8_0_compat from pc_compat_3_1 */ -+ { TYPE_X86_CPU, "x-intel-pt-auto-level", "off" }, -+}; -+const size_t pc_rhel_8_0_compat_len = G_N_ELEMENTS(pc_rhel_8_0_compat); -+ -+/* Similar to PC_COMPAT_3_0 + PC_COMPAT_2_12, but: -+ * all of the 2_12 stuff was already in 7.6 from bz 1481253 -+ * x-migrate-smi-count comes from PC_COMPAT_2_11 but -+ * is really tied to kernel version so keep it off on 7.x -+ * machine types irrespective of host. -+ */ -+GlobalProperty pc_rhel_7_6_compat[] = { -+ /* pc_rhel_7_6_compat from pc_compat_3_0 */ -+ { TYPE_X86_CPU, "x-hv-synic-kvm-only", "on" }, -+ /* pc_rhel_7_6_compat from pc_compat_3_0 */ -+ { "Skylake-Server" "-" TYPE_X86_CPU, "pku", "off" }, -+ /* pc_rhel_7_6_compat from pc_compat_3_0 */ -+ { "Skylake-Server-IBRS" "-" TYPE_X86_CPU, "pku", "off" }, -+ /* pc_rhel_7_6_compat from pc_compat_2_11 */ -+ { TYPE_X86_CPU, "x-migrate-smi-count", "off" }, -+ /* pc_rhel_7_6_compat from pc_compat_2_11 */ -+ { "Skylake-Client" "-" TYPE_X86_CPU, "mpx", "on" }, -+ /* pc_rhel_7_6_compat from pc_compat_2_11 */ -+ { "Skylake-Client-IBRS" "-" TYPE_X86_CPU, "mpx", "on" }, -+ /* pc_rhel_7_6_compat from pc_compat_2_11 */ -+ { "Skylake-Server" "-" TYPE_X86_CPU, "mpx", "on" }, -+ /* pc_rhel_7_6_compat from pc_compat_2_11 */ -+ { "Skylake-Server-IBRS" "-" TYPE_X86_CPU, "mpx", "on" }, -+ /* pc_rhel_7_6_compat from pc_compat_2_11 */ -+ { "Cascadelake-Server" "-" TYPE_X86_CPU, "mpx", "on" }, -+ /* pc_rhel_7_6_compat from pc_compat_2_11 */ -+ { "Icelake-Client" "-" TYPE_X86_CPU, "mpx", "on" }, -+ /* pc_rhel_7_6_compat from pc_compat_2_11 */ -+ { "Icelake-Server" "-" TYPE_X86_CPU, "mpx", "on" }, -+}; -+const size_t pc_rhel_7_6_compat_len = G_N_ELEMENTS(pc_rhel_7_6_compat); -+ -+/* -+ * The PC_RHEL_*_COMPAT serve the same purpose for RHEL-7 machine -+ * types as the PC_COMPAT_* do for upstream types. -+ * PC_RHEL_7_*_COMPAT apply both to i440fx and q35 types. -+ */ -+ - GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) - { - GSIState *s; -@@ -1738,6 +1869,7 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) - pcmc->pvh_enabled = true; - pcmc->kvmclock_create_always = true; - assert(!mc->get_hotplug_handler); -+ mc->async_pf_vmexit_disable = false; - mc->get_hotplug_handler = pc_get_hotplug_handler; - mc->hotplug_allowed = pc_hotplug_allowed; - mc->cpu_index_to_instance_props = x86_cpu_index_to_props; -@@ -1748,7 +1880,8 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) - mc->has_hotpluggable_cpus = true; - mc->default_boot_order = "cad"; - mc->block_default_type = IF_IDE; -- mc->max_cpus = 255; -+ /* 240: max CPU count for RHEL */ -+ mc->max_cpus = 240; - mc->reset = pc_machine_reset; - mc->wakeup = pc_machine_wakeup; - hc->pre_plug = pc_machine_device_pre_plug_cb; -diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c -index c797e98312..0cacc0d623 100644 ---- a/hw/i386/pc_piix.c -+++ b/hw/i386/pc_piix.c -@@ -50,6 +50,7 @@ - #include "qapi/error.h" - #include "qemu/error-report.h" - #include "sysemu/xen.h" -+#include "migration/migration.h" - #ifdef CONFIG_XEN - #include - #include "hw/xen/xen_pt.h" -@@ -174,8 +175,8 @@ static void pc_init1(MachineState *machine, - if (pcmc->smbios_defaults) { - MachineClass *mc = MACHINE_GET_CLASS(machine); - /* These values are guest ABI, do not change */ -- smbios_set_defaults("QEMU", "Standard PC (i440FX + PIIX, 1996)", -- mc->name, pcmc->smbios_legacy_mode, -+ smbios_set_defaults("Red Hat", "KVM", -+ mc->desc, pcmc->smbios_legacy_mode, - pcmc->smbios_uuid_encoded, - pcmc->smbios_stream_product, - pcmc->smbios_stream_version, -@@ -314,6 +315,7 @@ static void pc_init1(MachineState *machine, - * hw_compat_*, pc_compat_*, or * pc_*_machine_options(). - */ - -+#if 0 /* Disabled for Red Hat Enterprise Linux */ - static void pc_compat_2_3_fn(MachineState *machine) - { - X86MachineState *x86ms = X86_MACHINE(machine); -@@ -967,3 +969,76 @@ static void xenfv_3_1_machine_options(MachineClass *m) - DEFINE_PC_MACHINE(xenfv, "xenfv-3.1", pc_xen_hvm_init, - xenfv_3_1_machine_options); - #endif -+#endif /* Disabled for Red Hat Enterprise Linux */ -+ -+/* Red Hat Enterprise Linux machine types */ -+ -+/* Options for the latest rhel7 machine type */ -+static void pc_machine_rhel7_options(MachineClass *m) -+{ -+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m); -+ m->family = "pc_piix_Y"; -+ m->default_machine_opts = "firmware=bios-256k.bin,hpet=off"; -+ pcmc->default_nic_model = "e1000"; -+ pcmc->pci_root_uid = 0; -+ m->default_display = "std"; -+ m->no_parallel = 1; -+ m->numa_mem_supported = true; -+ m->auto_enable_numa_with_memdev = false; -+ machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE); -+ compat_props_add(m->compat_props, pc_rhel_compat, pc_rhel_compat_len); -+ m->alias = "pc"; -+ m->is_default = 1; -+ m->smp_props.prefer_sockets = true; -+} -+ -+static void pc_init_rhel760(MachineState *machine) -+{ -+ pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \ -+ TYPE_I440FX_PCI_DEVICE); -+} -+ -+static void pc_machine_rhel760_options(MachineClass *m) -+{ -+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m); -+ pc_machine_rhel7_options(m); -+ m->desc = "RHEL 7.6.0 PC (i440FX + PIIX, 1996)"; -+ m->async_pf_vmexit_disable = true; -+ m->smbus_no_migration_support = true; -+ -+ /* All RHEL machines for prior major releases are deprecated */ -+ m->deprecation_reason = rhel_old_machine_deprecation; -+ -+ pcmc->pvh_enabled = false; -+ pcmc->default_cpu_version = CPU_VERSION_LEGACY; -+ pcmc->kvmclock_create_always = false; -+ /* From pc_i440fx_5_1_machine_options() */ -+ pcmc->pci_root_uid = 1; -+ compat_props_add(m->compat_props, hw_compat_rhel_8_6, -+ hw_compat_rhel_8_6_len); -+ compat_props_add(m->compat_props, hw_compat_rhel_8_5, -+ hw_compat_rhel_8_5_len); -+ compat_props_add(m->compat_props, pc_rhel_8_5_compat, -+ pc_rhel_8_5_compat_len); -+ compat_props_add(m->compat_props, hw_compat_rhel_8_4, -+ hw_compat_rhel_8_4_len); -+ compat_props_add(m->compat_props, pc_rhel_8_4_compat, -+ pc_rhel_8_4_compat_len); -+ compat_props_add(m->compat_props, hw_compat_rhel_8_3, -+ hw_compat_rhel_8_3_len); -+ compat_props_add(m->compat_props, pc_rhel_8_3_compat, -+ pc_rhel_8_3_compat_len); -+ compat_props_add(m->compat_props, hw_compat_rhel_8_2, -+ hw_compat_rhel_8_2_len); -+ compat_props_add(m->compat_props, pc_rhel_8_2_compat, -+ pc_rhel_8_2_compat_len); -+ compat_props_add(m->compat_props, hw_compat_rhel_8_1, hw_compat_rhel_8_1_len); -+ compat_props_add(m->compat_props, pc_rhel_8_1_compat, pc_rhel_8_1_compat_len); -+ compat_props_add(m->compat_props, hw_compat_rhel_8_0, hw_compat_rhel_8_0_len); -+ compat_props_add(m->compat_props, pc_rhel_8_0_compat, pc_rhel_8_0_compat_len); -+ compat_props_add(m->compat_props, hw_compat_rhel_7_6, hw_compat_rhel_7_6_len); -+ compat_props_add(m->compat_props, pc_rhel_7_6_compat, pc_rhel_7_6_compat_len); -+} -+ -+DEFINE_PC_MACHINE(rhel760, "pc-i440fx-rhel7.6.0", pc_init_rhel760, -+ pc_machine_rhel760_options); -diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c -index b695f88c45..157160e069 100644 ---- a/hw/i386/pc_q35.c -+++ b/hw/i386/pc_q35.c -@@ -197,8 +197,8 @@ static void pc_q35_init(MachineState *machine) - - if (pcmc->smbios_defaults) { - /* These values are guest ABI, do not change */ -- smbios_set_defaults("QEMU", "Standard PC (Q35 + ICH9, 2009)", -- mc->name, pcmc->smbios_legacy_mode, -+ smbios_set_defaults("Red Hat", "KVM", -+ mc->desc, pcmc->smbios_legacy_mode, - pcmc->smbios_uuid_encoded, - pcmc->smbios_stream_product, - pcmc->smbios_stream_version, -@@ -342,6 +342,7 @@ static void pc_q35_init(MachineState *machine) - DEFINE_PC_MACHINE(suffix, name, pc_init_##suffix, optionfn) - - -+#if 0 /* Disabled for Red Hat Enterprise Linux */ - static void pc_q35_machine_options(MachineClass *m) - { - PCMachineClass *pcmc = PC_MACHINE_CLASS(m); -@@ -631,3 +632,225 @@ static void pc_q35_2_4_machine_options(MachineClass *m) - - DEFINE_Q35_MACHINE(v2_4, "pc-q35-2.4", NULL, - pc_q35_2_4_machine_options); -+#endif /* Disabled for Red Hat Enterprise Linux */ -+ -+/* Red Hat Enterprise Linux machine types */ -+ -+/* Options for the latest rhel q35 machine type */ -+static void pc_q35_machine_rhel_options(MachineClass *m) -+{ -+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m); -+ pcmc->default_nic_model = "e1000e"; -+ pcmc->pci_root_uid = 0; -+ m->family = "pc_q35_Z"; -+ m->units_per_default_bus = 1; -+ m->default_machine_opts = "firmware=bios-256k.bin,hpet=off"; -+ m->default_display = "std"; -+ m->no_floppy = 1; -+ m->no_parallel = 1; -+ pcmc->default_cpu_version = 1; -+ machine_class_allow_dynamic_sysbus_dev(m, TYPE_AMD_IOMMU_DEVICE); -+ machine_class_allow_dynamic_sysbus_dev(m, TYPE_INTEL_IOMMU_DEVICE); -+ machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE); -+ m->alias = "q35"; -+ m->max_cpus = 710; -+ compat_props_add(m->compat_props, pc_rhel_compat, pc_rhel_compat_len); -+} -+ -+static void pc_q35_init_rhel900(MachineState *machine) -+{ -+ pc_q35_init(machine); -+} -+ -+static void pc_q35_machine_rhel900_options(MachineClass *m) -+{ -+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m); -+ pc_q35_machine_rhel_options(m); -+ m->desc = "RHEL-9.0.0 PC (Q35 + ICH9, 2009)"; -+ pcmc->smbios_stream_product = "RHEL"; -+ pcmc->smbios_stream_version = "9.0.0"; -+} -+ -+DEFINE_PC_MACHINE(q35_rhel900, "pc-q35-rhel9.0.0", pc_q35_init_rhel900, -+ pc_q35_machine_rhel900_options); -+ -+static void pc_q35_init_rhel860(MachineState *machine) -+{ -+ pc_q35_init(machine); -+} -+ -+static void pc_q35_machine_rhel860_options(MachineClass *m) -+{ -+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m); -+ pc_q35_machine_rhel900_options(m); -+ m->desc = "RHEL-8.6.0 PC (Q35 + ICH9, 2009)"; -+ m->alias = NULL; -+ -+ /* All RHEL machines for prior major releases are deprecated */ -+ m->deprecation_reason = rhel_old_machine_deprecation; -+ -+ pcmc->smbios_stream_product = "RHEL-AV"; -+ pcmc->smbios_stream_version = "8.6.0"; -+ compat_props_add(m->compat_props, hw_compat_rhel_8_6, -+ hw_compat_rhel_8_6_len); -+} -+ -+DEFINE_PC_MACHINE(q35_rhel860, "pc-q35-rhel8.6.0", pc_q35_init_rhel860, -+ pc_q35_machine_rhel860_options); -+ -+ -+static void pc_q35_init_rhel850(MachineState *machine) -+{ -+ pc_q35_init(machine); -+} -+ -+static void pc_q35_machine_rhel850_options(MachineClass *m) -+{ -+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m); -+ pc_q35_machine_rhel860_options(m); -+ m->desc = "RHEL-8.5.0 PC (Q35 + ICH9, 2009)"; -+ m->alias = NULL; -+ pcmc->smbios_stream_product = "RHEL-AV"; -+ pcmc->smbios_stream_version = "8.5.0"; -+ compat_props_add(m->compat_props, hw_compat_rhel_8_5, -+ hw_compat_rhel_8_5_len); -+ compat_props_add(m->compat_props, pc_rhel_8_5_compat, -+ pc_rhel_8_5_compat_len); -+ m->smp_props.prefer_sockets = true; -+} -+ -+DEFINE_PC_MACHINE(q35_rhel850, "pc-q35-rhel8.5.0", pc_q35_init_rhel850, -+ pc_q35_machine_rhel850_options); -+ -+ -+static void pc_q35_init_rhel840(MachineState *machine) -+{ -+ pc_q35_init(machine); -+} -+ -+static void pc_q35_machine_rhel840_options(MachineClass *m) -+{ -+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m); -+ pc_q35_machine_rhel850_options(m); -+ m->desc = "RHEL-8.4.0 PC (Q35 + ICH9, 2009)"; -+ m->alias = NULL; -+ pcmc->smbios_stream_product = "RHEL-AV"; -+ pcmc->smbios_stream_version = "8.4.0"; -+ compat_props_add(m->compat_props, hw_compat_rhel_8_4, -+ hw_compat_rhel_8_4_len); -+ compat_props_add(m->compat_props, pc_rhel_8_4_compat, -+ pc_rhel_8_4_compat_len); -+} -+ -+DEFINE_PC_MACHINE(q35_rhel840, "pc-q35-rhel8.4.0", pc_q35_init_rhel840, -+ pc_q35_machine_rhel840_options); -+ -+ -+static void pc_q35_init_rhel830(MachineState *machine) -+{ -+ pc_q35_init(machine); -+} -+ -+static void pc_q35_machine_rhel830_options(MachineClass *m) -+{ -+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m); -+ pc_q35_machine_rhel840_options(m); -+ m->desc = "RHEL-8.3.0 PC (Q35 + ICH9, 2009)"; -+ m->alias = NULL; -+ pcmc->smbios_stream_product = "RHEL-AV"; -+ pcmc->smbios_stream_version = "8.3.0"; -+ compat_props_add(m->compat_props, hw_compat_rhel_8_3, -+ hw_compat_rhel_8_3_len); -+ compat_props_add(m->compat_props, pc_rhel_8_3_compat, -+ pc_rhel_8_3_compat_len); -+ /* From pc_q35_5_1_machine_options() */ -+ pcmc->kvmclock_create_always = false; -+ /* From pc_q35_5_1_machine_options() */ -+ pcmc->pci_root_uid = 1; -+} -+ -+DEFINE_PC_MACHINE(q35_rhel830, "pc-q35-rhel8.3.0", pc_q35_init_rhel830, -+ pc_q35_machine_rhel830_options); -+ -+static void pc_q35_init_rhel820(MachineState *machine) -+{ -+ pc_q35_init(machine); -+} -+ -+static void pc_q35_machine_rhel820_options(MachineClass *m) -+{ -+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m); -+ pc_q35_machine_rhel830_options(m); -+ m->desc = "RHEL-8.2.0 PC (Q35 + ICH9, 2009)"; -+ m->alias = NULL; -+ m->numa_mem_supported = true; -+ m->auto_enable_numa_with_memdev = false; -+ pcmc->smbios_stream_product = "RHEL-AV"; -+ pcmc->smbios_stream_version = "8.2.0"; -+ compat_props_add(m->compat_props, hw_compat_rhel_8_2, -+ hw_compat_rhel_8_2_len); -+ compat_props_add(m->compat_props, pc_rhel_8_2_compat, -+ pc_rhel_8_2_compat_len); -+} -+ -+DEFINE_PC_MACHINE(q35_rhel820, "pc-q35-rhel8.2.0", pc_q35_init_rhel820, -+ pc_q35_machine_rhel820_options); -+ -+static void pc_q35_init_rhel810(MachineState *machine) -+{ -+ pc_q35_init(machine); -+} -+ -+static void pc_q35_machine_rhel810_options(MachineClass *m) -+{ -+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m); -+ pc_q35_machine_rhel820_options(m); -+ m->desc = "RHEL-8.1.0 PC (Q35 + ICH9, 2009)"; -+ m->alias = NULL; -+ pcmc->smbios_stream_product = NULL; -+ pcmc->smbios_stream_version = NULL; -+ compat_props_add(m->compat_props, hw_compat_rhel_8_1, hw_compat_rhel_8_1_len); -+ compat_props_add(m->compat_props, pc_rhel_8_1_compat, pc_rhel_8_1_compat_len); -+} -+ -+DEFINE_PC_MACHINE(q35_rhel810, "pc-q35-rhel8.1.0", pc_q35_init_rhel810, -+ pc_q35_machine_rhel810_options); -+ -+static void pc_q35_init_rhel800(MachineState *machine) -+{ -+ pc_q35_init(machine); -+} -+ -+static void pc_q35_machine_rhel800_options(MachineClass *m) -+{ -+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m); -+ pc_q35_machine_rhel810_options(m); -+ m->desc = "RHEL-8.0.0 PC (Q35 + ICH9, 2009)"; -+ m->smbus_no_migration_support = true; -+ m->alias = NULL; -+ pcmc->pvh_enabled = false; -+ pcmc->default_cpu_version = CPU_VERSION_LEGACY; -+ compat_props_add(m->compat_props, hw_compat_rhel_8_0, hw_compat_rhel_8_0_len); -+ compat_props_add(m->compat_props, pc_rhel_8_0_compat, pc_rhel_8_0_compat_len); -+} -+ -+DEFINE_PC_MACHINE(q35_rhel800, "pc-q35-rhel8.0.0", pc_q35_init_rhel800, -+ pc_q35_machine_rhel800_options); -+ -+static void pc_q35_init_rhel760(MachineState *machine) -+{ -+ pc_q35_init(machine); -+} -+ -+static void pc_q35_machine_rhel760_options(MachineClass *m) -+{ -+ pc_q35_machine_rhel800_options(m); -+ m->alias = NULL; -+ m->desc = "RHEL-7.6.0 PC (Q35 + ICH9, 2009)"; -+ m->async_pf_vmexit_disable = true; -+ compat_props_add(m->compat_props, hw_compat_rhel_7_6, hw_compat_rhel_7_6_len); -+ compat_props_add(m->compat_props, pc_rhel_7_6_compat, pc_rhel_7_6_compat_len); -+} -+ -+DEFINE_PC_MACHINE(q35_rhel760, "pc-q35-rhel7.6.0", pc_q35_init_rhel760, -+ pc_q35_machine_rhel760_options); -diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c -index ec4176a1e0..465a2a09d2 100644 ---- a/hw/s390x/s390-virtio-ccw.c -+++ b/hw/s390x/s390-virtio-ccw.c -@@ -1136,6 +1136,7 @@ static void ccw_machine_rhel860_instance_options(MachineState *machine) - static void ccw_machine_rhel860_class_options(MachineClass *mc) - { - ccw_machine_rhel900_class_options(mc); -+ compat_props_add(mc->compat_props, hw_compat_rhel_8_6, hw_compat_rhel_8_6_len); - - /* All RHEL machines for prior major releases are deprecated */ - mc->deprecation_reason = rhel_old_machine_deprecation; -diff --git a/include/hw/boards.h b/include/hw/boards.h -index bf59275f18..d1555665df 100644 ---- a/include/hw/boards.h -+++ b/include/hw/boards.h -@@ -266,6 +266,8 @@ struct MachineClass { - strList *allowed_dynamic_sysbus_devices; - bool auto_enable_numa_with_memhp; - bool auto_enable_numa_with_memdev; -+ /* RHEL only */ -+ bool async_pf_vmexit_disable; - bool ignore_boot_device_suffixes; - bool smbus_no_migration_support; - bool nvdimm_supported; -@@ -449,6 +451,9 @@ extern const size_t hw_compat_2_2_len; - extern GlobalProperty hw_compat_2_1[]; - extern const size_t hw_compat_2_1_len; - -+extern GlobalProperty hw_compat_rhel_8_6[]; -+extern const size_t hw_compat_rhel_8_6_len; -+ - extern GlobalProperty hw_compat_rhel_8_5[]; - extern const size_t hw_compat_rhel_8_5_len; - -diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h -index 91331059d9..419a6ec24b 100644 ---- a/include/hw/i386/pc.h -+++ b/include/hw/i386/pc.h -@@ -289,6 +289,30 @@ extern const size_t pc_compat_1_5_len; - extern GlobalProperty pc_compat_1_4[]; - extern const size_t pc_compat_1_4_len; - -+extern GlobalProperty pc_rhel_compat[]; -+extern const size_t pc_rhel_compat_len; -+ -+extern GlobalProperty pc_rhel_8_5_compat[]; -+extern const size_t pc_rhel_8_5_compat_len; -+ -+extern GlobalProperty pc_rhel_8_4_compat[]; -+extern const size_t pc_rhel_8_4_compat_len; -+ -+extern GlobalProperty pc_rhel_8_3_compat[]; -+extern const size_t pc_rhel_8_3_compat_len; -+ -+extern GlobalProperty pc_rhel_8_2_compat[]; -+extern const size_t pc_rhel_8_2_compat_len; -+ -+extern GlobalProperty pc_rhel_8_1_compat[]; -+extern const size_t pc_rhel_8_1_compat_len; -+ -+extern GlobalProperty pc_rhel_8_0_compat[]; -+extern const size_t pc_rhel_8_0_compat_len; -+ -+extern GlobalProperty pc_rhel_7_6_compat[]; -+extern const size_t pc_rhel_7_6_compat_len; -+ - /* Helper for setting model-id for CPU models that changed model-id - * depending on QEMU versions up to QEMU 2.4. - */ -diff --git a/target/i386/kvm/kvm-cpu.c b/target/i386/kvm/kvm-cpu.c -index 5eb955ce9a..74c1396a93 100644 ---- a/target/i386/kvm/kvm-cpu.c -+++ b/target/i386/kvm/kvm-cpu.c -@@ -137,6 +137,7 @@ static PropValue kvm_default_props[] = { - { "acpi", "off" }, - { "monitor", "off" }, - { "svm", "off" }, -+ { "kvm-pv-unhalt", "on" }, - { NULL, NULL }, - }; - -diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c -index 9cf8e03669..6d1e009443 100644 ---- a/target/i386/kvm/kvm.c -+++ b/target/i386/kvm/kvm.c -@@ -3488,6 +3488,7 @@ static int kvm_get_msrs(X86CPU *cpu) - struct kvm_msr_entry *msrs = cpu->kvm_msr_buf->entries; - int ret, i; - uint64_t mtrr_top_bits; -+ MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine()); - - kvm_msr_buf_reset(cpu); - -@@ -3822,6 +3823,9 @@ static int kvm_get_msrs(X86CPU *cpu) - break; - case MSR_KVM_ASYNC_PF_EN: - env->async_pf_en_msr = msrs[i].data; -+ if (mc->async_pf_vmexit_disable) { -+ env->async_pf_en_msr &= ~(1ULL << 2); -+ } - break; - case MSR_KVM_ASYNC_PF_INT: - env->async_pf_int_msr = msrs[i].data; -diff --git a/tests/qtest/pvpanic-test.c b/tests/qtest/pvpanic-test.c -index 6dcad2db49..580c2c43d2 100644 ---- a/tests/qtest/pvpanic-test.c -+++ b/tests/qtest/pvpanic-test.c -@@ -17,7 +17,7 @@ static void test_panic_nopause(void) - QDict *response, *data; - QTestState *qts; - -- qts = qtest_init("-device pvpanic -action panic=none"); -+ qts = qtest_init("-M q35 -device pvpanic -action panic=none"); - - val = qtest_inb(qts, 0x505); - g_assert_cmpuint(val, ==, 3); -@@ -40,7 +40,8 @@ static void test_panic(void) - QDict *response, *data; - QTestState *qts; - -- qts = qtest_init("-device pvpanic -action panic=pause"); -+ /* RHEL: Use q35 */ -+ qts = qtest_init("-M q35 -device pvpanic -action panic=pause"); - - val = qtest_inb(qts, 0x505); - g_assert_cmpuint(val, ==, 3); --- -2.31.1 - diff --git a/SOURCES/0011-Enable-make-check.patch b/SOURCES/0011-Enable-make-check.patch deleted file mode 100644 index 832b38d..0000000 --- a/SOURCES/0011-Enable-make-check.patch +++ /dev/null @@ -1,186 +0,0 @@ -From 5e419e5e0a721bdbbfa6d9b82c8be5c5b3d26a01 Mon Sep 17 00:00:00 2001 -From: Miroslav Rezanina -Date: Wed, 2 Sep 2020 09:39:41 +0200 -Subject: Enable make check - -Fixing tests after device disabling and machine types changes and enabling -make check run during build. - -Signed-off-by: Miroslav Rezanina ---- -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 - -Merged patches (6.1.0): -- 2f129df7d3 redhat: Enable the 'test-block-iothread' test again ---- - .distro/qemu-kvm.spec.template | 5 ++--- - tests/qtest/fuzz-e1000e-test.c | 2 +- - tests/qtest/fuzz-virtio-scsi-test.c | 2 +- - tests/qtest/intel-hda-test.c | 2 +- - tests/qtest/libqos/meson.build | 2 +- - tests/qtest/lpc-ich9-test.c | 2 +- - tests/qtest/meson.build | 4 ---- - tests/qtest/usb-hcd-xhci-test.c | 4 ++++ - tests/qtest/virtio-net-failover.c | 1 + - 9 files changed, 12 insertions(+), 12 deletions(-) - -diff --git a/tests/qtest/fuzz-e1000e-test.c b/tests/qtest/fuzz-e1000e-test.c -index 66229e6096..947fba73b7 100644 ---- a/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) - { - 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-rhel8.4.0"); - - qtest_outl(s, 0xcf8, 0x80001010); - qtest_outl(s, 0xcfc, 0xe1020000); -diff --git a/tests/qtest/fuzz-virtio-scsi-test.c b/tests/qtest/fuzz-virtio-scsi-test.c -index aaf6d10e18..43727d62ac 100644 ---- a/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) - { - QTestState *s; - -- s = qtest_init("-M pc-q35-5.2 -display none -m 512M " -+ s = qtest_init("-M pc-q35-rhel8.4.0 -display none -m 512M " - "-device virtio-scsi,num_queues=8,addr=03.0 "); - - qtest_outl(s, 0xcf8, 0x80001811); -diff --git a/tests/qtest/intel-hda-test.c b/tests/qtest/intel-hda-test.c -index a58c98e4d1..c8387e39ce 100644 ---- a/tests/qtest/intel-hda-test.c -+++ b/tests/qtest/intel-hda-test.c -@@ -38,7 +38,7 @@ static void test_issue542_ich6(void) - { - QTestState *s; - -- s = qtest_init("-nographic -nodefaults -M pc-q35-6.2 " -+ s = qtest_init("-nographic -nodefaults -M pc-q35-rhel9.0.0 " - "-device intel-hda,id=" HDA_ID CODEC_DEVICES); - - qtest_outl(s, 0xcf8, 0x80000804); -diff --git a/tests/qtest/libqos/meson.build b/tests/qtest/libqos/meson.build -index e988d15791..46f7dcb81a 100644 ---- a/tests/qtest/libqos/meson.build -+++ b/tests/qtest/libqos/meson.build -@@ -41,7 +41,7 @@ libqos_srcs = files('../libqtest.c', - 'virtio-rng.c', - 'virtio-scsi.c', - 'virtio-serial.c', -- 'virtio-iommu.c', -+# 'virtio-iommu.c', - - # qgraph machines: - 'aarch64-xlnx-zcu102-machine.c', -diff --git a/tests/qtest/lpc-ich9-test.c b/tests/qtest/lpc-ich9-test.c -index fe0bef9980..7a9d51579b 100644 ---- a/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) - { - QTestState *s; - -- s = qtest_init("-M pc-q35-5.0 " -+ s = qtest_init("-M pc-q35-rhel8.4.0 " - "-nographic -monitor none -serial none"); - - qtest_outl(s, 0xcf8, 0x8000f840); /* PMBASE */ -diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build -index d25f82bb5a..67cd32def1 100644 ---- a/tests/qtest/meson.build -+++ b/tests/qtest/meson.build -@@ -73,7 +73,6 @@ qtests_i386 = \ - config_all_devices.has_key('CONFIG_Q35') and \ - config_all_devices.has_key('CONFIG_VIRTIO_PCI') and \ - slirp.found() ? ['virtio-net-failover'] : []) + \ -- (unpack_edk2_blobs ? ['bios-tables-test'] : []) + \ - qtests_pci + \ - ['fdc-test', - 'ide-test', -@@ -86,7 +85,6 @@ qtests_i386 = \ - 'drive_del-test', - 'tco-test', - 'cpu-plug-test', -- 'q35-test', - 'vmgenid-test', - 'migration-test', - 'test-x86-cpuid-compat', -@@ -216,7 +214,6 @@ qtests_arm = \ - - # TODO: once aarch64 TCG is fixed on ARM 32 bit host, make bios-tables-test unconditional - qtests_aarch64 = \ -- (cpu != 'arm' and unpack_edk2_blobs ? ['bios-tables-test'] : []) + \ - (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-test'] : []) + \ - (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-swtpm-test'] : []) + \ - (config_all_devices.has_key('CONFIG_XLNX_ZYNQMP_ARM') ? ['xlnx-can-test', 'fuzz-xlnx-dp-test'] : []) + \ -@@ -231,7 +228,6 @@ qtests_s390x = \ - (config_host.has_key('CONFIG_POSIX') ? ['test-filter-redirector'] : []) + \ - ['boot-serial-test', - 'drive_del-test', -- 'device-plug-test', - 'virtio-ccw-test', - 'cpu-plug-test', - 'migration-test'] -diff --git a/tests/qtest/usb-hcd-xhci-test.c b/tests/qtest/usb-hcd-xhci-test.c -index 10ef9d2a91..3855873050 100644 ---- a/tests/qtest/usb-hcd-xhci-test.c -+++ b/tests/qtest/usb-hcd-xhci-test.c -@@ -21,6 +21,7 @@ static void test_xhci_hotplug(void) - usb_test_hotplug(global_qtest, "xhci", "1", NULL); - } - -+#if 0 /* Disabled for Red Hat Enterprise Linux */ - static void test_usb_uas_hotplug(void) - { - QTestState *qts = global_qtest; -@@ -36,6 +37,7 @@ static void test_usb_uas_hotplug(void) - qtest_qmp_device_del(qts, "scsihd"); - qtest_qmp_device_del(qts, "uas"); - } -+#endif - - static void test_usb_ccid_hotplug(void) - { -@@ -56,7 +58,9 @@ int main(int argc, char **argv) - - qtest_add_func("/xhci/pci/init", test_xhci_init); - qtest_add_func("/xhci/pci/hotplug", test_xhci_hotplug); -+#if 0 /* Disabled for Red Hat Enterprise Linux */ - qtest_add_func("/xhci/pci/hotplug/usb-uas", test_usb_uas_hotplug); -+#endif - qtest_add_func("/xhci/pci/hotplug/usb-ccid", test_usb_ccid_hotplug); - - qtest_start("-device nec-usb-xhci,id=xhci" -diff --git a/tests/qtest/virtio-net-failover.c b/tests/qtest/virtio-net-failover.c -index 78811f1c92..44de8af00c 100644 ---- a/tests/qtest/virtio-net-failover.c -+++ b/tests/qtest/virtio-net-failover.c -@@ -25,6 +25,7 @@ - #define PCI_SEL_BASE 0x0010 - - #define BASE_MACHINE "-M q35 -nodefaults " \ -+ "-global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=on " \ - "-device pcie-root-port,id=root0,addr=0x1,bus=pcie.0,chassis=1 " \ - "-device pcie-root-port,id=root1,addr=0x2,bus=pcie.0,chassis=2 " - --- -2.31.1 - diff --git a/SOURCES/0012-vfio-cap-number-of-devices-that-can-be-assigned.patch b/SOURCES/0012-vfio-cap-number-of-devices-that-can-be-assigned.patch deleted file mode 100644 index c9e42b2..0000000 --- a/SOURCES/0012-vfio-cap-number-of-devices-that-can-be-assigned.patch +++ /dev/null @@ -1,104 +0,0 @@ -From c358fd4c224a9c3f64b4a8fff34cc6b1dc201fa0 Mon Sep 17 00:00:00 2001 -From: Bandan Das -Date: Tue, 3 Dec 2013 20:05:13 +0100 -Subject: vfio: cap number of devices that can be assigned - -RH-Author: Bandan Das -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 -RH-Acked-by: Marcelo Tosatti -RH-Acked-by: Michael S. Tsirkin - -Go through all groups to get count of total number of devices -active to enforce limit - -Reasoning from Alex for the limit(32) - Assuming 3 slots per -device, with 125 slots (number of memory slots for RHEL 7), -we can support almost 40 devices and still have few slots left -for other uses. Stepping down a bit, the number 32 arbitrarily -matches the number of slots on a PCI bus and is also a nice power -of two. - -Count of slots increased to 509 later so we could increase limit -to 64 as some usecases require more than 32 devices. - -Signed-off-by: Bandan Das ---- - hw/vfio/pci.c | 29 ++++++++++++++++++++++++++++- - hw/vfio/pci.h | 1 + - 2 files changed, 29 insertions(+), 1 deletion(-) - -diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c -index 67a183f17b..1e20f9fd59 100644 ---- a/hw/vfio/pci.c -+++ b/hw/vfio/pci.c -@@ -45,6 +45,9 @@ - - #define TYPE_VFIO_PCI_NOHOTPLUG "vfio-pci-nohotplug" - -+/* RHEL only: Set once for the first assigned dev */ -+static uint16_t device_limit; -+ - static void vfio_disable_interrupts(VFIOPCIDevice *vdev); - static void vfio_mmap_set_enabled(VFIOPCIDevice *vdev, bool enabled); - -@@ -2810,9 +2813,30 @@ static void vfio_realize(PCIDevice *pdev, Error **errp) - ssize_t len; - struct stat st; - int groupid; -- int i, ret; -+ int ret, i = 0; - bool is_mdev; - -+ if (device_limit && device_limit != vdev->assigned_device_limit) { -+ error_setg(errp, "Assigned device limit has been redefined. " -+ "Old:%d, New:%d", -+ device_limit, vdev->assigned_device_limit); -+ return; -+ } else { -+ device_limit = vdev->assigned_device_limit; -+ } -+ -+ QLIST_FOREACH(group, &vfio_group_list, next) { -+ QLIST_FOREACH(vbasedev_iter, &group->device_list, next) { -+ i++; -+ } -+ } -+ -+ if (i >= vdev->assigned_device_limit) { -+ error_setg(errp, "Maximum supported vfio devices (%d) " -+ "already attached", vdev->assigned_device_limit); -+ return; -+ } -+ - if (!vdev->vbasedev.sysfsdev) { - if (!(~vdev->host.domain || ~vdev->host.bus || - ~vdev->host.slot || ~vdev->host.function)) { -@@ -3249,6 +3273,9 @@ static Property vfio_pci_dev_properties[] = { - DEFINE_PROP_BOOL("x-no-kvm-msix", VFIOPCIDevice, no_kvm_msix, false), - DEFINE_PROP_BOOL("x-no-geforce-quirks", VFIOPCIDevice, - no_geforce_quirks, false), -+ /* RHEL only */ -+ DEFINE_PROP_UINT16("x-assigned-device-limit", VFIOPCIDevice, -+ assigned_device_limit, 64), - DEFINE_PROP_BOOL("x-no-kvm-ioeventfd", VFIOPCIDevice, no_kvm_ioeventfd, - false), - DEFINE_PROP_BOOL("x-no-vfio-ioeventfd", VFIOPCIDevice, no_vfio_ioeventfd, -diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h -index 64777516d1..e0fe6ca97e 100644 ---- a/hw/vfio/pci.h -+++ b/hw/vfio/pci.h -@@ -139,6 +139,7 @@ struct VFIOPCIDevice { - EventNotifier err_notifier; - EventNotifier req_notifier; - int (*resetfn)(struct VFIOPCIDevice *); -+ uint16_t assigned_device_limit; - uint32_t vendor_id; - uint32_t device_id; - uint32_t sub_vendor_id; --- -2.31.1 - diff --git a/SOURCES/0013-Add-support-statement-to-help-output.patch b/SOURCES/0013-Add-support-statement-to-help-output.patch deleted file mode 100644 index 4826ea4..0000000 --- a/SOURCES/0013-Add-support-statement-to-help-output.patch +++ /dev/null @@ -1,55 +0,0 @@ -From ba0c7a5f6b9a1f75666db6b3b795ddf03695dc26 Mon Sep 17 00:00:00 2001 -From: Eduardo Habkost -Date: Wed, 4 Dec 2013 18:53:17 +0100 -Subject: Add support statement to -help output - -RH-Author: Eduardo Habkost -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 -RH-Acked-by: knoel@redhat.com -RH-Acked-by: Paolo Bonzini - -Add support statement to -help output, reporting direct qemu-kvm usage -as unsupported by Red Hat, and advising users to use libvirt instead. - -Signed-off-by: Eduardo Habkost ---- - softmmu/vl.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/softmmu/vl.c b/softmmu/vl.c -index 6f646531a0..9d5dab43d2 100644 ---- a/softmmu/vl.c -+++ b/softmmu/vl.c -@@ -831,9 +831,17 @@ static void version(void) - QEMU_COPYRIGHT "\n"); - } - -+static void print_rh_warning(void) -+{ -+ printf("\nWARNING: Direct use of qemu-kvm from the command line is not supported by Red Hat.\n" -+ "WARNING: Use libvirt as the stable management interface.\n" -+ "WARNING: Some command line options listed here may not be available in future releases.\n\n"); -+} -+ - static void help(int exitcode) - { - version(); -+ print_rh_warning(); - printf("usage: %s [options] [disk_image]\n\n" - "'disk_image' is a raw hard disk image for IDE hard disk 0\n\n", - g_get_prgname()); -@@ -859,6 +867,7 @@ static void help(int exitcode) - "\n" - QEMU_HELP_BOTTOM "\n"); - -+ print_rh_warning(); - exit(exitcode); - } - --- -2.31.1 - diff --git a/SOURCES/0014-globally-limit-the-maximum-number-of-CPUs.patch b/SOURCES/0014-globally-limit-the-maximum-number-of-CPUs.patch deleted file mode 100644 index 6764a84..0000000 --- a/SOURCES/0014-globally-limit-the-maximum-number-of-CPUs.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 9ebfd2f6cfa8e79c92e58fd169f90cc768fb865a Mon Sep 17 00:00:00 2001 -From: Andrew Jones -Date: Tue, 21 Jan 2014 10:46:52 +0100 -Subject: globally limit the maximum number of CPUs - -We now globally limit the number of VCPUs. -Especially, there is no way one can specify more than -max_cpus VCPUs for a VM. - -This allows us the restore the ppc max_cpus limitation to the upstream -default and minimize the ppc hack in kvm-all.c. - -Signed-off-by: David Hildenbrand -Signed-off-by: Miroslav Rezanina -Signed-off-by: Danilo Cesar Lemes de Paula ---- - accel/kvm/kvm-all.c | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c -index 5f1377ca04..fdf0e4d429 100644 ---- a/accel/kvm/kvm-all.c -+++ b/accel/kvm/kvm-all.c -@@ -2430,6 +2430,18 @@ static int kvm_init(MachineState *ms) - soft_vcpus_limit = kvm_recommended_vcpus(s); - hard_vcpus_limit = kvm_max_vcpus(s); - -+#ifdef HOST_PPC64 -+ /* -+ * On POWER, the kernel advertises a soft limit based on the -+ * number of CPU threads on the host. We want to allow exceeding -+ * this for testing purposes, so we don't want to set hard limit -+ * to soft limit as on x86. -+ */ -+#else -+ /* RHEL doesn't support nr_vcpus > soft_vcpus_limit */ -+ hard_vcpus_limit = soft_vcpus_limit; -+#endif -+ - while (nc->name) { - if (nc->num > soft_vcpus_limit) { - warn_report("Number of %s cpus requested (%d) exceeds " --- -2.31.1 - diff --git a/SOURCES/0015-Use-qemu-kvm-in-documentation-instead-of-qemu-system.patch b/SOURCES/0015-Use-qemu-kvm-in-documentation-instead-of-qemu-system.patch deleted file mode 100644 index 722484d..0000000 --- a/SOURCES/0015-Use-qemu-kvm-in-documentation-instead-of-qemu-system.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 4b6c8cdc52fdf94d4098d278defb3833dce1d189 Mon Sep 17 00:00:00 2001 -From: Miroslav Rezanina -Date: Wed, 8 Jul 2020 08:35:50 +0200 -Subject: Use qemu-kvm in documentation instead of qemu-system- - -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 -RH-Acked-by: Markus Armbruster -RH-Acked-by: Stefan Hajnoczi - -From: Miroslav Rezanina - -We change the name and location of qemu-kvm binaries. Update documentation -to reflect this change. Only architectures available in RHEL are updated. - -Signed-off-by: Miroslav Rezanina ---- - docs/defs.rst.inc | 4 ++-- - qemu-options.hx | 10 +++++----- - 2 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/docs/defs.rst.inc b/docs/defs.rst.inc -index 52d6454b93..d74dbdeca9 100644 ---- a/docs/defs.rst.inc -+++ b/docs/defs.rst.inc -@@ -9,7 +9,7 @@ - but the manpages will end up misrendered with following normal text - incorrectly in boldface. - --.. |qemu_system| replace:: qemu-system-x86_64 --.. |qemu_system_x86| replace:: qemu-system-x86_64 -+.. |qemu_system| replace:: qemu-kvm -+.. |qemu_system_x86| replace:: qemu-kvm - .. |I2C| replace:: I\ :sup:`2`\ C - .. |I2S| replace:: I\ :sup:`2`\ S -diff --git a/qemu-options.hx b/qemu-options.hx -index 34e9b32a5c..924f61ab6d 100644 ---- a/qemu-options.hx -+++ b/qemu-options.hx -@@ -3233,11 +3233,11 @@ SRST - - :: - -- qemu -m 512 -object memory-backend-file,id=mem,size=512M,mem-path=/hugetlbfs,share=on \ -- -numa node,memdev=mem \ -- -chardev socket,id=chr0,path=/path/to/socket \ -- -netdev type=vhost-user,id=net0,chardev=chr0 \ -- -device virtio-net-pci,netdev=net0 -+ qemu-kvm -m 512 -object memory-backend-file,id=mem,size=512M,mem-path=/hugetlbfs,share=on \ -+ -numa node,memdev=mem \ -+ -chardev socket,id=chr0,path=/path/to/socket \ -+ -netdev type=vhost-user,id=net0,chardev=chr0 \ -+ -device virtio-net-pci,netdev=net0 - - ``-netdev vhost-vdpa,vhostdev=/path/to/dev`` - Establish a vhost-vdpa netdev. --- -2.31.1 - diff --git a/SOURCES/0016-virtio-scsi-Reject-scsi-cd-if-data-plane-enabled-RHE.patch b/SOURCES/0016-virtio-scsi-Reject-scsi-cd-if-data-plane-enabled-RHE.patch deleted file mode 100644 index 9f08024..0000000 --- a/SOURCES/0016-virtio-scsi-Reject-scsi-cd-if-data-plane-enabled-RHE.patch +++ /dev/null @@ -1,66 +0,0 @@ -From b72e04cb7e417d9e1c973223747ab3a27abda8b4 Mon Sep 17 00:00:00 2001 -From: Fam Zheng -Date: Wed, 14 Jun 2017 15:37:01 +0200 -Subject: virtio-scsi: Reject scsi-cd if data plane enabled [RHEL only] - -RH-Author: Fam Zheng -Message-id: <20170614153701.14757-1-famz@redhat.com> -Patchwork-id: 75613 -O-Subject: [RHV-7.4 qemu-kvm-rhev PATCH v3] virtio-scsi: Reject scsi-cd if data plane enabled [RHEL only] -Bugzilla: 1378816 -RH-Acked-by: Paolo Bonzini -RH-Acked-by: Stefan Hajnoczi -RH-Acked-by: Max Reitz - -We need a fix for RHEL 7.4 and 7.3.z, but unfortunately upstream isn't -ready. If it were, the changes will be too invasive. To have an idea: - -https://lists.gnu.org/archive/html/qemu-devel/2017-05/msg05400.html - -is an incomplete attempt to fix part of the issue, and the remaining -work unfortunately involve even more complex changes. - -As a band-aid, this partially reverts the effect of ef8875b -(virtio-scsi: Remove op blocker for dataplane, since v2.7). We cannot -simply revert that commit as a whole because we already shipped it in -qemu-kvm-rhev 7.3, since when, block jobs has been possible. We should -only block what has been broken. Also, faithfully reverting the above -commit means adding back the removed op blocker, but that is not enough, -because it still crashes when inserting media into an initially empty -scsi-cd. - -All in all, scsi-cd on virtio-scsi-dataplane has basically been unusable -unless the scsi-cd never enters an empty state, so, disable it -altogether. Otherwise it would be much more difficult to avoid -crashing. - -Signed-off-by: Fam Zheng -Signed-off-by: Miroslav Rezanina -Signed-off-by: Danilo C. L. de Paula ---- - hw/scsi/virtio-scsi.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c -index 34a968ecfb..7f6da33a8a 100644 ---- a/hw/scsi/virtio-scsi.c -+++ b/hw/scsi/virtio-scsi.c -@@ -896,6 +896,15 @@ static void virtio_scsi_hotplug(HotplugHandler *hotplug_dev, DeviceState *dev, - AioContext *old_context; - int ret; - -+ /* XXX: Remove this check once block backend is capable of handling -+ * AioContext change upon eject/insert. -+ * s->ctx is NULL if ioeventfd is off, s->ctx is qemu_get_aio_context() if -+ * data plane is not used, both cases are safe for scsi-cd. */ -+ if (s->ctx && s->ctx != qemu_get_aio_context() && -+ object_dynamic_cast(OBJECT(dev), "scsi-cd")) { -+ error_setg(errp, "scsi-cd is not supported by data plane"); -+ return; -+ } - if (s->ctx && !s->dataplane_fenced) { - if (blk_op_is_blocked(sd->conf.blk, BLOCK_OP_TYPE_DATAPLANE, errp)) { - return; --- -2.31.1 - diff --git a/SOURCES/0017-BZ1653590-Require-at-least-64kiB-pages-for-downstrea.patch b/SOURCES/0017-BZ1653590-Require-at-least-64kiB-pages-for-downstrea.patch deleted file mode 100644 index 2bc687c..0000000 --- a/SOURCES/0017-BZ1653590-Require-at-least-64kiB-pages-for-downstrea.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 64a06662cdea0ff62efb122be4eab506b2a842d9 Mon Sep 17 00:00:00 2001 -From: David Gibson -Date: Wed, 6 Feb 2019 03:58:56 +0000 -Subject: BZ1653590: Require at least 64kiB pages for downstream guests & hosts - -RH-Author: David Gibson -Message-id: <20190206035856.19058-1-dgibson@redhat.com> -Patchwork-id: 84246 -O-Subject: [RHELAV-8.0/rhel qemu-kvm PATCH] BZ1653590: Require at least 64kiB pages for downstream guests & hosts -Bugzilla: 1653590 -RH-Acked-by: Laurent Vivier -RH-Acked-by: Serhii Popovych -RH-Acked-by: Thomas Huth - -Most current POWER guests require 64kiB page support, so that's the default -for the cap-hpt-max-pagesize option in qemu which limits available guest -page sizes. We warn if the value is set smaller than that, but don't -outright fail upstream, because we need to allow for the possibility of -guest (and/or host) kernels configured for 4kiB page sizes. - -Downstream, however, we simply don't support 4kiB pagesize configured -kernels in guest or host, so we can have qemu simply error out in this -situation. - -Testing: Attempted to start a guest with cap-hpt-max-page-size=4k and verified - it failed immediately with a qemu error - -Signed-off-by: David Gibson -Signed-off-by: Danilo C. L. de Paula ---- - hw/ppc/spapr_caps.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c -index 655ab856a0..6aa7f93df9 100644 ---- a/hw/ppc/spapr_caps.c -+++ b/hw/ppc/spapr_caps.c -@@ -329,12 +329,19 @@ bool spapr_check_pagesize(SpaprMachineState *spapr, hwaddr pagesize, - static void cap_hpt_maxpagesize_apply(SpaprMachineState *spapr, - uint8_t val, Error **errp) - { -+#if 0 /* disabled for RHEL */ - if (val < 12) { - error_setg(errp, "Require at least 4kiB hpt-max-page-size"); - return; - } else if (val < 16) { - warn_report("Many guests require at least 64kiB hpt-max-page-size"); - } -+#else /* Only page sizes >=64kiB supported for RHEL */ -+ if (val < 16) { -+ error_setg(errp, "Require at least 64kiB hpt-max-page-size"); -+ return; -+ } -+#endif - - spapr_check_pagesize(spapr, qemu_minrampagesize(), errp); - } --- -2.31.1 - diff --git a/SOURCES/0018-qcow2-Deprecation-warning-when-opening-v2-images-rw.patch b/SOURCES/0018-qcow2-Deprecation-warning-when-opening-v2-images-rw.patch deleted file mode 100644 index d7401d5..0000000 --- a/SOURCES/0018-qcow2-Deprecation-warning-when-opening-v2-images-rw.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 54f9157a918e1404f2f17ce89a9c8b9088c1bc06 Mon Sep 17 00:00:00 2001 -From: Kevin Wolf -Date: Fri, 20 Aug 2021 18:25:12 +0200 -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 -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 -RH-Acked-by: Hanna Reitz -RH-Acked-by: Thomas Huth -RH-Acked-by: Philippe Mathieu-Daudé - -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 -do so unintentionally. Warn about it and suggest upgrading during the -RHEL 9 timeframe so that the code can possibly be disabled in RHEL 10. - -The warning is restricted to read-write mode and the system emulator. -The primary motivation for not having it in qemu-img is that 'qemu-img -amend' for upgrades would warn otherwise. It also avoids having to make -too many changes to the test suite. - -bdrv_uses_whitelist() is used as a proxy for deciding whether we are -running in a tool or the system emulator. This is not entirely clean, -but it's what is available and the same function qcow2_do_open() already -uses it this way for another warning. - -Signed-off-by: Kevin Wolf - -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 ++++++ - tests/qemu-iotests/common.filter | 1 + - 2 files changed, 7 insertions(+) - -diff --git a/block/qcow2.c b/block/qcow2.c -index b5c47931ef..a795e457ac 100644 ---- a/block/qcow2.c -+++ b/block/qcow2.c -@@ -1337,6 +1337,12 @@ static int coroutine_fn qcow2_do_open(BlockDriverState *bs, QDict *options, - ret = -ENOTSUP; - goto fail; - } -+ if (header.version < 3 && !bdrv_is_read_only(bs) && bdrv_uses_whitelist()) { -+ warn_report_once("qcow2 v2 images are deprecated and may not be " -+ "supported in future versions. Please consider " -+ "upgrading the image with 'qemu-img amend " -+ "-o compat=v3'."); -+ } - - s->qcow_version = header.version; - -diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter -index cc9f1a5891..6a13757177 100644 ---- a/tests/qemu-iotests/common.filter -+++ b/tests/qemu-iotests/common.filter -@@ -83,6 +83,7 @@ _filter_qemu() - { - gsed -e "s#\\(^\\|(qemu) \\)$(basename $QEMU_PROG):#\1QEMU_PROG:#" \ - -e 's#^QEMU [0-9]\+\.[0-9]\+\.[0-9]\+ monitor#QEMU X.Y.Z monitor#' \ -+ -e "/qcow2 v2 images are deprecated/d" \ - -e $'s#\r##' # QEMU monitor uses \r\n line endings - } - --- -2.31.1 - diff --git a/SOURCES/0019-WRB-Introduce-RHEL-9.0.0-hw-compat-structure.patch b/SOURCES/0019-WRB-Introduce-RHEL-9.0.0-hw-compat-structure.patch deleted file mode 100644 index 285cd6b..0000000 --- a/SOURCES/0019-WRB-Introduce-RHEL-9.0.0-hw-compat-structure.patch +++ /dev/null @@ -1,135 +0,0 @@ -From 1d6439527aa6ccabb58208c94417778ccc19de39 Mon Sep 17 00:00:00 2001 -From: Miroslav Rezanina -Date: Wed, 9 Feb 2022 04:16:25 -0500 -Subject: WRB: Introduce RHEL 9.0.0 hw compat structure - -General compatibility structure for post RHEL 9.0.0 rebase. - -Signed-off-by: Miroslav Rezanina ---- - hw/core/machine.c | 9 +++++++++ - hw/i386/pc.c | 6 ++++++ - hw/i386/pc_piix.c | 4 ++++ - hw/i386/pc_q35.c | 4 ++++ - hw/s390x/s390-virtio-ccw.c | 2 ++ - include/hw/boards.h | 3 +++ - include/hw/i386/pc.h | 3 +++ - 7 files changed, 31 insertions(+) - -diff --git a/hw/core/machine.c b/hw/core/machine.c -index 28989b6e7b..dffc3ef4ab 100644 ---- a/hw/core/machine.c -+++ b/hw/core/machine.c -@@ -53,6 +53,15 @@ GlobalProperty hw_compat_rhel_8_6[] = { - }; - const size_t hw_compat_rhel_8_6_len = G_N_ELEMENTS(hw_compat_rhel_8_6); - -+/* -+ * Mostly the same as hw_compat_6_2 -+ */ -+GlobalProperty hw_compat_rhel_9_0[] = { -+ /* hw_compat_rhel_9_0 from hw_compat_6_2 */ -+ { "PIIX4_PM", "x-not-migrate-acpi-index", "on"}, -+}; -+const size_t hw_compat_rhel_9_0_len = G_N_ELEMENTS(hw_compat_rhel_9_0); -+ - /* - * Mostly the same as hw_compat_6_0 and hw_compat_6_1 - */ -diff --git a/hw/i386/pc.c b/hw/i386/pc.c -index 263d882af6..0886cfe3fe 100644 ---- a/hw/i386/pc.c -+++ b/hw/i386/pc.c -@@ -391,6 +391,12 @@ GlobalProperty pc_rhel_compat[] = { - }; - const size_t pc_rhel_compat_len = G_N_ELEMENTS(pc_rhel_compat); - -+GlobalProperty pc_rhel_9_0_compat[] = { -+ /* pc_rhel_9_0_compat from pc_compat_6_2 */ -+ { "virtio-mem", "unplugged-inaccessible", "off" }, -+}; -+const size_t pc_rhel_9_0_compat_len = G_N_ELEMENTS(pc_rhel_9_0_compat); -+ - GlobalProperty pc_rhel_8_5_compat[] = { - /* pc_rhel_8_5_compat from pc_compat_6_0 */ - { "qemu64" "-" TYPE_X86_CPU, "family", "6" }, -diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c -index 0cacc0d623..dc987fe93b 100644 ---- a/hw/i386/pc_piix.c -+++ b/hw/i386/pc_piix.c -@@ -1014,6 +1014,10 @@ static void pc_machine_rhel760_options(MachineClass *m) - pcmc->kvmclock_create_always = false; - /* From pc_i440fx_5_1_machine_options() */ - pcmc->pci_root_uid = 1; -+ compat_props_add(m->compat_props, hw_compat_rhel_9_0, -+ hw_compat_rhel_9_0_len); -+ compat_props_add(m->compat_props, pc_rhel_9_0_compat, -+ pc_rhel_9_0_compat_len); - compat_props_add(m->compat_props, hw_compat_rhel_8_6, - hw_compat_rhel_8_6_len); - compat_props_add(m->compat_props, hw_compat_rhel_8_5, -diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c -index 157160e069..52c253c570 100644 ---- a/hw/i386/pc_q35.c -+++ b/hw/i386/pc_q35.c -@@ -669,6 +669,10 @@ static void pc_q35_machine_rhel900_options(MachineClass *m) - m->desc = "RHEL-9.0.0 PC (Q35 + ICH9, 2009)"; - pcmc->smbios_stream_product = "RHEL"; - pcmc->smbios_stream_version = "9.0.0"; -+ compat_props_add(m->compat_props, hw_compat_rhel_9_0, -+ hw_compat_rhel_9_0_len); -+ compat_props_add(m->compat_props, pc_rhel_9_0_compat, -+ pc_rhel_9_0_compat_len); - } - - DEFINE_PC_MACHINE(q35_rhel900, "pc-q35-rhel9.0.0", pc_q35_init_rhel900, -diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c -index 465a2a09d2..08e0f6a79b 100644 ---- a/hw/s390x/s390-virtio-ccw.c -+++ b/hw/s390x/s390-virtio-ccw.c -@@ -1118,12 +1118,14 @@ static void ccw_machine_2_4_class_options(MachineClass *mc) - DEFINE_CCW_MACHINE(2_4, "2.4", false); - #endif - -+ - static void ccw_machine_rhel900_instance_options(MachineState *machine) - { - } - - static void ccw_machine_rhel900_class_options(MachineClass *mc) - { -+ compat_props_add(mc->compat_props, hw_compat_rhel_9_0, hw_compat_rhel_9_0_len); - } - DEFINE_CCW_MACHINE(rhel900, "rhel9.0.0", true); - -diff --git a/include/hw/boards.h b/include/hw/boards.h -index d1555665df..635e45dd71 100644 ---- a/include/hw/boards.h -+++ b/include/hw/boards.h -@@ -451,6 +451,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_0[]; -+extern const size_t hw_compat_rhel_9_0_len; -+ - extern GlobalProperty hw_compat_rhel_8_6[]; - extern const size_t hw_compat_rhel_8_6_len; - -diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h -index 419a6ec24b..a492c420b5 100644 ---- a/include/hw/i386/pc.h -+++ b/include/hw/i386/pc.h -@@ -292,6 +292,9 @@ extern const size_t pc_compat_1_4_len; - extern GlobalProperty pc_rhel_compat[]; - extern const size_t pc_rhel_compat_len; - -+extern GlobalProperty pc_rhel_9_0_compat[]; -+extern const size_t pc_rhel_9_0_compat_len; -+ - extern GlobalProperty pc_rhel_8_5_compat[]; - extern const size_t pc_rhel_8_5_compat_len; - --- -2.31.1 - diff --git a/SOURCES/0020-redhat-Update-s390x-machine-type-compatibility-for-r.patch b/SOURCES/0020-redhat-Update-s390x-machine-type-compatibility-for-r.patch deleted file mode 100644 index d3b91d0..0000000 --- a/SOURCES/0020-redhat-Update-s390x-machine-type-compatibility-for-r.patch +++ /dev/null @@ -1,38 +0,0 @@ -From c8ad21ca31892f8798cf82508c2b2c61bf3b9895 Mon Sep 17 00:00:00 2001 -From: Thomas Huth -Date: Mon, 4 Apr 2022 12:15:50 +0200 -Subject: redhat: Update s390x machine type compatibility for rebase to QEMU - 7.0.0 - -RH-Author: Thomas Huth -RH-MergeRequest: 143: Update machine type compatibility for QEMU 7.0.0 update [s390x] -RH-Commit: [23/23] 0ecf97d7bdddc50565b5779c64744b353f715cbd -RH-Bugzilla: 2064782 -RH-Acked-by: Cornelia Huck -RH-Acked-by: David Hildenbrand - -No s390x-specific machine class property updates required this time, -only an update to the default qemu cpu model. - -Signed-off-by: Thomas Huth ---- - hw/s390x/s390-virtio-ccw.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c -index 08e0f6a79b..4a491d4988 100644 ---- a/hw/s390x/s390-virtio-ccw.c -+++ b/hw/s390x/s390-virtio-ccw.c -@@ -1121,6 +1121,9 @@ DEFINE_CCW_MACHINE(2_4, "2.4", false); - - static void ccw_machine_rhel900_instance_options(MachineState *machine) - { -+ static const S390FeatInit qemu_cpu_feat = { S390_FEAT_LIST_QEMU_V6_2 }; -+ -+ s390_set_qemu_cpu_model(0x3906, 14, 2, qemu_cpu_feat); - } - - static void ccw_machine_rhel900_class_options(MachineClass *mc) --- -2.31.1 - diff --git a/SOURCES/0021-pc-Move-s3-s4-suspend-disabling-to-compat.patch b/SOURCES/0021-pc-Move-s3-s4-suspend-disabling-to-compat.patch deleted file mode 100644 index f9535a8..0000000 --- a/SOURCES/0021-pc-Move-s3-s4-suspend-disabling-to-compat.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 38b89dc24551258b630f09d1c654b6c72b265c79 Mon Sep 17 00:00:00 2001 -From: "Dr. David Alan Gilbert" -Date: Thu, 14 Apr 2022 14:58:43 +0100 -Subject: pc: Move s3/s4 suspend disabling to compat - -RH-Author: Dr. David Alan Gilbert -RH-MergeRequest: 155: 7.0 machine type fixes (x86) -RH-Commit: [26/26] 7d666032d5f5dab1444ebba085f92f2de4e86699 -RH-Bugzilla: 2064771 - -Our downstream patches currently have tweaks in the C code to disable -s3/s4; Thomas pointed out we can just set the property. - -Signed-off-by: Dr. David Alan Gilbert ---- - hw/acpi/ich9.c | 4 ++-- - hw/acpi/piix4.c | 4 ++-- - hw/i386/pc.c | 6 ++++++ - 3 files changed, 10 insertions(+), 4 deletions(-) - -diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c -index de1e401cdf..bd9bbade70 100644 ---- a/hw/acpi/ich9.c -+++ b/hw/acpi/ich9.c -@@ -435,8 +435,8 @@ void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm) - static const uint32_t gpe0_len = ICH9_PMIO_GPE0_LEN; - pm->acpi_memory_hotplug.is_enabled = true; - pm->cpu_hotplug_legacy = true; -- pm->disable_s3 = 1; -- pm->disable_s4 = 1; -+ pm->disable_s3 = 0; -+ pm->disable_s4 = 0; - pm->s4_val = 2; - pm->use_acpi_hotplug_bridge = true; - pm->keep_pci_slot_hpc = true; -diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c -index 28544e78c3..2fb2b43248 100644 ---- a/hw/acpi/piix4.c -+++ b/hw/acpi/piix4.c -@@ -653,8 +653,8 @@ static void piix4_send_gpe(AcpiDeviceIf *adev, AcpiEventStatusBits ev) - - static Property piix4_pm_properties[] = { - DEFINE_PROP_UINT32("smb_io_base", PIIX4PMState, smb_io_base, 0), -- DEFINE_PROP_UINT8(ACPI_PM_PROP_S3_DISABLED, PIIX4PMState, disable_s3, 1), -- DEFINE_PROP_UINT8(ACPI_PM_PROP_S4_DISABLED, PIIX4PMState, disable_s4, 1), -+ DEFINE_PROP_UINT8(ACPI_PM_PROP_S3_DISABLED, PIIX4PMState, disable_s3, 0), -+ DEFINE_PROP_UINT8(ACPI_PM_PROP_S4_DISABLED, PIIX4PMState, disable_s4, 0), - DEFINE_PROP_UINT8(ACPI_PM_PROP_S4_VAL, PIIX4PMState, s4_val, 2), - DEFINE_PROP_BOOL(ACPI_PM_PROP_ACPI_PCIHP_BRIDGE, PIIX4PMState, - use_acpi_hotplug_bridge, true), -diff --git a/hw/i386/pc.c b/hw/i386/pc.c -index 0886cfe3fe..f98f842f80 100644 ---- a/hw/i386/pc.c -+++ b/hw/i386/pc.c -@@ -380,6 +380,12 @@ const size_t pc_compat_1_4_len = G_N_ELEMENTS(pc_compat_1_4); - * machine type. - */ - GlobalProperty pc_rhel_compat[] = { -+ /* we don't support s3/s4 suspend */ -+ { "PIIX4_PM", "disable_s3", "1" }, -+ { "PIIX4_PM", "disable_s4", "1" }, -+ { "ICH9-LPC", "disable_s3", "1" }, -+ { "ICH9-LPC", "disable_s4", "1" }, -+ - { TYPE_X86_CPU, "host-phys-bits", "on" }, - { TYPE_X86_CPU, "host-phys-bits-limit", "48" }, - { TYPE_X86_CPU, "vmx-entry-load-perf-global-ctrl", "off" }, --- -2.31.1 - diff --git a/SPECS/qemu.spec b/SPECS/qemu.spec index 0f60f89..9d2af8e 100644 --- a/SPECS/qemu.spec +++ b/SPECS/qemu.spec @@ -1,12 +1,12 @@ # Provide a way to skip tests via rpmbuild `--without` # This makes it easier to skip tests in copr repos, where # the qemu test suite is historically flakey -%bcond_with check +%bcond_without check %global libfdt_version 1.6.0 %global libseccomp_version 2.4.0 %global libusbx_version 1.0.23 -%global meson_version 0.58.2 +%global meson_version 0.61.3 %global usbredir_version 0.7.1 %global ipxe_version 20200823-5.git4bd064de @@ -81,13 +81,13 @@ # Matches xen ExclusiveArch %global have_xen 0 %if 0%{?fedora} -%ifarch %{ix86} x86_64 armv7hl aarch64 +%ifarch x86_64 aarch64 %global have_xen 1 %endif %endif %global have_liburing 0 -%if 0%{?fedora} || %{rhel} > 7 +%if 0%{?fedora} %ifnarch %{arm} %global have_liburing 1 %endif @@ -104,10 +104,16 @@ %endif %global have_jack 1 -%if 0%{?rhel} <= 7 +%if 0%{?rhel} %global have_jack 0 %endif +%global have_dbus_display 1 +%if %{defined rhel} && 0%{?rhel} < 9 +# RHEL/Centos 8 glib is not new enough +%global have_dbus_display 0 +%endif + %global have_sdl_image %{defined fedora} %global have_fdt 1 %global have_opengl 1 @@ -138,13 +144,6 @@ %define have_block_nfs 1 %endif -%define have_capstone_devel 0 -%if 0%{?fedora} -# capstone-devel is only on Fedora. Use it if it's available, but -# if not, use the internal qemu submodule copy -%define have_capstone_devel 1 -%endif - %define have_librdma 1 %ifarch %{arm} %define have_librdma 0 @@ -159,11 +158,6 @@ # https://bugzilla.redhat.com/show_bug.cgi?id=1952483 %global _lto_cflags %{nil} -# OOM killer breaks builds with parallel make on s390(x) -%ifarch s390x -%global _smp_mflags %{nil} -%endif - %global firmwaredirs "%{_datadir}/qemu-firmware:%{_datadir}/ipxe/qemu:%{_datadir}/seavgabios:%{_datadir}/seabios:%{_datadir}/sgabios" %global qemudocdir %{_docdir}/%{name} @@ -195,7 +189,6 @@ %endif %define requires_block_ssh Requires: %{name}-block-ssh = %{evr} %define requires_audio_alsa Requires: %{name}-audio-alsa = %{evr} -%define requires_audio_dbus Requires: %{name}-audio-dbus = %{evr} %define requires_audio_oss Requires: %{name}-audio-oss = %{evr} %define requires_audio_pa Requires: %{name}-audio-pa = %{evr} %define requires_audio_sdl Requires: %{name}-audio-sdl = %{evr} @@ -203,7 +196,6 @@ %define requires_device_usb_host Requires: %{name}-device-usb-host = %{evr} %define requires_device_usb_redirect Requires: %{name}-device-usb-redirect = %{evr} %define requires_ui_curses Requires: %{name}-ui-curses = %{evr} -%define requires_ui_dbus Requires: %{name}-ui-dbus = %{evr} %define requires_ui_gtk Requires: %{name}-ui-gtk = %{evr} %define requires_ui_sdl Requires: %{name}-ui-sdl = %{evr} %define requires_ui_egl_headless Requires: %{name}-ui-egl-headless = %{evr} @@ -215,6 +207,8 @@ %define requires_device_display_virtio_gpu_ccw Requires: %{name}-device-display-virtio-gpu-ccw = %{evr} %define requires_device_display_virtio_vga Requires: %{name}-device-display-virtio-vga = %{evr} %define requires_device_display_virtio_vga_gl Requires: %{name}-device-display-virtio-vga-gl = %{evr} +%define requires_package_qemu_pr_helper Requires: qemu-pr-helper +%define requires_package_virtiofsd Requires: vhostuser-backend(fs) %if %{have_virgl} %define requires_device_display_vhost_user_gpu Requires: %{name}-device-display-vhost-user-gpu = %{evr} @@ -229,6 +223,14 @@ %define requires_audio_jack %{nil} %endif +%if %{have_dbus_display} +%define requires_audio_dbus Requires: %{name}-audio-dbus = %{evr} +%define requires_ui_dbus Requires: %{name}-ui-dbus = %{evr} +%else +%define requires_audio_dbus %{nil} +%define requires_ui_dbus %{nil} +%endif + %if %{have_spice} %define requires_ui_spice_app Requires: %{name}-ui-spice-app = %{evr} %define requires_ui_spice_core Requires: %{name}-ui-spice-core = %{evr} @@ -276,6 +278,7 @@ %{requires_device_display_qxl} \ %{requires_device_display_vhost_user_gpu} \ %{requires_device_display_virtio_gpu} \ +%{requires_device_display_virtio_gpu_ccw} \ %{requires_device_display_virtio_gpu_gl} \ %{requires_device_display_virtio_gpu_pci} \ %{requires_device_display_virtio_gpu_pci_gl} \ @@ -284,6 +287,8 @@ %{requires_device_usb_host} \ %{requires_device_usb_redirect} \ %{requires_device_usb_smartcard} \ +%{requires_package_qemu_pr_helper} \ +%{requires_package_virtiofsd} \ # Modules which can be conditionally built %global obsoletes_some_modules \ @@ -305,11 +310,11 @@ Obsoletes: %{name}-system-unicore32-core <= %{epoch}:%{version}-%{release} %endif # To prevent rpmdev-bumpspec breakage -%global baserelease 2 +%global baserelease 4 Summary: QEMU is a FAST! processor emulator Name: qemu -Version: 7.0.0 +Version: 7.2.0 Release: %{baserelease}%{?rcrel}%{?dist} Epoch: 2 License: GPLv2 and BSD and MIT and CC-BY @@ -328,7 +333,12 @@ Source30: kvm-s390x.conf Source31: kvm-x86.conf Source36: README.tests -Patch0001: 0001-sgx-stub-fix.patch +# Fix SGX assert +Patch: 0001-target-i386-the-sgx_epc_get_section-stub-is-reachabl.patch +Patch: 0001-tests-Disable-pci_virtio_vga-for-ppc64.patch +# Fix compat with kernel-headers >= 6.1 +Patch: 0003-Revert-linux-user-add-more-compat-ioctl-definitions.patch +Patch: 0004-Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch BuildRequires: meson >= %{meson_version} BuildRequires: zlib-devel @@ -391,7 +401,7 @@ BuildRequires: pkgconfig(gbm) %endif BuildRequires: perl-Test-Harness BuildRequires: libslirp-devel -BuildRequires: libbpf-devel +BuildRequires: libbpf-devel >= 1.0.0 # Fedora specific @@ -401,6 +411,8 @@ BuildRequires: clang BuildRequires: gcc %endif BuildRequires: make +# For autosetup git_am +BuildRequires: git # -display sdl support BuildRequires: SDL2-devel # pulseaudio audio output @@ -447,10 +459,8 @@ BuildRequires: libcacard-devel # virgl 3d support BuildRequires: virglrenderer-devel %endif -%if %{have_capstone_devel} # preferred disassembler for TCG BuildRequires: capstone-devel -%endif # qemu-ga BuildRequires: libudev-devel # qauth infrastructure @@ -469,7 +479,7 @@ BuildRequires: daxctl-devel BuildRequires: fuse-devel %if %{have_jack} # jack audio driver -BuildRequires: jack-audio-connection-kit-devel +BuildRequires: (pipewire-jack-audio-connection-kit-devel or jack-audio-connection-kit-devel) %endif BuildRequires: fuse3-devel %if %{have_sdl_image} @@ -477,8 +487,14 @@ BuildRequires: SDL2_image-devel %endif %if %{user_static} -BuildRequires: glibc-static pcre-static glib2-static zlib-static +BuildRequires: glibc-static glib2-static zlib-static +%if 0%{?fedora} >= 37 +BuildRequires: pcre2-static +%else +BuildRequires: pcre-static %endif +%endif + # Requires for the Fedora 'qemu' metapackage Requires: %{name}-user = %{epoch}:%{version}-%{release} @@ -487,6 +503,7 @@ Requires: %{name}-system-alpha = %{epoch}:%{version}-%{release} Requires: %{name}-system-arm = %{epoch}:%{version}-%{release} Requires: %{name}-system-avr = %{epoch}:%{version}-%{release} Requires: %{name}-system-cris = %{epoch}:%{version}-%{release} +Requires: %{name}-system-loongarch64 = %{epoch}:%{version}-%{release} Requires: %{name}-system-m68k = %{epoch}:%{version}-%{release} Requires: %{name}-system-microblaze = %{epoch}:%{version}-%{release} Requires: %{name}-system-mips = %{epoch}:%{version}-%{release} @@ -503,8 +520,6 @@ Requires: %{name}-system-x86 = %{epoch}:%{version}-%{release} Requires: %{name}-system-xtensa = %{epoch}:%{version}-%{release} Requires: %{name}-img = %{epoch}:%{version}-%{release} Requires: %{name}-tools = %{epoch}:%{version}-%{release} -Requires: qemu-pr-helper = %{epoch}:%{version}-%{release} -Requires: vhostuser-backend(fs) %description @@ -685,11 +700,13 @@ Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} %description audio-alsa This package provides the additional ALSA audio driver for QEMU. +%if %{have_dbus_display} %package audio-dbus Summary: QEMU D-Bus audio driver Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} %description audio-dbus This package provides the additional D-Bus audio driver for QEMU. +%endif %package audio-oss Summary: QEMU OSS audio driver @@ -724,11 +741,13 @@ Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} %description ui-curses This package provides the additional curses UI for QEMU. +%if %{have_dbus_display} %package ui-dbus Summary: QEMU D-Bus UI driver Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} %description ui-dbus This package provides the additional D-Bus UI for QEMU. +%endif %package ui-gtk Summary: QEMU GTK UI driver @@ -919,11 +938,145 @@ Requires(postun): systemd-units # https://pagure.io/fedora-ci/general/issue/184 #Conflicts: qemu-user-binfmt #Provides: qemu-user-binfmt +Requires: qemu-user-static-aarch64 +Requires: qemu-user-static-alpha +Requires: qemu-user-static-arm +Requires: qemu-user-static-cris +Requires: qemu-user-static-hexagon +Requires: qemu-user-static-hppa +Requires: qemu-user-static-loongarch64 +Requires: qemu-user-static-m68k +Requires: qemu-user-static-microblaze +Requires: qemu-user-static-mips +Requires: qemu-user-static-nios2 +Requires: qemu-user-static-or1k +Requires: qemu-user-static-ppc +Requires: qemu-user-static-riscv +Requires: qemu-user-static-s390x +Requires: qemu-user-static-sh4 +Requires: qemu-user-static-sparc +Requires: qemu-user-static-x86 +Requires: qemu-user-static-xtensa + %description user-static This package provides the user mode emulation of qemu targets built as static binaries + +%package user-static-aarch64 +Summary: QEMU user mode emulation of aarch64 qemu targets static build +%description user-static-aarch64 +This package provides the aarch64 user mode emulation of qemu targets built as +static binaries + +%package user-static-alpha +Summary: QEMU user mode emulation of alpha qemu targets static build +%description user-static-alpha +This package provides the alpha user mode emulation of qemu targets built as +static binaries + +%package user-static-arm +Summary: QEMU user mode emulation of arm qemu targets static build +%description user-static-arm +This package provides the arm user mode emulation of qemu targets built as +static binaries + +%package user-static-cris +Summary: QEMU user mode emulation of cris qemu targets static build +%description user-static-cris +This package provides the cris user mode emulation of qemu targets built as +static binaries + +%package user-static-hexagon +Summary: QEMU user mode emulation of hexagon qemu targets static build +%description user-static-hexagon +This package provides the hexagon user mode emulation of qemu targets built as +static binaries + +%package user-static-hppa +Summary: QEMU user mode emulation of hppa qemu targets static build +%description user-static-hppa +This package provides the hppa user mode emulation of qemu targets built as +static binaries + +%package user-static-loongarch64 +Summary: QEMU user mode emulation of loongarch64 qemu targets static build +%description user-static-loongarch64 +This package provides the loongarch64 user mode emulation of qemu targets built as +static binaries + +%package user-static-m68k +Summary: QEMU user mode emulation of m68k qemu targets static build +%description user-static-m68k +This package provides the m68k user mode emulation of qemu targets built as +static binaries + +%package user-static-microblaze +Summary: QEMU user mode emulation of microblaze qemu targets static build +%description user-static-microblaze +This package provides the microblaze user mode emulation of qemu targets built as +static binaries + +%package user-static-mips +Summary: QEMU user mode emulation of mips qemu targets static build +%description user-static-mips +This package provides the mips user mode emulation of qemu targets built as +static binaries + +%package user-static-nios2 +Summary: QEMU user mode emulation of nios2 qemu targets static build +%description user-static-nios2 +This package provides the nios2 user mode emulation of qemu targets built as +static binaries + +%package user-static-or1k +Summary: QEMU user mode emulation of or1k qemu targets static build +%description user-static-or1k +This package provides the or1k user mode emulation of qemu targets built as +static binaries + +%package user-static-ppc +Summary: QEMU user mode emulation of ppc qemu targets static build +%description user-static-ppc +This package provides the ppc user mode emulation of qemu targets built as +static binaries + +%package user-static-riscv +Summary: QEMU user mode emulation of riscv qemu targets static build +%description user-static-riscv +This package provides the riscv user mode emulation of qemu targets built as +static binaries + +%package user-static-s390x +Summary: QEMU user mode emulation of s390x qemu targets static build +%description user-static-s390x +This package provides the s390x user mode emulation of qemu targets built as +static binaries + +%package user-static-sh4 +Summary: QEMU user mode emulation of sh4 qemu targets static build +%description user-static-sh4 +This package provides the sh4 user mode emulation of qemu targets built as +static binaries %endif +%package user-static-sparc +Summary: QEMU user mode emulation of sparc qemu targets static build +%description user-static-sparc +This package provides the sparc user mode emulation of qemu targets built as +static binaries + +%package user-static-x86 +Summary: QEMU user mode emulation of x86 qemu targets static build +%description user-static-x86 +This package provides the x86 user mode emulation of qemu targets built as +static binaries + +%package user-static-xtensa +Summary: QEMU user mode emulation of xtensa qemu targets static build +%description user-static-xtensa +This package provides the xtensa user mode emulation of qemu targets built as +static binaries + %package system-aarch64 Summary: QEMU system emulator for AArch64 @@ -1015,6 +1168,20 @@ Requires: %{name}-common = %{epoch}:%{version}-%{release} This package provides the QEMU system emulator for HPPA. +%package system-loongarch64 +Summary: QEMU system emulator for LoongArch (LA64) +Requires: %{name}-system-loongarch64-core = %{epoch}:%{version}-%{release} +%{requires_all_modules} +%description system-loongarch64 +This package provides the QEMU system emulator for Loongson boards. + +%package system-loongarch64-core +Summary: QEMU system emulator for LoongArch (LA64) +Requires: %{name}-common = %{epoch}:%{version}-%{release} +%description system-loongarch64-core +This package provides the QEMU system emulator for Loongson boards. + + %package system-m68k Summary: QEMU system emulator for ColdFire (m68k) Requires: %{name}-system-m68k-core = %{epoch}:%{version}-%{release} @@ -1225,11 +1392,9 @@ Requires: %{name}-common = %{epoch}:%{version}-%{release} This package provides the QEMU system emulator for Xtensa boards. - - %prep %setup -q -n qemu-%{version}%{?rcstr} -%autopatch -p1 +%autosetup -S git_am %global qemu_kvm_build qemu_kvm_build mkdir -p %{qemu_kvm_build} @@ -1241,10 +1406,12 @@ mkdir -p %{static_builddir} %build %define disable_everything \\\ --audio-drv-list= \\\ + --disable-alsa \\\ --disable-attr \\\ --disable-auth-pam \\\ --disable-avx2 \\\ --disable-avx512f \\\ + --disable-blkio \\\ --disable-block-drv-whitelist-in-tools \\\ --disable-bochs \\\ --disable-bpf \\\ @@ -1262,6 +1429,7 @@ mkdir -p %{static_builddir} --disable-crypto-afalg \\\ --disable-curl \\\ --disable-curses \\\ + --disable-dbus-display \\\ --disable-debug-info \\\ --disable-debug-mutex \\\ --disable-debug-tcg \\\ @@ -1277,6 +1445,7 @@ mkdir -p %{static_builddir} --disable-glusterfs \\\ --disable-gnutls \\\ --disable-gtk \\\ + --disable-gtk-clipboard \\\ --disable-guest-agent \\\ --disable-guest-agent-msi \\\ --disable-hax \\\ @@ -1332,6 +1501,7 @@ mkdir -p %{static_builddir} --disable-slirp-smbd \\\ --disable-smartcard \\\ --disable-snappy \\\ + --disable-sndio \\\ --disable-sparse \\\ --disable-spice \\\ --disable-spice-protocol \\\ @@ -1345,20 +1515,19 @@ mkdir -p %{static_builddir} --disable-user \\\ --disable-vde \\\ --disable-vdi \\\ + --disable-vfio-user-server \\\ --disable-vhost-crypto \\\ --disable-vhost-kernel \\\ --disable-vhost-net \\\ - --disable-vhost-scsi \\\ --disable-vhost-user \\\ --disable-vhost-user-blk-server \\\ --disable-vhost-vdpa \\\ - --disable-vhost-vsock \\\ --disable-virglrenderer \\\ --disable-virtfs \\\ --disable-virtiofsd \\\ --disable-vnc \\\ --disable-vnc-jpeg \\\ - --disable-vnc-png \\\ + --disable-png \\\ --disable-vnc-sasl \\\ --disable-vte \\\ --disable-vvfat \\\ @@ -1398,7 +1567,8 @@ run_configure() { --with-git=git \ --tls-priority=@QEMU,SYSTEM \ %{disable_everything} \ - "$@" + "$@" \ + || ( cat config.log ; exit 1 ) echo "config-host.mak contents:" echo "===" @@ -1418,15 +1588,19 @@ run_configure \ %if %{defined block_drivers_ro_list} --block-drv-ro-whitelist=%{block_drivers_ro_list} \ %endif + --enable-alsa \ --enable-attr \ %ifarch %{ix86} x86_64 --enable-avx2 \ %endif --enable-bpf \ --enable-cap-ng \ - --enable-capstone=auto \ + --enable-capstone \ --enable-coroutine-pool \ --enable-curl \ +%if %{have_dbus_display} + --enable-dbus-display \ +%endif --enable-debug-info \ --enable-docs \ %if %{have_fdt} @@ -1436,7 +1610,9 @@ run_configure \ --enable-gnutls \ --enable-guest-agent \ --enable-iconv \ +%if %{have_jack} --enable-jack \ +%endif --enable-kvm \ --enable-l2tpv3 \ --enable-libiscsi \ @@ -1471,7 +1647,7 @@ run_configure \ %endif --enable-seccomp \ --enable-selinux \ - --enable-slirp=system \ + --enable-slirp \ --enable-slirp-smbd \ --enable-snappy \ --enable-system \ @@ -1487,9 +1663,8 @@ run_configure \ --enable-vhost-user \ --enable-vhost-user-blk-server \ --enable-vhost-vdpa \ - --enable-vhost-vsock \ --enable-vnc \ - --enable-vnc-png \ + --enable-png \ --enable-vnc-sasl \ %if %{enable_werror} --enable-werror \ @@ -1547,7 +1722,6 @@ run_configure \ --enable-usb-redir \ --enable-vdi \ --enable-vhost-crypto \ - --enable-vhost-scsi \ %if %{have_virgl} --enable-virglrenderer \ %endif @@ -1559,8 +1733,7 @@ run_configure \ --enable-xen \ --enable-xen-pci-passthrough \ %endif - --enable-zstd \ - + --enable-zstd %if %{tools_only} %make_build qemu-img @@ -1730,6 +1903,7 @@ rm -rf %{buildroot}%{_datadir}/%{name}/sgabios.bin rm -rf %{buildroot}%{_datadir}/%{name}/edk2* rm -rf %{buildroot}%{_datadir}/%{name}/firmware + # Fedora specific stuff below %find_lang %{name} @@ -1799,11 +1973,8 @@ rm -rf %{static_buildroot} pushd %{qemu_kvm_build} echo "Testing %{name}-build" -# 2021-09: s390x tests randomly failing with 'Broken pipe' errors -# dhorak couldn't reproduce locally on an s390x machine so guessed -# it's a resource issue -# 2021-09: ppc64le intermittently hanging with no discernable pattern -%ifnarch s390x %{power64} +# 2022-06: ppc64le random qtest segfaults with no discernable pattern +%ifnarch %{power64} %make_build check %endif @@ -1842,11 +2013,102 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ /bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : %if %{user_static} -%post user-static +%post user-static-aarch64 /bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : -%postun user-static +%postun user-static-aarch64 +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : + +%post user-static-alpha +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : +%postun user-static-alpha +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : + +%post user-static-arm +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : +%postun user-static-arm +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : + +%post user-static-cris +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : +%postun user-static-cris +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : + +%post user-static-hexagon +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : +%postun user-static-hexagon +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : + +%post user-static-hppa +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : +%postun user-static-hppa +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : + +%post user-static-loongarch64 +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : +%postun user-static-loongarch64 +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : + +%post user-static-m68k +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : +%postun user-static-m68k +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : + +%post user-static-microblaze +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : +%postun user-static-microblaze +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : + +%post user-static-mips +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : +%postun user-static-mips +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : + +%post user-static-nios2 +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : +%postun user-static-nios2 +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : + +%post user-static-or1k +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : +%postun user-static-or1k +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : + +%post user-static-ppc +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : +%postun user-static-ppc +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : + +%post user-static-riscv +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : +%postun user-static-riscv +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : + +%post user-static-s390x +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : +%postun user-static-s390x +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : + +%post user-static-sh4 +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : +%postun user-static-sh4 /bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : %endif + +%post user-static-sparc +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : +%postun user-static-sparc +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : + +%post user-static-x86 +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : +%postun user-static-x86 +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : + +%post user-static-xtensa +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : +%postun user-static-xtensa +/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : + # endif !tools_only %endif @@ -1915,6 +2177,7 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %files common -f %{name}.lang %license COPYING COPYING.LIB LICENSE %dir %{_datadir}/%{name}/ +%dir %{_datadir}/%{name}/vhost-user/ %{_datadir}/icons/* %{_datadir}/%{name}/keymaps/ %{_datadir}/%{name}/linuxboot_dma.bin @@ -1974,8 +2237,10 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %files audio-alsa %{_libdir}/%{name}/audio-alsa.so +%if %{have_dbus_display} %files audio-dbus %{_libdir}/%{name}/audio-dbus.so +%endif %files audio-oss %{_libdir}/%{name}/audio-oss.so %files audio-pa @@ -1990,8 +2255,10 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %files ui-curses %{_libdir}/%{name}/ui-curses.so +%if %{have_dbus_display} %files ui-dbus %{_libdir}/%{name}/ui-dbus.so +%endif %files ui-gtk %{_libdir}/%{name}/ui-gtk.so %files ui-sdl @@ -2067,6 +2334,7 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %{_bindir}/qemu-cris %{_bindir}/qemu-hppa %{_bindir}/qemu-hexagon +%{_bindir}/qemu-loongarch64 %{_bindir}/qemu-m68k %{_bindir}/qemu-microblaze %{_bindir}/qemu-microblazeel @@ -2100,6 +2368,7 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %{_datadir}/systemtap/tapset/qemu-cris*.stp %{_datadir}/systemtap/tapset/qemu-hppa*.stp %{_datadir}/systemtap/tapset/qemu-hexagon*.stp +%{_datadir}/systemtap/tapset/qemu-loongarch64*.stp %{_datadir}/systemtap/tapset/qemu-m68k*.stp %{_datadir}/systemtap/tapset/qemu-microblaze*.stp %{_datadir}/systemtap/tapset/qemu-mips*.stp @@ -2119,11 +2388,160 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %if %{user_static} %files user-static %license COPYING COPYING.LIB LICENSE -# Just use wildcard matches here: we will catch any new/missing files -# in the qemu-user filelists -%{_exec_prefix}/lib/binfmt.d/qemu-*-static.conf -%{_bindir}/qemu-*-static -%{_datadir}/systemtap/tapset/qemu-*-static.stp + +%files user-static-aarch64 +%{_bindir}/qemu-aarch64-static +%{_bindir}/qemu-aarch64_be-static +%{_datadir}/systemtap/tapset/qemu-aarch64.stp +%{_datadir}/systemtap/tapset/qemu-aarch64_be-static.stp +%ifnarch aarch64 +%{_exec_prefix}/lib/binfmt.d/qemu-aarch64-static.conf +%endif +%{_exec_prefix}/lib/binfmt.d/qemu-aarch64_be-static.conf + +%files user-static-alpha +%{_bindir}/qemu-alpha-static +%{_datadir}/systemtap/tapset/qemu-alpha-static.stp +%{_exec_prefix}/lib/binfmt.d/qemu-alpha-static.conf + +%files user-static-arm +%{_bindir}/qemu-arm-static +%{_bindir}/qemu-armeb-static +%{_datadir}/systemtap/tapset/qemu-armeb-static.stp +%ifnarch aarch64 +%{_exec_prefix}/lib/binfmt.d/qemu-arm-static.conf +%endif +%{_exec_prefix}/lib/binfmt.d/qemu-armeb-static.conf + +%files user-static-cris +%{_bindir}/qemu-cris-static +%{_datadir}/systemtap/tapset/qemu-cris-static.stp + +%files user-static-hexagon +%{_bindir}/qemu-hexagon-static +%{_datadir}/systemtap/tapset/qemu-hexagon-static.stp +%{_exec_prefix}/lib/binfmt.d/qemu-hexagon-static.conf + +%files user-static-hppa +%{_bindir}/qemu-hppa-static +%{_datadir}/systemtap/tapset/qemu-hppa-static.stp +%{_exec_prefix}/lib/binfmt.d/qemu-hppa-static.conf + +%files user-static-loongarch64 +%{_bindir}/qemu-loongarch64-static +%{_datadir}/systemtap/tapset/qemu-loongarch64-static.stp +%{_exec_prefix}/lib/binfmt.d/qemu-loongarch64-static.conf + +%files user-static-m68k +%{_bindir}/qemu-m68k-static +%{_datadir}/systemtap/tapset/qemu-m68k-static.stp +%{_exec_prefix}/lib/binfmt.d/qemu-m68k-static.conf + +%files user-static-microblaze +%{_bindir}/qemu-microblaze-static +%{_bindir}/qemu-microblazeel-static +%{_datadir}/systemtap/tapset/qemu-microblaze-static.stp +%{_datadir}/systemtap/tapset/qemu-microblazeel-static.stp +%{_exec_prefix}/lib/binfmt.d/qemu-microblaze-static.conf +%{_exec_prefix}/lib/binfmt.d/qemu-microblazeel-static.conf + +%files user-static-mips +%{_bindir}/qemu-mips-static +%{_bindir}/qemu-mips64-static +%{_bindir}/qemu-mips64el-static +%{_bindir}/qemu-mipsel-static +%{_bindir}/qemu-mipsn32-static +%{_bindir}/qemu-mipsn32el-static +%{_datadir}/systemtap/tapset/qemu-mips-static.stp +%{_datadir}/systemtap/tapset/qemu-mips64-static.stp +%{_datadir}/systemtap/tapset/qemu-mips64el-static.stp +%{_datadir}/systemtap/tapset/qemu-mipsel-static.stp +%{_datadir}/systemtap/tapset/qemu-mipsn32-static.stp +%{_datadir}/systemtap/tapset/qemu-mipsn32el-static.stp +%{_exec_prefix}/lib/binfmt.d/qemu-mips-static.conf +%{_exec_prefix}/lib/binfmt.d/qemu-mips64-static.conf +%{_exec_prefix}/lib/binfmt.d/qemu-mips64el-static.conf +%{_exec_prefix}/lib/binfmt.d/qemu-mipsel-static.conf +%{_exec_prefix}/lib/binfmt.d/qemu-mipsn32-static.conf +%{_exec_prefix}/lib/binfmt.d/qemu-mipsn32el-static.conf + +%files user-static-nios2 +%{_bindir}/qemu-nios2-static +%{_datadir}/systemtap/tapset/qemu-nios2-static.stp + +%files user-static-or1k +%{_bindir}/qemu-or1k-static +%{_datadir}/systemtap/tapset/qemu-or1k-static.stp +%{_exec_prefix}/lib/binfmt.d/qemu-or1k-static.conf + +%files user-static-ppc +%{_bindir}/qemu-ppc-static +%{_bindir}/qemu-ppc64-static +%{_bindir}/qemu-ppc64le-static +%{_datadir}/systemtap/tapset/qemu-ppc-static.stp +%{_datadir}/systemtap/tapset/qemu-ppc64-static.stp +%{_datadir}/systemtap/tapset/qemu-ppc64le-static.stp +%{_exec_prefix}/lib/binfmt.d/qemu-ppc-static.conf +%{_exec_prefix}/lib/binfmt.d/qemu-ppc64-static.conf +%ifnarch ppc64le +%{_exec_prefix}/lib/binfmt.d/qemu-ppc64le-static.conf +%endif + +%files user-static-riscv +%{_bindir}/qemu-riscv32-static +%{_bindir}/qemu-riscv64-static +%{_datadir}/systemtap/tapset/qemu-riscv32-static.stp +%{_datadir}/systemtap/tapset/qemu-riscv64-static.stp +%{_exec_prefix}/lib/binfmt.d/qemu-riscv32-static.conf +%ifnarch riscv64 +%{_exec_prefix}/lib/binfmt.d/qemu-riscv64-static.conf +%endif + +%files user-static-s390x +%{_bindir}/qemu-s390x-static +%{_datadir}/systemtap/tapset/qemu-s390x-static.stp +%ifnarch s390x +%{_exec_prefix}/lib/binfmt.d/qemu-s390x-static.conf +%endif + +%files user-static-sh4 +%{_bindir}/qemu-sh4-static +%{_bindir}/qemu-sh4eb-static +%{_datadir}/systemtap/tapset/qemu-sh4-static.stp +%{_datadir}/systemtap/tapset/qemu-sh4eb-static.stp +%{_exec_prefix}/lib/binfmt.d/qemu-sh4-static.conf +%{_exec_prefix}/lib/binfmt.d/qemu-sh4eb-static.conf + +%files user-static-sparc +%{_bindir}/qemu-sparc-static +%{_bindir}/qemu-sparc32plus-static +%{_bindir}/qemu-sparc64-static +%{_datadir}/systemtap/tapset/qemu-sparc-static.stp +%{_datadir}/systemtap/tapset/qemu-sparc32plus-static.stp +%{_datadir}/systemtap/tapset/qemu-sparc64-static.stp +%{_exec_prefix}/lib/binfmt.d/qemu-sparc-static.conf +%{_exec_prefix}/lib/binfmt.d/qemu-sparc32plus-static.conf +%{_exec_prefix}/lib/binfmt.d/qemu-sparc64-static.conf + +%files user-static-x86 +%{_bindir}/qemu-i386-static +%{_bindir}/qemu-x86_64-static +%{_datadir}/systemtap/tapset/qemu-i386-static.stp +%{_datadir}/systemtap/tapset/qemu-x86_64-static.stp +%ifnarch %{ix86} x86_64 +%{_exec_prefix}/lib/binfmt.d/qemu-i386-static.conf +%{_exec_prefix}/lib/binfmt.d/qemu-i486-static.conf +%{_exec_prefix}/lib/binfmt.d/qemu-x86_64-static.conf +%endif + +%files user-static-xtensa +%{_bindir}/qemu-xtensa-static +%{_bindir}/qemu-xtensaeb-static +%{_datadir}/systemtap/tapset/qemu-xtensa-static.stp +%{_datadir}/systemtap/tapset/qemu-xtensaeb-static.stp +%{_exec_prefix}/lib/binfmt.d/qemu-xtensa-static.conf +%{_exec_prefix}/lib/binfmt.d/qemu-xtensaeb-static.conf + %endif @@ -2172,6 +2590,13 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %{_datadir}/%{name}/hppa-firmware.img +%files system-loongarch64 +%files system-loongarch64-core +%{_bindir}/qemu-system-loongarch64 +%{_datadir}/systemtap/tapset/qemu-system-loongarch64*.stp +%{_mandir}/man1/qemu-system-loongarch64.1* + + %files system-m68k %files system-m68k-core %{_bindir}/qemu-system-m68k @@ -2321,6 +2746,55 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %changelog +* Wed Jan 11 2023 Richard W.M. Jones - 2:7.2.0-4 +- Rebuild for xen-4.17.0, second attempt + +* Tue Jan 10 2023 Daniel P. Berrangé - 7.2.0-3 +- Fix compat with linux > 6.1 headers +- Re-enable iotests + +* Tue Jan 03 2023 Richard W.M. Jones - 2:7.2.0-2 +- Rebuild for xen-4.17.0 + +* Mon Dec 19 2022 Eduardo Lima (Etrunko) - 7.2.0-1 +- Rebase to qemu 7.2.0 + +* Fri Nov 11 2022 Eduardo Lima (Etrunko) - 7.1.0-4 +- Update libbpf dependency + +* Thu Sep 08 2022 Davide Cavalca - 7.1.0-3 +- Unconditionally enable capstone-devel + +* Thu Sep 08 2022 Davide Cavalca - 7.1.0-2 +- Bump required meson version + +* Wed Aug 31 2022 Eduardo Lima (Etrunko) - 7.1.0-1 +- Rebase to qemu 7.1.0 + +* Tue Aug 2 2022 Daniel P. Berrangé - 7.0.0-9 +- Fix compat with glibc 2.36 headers + +* Mon Jul 25 2022 Paolo Bonzini - 2:7.0.0-8 +- Replace pcre-static dependency with pcre2-static, to adjust for glib switching + +* Fri Jul 22 2022 Fedora Release Engineering - 2:7.0.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sat Jun 11 2022 Cole Robinson - 7.0.0-6 +- Adjust for Xen dropping 32bit arches + +* Mon Jun 06 2022 Daniel J Walsh - 7.0.0-5 +- Split qemu-user-static into per-arch subpackages (bz 2061584) + +* Thu Jun 02 2022 Cole Robinson - 7.0.0-4 +- Fix virtio-scsi hang (bz #2079347) +- Add dep on virtio-gpu-ccw (bz #2091964) + +* Tue May 17 2022 Cole Robinson - 7.0.0-3 +- Make qemu-common own /usr/share/qemu/vhost-user (bz 2086836) +- Add virtiofsd to qemu-system-* deps (bz 2083155) +- Add qemu-pr-helper to qemu-system-* deps + * Tue May 3 2022 Daniel P. Berrangé - 7.0.0-2 - Drop redundant qemu-trace-stap copy from qemu-user-static (rhbz#2061584) - Remove qemu-common dep from qemu-user-static (rhbz#2061584) @@ -2483,125 +2957,3 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ * Mon Jan 11 2021 Paolo Bonzini - 2:5.2.0-5 - Use symlink for qemu-kvm. - Fix make check on bash 5.1. - -* Fri Dec 11 2020 Richard W.M. Jones - 2:5.2.0-4 -- qemu-char-spice not qemu-chardev-spice. - -* Thu Dec 10 2020 Mohan Boddu - 5.2.0-2 -- Fixing the ISA Dependencies - -* Wed Dec 09 2020 Cole Robinson - 5.2.0-1 -- Rebase to qemu-5.2.0 GA -- Fix spice and GL UI module deps (bz 1904603) - -* Thu Dec 03 2020 Richard W.M. Jones - 5.2.0-0.9.rc4 -- Enable qemu-kvm-core package on riscv64. - -* Thu Dec 03 2020 Cole Robinson - 5.2.0-0.8.rc4 -- Rebase to qemu-5.2.0-rc4 - -* Tue Nov 24 2020 Cole Robinson - 5.2.0-0.7.rc2 -- Fix running 9p tests in copr - -* Thu Nov 19 2020 Paolo Bonzini - 5.2.0-0.6.rc2 -- Remove --python=... to force use of system meson - -* Thu Nov 19 2020 Daniel P. Berrangé - 5.2.0-0.5.rc2 -- Re-enable systemtap tracing - -* Wed Nov 18 2020 Cole Robinson - 5.2.0-0.4.rc2 -- Rebase to qemu-5.2.0-rc2 - -* Fri Nov 13 2020 Daniel P. Berrangé - 5.2.0-0.3.rc1 -- Disable user mode static builds in ELN - -* Wed Nov 11 2020 Cole Robinson - 5.2.0-0.2.rc1 -- Rebase to qemu-5.2.0-rc1 - -* Sun Nov 08 2020 Cole Robinson - 5.2.0-0.1.rc0 -- Rebase to qemu-5.2.0-rc0 - -* Thu Nov 5 2020 Daniel P. Berrangé - 5.1.0-7 -- Disable LTO again. Tests were not passing, we were ignoring failures. - -* Mon Oct 26 2020 Daniel P. Berrangé - 5.1.0-6 -- Re-enable LTO since tests now pass without asserts - -* Fri Sep 4 2020 Daniel P. Berrangé - 5.1.0-5 -- Drop conditions for ppc, ppc64, mips64 and s390 arches -- Fix host qemu binary path for aarch64 -- Re-enable kernel BR for QEMU sanity check -- Fix conditionals for enabling QEMU sanity check -- Check whether emulator works before doing sanity check -- Provide explicit kernel path for QEMU sanity check -- Make QEMU sanity check a build blocker - -* Thu Sep 3 2020 Daniel P. Berrangé - 5.1.0-4 -- Add btrfs ioctls to linux-user (rhbz #1872918) - -* Tue Aug 18 2020 Tom Stellard - 5.1.0-3 -- Add BuildRequires: gcc -- https://fedoraproject.org/wiki/Packaging:C_and_C%2B%2B#BuildRequires_and_Requires - -* Mon Aug 17 2020 Cole Robinson - 5.1.0-2 -- Disable dtrace generation to fix use of modules (bz 1869339) - -* Tue Aug 11 2020 Cole Robinson - 5.1.0-1 -- Update to version 5.1.0 - -* Fri Aug 07 2020 Cole Robinson - 5.1.0-0.3.rc3 -- Update to version 5.1.0-rc3 - -* Thu Aug 06 2020 Merlin Mathesius - 5.1.0-0.2.rc2 -- Use new %%{kernel_arches} macro to determine when a full kernel is available - -* Wed Aug 05 2020 Cole Robinson - 5.1.0-0.2.rc2 -- Pull in new modules by default, like we do for others - -* Tue Aug 04 2020 Cole Robinson - 5.1.0-0.1.rc2 -- Update to qemu 5.1.0 rc2 - -* Fri Jul 31 2020 Daniel P. Berrangé - 5.0.0-6 -- Remove obsolete Fedora conditionals (PR#9) - -* Thu Jul 30 2020 Richard W.M. Jones - 5.0.0-5 -- Disable LTO as it caused many strange assert failures. - -* Wed Jul 29 2020 Richard W.M. Jones - 5.0.0-4 -- Backport Dan's upstream patch to fix insecure cert in test suite. - -* Mon Jul 27 2020 Kevin Fenzi - 5.0.0-3 -- Rebuild for new xen - -* Wed May 13 2020 Cole Robinson - 5.0.0-2 -- Fix iouring hang (bz #1823751) - -* Wed May 06 2020 Cole Robinson - 5.0.0-1 -- Update to version 5.0.0 - -* Thu Apr 16 2020 Cole Robinson - 5.0.0-0.3.rc3 -- Update to qemu 5.0.0 rc3 - -* Thu Apr 09 2020 Cole Robinson - 5.0.0-0.3.rc2 -- Update to qemu 5.0.0 rc2 - -* Wed Apr 08 2020 Adam Williamson - 2:5.0.0-0.2.rc0 -- Rebuild for new brltty - -* Wed Mar 25 2020 Cole Robinson - 2:5.0.0-0.1.rc0 -- Update to qemu-5.0.0-rc0 - -* Tue Mar 17 2020 Fabiano Fidêncio - 2:4.2.0-7 -- Fix segfault with SR-IOV hot-{plug,unplug} (bz #1814017) - -* Tue Feb 25 2020 Cole Robinson - 2:4.2.0-6 -- Rebuild for libiscsi soname bump - -* Sat Feb 15 2020 Cole Robinson - 2:4.2.0-5 -- Fix ppc shutdown issue (bz #1784961) - -* Tue Jan 28 2020 Cole Robinson - 2:4.2.0-4 -- virtio-fs support - -* Sat Jan 25 2020 Richard W.M. Jones - 4.2.0-3 -- Add miscellaneous fixes for RISC-V (RHBZ#1794902).