ff9ada
From 3d5a82d172345d17e300672909835262ff9dc917 Mon Sep 17 00:00:00 2001
ddf19c
From: Miroslav Rezanina <mrezanin@redhat.com>
ff9ada
Date: Wed, 2 Sep 2020 09:11:07 +0200
ddf19c
Subject: Enable/disable devices for RHEL
ddf19c
ddf19c
This commit adds all changes related to changes in supported devices.
ddf19c
ddf19c
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
ddf19c
ddf19c
Rebase notes (qemu 3.1.0)
ddf19c
- spapr_rng disabled in default_config
ddf19c
- new hyperv.mak in default configs
ddf19c
- Move changes from x86_64-softmmu.mak to i386-softmmu.mak
ddf19c
- Added CONFIG_VIRTIO_MMIO to aarch64-softmmu.mak
ddf19c
- Removed config_vga_isa.c changes as no longer needed
ddf19c
- Removed new devices
ddf19c
ddf19c
Rebase notes (4.0.0):
ddf19c
- Added CONFIG_PCI_EXPRESS_GENERIC_BRIDGE for aarch64-softmmu.mak
ddf19c
- Added CONFIG_ARM_VIRT for aarch64-softmmu.mak
ddf19c
- Switch to KConfig (upstream)
ddf19c
 - Using device whitelist + without-defualt-devices option
ddf19c
ddf19c
Rebase notes (4.1.0):
ddf19c
- Added CONFIG_USB_OHCI_PCI for ppc64
ddf19c
- Added CONFIG_XIVE_KVM for ppc64
ddf19c
- Added CONFIG_ACPI_PCI for x86_64
ddf19c
- Added CONFIG_SEMIHOSTING for aarch64
ddf19c
- Cleanup aarch64 devices
ddf19c
- Do not build a15mpcore.c
ddf19c
- Removed ide-isa.c stub file
ddf19c
- Use CONFIG_USB_EHCI_PCI on x86_64 (new upstream)
ddf19c
ddf19c
Rebase notes (4.2.0-rc0):
ddf19c
- Use conditional build for isa-superio.c (upstream change)
ddf19c
- Rename PCI_PIIX to PCI_I440FX (upstream change)
ddf19c
ddf19c
Rebase notes (4.2.0-rc3):
ddf19c
- Disabled ccid-card-emulated (patch 92566)
ddf19c
- Disabled vfio-pci-igd-lpc-bridge (patch 92565)
ddf19c
ff9ada
Rebase notes (5.1.0):
ff9ada
- added CONFIG_PCI_EXPRESS on ppc64 (due to upstream dependency)
ff9ada
- Added CONFIG_NVDIMM
ff9ada
- updated cortex-15 disabling to upstream code
ff9ada
- Add CONFIG_ACPI_APEI for aarch64
ff9ada
- removed obsolete hw/bt/Makefile.objs chunk
ff9ada
- removed unnecessary changes in target/i386/cpu.c
ff9ada
ff9ada
Rebase notes (5.2.0 rc0):
ff9ada
- Added CONFIG_USB_XHCI_PCI on aarch64 ppc64 and x86_64
ff9ada
- remove vl.c hack for no hpet
ff9ada
- Enable CONFIG_PTIMER for aarch64
ff9ada
- Do not package hw-display-virtio-gpu.so on s390x
ff9ada
ff9ada
Rebase notes (5.2.0 rc1):
ff9ada
- Added CONFIG_ARM_GIC for aarch64 (required for build)
ff9ada
ff9ada
Rebase notes (weekly-210113):
ff9ada
- Removed XICS_KVM, XICS_SPAPR, XIVE_KVM and XIVE_SPAPR config (removed upstream)
ff9ada
ff9ada
Rebase notes (weekly-210120):
ff9ada
- Add CONFIG_ARM_COMPATIBLE_SEMIHOSTING option
ff9ada
ff9ada
Rebase notes (weekly-210203):
ff9ada
- Rename CONFIG_PVPANIC to CONFIG_PVPANIC_ISA
ff9ada
ff9ada
Rebase notes (weekly-210317):
ff9ada
- Add new USB_STORAGE_CORE and USB_STORAGE_CLASSIC config for ppc64 and x86_64
ff9ada
- Update disabling TCG cpus for AArch64
ff9ada
ff9ada
Rebase notes (weekly-210519):
ff9ada
- Do not use CONFIG_SPICE and CONFIG_OPENGL in default configs
ff9ada
ff9ada
Rebase notes (weekly-210623):
ff9ada
- Add CONFIG_TPM for archs with used TPM functionality
ff9ada
ff9ada
Rebase notes (weekly-210714):
ff9ada
- default_configs moved to configs
ff9ada
ff9ada
Rebase notes (6.1.0 rc2):
ff9ada
- Use --with-device-ARCH configure option to use redhat config files
ff9ada
ff9ada
Rebase notes (6.2.0 rc3):
ff9ada
- Do not remove -no-hpet documentation
ddf19c
Merged patches (qemu 3.1.0):
ddf19c
- d51e082 Re-enable CONFIG_HYPERV_TESTDEV
ddf19c
- 4b889f3 Declare cirrus-vga as deprecated
ddf19c
- b579d32 Do not build bluetooth support
ddf19c
- 3eef52a Disable CONFIG_IPMI and CONFIG_I2C for ppc64
ddf19c
- 9caf292 Disable CONFIG_CAN_BUS and CONFIG_CAN_SJA1000
ddf19c
ddf19c
Merged patches (4.1.0):
ddf19c
- 20a51f6 fdc: Revert downstream disablement of device "floppy"
ddf19c
- f869cc0 fdc: Restrict floppy controllers to RHEL-7 machine types
ddf19c
- 5909721 aarch64: Compile out IOH3420
ddf19c
- 27b7c44 rh: set CONFIG_BOCHS_DISPLAY=y for x86 (partial)
ddf19c
- 495a27d x86_64-rh-devices: add missing TPM passthrough
ddf19c
- e1fe9fe x86_64-rh-devices: enable TPM emulation (partial)
ddf19c
ddf19c
Merged patches (4.2.0):
ddf19c
- f7587dd RHEL: disable hostmem-memfd
ddf19c
ff9ada
Merged patches (5.1.0):
ff9ada
- 4543a3c i386: Remove cpu64-rhel6 CPU model
ff9ada
- 96533 aarch64: Remove tcg cpu types (pjw commit)
ff9ada
- 559d589 Revert "RHEL: disable hostmem-memfd"
ff9ada
- 441128e enable ramfb
ff9ada
ff9ada
Merged patches (5.2.0 rc0):
ff9ada
- f70eb50 RHEL-only: Enable vTPM for POWER in downstream configs
ff9ada
- 69d8ae7 redhat: fix 5.0 rebase missing ISA TPM TIS
ff9ada
- 8310f89 RHEL-only: Enable vTPM for ARM in downstream configs
ff9ada
- 4a8ccfd Disable TPM passthrough backend on ARM
ff9ada
ff9ada
Merged patches (6.0.0):
ff9ada
- ff817df9e3 config: enable VFIO_CCW
ff9ada
- 70d3924521 redhat: Add some devices for exporting upstream machine types
ff9ada
 - without machine type chunks
ff9ada
- efac91b2b4 default-configs: Enable vhost-user-blk
ff9ada
ff9ada
Merged patches (weekly-210630):
ff9ada
- 59a178acff disable CONFIG_USB_STORAGE_BOT
ff9ada
ff9ada
Merged patches (6.1.0 rc2):
ff9ada
- 86f0025f16 aarch64: Add USB storage devices
ddf19c
---
ff9ada
 .../aarch64-softmmu/aarch64-rh-devices.mak    |  31 ++++++
ff9ada
 .../ppc64-softmmu/ppc64-rh-devices.mak        |  36 ++++++
ff9ada
 configs/devices/rh-virtio.mak                 |  10 ++
ff9ada
 .../s390x-softmmu/s390x-rh-devices.mak        |  16 +++
ff9ada
 .../x86_64-softmmu/x86_64-rh-devices.mak      | 104 ++++++++++++++++++
ff9ada
 .../x86_64-upstream-devices.mak               |   4 +
ff9ada
 hw/acpi/ich9.c                                |   4 +-
ff9ada
 hw/arm/meson.build                            |   2 +-
ff9ada
 hw/block/fdc.c                                |  10 ++
ff9ada
 hw/char/parallel.c                            |   9 ++
ff9ada
 hw/cpu/meson.build                            |   5 +-
ff9ada
 hw/display/cirrus_vga.c                       |   3 +
ff9ada
 hw/ide/piix.c                                 |   5 +-
ff9ada
 hw/input/pckbd.c                              |   2 +
ff9ada
 hw/net/e1000.c                                |   2 +
ff9ada
 hw/ppc/spapr_cpu_core.c                       |   2 +
ff9ada
 hw/timer/hpet.c                               |   8 ++
ff9ada
 hw/usb/meson.build                            |   2 +-
ff9ada
 redhat/qemu-kvm.spec.template                 |   9 +-
ff9ada
 target/arm/cpu_tcg.c                          |  10 ++
ff9ada
 target/ppc/cpu-models.c                       |  10 ++
ff9ada
 target/s390x/cpu_models_sysemu.c              |   3 +
ff9ada
 target/s390x/kvm/kvm.c                        |   8 ++
ff9ada
 23 files changed, 286 insertions(+), 9 deletions(-)
ff9ada
 create mode 100644 configs/devices/aarch64-softmmu/aarch64-rh-devices.mak
ff9ada
 create mode 100644 configs/devices/ppc64-softmmu/ppc64-rh-devices.mak
ff9ada
 create mode 100644 configs/devices/rh-virtio.mak
ff9ada
 create mode 100644 configs/devices/s390x-softmmu/s390x-rh-devices.mak
ff9ada
 create mode 100644 configs/devices/x86_64-softmmu/x86_64-rh-devices.mak
ff9ada
 create mode 100644 configs/devices/x86_64-softmmu/x86_64-upstream-devices.mak
ddf19c
ff9ada
diff --git a/configs/devices/aarch64-softmmu/aarch64-rh-devices.mak b/configs/devices/aarch64-softmmu/aarch64-rh-devices.mak
ddf19c
new file mode 100644
ff9ada
index 0000000000..0d4f9e6e4b
ddf19c
--- /dev/null
ff9ada
+++ b/configs/devices/aarch64-softmmu/aarch64-rh-devices.mak
ff9ada
@@ -0,0 +1,31 @@
ff9ada
+include ../rh-virtio.mak
ddf19c
+
ddf19c
+CONFIG_ARM_GIC_KVM=y
ff9ada
+CONFIG_ARM_GIC=y
ddf19c
+CONFIG_ARM_SMMUV3=y
ddf19c
+CONFIG_ARM_V7M=y
ddf19c
+CONFIG_ARM_VIRT=y
ddf19c
+CONFIG_EDID=y
ddf19c
+CONFIG_PCIE_PORT=y
ddf19c
+CONFIG_PCI_DEVICES=y
ddf19c
+CONFIG_PCI_TESTDEV=y
ddf19c
+CONFIG_PFLASH_CFI01=y
ddf19c
+CONFIG_SCSI=y
ddf19c
+CONFIG_SEMIHOSTING=y
ddf19c
+CONFIG_USB=y
ddf19c
+CONFIG_USB_XHCI=y
ff9ada
+CONFIG_USB_XHCI_PCI=y
ff9ada
+CONFIG_USB_STORAGE_CORE=y
ff9ada
+CONFIG_USB_STORAGE_CLASSIC=y
ddf19c
+CONFIG_VFIO=y
ddf19c
+CONFIG_VFIO_PCI=y
ddf19c
+CONFIG_VIRTIO_MMIO=y
ddf19c
+CONFIG_VIRTIO_PCI=y
ddf19c
+CONFIG_XIO3130=y
ff9ada
+CONFIG_NVDIMM=y
ff9ada
+CONFIG_ACPI_APEI=y
ff9ada
+CONFIG_TPM=y
ff9ada
+CONFIG_TPM_EMULATOR=y
ff9ada
+CONFIG_TPM_TIS_SYSBUS=y
ff9ada
+CONFIG_PTIMER=y
ff9ada
+CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
ff9ada
diff --git a/configs/devices/ppc64-softmmu/ppc64-rh-devices.mak b/configs/devices/ppc64-softmmu/ppc64-rh-devices.mak
ddf19c
new file mode 100644
ff9ada
index 0000000000..73e3ee0293
ddf19c
--- /dev/null
ff9ada
+++ b/configs/devices/ppc64-softmmu/ppc64-rh-devices.mak
ff9ada
@@ -0,0 +1,36 @@
ff9ada
+include ../rh-virtio.mak
ddf19c
+
ddf19c
+CONFIG_DIMM=y
ddf19c
+CONFIG_MEM_DEVICE=y
ff9ada
+CONFIG_NVDIMM=y
ddf19c
+CONFIG_PCI=y
ddf19c
+CONFIG_PCI_DEVICES=y
ddf19c
+CONFIG_PCI_TESTDEV=y
ff9ada
+CONFIG_PCI_EXPRESS=y
ddf19c
+CONFIG_PSERIES=y
ddf19c
+CONFIG_SCSI=y
ddf19c
+CONFIG_SPAPR_VSCSI=y
ddf19c
+CONFIG_TEST_DEVICES=y
ddf19c
+CONFIG_USB=y
ddf19c
+CONFIG_USB_OHCI=y
ddf19c
+CONFIG_USB_OHCI_PCI=y
ddf19c
+CONFIG_USB_SMARTCARD=y
ff9ada
+CONFIG_USB_STORAGE_CORE=y
ff9ada
+CONFIG_USB_STORAGE_CLASSIC=y
ddf19c
+CONFIG_USB_XHCI=y
ddf19c
+CONFIG_USB_XHCI_NEC=y
ff9ada
+CONFIG_USB_XHCI_PCI=y
ddf19c
+CONFIG_VFIO=y
ddf19c
+CONFIG_VFIO_PCI=y
ddf19c
+CONFIG_VGA=y
ddf19c
+CONFIG_VGA_PCI=y
ddf19c
+CONFIG_VHOST_USER=y
ddf19c
+CONFIG_VIRTIO_PCI=y
ddf19c
+CONFIG_VIRTIO_VGA=y
ddf19c
+CONFIG_WDT_IB6300ESB=y
ddf19c
+CONFIG_XICS=y
ddf19c
+CONFIG_XIVE=y
ff9ada
+CONFIG_TPM=y
ff9ada
+CONFIG_TPM_SPAPR=y
ff9ada
+CONFIG_TPM_EMULATOR=y
ff9ada
+CONFIG_TPM_PASSTHROUGH=y
ff9ada
diff --git a/configs/devices/rh-virtio.mak b/configs/devices/rh-virtio.mak
ddf19c
new file mode 100644
ddf19c
index 0000000000..94ede1b5f6
ddf19c
--- /dev/null
ff9ada
+++ b/configs/devices/rh-virtio.mak
ddf19c
@@ -0,0 +1,10 @@
ddf19c
+CONFIG_VIRTIO=y
ddf19c
+CONFIG_VIRTIO_BALLOON=y
ddf19c
+CONFIG_VIRTIO_BLK=y
ddf19c
+CONFIG_VIRTIO_GPU=y
ddf19c
+CONFIG_VIRTIO_INPUT=y
ddf19c
+CONFIG_VIRTIO_INPUT_HOST=y
ddf19c
+CONFIG_VIRTIO_NET=y
ddf19c
+CONFIG_VIRTIO_RNG=y
ddf19c
+CONFIG_VIRTIO_SCSI=y
ddf19c
+CONFIG_VIRTIO_SERIAL=y
ff9ada
diff --git a/configs/devices/s390x-softmmu/s390x-rh-devices.mak b/configs/devices/s390x-softmmu/s390x-rh-devices.mak
ddf19c
new file mode 100644
ff9ada
index 0000000000..165c082e87
ddf19c
--- /dev/null
ff9ada
+++ b/configs/devices/s390x-softmmu/s390x-rh-devices.mak
ff9ada
@@ -0,0 +1,16 @@
ff9ada
+include ../rh-virtio.mak
ddf19c
+
ddf19c
+CONFIG_PCI=y
ddf19c
+CONFIG_S390_CCW_VIRTIO=y
ddf19c
+CONFIG_S390_FLIC=y
ddf19c
+CONFIG_S390_FLIC_KVM=y
ddf19c
+CONFIG_SCLPCONSOLE=y
ddf19c
+CONFIG_SCSI=y
ddf19c
+CONFIG_TERMINAL3270=y
ddf19c
+CONFIG_VFIO=y
ddf19c
+CONFIG_VFIO_AP=y
ff9ada
+CONFIG_VFIO_CCW=y
ddf19c
+CONFIG_VFIO_PCI=y
ddf19c
+CONFIG_VHOST_USER=y
ddf19c
+CONFIG_VIRTIO_CCW=y
ddf19c
+CONFIG_WDT_DIAG288=y
ff9ada
diff --git a/configs/devices/x86_64-softmmu/x86_64-rh-devices.mak b/configs/devices/x86_64-softmmu/x86_64-rh-devices.mak
ddf19c
new file mode 100644
ff9ada
index 0000000000..ddf036f042
ddf19c
--- /dev/null
ff9ada
+++ b/configs/devices/x86_64-softmmu/x86_64-rh-devices.mak
ff9ada
@@ -0,0 +1,104 @@
ff9ada
+include ../rh-virtio.mak
ff9ada
+include x86_64-upstream-devices.mak
ddf19c
+
ddf19c
+CONFIG_AC97=y
ddf19c
+CONFIG_ACPI=y
ddf19c
+CONFIG_ACPI_PCI=y
ddf19c
+CONFIG_ACPI_CPU_HOTPLUG=y
ddf19c
+CONFIG_ACPI_MEMORY_HOTPLUG=y
ddf19c
+CONFIG_ACPI_NVDIMM=y
ddf19c
+CONFIG_ACPI_SMBUS=y
ddf19c
+CONFIG_ACPI_VMGENID=y
ddf19c
+CONFIG_ACPI_X86=y
ddf19c
+CONFIG_ACPI_X86_ICH=y
ddf19c
+CONFIG_AHCI=y
ddf19c
+CONFIG_APIC=y
ddf19c
+CONFIG_APM=y
ddf19c
+CONFIG_BOCHS_DISPLAY=y
ddf19c
+CONFIG_DIMM=y
ddf19c
+CONFIG_E1000E_PCI_EXPRESS=y
ddf19c
+CONFIG_E1000_PCI=y
ddf19c
+CONFIG_EDU=y
ddf19c
+CONFIG_FDC=y
ff9ada
+CONFIG_FDC_SYSBUS=y
ddf19c
+CONFIG_FW_CFG_DMA=y
ddf19c
+CONFIG_HDA=y
ddf19c
+CONFIG_HYPERV=y
ddf19c
+CONFIG_HYPERV_TESTDEV=y
ddf19c
+CONFIG_I2C=y
ddf19c
+CONFIG_I440FX=y
ddf19c
+CONFIG_I8254=y
ddf19c
+CONFIG_I8257=y
ddf19c
+CONFIG_I8259=y
ddf19c
+CONFIG_I82801B11=y
ddf19c
+CONFIG_IDE_CORE=y
ddf19c
+CONFIG_IDE_PCI=y
ddf19c
+CONFIG_IDE_PIIX=y
ddf19c
+CONFIG_IDE_QDEV=y
ddf19c
+CONFIG_IOAPIC=y
ddf19c
+CONFIG_IOH3420=y
ddf19c
+CONFIG_ISA_BUS=y
ddf19c
+CONFIG_ISA_DEBUG=y
ddf19c
+CONFIG_ISA_TESTDEV=y
ddf19c
+CONFIG_LPC_ICH9=y
ddf19c
+CONFIG_MC146818RTC=y
ddf19c
+CONFIG_MEM_DEVICE=y
ddf19c
+CONFIG_NVDIMM=y
ddf19c
+CONFIG_PAM=y
ddf19c
+CONFIG_PC=y
ddf19c
+CONFIG_PCI=y
ddf19c
+CONFIG_PCIE_PORT=y
ddf19c
+CONFIG_PCI_DEVICES=y
ddf19c
+CONFIG_PCI_EXPRESS=y
ddf19c
+CONFIG_PCI_EXPRESS_Q35=y
ddf19c
+CONFIG_PCI_I440FX=y
ddf19c
+CONFIG_PCI_TESTDEV=y
ddf19c
+CONFIG_PCKBD=y
ddf19c
+CONFIG_PCSPK=y
ddf19c
+CONFIG_PC_ACPI=y
ddf19c
+CONFIG_PC_PCI=y
ddf19c
+CONFIG_PFLASH_CFI01=y
ff9ada
+CONFIG_PVPANIC_ISA=y
ddf19c
+CONFIG_PXB=y
ddf19c
+CONFIG_Q35=y
ddf19c
+CONFIG_QXL=y
ddf19c
+CONFIG_RTL8139_PCI=y
ddf19c
+CONFIG_SCSI=y
ddf19c
+CONFIG_SERIAL=y
ddf19c
+CONFIG_SERIAL_ISA=y
ddf19c
+CONFIG_SERIAL_PCI=y
ddf19c
+CONFIG_SEV=y
ddf19c
+CONFIG_SGA=y
ddf19c
+CONFIG_SMBIOS=y
ddf19c
+CONFIG_SMBUS_EEPROM=y
ddf19c
+CONFIG_TEST_DEVICES=y
ddf19c
+CONFIG_USB=y
ddf19c
+CONFIG_USB_EHCI=y
ddf19c
+CONFIG_USB_EHCI_PCI=y
ddf19c
+CONFIG_USB_SMARTCARD=y
ff9ada
+CONFIG_USB_STORAGE_CORE=y
ff9ada
+CONFIG_USB_STORAGE_CLASSIC=y
ddf19c
+CONFIG_USB_UHCI=y
ddf19c
+CONFIG_USB_XHCI=y
ddf19c
+CONFIG_USB_XHCI_NEC=y
ff9ada
+CONFIG_USB_XHCI_PCI=y
ddf19c
+CONFIG_VFIO=y
ddf19c
+CONFIG_VFIO_PCI=y
ddf19c
+CONFIG_VGA=y
ddf19c
+CONFIG_VGA_CIRRUS=y
ddf19c
+CONFIG_VGA_PCI=y
ddf19c
+CONFIG_VHOST_USER=y
ff9ada
+CONFIG_VHOST_USER_BLK=y
ddf19c
+CONFIG_VIRTIO_PCI=y
ddf19c
+CONFIG_VIRTIO_VGA=y
ddf19c
+CONFIG_VMMOUSE=y
ddf19c
+CONFIG_VMPORT=y
ddf19c
+CONFIG_VTD=y
ddf19c
+CONFIG_WDT_IB6300ESB=y
ddf19c
+CONFIG_WDT_IB700=y
ddf19c
+CONFIG_XIO3130=y
ff9ada
+CONFIG_TPM=y
ddf19c
+CONFIG_TPM_CRB=y
ff9ada
+CONFIG_TPM_TIS_ISA=y
ddf19c
+CONFIG_TPM_EMULATOR=y
ddf19c
+CONFIG_TPM_PASSTHROUGH=y
ff9ada
diff --git a/configs/devices/x86_64-softmmu/x86_64-upstream-devices.mak b/configs/devices/x86_64-softmmu/x86_64-upstream-devices.mak
ff9ada
new file mode 100644
ff9ada
index 0000000000..2cd20f54d2
ff9ada
--- /dev/null
ff9ada
+++ b/configs/devices/x86_64-softmmu/x86_64-upstream-devices.mak
ff9ada
@@ -0,0 +1,4 @@
ff9ada
+# We need "isa-parallel"
ff9ada
+CONFIG_PARALLEL=y
ff9ada
+# We need "hpet"
ff9ada
+CONFIG_HPET=y
ddf19c
diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
ff9ada
index ebe08ed831..381ef2ddcf 100644
ddf19c
--- a/hw/acpi/ich9.c
ddf19c
+++ b/hw/acpi/ich9.c
ff9ada
@@ -438,8 +438,8 @@ void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm)
ddf19c
     static const uint32_t gpe0_len = ICH9_PMIO_GPE0_LEN;
ddf19c
     pm->acpi_memory_hotplug.is_enabled = true;
ddf19c
     pm->cpu_hotplug_legacy = true;
ddf19c
-    pm->disable_s3 = 0;
ddf19c
-    pm->disable_s4 = 0;
ddf19c
+    pm->disable_s3 = 1;
ddf19c
+    pm->disable_s4 = 1;
ddf19c
     pm->s4_val = 2;
ff9ada
     pm->use_acpi_hotplug_bridge = true;
ff9ada
     pm->keep_pci_slot_hpc = true;
ff9ada
diff --git a/hw/arm/meson.build b/hw/arm/meson.build
ff9ada
index 721a8eb8be..87ed4dd914 100644
ff9ada
--- a/hw/arm/meson.build
ff9ada
+++ b/hw/arm/meson.build
ff9ada
@@ -31,7 +31,7 @@ arm_ss.add(when: 'CONFIG_VEXPRESS', if_true: files('vexpress.c'))
ff9ada
 arm_ss.add(when: 'CONFIG_ZYNQ', if_true: files('xilinx_zynq.c'))
ff9ada
 arm_ss.add(when: 'CONFIG_SABRELITE', if_true: files('sabrelite.c'))
ff9ada
 
ff9ada
-arm_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('armv7m.c'))
ff9ada
+#arm_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('armv7m.c'))
ff9ada
 arm_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210.c'))
ff9ada
 arm_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx.c', 'pxa2xx_gpio.c', 'pxa2xx_pic.c'))
ff9ada
 arm_ss.add(when: 'CONFIG_DIGIC', if_true: files('digic.c'))
ddf19c
diff --git a/hw/block/fdc.c b/hw/block/fdc.c
ff9ada
index 21d18ac2e3..97fa6de423 100644
ddf19c
--- a/hw/block/fdc.c
ddf19c
+++ b/hw/block/fdc.c
ff9ada
@@ -48,6 +48,8 @@
ff9ada
 #include "qom/object.h"
ff9ada
 #include "fdc-internal.h"
ddf19c
 
ddf19c
+#include "hw/boards.h"
ddf19c
+
ddf19c
 /********************************************************/
ddf19c
 /* debug Floppy devices */
ddf19c
 
ff9ada
@@ -2337,6 +2339,14 @@ void fdctrl_realize_common(DeviceState *dev, FDCtrl *fdctrl, Error **errp)
ff9ada
     FDrive *drive;
ddf19c
     static int command_tables_inited = 0;
ddf19c
 
ddf19c
+    /* Restricted for Red Hat Enterprise Linux: */
ddf19c
+    MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine());
ddf19c
+    if (!strstr(mc->name, "-rhel7.")) {
ddf19c
+        error_setg(errp, "Device %s is not supported with machine type %s",
ddf19c
+                   object_get_typename(OBJECT(dev)), mc->name);
ddf19c
+        return;
ddf19c
+    }
ddf19c
+
ddf19c
     if (fdctrl->fallback == FLOPPY_DRIVE_TYPE_AUTO) {
ddf19c
         error_setg(errp, "Cannot choose a fallback FDrive type of 'auto'");
ff9ada
         return;
ff9ada
diff --git a/hw/char/parallel.c b/hw/char/parallel.c
ff9ada
index b45e67bfbb..e5f108211b 100644
ff9ada
--- a/hw/char/parallel.c
ff9ada
+++ b/hw/char/parallel.c
ff9ada
@@ -29,6 +29,7 @@
ff9ada
 #include "chardev/char-parallel.h"
ff9ada
 #include "chardev/char-fe.h"
ff9ada
 #include "hw/acpi/aml-build.h"
ff9ada
+#include "hw/boards.h"
ff9ada
 #include "hw/irq.h"
ff9ada
 #include "hw/isa/isa.h"
ff9ada
 #include "hw/qdev-properties.h"
ff9ada
@@ -534,6 +535,14 @@ static void parallel_isa_realizefn(DeviceState *dev, Error **errp)
ff9ada
     int base;
ff9ada
     uint8_t dummy;
ff9ada
 
ff9ada
+    /* Restricted for Red Hat Enterprise Linux */
ff9ada
+    MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine());
ff9ada
+    if (strstr(mc->name, "rhel")) {
ff9ada
+        error_setg(errp, "Device %s is not supported with machine type %s",
ff9ada
+                   object_get_typename(OBJECT(dev)), mc->name);
ff9ada
+        return;
ff9ada
+    }
ff9ada
+
ff9ada
     if (!qemu_chr_fe_backend_connected(&s->chr)) {
ff9ada
         error_setg(errp, "Can't create parallel device, empty char device");
ff9ada
         return;
ff9ada
diff --git a/hw/cpu/meson.build b/hw/cpu/meson.build
ff9ada
index 9e52fee9e7..bb71c9f3e7 100644
ff9ada
--- a/hw/cpu/meson.build
ff9ada
+++ b/hw/cpu/meson.build
ff9ada
@@ -1,6 +1,7 @@
ff9ada
-softmmu_ss.add(files('core.c', 'cluster.c'))
ff9ada
+#softmmu_ss.add(files('core.c', 'cluster.c'))
ff9ada
+softmmu_ss.add(files('core.c'))
ff9ada
 
ff9ada
 specific_ss.add(when: 'CONFIG_ARM11MPCORE', if_true: files('arm11mpcore.c'))
ff9ada
 specific_ss.add(when: 'CONFIG_REALVIEW', if_true: files('realview_mpcore.c'))
ff9ada
 specific_ss.add(when: 'CONFIG_A9MPCORE', if_true: files('a9mpcore.c'))
ff9ada
-specific_ss.add(when: 'CONFIG_A15MPCORE', if_true: files('a15mpcore.c'))
ff9ada
+#specific_ss.add(when: 'CONFIG_A15MPCORE', if_true: files('a15mpcore.c'))
ddf19c
diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
ff9ada
index fdca6ca659..fa1a7eee51 100644
ddf19c
--- a/hw/display/cirrus_vga.c
ddf19c
+++ b/hw/display/cirrus_vga.c
ff9ada
@@ -2945,6 +2945,9 @@ static void pci_cirrus_vga_realize(PCIDevice *dev, Error **errp)
ddf19c
      PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(dev);
ddf19c
      int16_t device_id = pc->device_id;
ddf19c
 
ddf19c
+     warn_report("'cirrus-vga' is deprecated, "
ddf19c
+                 "please use a different VGA card instead");
ddf19c
+
ddf19c
      /* follow real hardware, cirrus card emulated has 4 MB video memory.
ddf19c
        Also accept 8 MB/16 MB for backward compatibility. */
ddf19c
      if (s->vga.vram_size_mb != 4 && s->vga.vram_size_mb != 8 &&
ddf19c
diff --git a/hw/ide/piix.c b/hw/ide/piix.c
ff9ada
index ce89fd0aa3..fbcf802b13 100644
ddf19c
--- a/hw/ide/piix.c
ddf19c
+++ b/hw/ide/piix.c
ff9ada
@@ -232,7 +232,8 @@ static void piix3_ide_class_init(ObjectClass *klass, void *data)
ddf19c
     k->device_id = PCI_DEVICE_ID_INTEL_82371SB_1;
ddf19c
     k->class_id = PCI_CLASS_STORAGE_IDE;
ddf19c
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
ddf19c
-    dc->hotpluggable = false;
ddf19c
+    /* Disabled for Red Hat Enterprise Linux: */
ddf19c
+    dc->user_creatable = false;
ddf19c
 }
ddf19c
 
ddf19c
 static const TypeInfo piix3_ide_info = {
ff9ada
@@ -261,6 +262,8 @@ static void piix4_ide_class_init(ObjectClass *klass, void *data)
ddf19c
     k->class_id = PCI_CLASS_STORAGE_IDE;
ddf19c
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
ddf19c
     dc->hotpluggable = false;
ddf19c
+    /* Disabled for Red Hat Enterprise Linux: */
ddf19c
+    dc->user_creatable = false;
ddf19c
 }
ddf19c
 
ddf19c
 static const TypeInfo piix4_ide_info = {
ddf19c
diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
ff9ada
index baba62f357..bc360347ea 100644
ddf19c
--- a/hw/input/pckbd.c
ddf19c
+++ b/hw/input/pckbd.c
ff9ada
@@ -796,6 +796,8 @@ static void i8042_class_initfn(ObjectClass *klass, void *data)
ddf19c
     dc->vmsd = &vmstate_kbd_isa;
ff9ada
     isa->build_aml = i8042_build_aml;
ddf19c
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
ddf19c
+    /* Disabled for Red Hat Enterprise Linux: */
ddf19c
+    dc->user_creatable = false;
ddf19c
 }
ddf19c
 
ddf19c
 static const TypeInfo i8042_info = {
ddf19c
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
ff9ada
index f5bc81296d..282d01e374 100644
ddf19c
--- a/hw/net/e1000.c
ddf19c
+++ b/hw/net/e1000.c
ff9ada
@@ -1821,6 +1821,7 @@ static const E1000Info e1000_devices[] = {
ddf19c
         .revision  = 0x03,
ddf19c
         .phy_id2   = E1000_PHY_ID2_8254xx_DEFAULT,
ddf19c
     },
ddf19c
+#if 0 /* Disabled for Red Hat Enterprise Linux 7 */
ddf19c
     {
ddf19c
         .name      = "e1000-82544gc",
ddf19c
         .device_id = E1000_DEV_ID_82544GC_COPPER,
ff9ada
@@ -1833,6 +1834,7 @@ static const E1000Info e1000_devices[] = {
ddf19c
         .revision  = 0x03,
ddf19c
         .phy_id2   = E1000_PHY_ID2_8254xx_DEFAULT,
ddf19c
     },
ddf19c
+#endif
ddf19c
 };
ddf19c
 
ddf19c
 static void e1000_register_types(void)
ddf19c
diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
ff9ada
index 58e7341cb7..8ba34f6a1d 100644
ddf19c
--- a/hw/ppc/spapr_cpu_core.c
ddf19c
+++ b/hw/ppc/spapr_cpu_core.c
ff9ada
@@ -370,10 +370,12 @@ static const TypeInfo spapr_cpu_core_type_infos[] = {
ddf19c
         .instance_size = sizeof(SpaprCpuCore),
ddf19c
         .class_size = sizeof(SpaprCpuCoreClass),
ddf19c
     },
ddf19c
+#if 0  /* Disabled for Red Hat Enterprise Linux */
ddf19c
     DEFINE_SPAPR_CPU_CORE_TYPE("970_v2.2"),
ddf19c
     DEFINE_SPAPR_CPU_CORE_TYPE("970mp_v1.0"),
ddf19c
     DEFINE_SPAPR_CPU_CORE_TYPE("970mp_v1.1"),
ddf19c
     DEFINE_SPAPR_CPU_CORE_TYPE("power5+_v2.1"),
ddf19c
+#endif
ddf19c
     DEFINE_SPAPR_CPU_CORE_TYPE("power7_v2.3"),
ddf19c
     DEFINE_SPAPR_CPU_CORE_TYPE("power7+_v2.1"),
ddf19c
     DEFINE_SPAPR_CPU_CORE_TYPE("power8_v2.0"),
ff9ada
diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
ff9ada
index 9520471be2..202e032524 100644
ff9ada
--- a/hw/timer/hpet.c
ff9ada
+++ b/hw/timer/hpet.c
ff9ada
@@ -733,6 +733,14 @@ static void hpet_realize(DeviceState *dev, Error **errp)
ff9ada
     int i;
ff9ada
     HPETTimer *timer;
ff9ada
 
ff9ada
+    /* Restricted for Red Hat Enterprise Linux */
ff9ada
+    MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine());
ff9ada
+    if (strstr(mc->name, "rhel")) {
ff9ada
+        error_setg(errp, "Device %s is not supported with machine type %s",
ff9ada
+                   object_get_typename(OBJECT(dev)), mc->name);
ff9ada
+        return;
ff9ada
+    }
ff9ada
+
ff9ada
     if (!s->intcap) {
ff9ada
         warn_report("Hpet's intcap not initialized");
ff9ada
     }
ff9ada
diff --git a/hw/usb/meson.build b/hw/usb/meson.build
ff9ada
index de853d780d..0776ae6a20 100644
ff9ada
--- a/hw/usb/meson.build
ff9ada
+++ b/hw/usb/meson.build
ff9ada
@@ -52,7 +52,7 @@ softmmu_ss.add(when: 'CONFIG_USB_SMARTCARD', if_true: files('dev-smartcard-reade
ff9ada
 if cacard.found()
ff9ada
   usbsmartcard_ss = ss.source_set()
ff9ada
   usbsmartcard_ss.add(when: 'CONFIG_USB_SMARTCARD',
ff9ada
-                      if_true: [cacard, files('ccid-card-emulated.c', 'ccid-card-passthru.c')])
ff9ada
+                      if_true: [cacard, files('ccid-card-passthru.c')])
ff9ada
   hw_usb_modules += {'smartcard': usbsmartcard_ss}
ddf19c
 endif
ddf19c
 
ff9ada
diff --git a/target/arm/cpu_tcg.c b/target/arm/cpu_tcg.c
ff9ada
index 13d0e9b195..3826fa5122 100644
ff9ada
--- a/target/arm/cpu_tcg.c
ff9ada
+++ b/target/arm/cpu_tcg.c
ff9ada
@@ -22,6 +22,7 @@
ff9ada
 /* CPU models. These are not needed for the AArch64 linux-user build. */
ff9ada
 #if !defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64)
ddf19c
 
ddf19c
+#if 0 /* Disabled for Red Hat Enterprise Linux */
ff9ada
 #if !defined(CONFIG_USER_ONLY) && defined(CONFIG_TCG)
ff9ada
 static bool arm_v7m_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
ddf19c
 {
ff9ada
@@ -375,6 +376,7 @@ static void cortex_a9_initfn(Object *obj)
ff9ada
     cpu->ccsidr[1] = 0x200fe019; /* 16k L1 icache. */
ff9ada
     define_arm_cp_regs(cpu, cortexa9_cp_reginfo);
ddf19c
 }
ff9ada
+#endif /* disabled for RHEL */
ddf19c
 
ff9ada
 #ifndef CONFIG_USER_ONLY
ff9ada
 static uint64_t a15_l2ctlr_read(CPUARMState *env, const ARMCPRegInfo *ri)
ff9ada
@@ -400,6 +402,7 @@ static const ARMCPRegInfo cortexa15_cp_reginfo[] = {
ff9ada
     REGINFO_SENTINEL
ddf19c
 };
ddf19c
 
ddf19c
+#if 0 /* Disabled for Red Hat Enterprise Linux */
ff9ada
 static void cortex_a7_initfn(Object *obj)
ddf19c
 {
ff9ada
     ARMCPU *cpu = ARM_CPU(obj);
ff9ada
@@ -445,6 +448,7 @@ static void cortex_a7_initfn(Object *obj)
ff9ada
     cpu->ccsidr[2] = 0x711fe07a; /* 4096K L2 unified cache */
ff9ada
     define_arm_cp_regs(cpu, cortexa15_cp_reginfo); /* Same as A15 */
ddf19c
 }
ff9ada
+#endif /* disabled for RHEL */
ddf19c
 
ff9ada
 static void cortex_a15_initfn(Object *obj)
ff9ada
 {
ff9ada
@@ -488,6 +492,7 @@ static void cortex_a15_initfn(Object *obj)
ff9ada
     define_arm_cp_regs(cpu, cortexa15_cp_reginfo);
ff9ada
 }
ddf19c
 
ff9ada
+#if 0 /* Disabled for Red Hat Enterprise Linux */
ff9ada
 static void cortex_m0_initfn(Object *obj)
ff9ada
 {
ff9ada
     ARMCPU *cpu = ARM_CPU(obj);
ff9ada
@@ -928,6 +933,7 @@ static void arm_v7m_class_init(ObjectClass *oc, void *data)
ddf19c
 
ff9ada
     cc->gdb_core_xml_file = "arm-m-profile.xml";
ff9ada
 }
ff9ada
+#endif /* disabled for RHEL */
ddf19c
 
ff9ada
 #ifndef TARGET_AARCH64
ff9ada
 /*
ff9ada
@@ -1007,6 +1013,7 @@ static void arm_max_initfn(Object *obj)
ff9ada
 #endif /* !TARGET_AARCH64 */
ddf19c
 
ff9ada
 static const ARMCPUInfo arm_tcg_cpus[] = {
ff9ada
+#if 0 /* Disabled for Red Hat Enterprise Linux */
ff9ada
     { .name = "arm926",      .initfn = arm926_initfn },
ff9ada
     { .name = "arm946",      .initfn = arm946_initfn },
ff9ada
     { .name = "arm1026",     .initfn = arm1026_initfn },
ff9ada
@@ -1022,7 +1029,9 @@ static const ARMCPUInfo arm_tcg_cpus[] = {
ff9ada
     { .name = "cortex-a7",   .initfn = cortex_a7_initfn },
ff9ada
     { .name = "cortex-a8",   .initfn = cortex_a8_initfn },
ff9ada
     { .name = "cortex-a9",   .initfn = cortex_a9_initfn },
ff9ada
+#endif /* disabled for RHEL */
ff9ada
     { .name = "cortex-a15",  .initfn = cortex_a15_initfn },
ff9ada
+#if 0 /* Disabled for Red Hat Enterprise Linux */
ff9ada
     { .name = "cortex-m0",   .initfn = cortex_m0_initfn,
ff9ada
                              .class_init = arm_v7m_class_init },
ff9ada
     { .name = "cortex-m3",   .initfn = cortex_m3_initfn,
ff9ada
@@ -1053,6 +1062,7 @@ static const ARMCPUInfo arm_tcg_cpus[] = {
ff9ada
     { .name = "pxa270-b1",   .initfn = pxa270b1_initfn },
ff9ada
     { .name = "pxa270-c0",   .initfn = pxa270c0_initfn },
ff9ada
     { .name = "pxa270-c5",   .initfn = pxa270c5_initfn },
ff9ada
+#endif /* disabled for RHEL */
ff9ada
 #ifndef TARGET_AARCH64
ff9ada
     { .name = "max",         .initfn = arm_max_initfn },
ff9ada
 #endif
ddf19c
diff --git a/target/ppc/cpu-models.c b/target/ppc/cpu-models.c
ff9ada
index 4baa111713..d779c4d1d5 100644
ddf19c
--- a/target/ppc/cpu-models.c
ddf19c
+++ b/target/ppc/cpu-models.c
ddf19c
@@ -66,6 +66,7 @@
ddf19c
 #define POWERPC_DEF(_name, _pvr, _type, _desc)                              \
ddf19c
     POWERPC_DEF_SVR(_name, _desc, _pvr, POWERPC_SVR_NONE, _type)
ddf19c
 
ddf19c
+#if 0  /* Embedded and 32-bit CPUs disabled for Red Hat Enterprise Linux */
ddf19c
     /* Embedded PowerPC                                                      */
ddf19c
     /* PowerPC 401 family                                                    */
ddf19c
     POWERPC_DEF("401",           CPU_POWERPC_401,                    401,
ddf19c
@@ -740,8 +741,10 @@
ddf19c
                 "PowerPC 7447A v1.2 (G4)")
ddf19c
     POWERPC_DEF("7457a_v1.2",    CPU_POWERPC_74x7A_v12,              7455,
ddf19c
                 "PowerPC 7457A v1.2 (G4)")
ddf19c
+#endif
ddf19c
     /* 64 bits PowerPC                                                       */
ddf19c
 #if defined(TARGET_PPC64)
ddf19c
+#if 0  /* Disabled for Red Hat Enterprise Linux */
ddf19c
     POWERPC_DEF("970_v2.2",      CPU_POWERPC_970_v22,                970,
ddf19c
                 "PowerPC 970 v2.2")
ddf19c
     POWERPC_DEF("970fx_v1.0",    CPU_POWERPC_970FX_v10,              970,
ddf19c
@@ -760,6 +763,7 @@
ddf19c
                 "PowerPC 970MP v1.1")
ddf19c
     POWERPC_DEF("power5+_v2.1",  CPU_POWERPC_POWER5P_v21,            POWER5P,
ddf19c
                 "POWER5+ v2.1")
ddf19c
+#endif
ddf19c
     POWERPC_DEF("power7_v2.3",   CPU_POWERPC_POWER7_v23,             POWER7,
ddf19c
                 "POWER7 v2.3")
ddf19c
     POWERPC_DEF("power7+_v2.1",  CPU_POWERPC_POWER7P_v21,            POWER7,
ff9ada
@@ -784,6 +788,7 @@
ddf19c
 /* PowerPC CPU aliases                                                     */
ddf19c
 
ddf19c
 PowerPCCPUAlias ppc_cpu_aliases[] = {
ddf19c
+#if 0  /* Embedded and 32-bit CPUs disabled for Red Hat Enterprise Linux */
ddf19c
     { "403", "403gc" },
ddf19c
     { "405", "405d4" },
ddf19c
     { "405cr", "405crc" },
ff9ada
@@ -942,12 +947,15 @@ PowerPCCPUAlias ppc_cpu_aliases[] = {
ddf19c
     { "7447a", "7447a_v1.2" },
ddf19c
     { "7457a", "7457a_v1.2" },
ddf19c
     { "apollo7pm", "7457a_v1.0" },
ddf19c
+#endif
ddf19c
 #if defined(TARGET_PPC64)
ddf19c
+#if 0  /* Disabled for Red Hat Enterprise Linux */
ddf19c
     { "970", "970_v2.2" },
ddf19c
     { "970fx", "970fx_v3.1" },
ddf19c
     { "970mp", "970mp_v1.1" },
ddf19c
     { "power5+", "power5+_v2.1" },
ddf19c
     { "power5gs", "power5+_v2.1" },
ddf19c
+#endif
ddf19c
     { "power7", "power7_v2.3" },
ddf19c
     { "power7+", "power7+_v2.1" },
ddf19c
     { "power8e", "power8e_v2.1" },
ff9ada
@@ -957,6 +965,7 @@ PowerPCCPUAlias ppc_cpu_aliases[] = {
ff9ada
     { "power10", "power10_v2.0" },
ddf19c
 #endif
ddf19c
 
ddf19c
+#if 0  /* Disabled for Red Hat Enterprise Linux */
ddf19c
     /* Generic PowerPCs */
ddf19c
 #if defined(TARGET_PPC64)
ddf19c
     { "ppc64", "970fx_v3.1" },
ff9ada
@@ -964,5 +973,6 @@ PowerPCCPUAlias ppc_cpu_aliases[] = {
ddf19c
     { "ppc32", "604" },
ddf19c
     { "ppc", "604" },
ddf19c
     { "default", "604" },
ddf19c
+#endif
ddf19c
     { NULL, NULL }
ddf19c
 };
ff9ada
diff --git a/target/s390x/cpu_models_sysemu.c b/target/s390x/cpu_models_sysemu.c
ff9ada
index 05c3ccaaff..6a04ccab1b 100644
ff9ada
--- a/target/s390x/cpu_models_sysemu.c
ff9ada
+++ b/target/s390x/cpu_models_sysemu.c
ff9ada
@@ -36,6 +36,9 @@ static void check_unavailable_features(const S390CPUModel *max_model,
ddf19c
         (max_model->def->gen == model->def->gen &&
ddf19c
          max_model->def->ec_ga < model->def->ec_ga)) {
ddf19c
         list_add_feat("type", unavailable);
ddf19c
+    } else if (model->def->gen < 11 && kvm_enabled()) {
ddf19c
+        /* Older CPU models are not supported on Red Hat Enterprise Linux */
ddf19c
+        list_add_feat("type", unavailable);
ddf19c
     }
ddf19c
 
ddf19c
     /* detect missing features if any to properly report them */
ff9ada
diff --git a/target/s390x/kvm/kvm.c b/target/s390x/kvm/kvm.c
ff9ada
index 5b1fdb55c4..c52434985b 100644
ff9ada
--- a/target/s390x/kvm/kvm.c
ff9ada
+++ b/target/s390x/kvm/kvm.c
ff9ada
@@ -2508,6 +2508,14 @@ void kvm_s390_apply_cpu_model(const S390CPUModel *model, Error **errp)
ddf19c
         error_setg(errp, "KVM doesn't support CPU models");
ddf19c
         return;
ddf19c
     }
ddf19c
+
ddf19c
+    /* Older CPU models are not supported on Red Hat Enterprise Linux */
ddf19c
+    if (model->def->gen < 11) {
ddf19c
+        error_setg(errp, "KVM: Unsupported CPU type specified: %s",
ddf19c
+                   MACHINE(qdev_get_machine())->cpu_type);
ddf19c
+        return;
ddf19c
+    }
ddf19c
+
ddf19c
     prop.cpuid = s390_cpuid_from_cpu_model(model);
ddf19c
     prop.ibc = s390_ibc_from_cpu_model(model);
ddf19c
     /* configure cpu features indicated via STFL(e) */
ddf19c
-- 
ff9ada
2.27.0
ddf19c