cryptospore / rpms / qemu-kvm

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