import qemu-kvm-4.2.0-29.module+el8.3.0+7212+401047e6
This commit is contained in:
parent
7b46666c6f
commit
0e8de4761c
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/qemu-2.12.0.tar.xz
|
||||
SOURCES/qemu-4.2.0.tar.xz
|
||||
|
@ -1 +1 @@
|
||||
5a62c911b2cebbd41decd5c77c524395212411cf SOURCES/qemu-2.12.0.tar.xz
|
||||
b27aa828a8457bd8551ae3c81b80cc365e1f6bfe SOURCES/qemu-4.2.0.tar.xz
|
||||
|
@ -1,332 +0,0 @@
|
||||
From 7000ac85100400a686b48562d830c7b14a439a94 Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Mon, 11 Sep 2017 07:11:00 +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
|
||||
- Use "/share/qemu-kvm" as SHARE_SUFFIX
|
||||
- We reconfigured our share to qemu-kvm to be consistent with used name
|
||||
- Added .gitpublish configuration file
|
||||
- Support for git publish has to be stored in repository root
|
||||
|
||||
--
|
||||
Rebase notes for RHEL-8 (2.12.0):
|
||||
- Conflict fix in .gitpublish
|
||||
- Not packaging hppa-firmware.img
|
||||
- Disable vxhs.o in block/Makefile.obj
|
||||
- Disable ppc64 builds
|
||||
- Removed acpi-dsdt.aml (upstream)
|
||||
- dropped libjpeg build requirement
|
||||
- Replaced buildrequirement librados2 and librbd1 by librados and librbd.
|
||||
- dropping "-pie -fPIE -DPIE" as we're using --enable-pie
|
||||
- Do not use tcmmaloc
|
||||
- Dropping gperftools-devel dependency
|
||||
|
||||
Rebase notes for RHEL-8.0 (2.11.0):
|
||||
- Removed references to rhel6 rom files (virtio.rom, pcnet, rtl8139,
|
||||
net2k_pci e1000, bios-256k,
|
||||
pxe-e1000e.rom)
|
||||
- Removed 80-kvm.rules file
|
||||
- Changing ipxe linking to match upstream
|
||||
- Updating kvm.modules and ksmtuned files
|
||||
- cleaning %kvm_files section
|
||||
- Remove CONFIG_RHV
|
||||
- Remove CONFIG_LIVE_BLOCK_OPS
|
||||
- Removing CONFIG_VTD
|
||||
- Moving vxhs related changes to another commit
|
||||
- removed live-block-migration option
|
||||
|
||||
Rebase notes (2.11.0):
|
||||
- Removed --with-pixman configure option (upstream)
|
||||
- Enabling multipath for qemu-pr-helper
|
||||
- Removed qemu-kvm-tools
|
||||
- Removed references to "-rhev" and "-ma"
|
||||
- Removing kvm-unit-tests
|
||||
- Enabling qemu-geust-agent
|
||||
|
||||
Rebase notes (2.10.0):
|
||||
- live_block_migration option added upstream
|
||||
- moved qmp-spec.txt file (upstream)
|
||||
- added s390-netboot.img (added upstream)
|
||||
- removed qemu_vga.ndrv (added upstream)
|
||||
- switch to (rhevh-)rhel-7.5-candidate
|
||||
- switched differentiation defaults
|
||||
- moved binary files to separate commit
|
||||
|
||||
Rebase notes (2.9.0):
|
||||
- documentation files handling changes (upstrem)
|
||||
- removed --enable-colo option and --disable-archipelago (upstream)
|
||||
- bump BuildRequires versions
|
||||
- new mandatory argument for tracetool.py (upstream)
|
||||
- updated RHEL 6 roms
|
||||
- switch from sha1sum to sha256sum
|
||||
- Moved adding rhel6-e1000.rom from machine types commit
|
||||
- Moved adding pxe-e1000e.rom from device disable commit
|
||||
- Use rdma-core instead of librdmacm
|
||||
- Add upstream tarballs tar.xz to .gitignore
|
||||
- Updated git-backport-diff script
|
||||
|
||||
Rebase notes (2.8.0):
|
||||
- removed vhdx option (upstream)
|
||||
- qemu-tech.html merged to qemu-doc.html (upstream)
|
||||
- removed skiboot.lid firmware
|
||||
- Changed tracetool.py parameters
|
||||
- Added support for easy z-stream switch
|
||||
|
||||
Rebase notes (2.7.0):
|
||||
- removed kvm_stat
|
||||
- added efi-e1000e.rom
|
||||
- added efi-vmxnet.rom
|
||||
- added linuxboot_dma.bin
|
||||
- trace-events renamed to trace-events-all
|
||||
- reverted dependency to seccomp on aarch64
|
||||
- Add ipxe-qemu-roms ad build dependency to pass tests
|
||||
|
||||
Rebase notes (2.6.0):
|
||||
- removed q35-acpi-dsdt.aml
|
||||
- add enable-gcrypt option
|
||||
|
||||
Rebase notes (2.5.0):
|
||||
- New seccomp hadling in configure
|
||||
- New condition format in migration/migration.c
|
||||
- libcacard extracted
|
||||
- vnc fixes
|
||||
- libsecomp for aarch64 requirements changed downstream
|
||||
|
||||
Rebase notes (2.4.0):
|
||||
- remove --enable-ws-vnc
|
||||
- use error_setg instead of error_set in migration/migration.c
|
||||
- remove target-x86_64.conf
|
||||
- create /etc/qemu-kvm on copying of bridge.conf
|
||||
- disabled opengl
|
||||
- rebased to version 2.3.0-30.el7
|
||||
|
||||
- Merged patches (Rebase 2.12.0)
|
||||
- spec: Change License line
|
||||
- spec: Do not depend on ipxe for Power architectures
|
||||
- configuration: Use gcrypt instead of nettle
|
||||
- spec: Use hardening flags for ksmctl build
|
||||
|
||||
Merged patches (rebase 2.11.0)
|
||||
- ce6e8e5b8a redhat/qemu-kvm.spec.template: Enable seccomp on s390x, too
|
||||
- 8629f208c6 redhat: Remove qemu.binfmt from the downstream repository
|
||||
- b889ce1c40 Disable build of qemu-kvm-ma for x86_64
|
||||
- 4506913c42 redhat: add CONFIG_RHV flag
|
||||
- 21ecaec46f s390x: vm.allocate_pgste sysctl is no longer needed
|
||||
- 78a1864d99 Update build_configure for 2.10.0 options
|
||||
- decf881320 redhat: Provide s390x specific /etc/modprobe.d/kvm.conf
|
||||
- e0cd3138cc redhat/qemu-kvm.spec: Use the freshly built s390-ccw.img firmware image
|
||||
- 7af6b9a4fa redhat: install generic kvm.conf except for s390 and x86 architectures
|
||||
- c4290f50bb redhat: fix rh-srpm target
|
||||
- 8943f52e8b Package qemu-block-drivers manpage
|
||||
- 88b41044d6 update spec to build and install qemu-pr-helper
|
||||
|
||||
Merged patches (rebase 2.10.0)
|
||||
- feefd46 qemu-kvm.spec: Enable s390x build
|
||||
- 985051e Removing texi2html from build requirements
|
||||
- 7c64a2a Update ignore files for redhat usage
|
||||
- 8f9a95a Disable replication feature
|
||||
- 1b7bbc5 block/vxhs: modularize VXHS via g_module
|
||||
- 7511527 Remove the dependencies to seavgabios-bin and ipxe-roms-qemu on s390x
|
||||
- aa0891c Downstream: Don't disable SMT on POWER9 hosts
|
||||
- a13a0e9 Update configuration for qemu 2.9
|
||||
- bbf46dd disable pulseaudio and alsa
|
||||
- 9124839 redhat/Makefile: honor BREW_FLAGS like the kernel
|
||||
- 53c03bd copy SLIT test reference blobs into tests directory
|
||||
- c4c77e6 Differentiation support
|
||||
- f1ec0e8 configure: allow to disable VT-d emulation
|
||||
- b972023 Disable VT-d for rhel builds
|
||||
- 29a0414 RHEL Diff.: Add option in configure to disable live block ops
|
||||
- 1f33b29 RHEL Diff.: Unregister live block operations
|
||||
- c590551 RHEL Diff.: Disable live block operations in HMP monitor
|
||||
- c7e208f RHEL Diff.: Add rpm spec options for live block ops
|
||||
- 733af5c pegas: add rpm spec options for vhost-user
|
||||
- ff16138 Add support for local build
|
||||
- fb426d4 qemu-kvm.spec: Configure vm.allocate_pgste for s390x
|
||||
|
||||
Merged patches (rebase 2.9.0)
|
||||
- 9c7ab94 Enable seccomp for ppc64/ppc64le architecture
|
||||
- f6d7e9d Update qemu-kvm package Summary and Description
|
||||
- a9e55b6 Disable usbredir and libcacard for unsupported architectures
|
||||
- 0218220 Update configuration for 2.8.0 release
|
||||
|
||||
Merged patches (rebase 2.7.0)
|
||||
- 2be6077 Fix SLOF dependency
|
||||
- dc58590 spec: Remove dependency to ipxe-roms-qemu for aarch64
|
||||
- 357ef43 spec: link sgabios.bin only for x86_64
|
||||
- 08d82cc spec: Update rules before triggering for kvm device
|
||||
- 8980a76 spec: Do not package ivshmem-server and ivshmem-client
|
||||
- 027067c spec: add a sample kvm.conf to enable Nested Virtualization
|
||||
- ba2ba30 Adjust locked memory limits to allow unprivileged VMs on Power
|
||||
- e9740b0 Increase locked memory limit for all users, not just kvm group
|
||||
- 8c301be add vgabios-virtio.bin symlink
|
||||
- 4d03723 usb: enable streams support
|
||||
- 2a9363e Add install dependency required for usb streams
|
||||
- 9a54442 Add dump-guest-memory.py to all archs
|
||||
- 73fffc9 add e1000e ipxe rom symlink
|
||||
- aaaa2a9 Add 'luks' to block driver whitelist
|
||||
- c78c3a8 redhat: switch from gcrypt to nettle for crypto
|
||||
- bb51a69 redhat: include username and date in RPM N-E-V-R for scratch builds
|
||||
|
||||
Merged patches (rebase 2.4.0)
|
||||
- 9201274 spec: Remove obsolete differentiation code
|
||||
- a938a8c spec: Use external configuration script
|
||||
- 5ca8d0e spec: Use configure options to prevent default resolution
|
||||
- 5dca391 spec: Ship complete QMP documentation files
|
||||
- 7899edd aarch64: allow --enable-seccomp
|
||||
- a56fb9c aarch64: redhat spec: enable seccomp
|
||||
- a9571e6 rhel: Update package version for SLOF dependency
|
||||
- 25c70c4 configure: Add support for tcmalloc
|
||||
- db72485 Change fsreeze-hook default location
|
||||
- 14b8a9e redhat: add kvm-unit-tests tarball to environment
|
||||
- 5ee4238 spec: Build tscdeadline_latency.flat from kvm-unit-tests
|
||||
- 6ba800b Downstream-only: Start kvm-setup service before libvirtd service
|
||||
- 59b43d6 Do not stop qemu-guest-agent service on target switch
|
||||
- 4d851fa provide vhost module config file with max_mem_regions set to 509
|
||||
- 0b18027 spec: Require proper version of SLOF
|
||||
- 3c436c7 Fix rh-brew-aarch64, rh-brew-ppc rh-brew-ga-ppc target
|
||||
|
||||
(cherry picked from commit ba7591ec4a0906121d15ffbf740580bd79ec5814)
|
||||
---
|
||||
.gitpublish | 58 +--
|
||||
Makefile | 2 +-
|
||||
block/Makefile.objs | 2 +-
|
||||
os-posix.c | 2 +-
|
||||
redhat/.gitignore | 5 +
|
||||
redhat/85-kvm.preset | 5 +
|
||||
redhat/95-kvm-memlock.conf | 10 +
|
||||
redhat/99-qemu-guest-agent.rules | 2 +
|
||||
redhat/Makefile | 88 ++++
|
||||
redhat/Makefile.common | 48 +++
|
||||
redhat/Makefile.local | 76 ++++
|
||||
redhat/bridge.conf | 1 +
|
||||
redhat/build_configure.sh | 145 +++++++
|
||||
redhat/ksm.service | 13 +
|
||||
redhat/ksm.sysconfig | 4 +
|
||||
redhat/ksmctl.c | 77 ++++
|
||||
redhat/ksmtuned | 139 +++++++
|
||||
redhat/ksmtuned.conf | 21 +
|
||||
redhat/ksmtuned.service | 12 +
|
||||
redhat/kvm-s390x.conf | 7 +
|
||||
redhat/kvm-setup | 40 ++
|
||||
redhat/kvm-setup.service | 14 +
|
||||
redhat/kvm-x86.conf | 12 +
|
||||
redhat/kvm.conf | 3 +
|
||||
redhat/kvm.modules | 18 +
|
||||
redhat/qemu-ga.sysconfig | 19 +
|
||||
redhat/qemu-guest-agent.service | 20 +
|
||||
redhat/qemu-kvm.spec.template | 794 +++++++++++++++++++++++++++++++++++++
|
||||
redhat/qemu-pr-helper.service | 15 +
|
||||
redhat/qemu-pr-helper.socket | 9 +
|
||||
redhat/rpmbuild/BUILD/.gitignore | 2 +
|
||||
redhat/rpmbuild/RPMS/.gitignore | 2 +
|
||||
redhat/rpmbuild/SOURCES/.gitignore | 2 +
|
||||
redhat/rpmbuild/SPECS/.gitignore | 2 +
|
||||
redhat/rpmbuild/SRPMS/.gitignore | 2 +
|
||||
redhat/scripts/frh.py | 26 ++
|
||||
redhat/scripts/git-backport-diff | 327 +++++++++++++++
|
||||
redhat/scripts/git-compile-check | 215 ++++++++++
|
||||
redhat/scripts/process-patches.sh | 78 ++++
|
||||
redhat/scripts/tarball_checksum.sh | 3 +
|
||||
redhat/vhost.conf | 3 +
|
||||
ui/vnc.c | 2 +-
|
||||
42 files changed, 2270 insertions(+), 55 deletions(-)
|
||||
create mode 100644 redhat/.gitignore
|
||||
create mode 100644 redhat/85-kvm.preset
|
||||
create mode 100644 redhat/95-kvm-memlock.conf
|
||||
create mode 100644 redhat/99-qemu-guest-agent.rules
|
||||
create mode 100644 redhat/Makefile
|
||||
create mode 100644 redhat/Makefile.common
|
||||
create mode 100644 redhat/Makefile.local
|
||||
create mode 100644 redhat/bridge.conf
|
||||
create mode 100755 redhat/build_configure.sh
|
||||
create mode 100644 redhat/ksm.service
|
||||
create mode 100644 redhat/ksm.sysconfig
|
||||
create mode 100644 redhat/ksmctl.c
|
||||
create mode 100644 redhat/ksmtuned
|
||||
create mode 100644 redhat/ksmtuned.conf
|
||||
create mode 100644 redhat/ksmtuned.service
|
||||
create mode 100644 redhat/kvm-s390x.conf
|
||||
create mode 100644 redhat/kvm-setup
|
||||
create mode 100644 redhat/kvm-setup.service
|
||||
create mode 100644 redhat/kvm-x86.conf
|
||||
create mode 100644 redhat/kvm.conf
|
||||
create mode 100644 redhat/kvm.modules
|
||||
create mode 100644 redhat/qemu-ga.sysconfig
|
||||
create mode 100644 redhat/qemu-guest-agent.service
|
||||
create mode 100644 redhat/qemu-kvm.spec.template
|
||||
create mode 100644 redhat/qemu-pr-helper.service
|
||||
create mode 100644 redhat/qemu-pr-helper.socket
|
||||
create mode 100644 redhat/rpmbuild/BUILD/.gitignore
|
||||
create mode 100644 redhat/rpmbuild/RPMS/.gitignore
|
||||
create mode 100644 redhat/rpmbuild/SOURCES/.gitignore
|
||||
create mode 100644 redhat/rpmbuild/SPECS/.gitignore
|
||||
create mode 100644 redhat/rpmbuild/SRPMS/.gitignore
|
||||
create mode 100755 redhat/scripts/frh.py
|
||||
create mode 100755 redhat/scripts/git-backport-diff
|
||||
create mode 100755 redhat/scripts/git-compile-check
|
||||
create mode 100755 redhat/scripts/process-patches.sh
|
||||
create mode 100755 redhat/scripts/tarball_checksum.sh
|
||||
create mode 100644 redhat/vhost.conf
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index d71dd5b..89ba4c5 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -804,7 +804,7 @@ install-doc: $(DOCS)
|
||||
$(INSTALL_DATA) docs/interop/qemu-qmp-ref.txt "$(DESTDIR)$(qemu_docdir)"
|
||||
ifdef CONFIG_POSIX
|
||||
$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
|
||||
- $(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1"
|
||||
+ $(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1/qemu-kvm.1"
|
||||
$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man7"
|
||||
$(INSTALL_DATA) docs/interop/qemu-qmp-ref.7 "$(DESTDIR)$(mandir)/man7"
|
||||
$(INSTALL_DATA) docs/qemu-block-drivers.7 "$(DESTDIR)$(mandir)/man7"
|
||||
diff --git a/block/Makefile.objs b/block/Makefile.objs
|
||||
index d644bac..c0693fc 100644
|
||||
--- a/block/Makefile.objs
|
||||
+++ b/block/Makefile.objs
|
||||
@@ -20,7 +20,7 @@ block-obj-$(CONFIG_LIBNFS) += nfs.o
|
||||
block-obj-$(CONFIG_CURL) += curl.o
|
||||
block-obj-$(CONFIG_RBD) += rbd.o
|
||||
block-obj-$(CONFIG_GLUSTERFS) += gluster.o
|
||||
-block-obj-$(CONFIG_VXHS) += vxhs.o
|
||||
+#block-obj-$(CONFIG_VXHS) += vxhs.o
|
||||
block-obj-$(CONFIG_LIBSSH2) += ssh.o
|
||||
block-obj-y += accounting.o dirty-bitmap.o
|
||||
block-obj-y += write-threshold.o
|
||||
diff --git a/os-posix.c b/os-posix.c
|
||||
index b9c2343..05de8ee 100644
|
||||
--- a/os-posix.c
|
||||
+++ b/os-posix.c
|
||||
@@ -75,7 +75,7 @@ void os_setup_signal_handling(void)
|
||||
/* Find a likely location for support files using the location of the binary.
|
||||
For installed binaries this will be "$bindir/../share/qemu". When
|
||||
running from the build tree this will be "$bindir/../pc-bios". */
|
||||
-#define SHARE_SUFFIX "/share/qemu"
|
||||
+#define SHARE_SUFFIX "/share/qemu-kvm"
|
||||
#define BUILD_SUFFIX "/pc-bios"
|
||||
char *os_find_datadir(void)
|
||||
{
|
||||
diff --git a/ui/vnc.c b/ui/vnc.c
|
||||
index e164eb7..0c3011b 100644
|
||||
--- a/ui/vnc.c
|
||||
+++ b/ui/vnc.c
|
||||
@@ -4045,7 +4045,7 @@ void vnc_display_open(const char *id, Error **errp)
|
||||
trace_vnc_auth_init(vd, 1, vd->ws_auth, vd->ws_subauth);
|
||||
|
||||
#ifdef CONFIG_VNC_SASL
|
||||
- if ((saslErr = sasl_server_init(NULL, "qemu")) != SASL_OK) {
|
||||
+ if ((saslErr = sasl_server_init(NULL, "qemu-kvm")) != SASL_OK) {
|
||||
error_setg(errp, "Failed to initialize SASL auth: %s",
|
||||
sasl_errstring(saslErr, NULL, NULL));
|
||||
goto fail;
|
||||
--
|
||||
1.8.3.1
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,515 +0,0 @@
|
||||
From e58ce3910208fead9e24eb08e19a11bb2eba2f1e Mon Sep 17 00:00:00 2001
|
||||
From: "Danilo C. L. de Paula" <ddepaula@redhat.com>
|
||||
Date: Wed, 7 Mar 2018 13:05:43 -0300
|
||||
Subject: block/vxhs: modularize VXHS via g_module
|
||||
|
||||
RH-Author: Jeffrey Cody <jcody@redhat.com>
|
||||
Message-id: <8a91a423440b7a5a14e868279c772e99b865bfc6.1494281291.git.jcody@redhat.com>
|
||||
Patchwork-id: 75046
|
||||
O-Subject: [RHEV-7.4 qemu-kvm-rhev 4/4] block/vxhs: modularize VXHS via g_module Bugzilla: 1265869
|
||||
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
||||
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
This converts the VXHS driver to be a runtime loaded module, with no
|
||||
external build dependencies on libvxhs / libqnio. This (libvxhs) is a
|
||||
3rd party library, written by Veritas, to interface with the VXHS
|
||||
server.
|
||||
|
||||
Red Hat is not going to distribute libvxhs, nor will Red Hat use libvxhs
|
||||
in the build systems. So that creates two criteria for the
|
||||
modularization, for business reasons:
|
||||
|
||||
1. No runtime dependencies on libvxhs (aside from opening the library on
|
||||
vxhs open)
|
||||
|
||||
2. No build dependencies on libvxhs packages.
|
||||
|
||||
There is support in QEMU for modular block drivers, however there are
|
||||
two issues with using the built-in support:
|
||||
|
||||
A. It is all-or-none; if modules are enabled all protocols are built
|
||||
as modules. This wouldn't be that bad, as it would of course
|
||||
enable more granular dependencies for qemu rpm packages. But...
|
||||
|
||||
B. It is not designed with criteria #2 in mind; it reduces runtime
|
||||
dependencies, not build dependencies. The protocol libraries
|
||||
that are still built linked against external libraries and using
|
||||
external headers.
|
||||
|
||||
This patch uses g_module to load the libvxhs library, and incorporates
|
||||
the libvxhs.h header in the build tree. If block driver protocols are
|
||||
also built as modules, libvxhs will still work and be built as a module
|
||||
too, except the shared library will still not have any dependency on
|
||||
libvxhs.
|
||||
|
||||
There are a few changes in this patch from upstream (aside from the
|
||||
module loading aspects):
|
||||
|
||||
1. It enables VXHS support to be built as a protocl module if
|
||||
--enable-modules is used during configure.
|
||||
|
||||
2. If the init call to iio_init() fails, populate errp with a
|
||||
meaningful error message.
|
||||
|
||||
3. Since we are loading the library dynamically, make check the min and
|
||||
max supported versions in the libvxhs library on load.
|
||||
|
||||
Patches for items #1 and #2 have been posted upstream.
|
||||
|
||||
It is expected that the libvxhs library is located at the following
|
||||
pathname: /usr/lib64/qemu/libvxhs.so.1
|
||||
|
||||
VXHS support is only built for x86_64 in RHEV.
|
||||
|
||||
Signed-off-by: Jeff Cody <jcody@redhat.com>
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
block/vxhs: improve error message for missing / bad vxhs module
|
||||
|
||||
RH-Author: Jeffrey Cody <jcody@redhat.com>
|
||||
Message-id: <59af10d83125fff42beacd30dbca83d50409bbed.1513031708.git.jcody@redhat.com>
|
||||
Patchwork-id: 78305
|
||||
O-Subject: [RHV7.5 qemu-kvm-rhev PATCH 1/1] block/vxhs: improve error message for missing / bad vxhs module
|
||||
Bugzilla: 1505654
|
||||
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
|
||||
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
||||
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
|
||||
[Downstream only, as the module load of libvxhs is downstream only]
|
||||
|
||||
In the case of missing libvxhs libraries, the original error message,
|
||||
while technically accurate, may lead a user to think there is a QEMU bug
|
||||
if trying to using the VXHS protocol. Update the message so that it is
|
||||
clear that the likely issue is that the Veritas QEMU libvxhs RPM is not
|
||||
installed (or not installed correctly, if there are permission or file
|
||||
corruption issues, etc.).
|
||||
|
||||
An example error message before this change:
|
||||
|
||||
> qemu-img info vxhs://localhost/test
|
||||
qemu-img: Could not open 'vxhs://localhost/test': \
|
||||
error loading libvxhs: /usr/lib64/qemu/libvxhs.so.1: \
|
||||
cannot open shared object file: No such file or directory
|
||||
|
||||
An example error message after this change:
|
||||
|
||||
> qemu-img info vxhs://localhost/test
|
||||
qemu-img: Could not open 'vxhs://localhost/test': \
|
||||
The VXHS library from Veritas might not be installed correctly \
|
||||
(/usr/lib64/qemu/libvxhs.so.1: \
|
||||
cannot open shared object file: No such file or directory)
|
||||
|
||||
Signed-off-by: Jeff Cody <jcody@redhat.com>
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
block/vxhs.c | 123 ++++++++++++++++++++++++++++++++----
|
||||
configure | 33 +---------
|
||||
include/block/vxhs_shim.h | 143 ++++++++++++++++++++++++++++++++++++++++++
|
||||
redhat/build_configure.sh | 9 ++-
|
||||
redhat/qemu-kvm.spec.template | 7 +++
|
||||
5 files changed, 273 insertions(+), 42 deletions(-)
|
||||
create mode 100644 include/block/vxhs_shim.h
|
||||
|
||||
diff --git a/block/vxhs.c b/block/vxhs.c
|
||||
index 75cc6c8..68edb51 100644
|
||||
--- a/block/vxhs.c
|
||||
+++ b/block/vxhs.c
|
||||
@@ -9,7 +9,8 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
-#include <qnio/qnio_api.h>
|
||||
+#include "block/vxhs_shim.h"
|
||||
+#include <gmodule.h>
|
||||
#include <sys/param.h>
|
||||
#include "block/block_int.h"
|
||||
#include "qapi/qmp/qerror.h"
|
||||
@@ -58,6 +59,97 @@ typedef struct BDRVVXHSState {
|
||||
char *tlscredsid; /* tlscredsid */
|
||||
} BDRVVXHSState;
|
||||
|
||||
+#define LIBVXHS_FULL_PATHNAME "/usr/lib64/qemu/libvxhs.so.1"
|
||||
+static bool libvxhs_loaded;
|
||||
+static GModule *libvxhs_handle;
|
||||
+
|
||||
+static LibVXHSFuncs libvxhs;
|
||||
+
|
||||
+typedef struct LibVXHSSymbols {
|
||||
+ const char *name;
|
||||
+ gpointer *addr;
|
||||
+} LibVXHSSymbols;
|
||||
+
|
||||
+static LibVXHSSymbols libvxhs_symbols[] = {
|
||||
+ {"iio_init", (gpointer *) &libvxhs.iio_init},
|
||||
+ {"iio_fini", (gpointer *) &libvxhs.iio_fini},
|
||||
+ {"iio_min_version", (gpointer *) &libvxhs.iio_min_version},
|
||||
+ {"iio_max_version", (gpointer *) &libvxhs.iio_max_version},
|
||||
+ {"iio_open", (gpointer *) &libvxhs.iio_open},
|
||||
+ {"iio_close", (gpointer *) &libvxhs.iio_close},
|
||||
+ {"iio_writev", (gpointer *) &libvxhs.iio_writev},
|
||||
+ {"iio_readv", (gpointer *) &libvxhs.iio_readv},
|
||||
+ {"iio_ioctl", (gpointer *) &libvxhs.iio_ioctl},
|
||||
+ {NULL}
|
||||
+};
|
||||
+
|
||||
+static void bdrv_vxhs_set_funcs(GModule *handle, Error **errp)
|
||||
+{
|
||||
+ int i = 0;
|
||||
+ while (libvxhs_symbols[i].name) {
|
||||
+ const char *name = libvxhs_symbols[i].name;
|
||||
+ if (!g_module_symbol(handle, name, libvxhs_symbols[i].addr)) {
|
||||
+ error_setg(errp, "%s could not be loaded from libvxhs: %s",
|
||||
+ name, g_module_error());
|
||||
+ return;
|
||||
+ }
|
||||
+ ++i;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void bdrv_vxhs_load_libs(Error **errp)
|
||||
+{
|
||||
+ Error *local_err = NULL;
|
||||
+ int32_t ver;
|
||||
+
|
||||
+ if (libvxhs_loaded) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (!g_module_supported()) {
|
||||
+ error_setg(errp, "modules are not supported on this platform: %s",
|
||||
+ g_module_error());
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ libvxhs_handle = g_module_open(LIBVXHS_FULL_PATHNAME,
|
||||
+ G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
|
||||
+ if (!libvxhs_handle) {
|
||||
+ error_setg(errp, "The VXHS library from Veritas might not be installed "
|
||||
+ "correctly (%s)", g_module_error());
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ g_module_make_resident(libvxhs_handle);
|
||||
+
|
||||
+ bdrv_vxhs_set_funcs(libvxhs_handle, &local_err);
|
||||
+ if (local_err) {
|
||||
+ error_propagate(errp, local_err);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ /* Now check to see if the libvxhs we are using here is supported
|
||||
+ * by the loaded version */
|
||||
+
|
||||
+ ver = (*libvxhs.iio_min_version)();
|
||||
+ if (ver > QNIO_VERSION) {
|
||||
+ error_setg(errp, "Trying to use libvxhs version %"PRId32" API, but "
|
||||
+ "only %"PRId32" or newer is supported by %s",
|
||||
+ QNIO_VERSION, ver, LIBVXHS_FULL_PATHNAME);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ ver = (*libvxhs.iio_max_version)();
|
||||
+ if (ver < QNIO_VERSION) {
|
||||
+ error_setg(errp, "Trying to use libvxhs version %"PRId32" API, but "
|
||||
+ "only %"PRId32" or earlier is supported by %s",
|
||||
+ QNIO_VERSION, ver, LIBVXHS_FULL_PATHNAME);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ libvxhs_loaded = true;
|
||||
+}
|
||||
+
|
||||
static void vxhs_complete_aio_bh(void *opaque)
|
||||
{
|
||||
VXHSAIOCB *acb = opaque;
|
||||
@@ -219,7 +311,7 @@ static void vxhs_parse_filename(const char *filename, QDict *options,
|
||||
static int vxhs_init_and_ref(void)
|
||||
{
|
||||
if (vxhs_ref++ == 0) {
|
||||
- if (iio_init(QNIO_VERSION, vxhs_iio_callback)) {
|
||||
+ if ((*libvxhs.iio_init)(QNIO_VERSION, vxhs_iio_callback)) {
|
||||
return -ENODEV;
|
||||
}
|
||||
}
|
||||
@@ -229,7 +321,7 @@ static int vxhs_init_and_ref(void)
|
||||
static void vxhs_unref(void)
|
||||
{
|
||||
if (--vxhs_ref == 0) {
|
||||
- iio_fini();
|
||||
+ (*libvxhs.iio_fini)();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -299,8 +391,17 @@ static int vxhs_open(BlockDriverState *bs, QDict *options,
|
||||
char *client_key = NULL;
|
||||
char *client_cert = NULL;
|
||||
|
||||
+ bdrv_vxhs_load_libs(&local_err);
|
||||
+ if (local_err) {
|
||||
+ error_propagate(errp, local_err);
|
||||
+ /* on error, cannot cleanup because the iio_fini() function
|
||||
+ * is not loaded */
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
ret = vxhs_init_and_ref();
|
||||
if (ret < 0) {
|
||||
+ error_setg(&local_err, "libvxhs iio_init() failed");
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
@@ -385,8 +486,8 @@ static int vxhs_open(BlockDriverState *bs, QDict *options,
|
||||
/*
|
||||
* Open qnio channel to storage agent if not opened before
|
||||
*/
|
||||
- dev_handlep = iio_open(of_vsa_addr, s->vdisk_guid, 0,
|
||||
- cacert, client_key, client_cert);
|
||||
+ dev_handlep = (*libvxhs.iio_open)(of_vsa_addr, s->vdisk_guid, 0,
|
||||
+ cacert, client_key, client_cert);
|
||||
if (dev_handlep == NULL) {
|
||||
trace_vxhs_open_iio_open(of_vsa_addr);
|
||||
ret = -ENODEV;
|
||||
@@ -450,12 +551,12 @@ static BlockAIOCB *vxhs_aio_rw(BlockDriverState *bs, int64_t sector_num,
|
||||
|
||||
switch (iodir) {
|
||||
case VDISK_AIO_WRITE:
|
||||
- ret = iio_writev(dev_handle, acb, qiov->iov, qiov->niov,
|
||||
- offset, (uint64_t)size, iio_flags);
|
||||
+ ret = (*libvxhs.iio_writev)(dev_handle, acb, qiov->iov, qiov->niov,
|
||||
+ offset, (uint64_t)size, iio_flags);
|
||||
break;
|
||||
case VDISK_AIO_READ:
|
||||
- ret = iio_readv(dev_handle, acb, qiov->iov, qiov->niov,
|
||||
- offset, (uint64_t)size, iio_flags);
|
||||
+ ret = (*libvxhs.iio_readv)(dev_handle, acb, qiov->iov, qiov->niov,
|
||||
+ offset, (uint64_t)size, iio_flags);
|
||||
break;
|
||||
default:
|
||||
trace_vxhs_aio_rw_invalid(iodir);
|
||||
@@ -505,7 +606,7 @@ static void vxhs_close(BlockDriverState *bs)
|
||||
* Close vDisk device
|
||||
*/
|
||||
if (s->vdisk_hostinfo.dev_handle) {
|
||||
- iio_close(s->vdisk_hostinfo.dev_handle);
|
||||
+ (*libvxhs.iio_close)(s->vdisk_hostinfo.dev_handle);
|
||||
s->vdisk_hostinfo.dev_handle = NULL;
|
||||
}
|
||||
|
||||
@@ -527,7 +628,7 @@ static int64_t vxhs_get_vdisk_stat(BDRVVXHSState *s)
|
||||
int ret = 0;
|
||||
void *dev_handle = s->vdisk_hostinfo.dev_handle;
|
||||
|
||||
- ret = iio_ioctl(dev_handle, IOR_VDISK_STAT, &vdisk_size, 0);
|
||||
+ ret = (*libvxhs.iio_ioctl)(dev_handle, IOR_VDISK_STAT, &vdisk_size, 0);
|
||||
if (ret < 0) {
|
||||
trace_vxhs_get_vdisk_stat_err(s->vdisk_guid, ret, errno);
|
||||
return -EIO;
|
||||
diff --git a/configure b/configure
|
||||
index 0a19b03..7358269 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -3369,7 +3369,7 @@ else
|
||||
glib_req_ver=2.22
|
||||
fi
|
||||
glib_modules=gthread-2.0
|
||||
-if test "$modules" = yes; then
|
||||
+if test "$modules" = yes -o "$vxhs" = yes; then
|
||||
glib_modules="$glib_modules gmodule-export-2.0"
|
||||
fi
|
||||
|
||||
@@ -5314,33 +5314,6 @@ if compile_prog "" "" ; then
|
||||
fi
|
||||
|
||||
##########################################
|
||||
-# Veritas HyperScale block driver VxHS
|
||||
-# Check if libvxhs is installed
|
||||
-
|
||||
-if test "$vxhs" != "no" ; then
|
||||
- cat > $TMPC <<EOF
|
||||
-#include <stdint.h>
|
||||
-#include <qnio/qnio_api.h>
|
||||
-
|
||||
-void *vxhs_callback;
|
||||
-
|
||||
-int main(void) {
|
||||
- iio_init(QNIO_VERSION, vxhs_callback);
|
||||
- return 0;
|
||||
-}
|
||||
-EOF
|
||||
- vxhs_libs="-lvxhs -lssl"
|
||||
- if compile_prog "" "$vxhs_libs" ; then
|
||||
- vxhs=yes
|
||||
- else
|
||||
- if test "$vxhs" = "yes" ; then
|
||||
- feature_not_found "vxhs block device" "Install libvxhs See github"
|
||||
- fi
|
||||
- vxhs=no
|
||||
- fi
|
||||
-fi
|
||||
-
|
||||
-##########################################
|
||||
# check for _Static_assert()
|
||||
|
||||
have_static_assert=no
|
||||
@@ -6614,8 +6587,8 @@ if test "$pthread_setname_np" = "yes" ; then
|
||||
fi
|
||||
|
||||
if test "$vxhs" = "yes" ; then
|
||||
- echo "CONFIG_VXHS=y" >> $config_host_mak
|
||||
- echo "VXHS_LIBS=$vxhs_libs" >> $config_host_mak
|
||||
+ echo "CONFIG_VXHS=m" >> $config_host_mak
|
||||
+ echo "VXHS_LIBS= -lssl" >> $config_host_mak
|
||||
fi
|
||||
|
||||
if test "$tcg_interpreter" = "yes"; then
|
||||
diff --git a/include/block/vxhs_shim.h b/include/block/vxhs_shim.h
|
||||
new file mode 100644
|
||||
index 0000000..42519ae
|
||||
--- /dev/null
|
||||
+++ b/include/block/vxhs_shim.h
|
||||
@@ -0,0 +1,143 @@
|
||||
+/*
|
||||
+ * Network IO library for VxHS QEMU block driver (Veritas Technologies)
|
||||
+ *
|
||||
+ * This work is licensed under the terms of the GNU GPL, version 2. See
|
||||
+ * the COPYING file in the top-level directory.
|
||||
+ *
|
||||
+ * Contributions after 2014-08-15 are licensed under the terms of the
|
||||
+ * GNU GPL, version 2 or (at your option) any later version.
|
||||
+ */
|
||||
+
|
||||
+#ifndef QNIO_API_H
|
||||
+#define QNIO_API_H
|
||||
+
|
||||
+#include <sys/uio.h>
|
||||
+
|
||||
+/*
|
||||
+ * Bump up the version everytime this file is modified
|
||||
+ */
|
||||
+#define QNIO_VERSION 34
|
||||
+
|
||||
+/*
|
||||
+ * These are the opcodes referenced by callback routine.
|
||||
+ */
|
||||
+#define IRP_READ_REQUEST 0x1FFF
|
||||
+#define IRP_WRITE_REQUEST 0x2FFF
|
||||
+#define IRP_VDISK_CHECK_IO_FAILOVER_READY 2020
|
||||
+
|
||||
+/*
|
||||
+ * opcodes for iio_ioctl.
|
||||
+ */
|
||||
+#define IOR_VDISK_STAT 1005
|
||||
+
|
||||
+/*
|
||||
+ * Error values for iio_cb_t callback function.
|
||||
+ */
|
||||
+#define QNIOERROR_HUP 901 /* Retriable error */
|
||||
+#define QNIOERROR_NOCONN 902 /* Non-retriable error */
|
||||
+
|
||||
+
|
||||
+/* Operation Flags */
|
||||
+#define IIO_FLAG_ASYNC 0x0001 /* Do an async send */
|
||||
+
|
||||
+/*
|
||||
+ * INPUT:
|
||||
+ * ctx - opaque context
|
||||
+ * opcode - Operation
|
||||
+ * error - 0 for sucess, non-zero for failure.
|
||||
+ * RETURNS:
|
||||
+ * void
|
||||
+ * DESCRIPTION:
|
||||
+ * This callback is called, after Async request completes.
|
||||
+ *
|
||||
+ * CONTEXT:
|
||||
+ * The callback should be wait-free.
|
||||
+ */
|
||||
+typedef void (*iio_cb_t) (void *ctx, uint32_t opcode, uint32_t error);
|
||||
+
|
||||
+typedef struct LibVXHSFuncs {
|
||||
+/*
|
||||
+ * RETURNS:
|
||||
+ * 0 for sucess, non-zero for failure.
|
||||
+ * DESCRIPTION:
|
||||
+ * Intilize the library state. This should be called at the
|
||||
+ * begining before issuing any library call.
|
||||
+ */
|
||||
+ int (*iio_init)(int32_t version, iio_cb_t cb);
|
||||
+/*
|
||||
+ * RETURNS:
|
||||
+ * void
|
||||
+ * DESCRIPTION:
|
||||
+ * Relinquish library resources. This should be called on the
|
||||
+ * close of last open device.
|
||||
+ */
|
||||
+ void (*iio_fini)(void);
|
||||
+/*
|
||||
+ * DESCRIPTION:
|
||||
+ * Returns minimum QNIO API version supported by library.
|
||||
+ */
|
||||
+ int32_t (*iio_min_version)(void);
|
||||
+/*
|
||||
+ * DESCRIPTION:
|
||||
+ * Returns maximum QNIO API version supported by library.
|
||||
+ */
|
||||
+ int32_t (*iio_max_version)(void);
|
||||
+/*
|
||||
+ * INPUT:
|
||||
+ * uri - const string of the format of://<hostname|ip>:port
|
||||
+ * devid - Device ID.
|
||||
+ * flags - currently unused, this must be set to 0
|
||||
+ * cacert - CA certificates file in PEM format
|
||||
+ * client_key - Client private key file in PEM format
|
||||
+ * client_cert - Client certificate file in PEM format
|
||||
+ * RETURNS:
|
||||
+ * opeque device handle on success, NULL on failure.
|
||||
+ * DESCRIPTION:
|
||||
+ * This call returns device handle on success. Returns NULL on
|
||||
+ * failure with errno set
|
||||
+ * errno can be one of:
|
||||
+ * ENODEV - remote device not found
|
||||
+ * EBADF - Unable to open communication channel.
|
||||
+ * EBUSY - The call cannot be completed right now
|
||||
+ */
|
||||
+ void *(*iio_open)(const char *uri, const char *devid, uint32_t flags,
|
||||
+ const char *cacert, const char *client_key,
|
||||
+ const char *client_cert);
|
||||
+/*
|
||||
+ * Close the device.
|
||||
+ * For every matching iio_open() there should be a matching iio_close()
|
||||
+ * The last close free all data structures associated with the device.
|
||||
+ */
|
||||
+ int32_t (*iio_close)(void *dev_handle);
|
||||
+/*
|
||||
+ * INPUT:
|
||||
+ * dev_handle - device descriptor on which read/write needs to be performed
|
||||
+ * ctx - an opaque context that is not interpreted This is set for
|
||||
+ * async calls only. It can be NULL.
|
||||
+ * iov - an array of iovecs (This is a scatter gather operation)
|
||||
+ * iovcnt - the number of iovecs
|
||||
+ * offset - an offset to perform the write
|
||||
+ * size - I/O size
|
||||
+ * flags - can be one of
|
||||
+ * IIO_FLAG_ASYNC - indicating this is a aio call.
|
||||
+ * RETURNS:
|
||||
+ * -1 on error, sets errno
|
||||
+ * EBADF - the remote fd is bad
|
||||
+ * EBUSY - The call cannot be completed right now
|
||||
+ * EPIPE - the channel got disconnected, call back would be called in
|
||||
+ * addition to this.
|
||||
+ */
|
||||
+ int32_t (*iio_writev)(void *dev_handle, void *ctx, struct iovec *iov,
|
||||
+ int iovcnt, uint64_t offset, uint64_t size,
|
||||
+ uint32_t flags);
|
||||
+
|
||||
+ int32_t (*iio_readv)(void *dev_handle, void *ctx, struct iovec *iov,
|
||||
+ int iovcnt, uint64_t offset, uint64_t size,
|
||||
+ uint32_t flags);
|
||||
+
|
||||
+ int32_t (*iio_ioctl)(void *dev_handle, uint32_t opcode, void *opaque,
|
||||
+ uint32_t flags);
|
||||
+
|
||||
+} LibVXHSFuncs;
|
||||
+
|
||||
+#endif
|
167
SOURCES/0005-Initial-redhat-build.patch
Normal file
167
SOURCES/0005-Initial-redhat-build.patch
Normal file
@ -0,0 +1,167 @@
|
||||
From 4df157781801c50224373be57fa3c8c3741c0535 Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Fri, 12 Oct 2018 07:31:11 +0200
|
||||
Subject: Initial redhat build
|
||||
|
||||
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
|
||||
- Use "/share/qemu-kvm" as SHARE_SUFFIX
|
||||
- We reconfigured our share to qemu-kvm to be consistent with used name
|
||||
|
||||
This rebase includes changes up to qemu-kvm-4.1.0-18.el8
|
||||
|
||||
Rebase notes (3.1.0):
|
||||
- added new configure options
|
||||
|
||||
Rebase notes (4.0.0):
|
||||
- Added dependency to perl-Test-Harness (upstream)
|
||||
- Added dependency to python3-sphinx (upstream)
|
||||
- Change location of icons (upstream)
|
||||
- Remove .desktop file (added upstream)
|
||||
- Added qemu-trace-stap (added upstream)
|
||||
- Removed elf2dmp (added upstream)
|
||||
- Remove .buildinfo
|
||||
- Added pvh.bin rom (added upstream)
|
||||
- Added interop documentation files
|
||||
- Use python module instead of qemu.py (upstream)
|
||||
|
||||
Rebase notes (4.1.0):
|
||||
- Remove edk2 files generated by build
|
||||
- Switch to rhel-8.1-candidate build target
|
||||
- Remove specs documentation
|
||||
- Switched from libssh2 to libssh
|
||||
- Add rc0 tarball usage hacks
|
||||
- Added BuildRequires for wget, rpm-build and python3-sphinx
|
||||
- Removed new unpacked files
|
||||
- Update configure line to use new options
|
||||
|
||||
Rebase notes (4.2.0):
|
||||
- Disable iotest run during make check
|
||||
- README renamed to README.rst (upstream)
|
||||
- Removed ui-spice-app.so
|
||||
- Added relevant changes from "505f7f4 redhat: Adding slirp to the exploded tree"
|
||||
- Removed qemu-ga.8 install from spec file - installed by make
|
||||
- Removed spapr-rtas.bin (upstream)
|
||||
- Require newer SLOF (20191022)
|
||||
|
||||
Merged patches (3.1.0):
|
||||
- 01f0c9f RHEL8: Add disable configure options to qemu spec file
|
||||
- Spec file cleanups
|
||||
|
||||
Merged patches (4.0.0):
|
||||
- aa4297c Add edk2 Requires to qemu-kvm
|
||||
- d124ff5779 Fixing brew build target
|
||||
- eb204b5 Introduce the qemu-kvm-tests rpm
|
||||
- 223cf0c Load kvm module during boot (partial)
|
||||
|
||||
Merged patches (4.1.0):
|
||||
- ebb6e97 redhat: Fix LOCALVERSION creation
|
||||
- b0ab0cc redhat: enable tpmdev passthrough (not disabling tests)
|
||||
- 7cb3c4a Enable libpmem to support nvdimm
|
||||
- 8943607 qemu-kvm.spec: bump libseccomp >= 2.4.0
|
||||
- 27b7c44 rh: set CONFIG_BOCHS_DISPLAY=y for x86 (partial)
|
||||
- e1fe9fe x86_64-rh-devices: enable TPM emulation (partial)
|
||||
|
||||
Merged patches (4.2.0):
|
||||
- 69e1fb2 enable virgla
|
||||
- d4f6115 enable virgl, for real this time ...
|
||||
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
.gitignore | 1 +
|
||||
Makefile | 3 +-
|
||||
configure | 1 +
|
||||
os-posix.c | 2 +-
|
||||
redhat/Makefile | 82 +
|
||||
redhat/Makefile.common | 51 +
|
||||
redhat/README.tests | 39 +
|
||||
redhat/qemu-kvm.spec.template | 2434 +++++++++++++++++++++++++++++
|
||||
redhat/scripts/process-patches.sh | 7 +-
|
||||
tests/Makefile.include | 2 +-
|
||||
ui/vnc.c | 2 +-
|
||||
11 files changed, 2615 insertions(+), 9 deletions(-)
|
||||
create mode 100644 redhat/Makefile
|
||||
create mode 100644 redhat/Makefile.common
|
||||
create mode 100644 redhat/README.tests
|
||||
create mode 100644 redhat/qemu-kvm.spec.template
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index b437a346d7..086727dbb9 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -512,6 +512,7 @@ CAP_CFLAGS += -DCAPSTONE_HAS_ARM
|
||||
CAP_CFLAGS += -DCAPSTONE_HAS_ARM64
|
||||
CAP_CFLAGS += -DCAPSTONE_HAS_POWERPC
|
||||
CAP_CFLAGS += -DCAPSTONE_HAS_X86
|
||||
+CAP_CFLAGS += -Wp,-D_GLIBCXX_ASSERTIONS
|
||||
|
||||
.PHONY: capstone/all
|
||||
capstone/all: .git-submodule-status
|
||||
@@ -826,7 +827,7 @@ install-doc: $(DOCS) install-sphinxdocs
|
||||
$(INSTALL_DATA) docs/interop/qemu-qmp-ref.txt "$(DESTDIR)$(qemu_docdir)"
|
||||
ifdef CONFIG_POSIX
|
||||
$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
|
||||
- $(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1"
|
||||
+ $(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1/qemu-kvm.1"
|
||||
$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man7"
|
||||
$(INSTALL_DATA) docs/interop/qemu-qmp-ref.7 "$(DESTDIR)$(mandir)/man7"
|
||||
$(INSTALL_DATA) docs/qemu-block-drivers.7 "$(DESTDIR)$(mandir)/man7"
|
||||
diff --git a/configure b/configure
|
||||
index 6099be1d84..16564f8ccc 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -2424,6 +2424,7 @@ if test "$seccomp" != "no" ; then
|
||||
seccomp="no"
|
||||
fi
|
||||
fi
|
||||
+
|
||||
##########################################
|
||||
# xen probe
|
||||
|
||||
diff --git a/os-posix.c b/os-posix.c
|
||||
index 86cffd2c7d..1c9f86768d 100644
|
||||
--- a/os-posix.c
|
||||
+++ b/os-posix.c
|
||||
@@ -83,7 +83,7 @@ void os_setup_signal_handling(void)
|
||||
/* Find a likely location for support files using the location of the binary.
|
||||
For installed binaries this will be "$bindir/../share/qemu". When
|
||||
running from the build tree this will be "$bindir/../pc-bios". */
|
||||
-#define SHARE_SUFFIX "/share/qemu"
|
||||
+#define SHARE_SUFFIX "/share/qemu-kvm"
|
||||
#define BUILD_SUFFIX "/pc-bios"
|
||||
char *os_find_datadir(void)
|
||||
{
|
||||
diff --git a/tests/Makefile.include b/tests/Makefile.include
|
||||
index 8566f5f119..b483790cf3 100644
|
||||
--- a/tests/Makefile.include
|
||||
+++ b/tests/Makefile.include
|
||||
@@ -1194,7 +1194,7 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR)
|
||||
check-qapi-schema: check-tests/qapi-schema/frontend check-tests/qapi-schema/doc-good.texi
|
||||
check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS))
|
||||
check-block: $(patsubst %,check-%, $(check-block-y))
|
||||
-check: check-block check-qapi-schema check-unit check-softfloat check-qtest check-decodetree
|
||||
+check: check-qapi-schema check-unit check-softfloat check-qtest check-decodetree
|
||||
check-clean:
|
||||
rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
|
||||
rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(target)-y)) $(check-qtest-generic-y))
|
||||
diff --git a/ui/vnc.c b/ui/vnc.c
|
||||
index 87b8045afe..ecf6276f5b 100644
|
||||
--- a/ui/vnc.c
|
||||
+++ b/ui/vnc.c
|
||||
@@ -3987,7 +3987,7 @@ void vnc_display_open(const char *id, Error **errp)
|
||||
|
||||
#ifdef CONFIG_VNC_SASL
|
||||
if (sasl) {
|
||||
- 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.21.0
|
||||
|
@ -1,41 +0,0 @@
|
||||
From a737b4e82a67c87c6c34bbe5826dc9ed5c6318da Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Thu, 18 Dec 2014 06:27:49 +0100
|
||||
Subject: Use kvm by default
|
||||
|
||||
Bugzilla: 906185
|
||||
|
||||
RHEL uses kvm accelerator by default, if available.
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
Rebase notes (2.10.0)
|
||||
- variable rename (upstream)
|
||||
|
||||
Rebase notes (2.2.0):
|
||||
- Move code from vl.c to accel.c
|
||||
|
||||
(cherry picked from commit abcd662eb8e516ebe4a6b401e83a62f749491a15)
|
||||
(cherry picked from commit eca6d5766d956c37e3f7f28d70903d357308c846)
|
||||
---
|
||||
accel/accel.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/accel/accel.c b/accel/accel.c
|
||||
index 93e2434..5f3d73f 100644
|
||||
--- a/accel/accel.c
|
||||
+++ b/accel/accel.c
|
||||
@@ -79,8 +79,8 @@ void configure_accelerator(MachineState *ms)
|
||||
|
||||
accel = qemu_opt_get(qemu_get_machine_opts(), "accel");
|
||||
if (accel == NULL) {
|
||||
- /* Use the default "accelerator", tcg */
|
||||
- accel = "tcg";
|
||||
+ /* RHEL uses kvm as the default accelerator, fallback to tcg */
|
||||
+ accel = "kvm:tcg";
|
||||
}
|
||||
|
||||
p = accel;
|
||||
--
|
||||
1.8.3.1
|
||||
|
994
SOURCES/0006-Enable-disable-devices-for-RHEL.patch
Normal file
994
SOURCES/0006-Enable-disable-devices-for-RHEL.patch
Normal file
@ -0,0 +1,994 @@
|
||||
From 67511676246cce57becbd2dcf5abccf08d9ef737 Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Mon, 11 Jan 2016 11:53:33 +0100
|
||||
Subject: Enable/disable devices for RHEL
|
||||
|
||||
This commit adds all changes related to changes in supported devices.
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
Rebase notes (qemu 3.1.0)
|
||||
- spapr_rng disabled in default_config
|
||||
- new hyperv.mak in default configs
|
||||
- Move changes from x86_64-softmmu.mak to i386-softmmu.mak
|
||||
- Added CONFIG_VIRTIO_MMIO to aarch64-softmmu.mak
|
||||
- Removed config_vga_isa.c changes as no longer needed
|
||||
- Removed new devices
|
||||
|
||||
Rebase notes (4.0.0):
|
||||
- Added CONFIG_PCI_EXPRESS_GENERIC_BRIDGE for aarch64-softmmu.mak
|
||||
- Added CONFIG_ARM_VIRT for aarch64-softmmu.mak
|
||||
- Switch to KConfig (upstream)
|
||||
- Using device whitelist + without-defualt-devices option
|
||||
|
||||
Rebase notes (4.1.0):
|
||||
- Added CONFIG_USB_OHCI_PCI for ppc64
|
||||
- Added CONFIG_XIVE_KVM for ppc64
|
||||
- Added CONFIG_ACPI_PCI for x86_64
|
||||
- Added CONFIG_SEMIHOSTING for aarch64
|
||||
- Cleanup aarch64 devices
|
||||
- Do not build a15mpcore.c
|
||||
- Removed ide-isa.c stub file
|
||||
- Use CONFIG_USB_EHCI_PCI on x86_64 (new upstream)
|
||||
|
||||
Rebase notes (4.2.0-rc0):
|
||||
- Use conditional build for isa-superio.c (upstream change)
|
||||
- Rename PCI_PIIX to PCI_I440FX (upstream change)
|
||||
|
||||
Rebase notes (4.2.0-rc3):
|
||||
- Disabled ccid-card-emulated (patch 92566)
|
||||
- Disabled vfio-pci-igd-lpc-bridge (patch 92565)
|
||||
|
||||
Merged patches (qemu 3.1.0):
|
||||
- d51e082 Re-enable CONFIG_HYPERV_TESTDEV
|
||||
- 4b889f3 Declare cirrus-vga as deprecated
|
||||
- b579d32 Do not build bluetooth support
|
||||
- 3eef52a Disable CONFIG_IPMI and CONFIG_I2C for ppc64
|
||||
- 9caf292 Disable CONFIG_CAN_BUS and CONFIG_CAN_SJA1000
|
||||
|
||||
Merged patches (4.1.0):
|
||||
- 20a51f6 fdc: Revert downstream disablement of device "floppy"
|
||||
- f869cc0 fdc: Restrict floppy controllers to RHEL-7 machine types
|
||||
- 5909721 aarch64: Compile out IOH3420
|
||||
- 27b7c44 rh: set CONFIG_BOCHS_DISPLAY=y for x86 (partial)
|
||||
- 495a27d x86_64-rh-devices: add missing TPM passthrough
|
||||
- e1fe9fe x86_64-rh-devices: enable TPM emulation (partial)
|
||||
|
||||
Merged patches (4.2.0):
|
||||
- f7587dd RHEL: disable hostmem-memfd
|
||||
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
Makefile.objs | 4 +-
|
||||
backends/Makefile.objs | 3 +-
|
||||
default-configs/aarch64-rh-devices.mak | 20 +++++
|
||||
default-configs/aarch64-softmmu.mak | 10 ++-
|
||||
default-configs/ppc64-rh-devices.mak | 32 ++++++++
|
||||
default-configs/ppc64-softmmu.mak | 8 +-
|
||||
default-configs/rh-virtio.mak | 10 +++
|
||||
default-configs/s390x-rh-devices.mak | 15 ++++
|
||||
default-configs/s390x-softmmu.mak | 4 +-
|
||||
default-configs/x86_64-rh-devices.mak | 100 +++++++++++++++++++++++++
|
||||
default-configs/x86_64-softmmu.mak | 4 +-
|
||||
hw/acpi/ich9.c | 4 +-
|
||||
hw/arm/Makefile.objs | 2 +-
|
||||
hw/block/fdc.c | 10 +++
|
||||
hw/bt/Makefile.objs | 4 +-
|
||||
hw/cpu/Makefile.objs | 5 +-
|
||||
hw/display/Makefile.objs | 5 +-
|
||||
hw/display/cirrus_vga.c | 3 +
|
||||
hw/ide/piix.c | 5 +-
|
||||
hw/input/pckbd.c | 2 +
|
||||
hw/net/e1000.c | 2 +
|
||||
hw/pci-host/i440fx.c | 4 +
|
||||
hw/ppc/spapr_cpu_core.c | 2 +
|
||||
hw/usb/Makefile.objs | 4 +-
|
||||
hw/vfio/pci-quirks.c | 9 +++
|
||||
hw/vfio/pci.c | 5 ++
|
||||
qemu-options.hx | 7 +-
|
||||
redhat/qemu-kvm.spec.template | 5 +-
|
||||
target/arm/cpu.c | 4 +-
|
||||
target/i386/cpu.c | 35 +++++++--
|
||||
target/ppc/cpu-models.c | 10 +++
|
||||
target/s390x/cpu_models.c | 3 +
|
||||
target/s390x/kvm.c | 8 ++
|
||||
util/memfd.c | 2 +-
|
||||
vl.c | 8 +-
|
||||
35 files changed, 317 insertions(+), 41 deletions(-)
|
||||
create mode 100644 default-configs/aarch64-rh-devices.mak
|
||||
create mode 100644 default-configs/ppc64-rh-devices.mak
|
||||
create mode 100644 default-configs/rh-virtio.mak
|
||||
create mode 100644 default-configs/s390x-rh-devices.mak
|
||||
create mode 100644 default-configs/x86_64-rh-devices.mak
|
||||
|
||||
diff --git a/Makefile.objs b/Makefile.objs
|
||||
index 11ba1a36bd..fcf63e1096 100644
|
||||
--- a/Makefile.objs
|
||||
+++ b/Makefile.objs
|
||||
@@ -65,8 +65,8 @@ common-obj-y += replay/
|
||||
|
||||
common-obj-y += ui/
|
||||
common-obj-m += ui/
|
||||
-common-obj-y += bt-host.o bt-vhci.o
|
||||
-bt-host.o-cflags := $(BLUEZ_CFLAGS)
|
||||
+#common-obj-y += bt-host.o bt-vhci.o
|
||||
+#bt-host.o-cflags := $(BLUEZ_CFLAGS)
|
||||
|
||||
common-obj-y += dma-helpers.o
|
||||
common-obj-y += vl.o
|
||||
diff --git a/backends/Makefile.objs b/backends/Makefile.objs
|
||||
index f0691116e8..f328d404bf 100644
|
||||
--- a/backends/Makefile.objs
|
||||
+++ b/backends/Makefile.objs
|
||||
@@ -16,4 +16,5 @@ endif
|
||||
|
||||
common-obj-$(call land,$(CONFIG_VHOST_USER),$(CONFIG_VIRTIO)) += vhost-user.o
|
||||
|
||||
-common-obj-$(CONFIG_LINUX) += hostmem-memfd.o
|
||||
+# RHEL: disable memfd
|
||||
+# common-obj-$(CONFIG_LINUX) += hostmem-memfd.o
|
||||
diff --git a/default-configs/aarch64-rh-devices.mak b/default-configs/aarch64-rh-devices.mak
|
||||
new file mode 100644
|
||||
index 0000000000..a1ed641174
|
||||
--- /dev/null
|
||||
+++ b/default-configs/aarch64-rh-devices.mak
|
||||
@@ -0,0 +1,20 @@
|
||||
+include rh-virtio.mak
|
||||
+
|
||||
+CONFIG_ARM_GIC_KVM=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_VFIO=y
|
||||
+CONFIG_VFIO_PCI=y
|
||||
+CONFIG_VIRTIO_MMIO=y
|
||||
+CONFIG_VIRTIO_PCI=y
|
||||
+CONFIG_XIO3130=y
|
||||
diff --git a/default-configs/aarch64-softmmu.mak b/default-configs/aarch64-softmmu.mak
|
||||
index 958b1e08e4..8f6867d48a 100644
|
||||
--- a/default-configs/aarch64-softmmu.mak
|
||||
+++ b/default-configs/aarch64-softmmu.mak
|
||||
@@ -1,8 +1,10 @@
|
||||
# Default configuration for aarch64-softmmu
|
||||
|
||||
# We support all the 32 bit boards so need all their config
|
||||
-include arm-softmmu.mak
|
||||
+#include arm-softmmu.mak
|
||||
|
||||
-CONFIG_XLNX_ZYNQMP_ARM=y
|
||||
-CONFIG_XLNX_VERSAL=y
|
||||
-CONFIG_SBSA_REF=y
|
||||
+#CONFIG_XLNX_ZYNQMP_ARM=y
|
||||
+#CONFIG_XLNX_VERSAL=y
|
||||
+#CONFIG_SBSA_REF=y
|
||||
+
|
||||
+include aarch64-rh-devices.mak
|
||||
diff --git a/default-configs/ppc64-rh-devices.mak b/default-configs/ppc64-rh-devices.mak
|
||||
new file mode 100644
|
||||
index 0000000000..35f2106d06
|
||||
--- /dev/null
|
||||
+++ b/default-configs/ppc64-rh-devices.mak
|
||||
@@ -0,0 +1,32 @@
|
||||
+include rh-virtio.mak
|
||||
+
|
||||
+CONFIG_DIMM=y
|
||||
+CONFIG_MEM_DEVICE=y
|
||||
+CONFIG_PCI=y
|
||||
+CONFIG_PCI_DEVICES=y
|
||||
+CONFIG_PCI_TESTDEV=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_BOT=y
|
||||
+CONFIG_USB_XHCI=y
|
||||
+CONFIG_USB_XHCI_NEC=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_XICS_KVM=y
|
||||
+CONFIG_XICS_SPAPR=y
|
||||
+CONFIG_XIVE=y
|
||||
+CONFIG_XIVE_SPAPR=y
|
||||
+CONFIG_XIVE_KVM=y
|
||||
diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64-softmmu.mak
|
||||
index cca52665d9..fec354f327 100644
|
||||
--- a/default-configs/ppc64-softmmu.mak
|
||||
+++ b/default-configs/ppc64-softmmu.mak
|
||||
@@ -1,10 +1,12 @@
|
||||
# Default configuration for ppc64-softmmu
|
||||
|
||||
# Include all 32-bit boards
|
||||
-include ppc-softmmu.mak
|
||||
+#include ppc-softmmu.mak
|
||||
|
||||
# For PowerNV
|
||||
-CONFIG_POWERNV=y
|
||||
+#CONFIG_POWERNV=y
|
||||
|
||||
# For pSeries
|
||||
-CONFIG_PSERIES=y
|
||||
+#CONFIG_PSERIES=y
|
||||
+
|
||||
+include ppc64-rh-devices.mak
|
||||
diff --git a/default-configs/rh-virtio.mak b/default-configs/rh-virtio.mak
|
||||
new file mode 100644
|
||||
index 0000000000..94ede1b5f6
|
||||
--- /dev/null
|
||||
+++ b/default-configs/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/default-configs/s390x-rh-devices.mak b/default-configs/s390x-rh-devices.mak
|
||||
new file mode 100644
|
||||
index 0000000000..c3c73fe752
|
||||
--- /dev/null
|
||||
+++ b/default-configs/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_TERMINAL3270=y
|
||||
+CONFIG_VFIO=y
|
||||
+CONFIG_VFIO_AP=y
|
||||
+CONFIG_VFIO_PCI=y
|
||||
+CONFIG_VHOST_USER=y
|
||||
+CONFIG_VIRTIO_CCW=y
|
||||
+CONFIG_WDT_DIAG288=y
|
||||
diff --git a/default-configs/s390x-softmmu.mak b/default-configs/s390x-softmmu.mak
|
||||
index f2287a133f..3e2e388e91 100644
|
||||
--- a/default-configs/s390x-softmmu.mak
|
||||
+++ b/default-configs/s390x-softmmu.mak
|
||||
@@ -10,4 +10,6 @@
|
||||
|
||||
# Boards:
|
||||
#
|
||||
-CONFIG_S390_CCW_VIRTIO=y
|
||||
+#CONFIG_S390_CCW_VIRTIO=y
|
||||
+
|
||||
+include s390x-rh-devices.mak
|
||||
diff --git a/default-configs/x86_64-rh-devices.mak b/default-configs/x86_64-rh-devices.mak
|
||||
new file mode 100644
|
||||
index 0000000000..d59b6d9bb5
|
||||
--- /dev/null
|
||||
+++ b/default-configs/x86_64-rh-devices.mak
|
||||
@@ -0,0 +1,100 @@
|
||||
+include rh-virtio.mak
|
||||
+
|
||||
+CONFIG_AC97=y
|
||||
+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_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=y
|
||||
+CONFIG_PXB=y
|
||||
+CONFIG_Q35=y
|
||||
+CONFIG_QXL=y
|
||||
+CONFIG_RTL8139_PCI=y
|
||||
+CONFIG_SCSI=y
|
||||
+CONFIG_SERIAL=y
|
||||
+CONFIG_SERIAL_ISA=y
|
||||
+CONFIG_SERIAL_PCI=y
|
||||
+CONFIG_SEV=y
|
||||
+CONFIG_SGA=y
|
||||
+CONFIG_SMBIOS=y
|
||||
+CONFIG_SMBUS_EEPROM=y
|
||||
+CONFIG_SPICE=y
|
||||
+CONFIG_TEST_DEVICES=y
|
||||
+CONFIG_USB=y
|
||||
+CONFIG_USB_EHCI=y
|
||||
+CONFIG_USB_EHCI_PCI=y
|
||||
+CONFIG_USB_SMARTCARD=y
|
||||
+CONFIG_USB_STORAGE_BOT=y
|
||||
+CONFIG_USB_UHCI=y
|
||||
+CONFIG_USB_XHCI=y
|
||||
+CONFIG_USB_XHCI_NEC=y
|
||||
+CONFIG_VFIO=y
|
||||
+CONFIG_VFIO_PCI=y
|
||||
+CONFIG_VGA=y
|
||||
+CONFIG_VGA_CIRRUS=y
|
||||
+CONFIG_VGA_PCI=y
|
||||
+CONFIG_VHOST_USER=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_CRB=y
|
||||
+CONFIG_TPM_TIS=y
|
||||
+CONFIG_TPM_EMULATOR=y
|
||||
+CONFIG_TPM_PASSTHROUGH=y
|
||||
diff --git a/default-configs/x86_64-softmmu.mak b/default-configs/x86_64-softmmu.mak
|
||||
index 64b2ee2960..b5de7e5279 100644
|
||||
--- a/default-configs/x86_64-softmmu.mak
|
||||
+++ b/default-configs/x86_64-softmmu.mak
|
||||
@@ -1,3 +1,5 @@
|
||||
# Default configuration for x86_64-softmmu
|
||||
|
||||
-include i386-softmmu.mak
|
||||
+#include i386-softmmu.mak
|
||||
+
|
||||
+include x86_64-rh-devices.mak
|
||||
diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
|
||||
index 2034dd749e..ab203ad448 100644
|
||||
--- a/hw/acpi/ich9.c
|
||||
+++ b/hw/acpi/ich9.c
|
||||
@@ -449,8 +449,8 @@ void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm, Error **errp)
|
||||
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;
|
||||
|
||||
object_property_add_uint32_ptr(obj, ACPI_PM_PROP_PM_IO_BASE,
|
||||
diff --git a/hw/arm/Makefile.objs b/hw/arm/Makefile.objs
|
||||
index fe749f65fd..2aa1a9efdd 100644
|
||||
--- a/hw/arm/Makefile.objs
|
||||
+++ b/hw/arm/Makefile.objs
|
||||
@@ -27,7 +27,7 @@ obj-$(CONFIG_VEXPRESS) += vexpress.o
|
||||
obj-$(CONFIG_ZYNQ) += xilinx_zynq.o
|
||||
obj-$(CONFIG_SABRELITE) += sabrelite.o
|
||||
|
||||
-obj-$(CONFIG_ARM_V7M) += armv7m.o
|
||||
+#obj-$(CONFIG_ARM_V7M) += armv7m.o
|
||||
obj-$(CONFIG_EXYNOS4) += exynos4210.o
|
||||
obj-$(CONFIG_PXA2XX) += pxa2xx.o pxa2xx_gpio.o pxa2xx_pic.o
|
||||
obj-$(CONFIG_DIGIC) += digic.o
|
||||
diff --git a/hw/block/fdc.c b/hw/block/fdc.c
|
||||
index ac5d31e8c1..e925bac002 100644
|
||||
--- a/hw/block/fdc.c
|
||||
+++ b/hw/block/fdc.c
|
||||
@@ -46,6 +46,8 @@
|
||||
#include "qemu/module.h"
|
||||
#include "trace.h"
|
||||
|
||||
+#include "hw/boards.h"
|
||||
+
|
||||
/********************************************************/
|
||||
/* debug Floppy devices */
|
||||
|
||||
@@ -2638,6 +2640,14 @@ static void fdctrl_realize_common(DeviceState *dev, FDCtrl *fdctrl,
|
||||
int i, j;
|
||||
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'");
|
||||
}
|
||||
diff --git a/hw/bt/Makefile.objs b/hw/bt/Makefile.objs
|
||||
index 867a7d2e8a..e678e9ee3c 100644
|
||||
--- a/hw/bt/Makefile.objs
|
||||
+++ b/hw/bt/Makefile.objs
|
||||
@@ -1,3 +1,3 @@
|
||||
-common-obj-y += core.o l2cap.o sdp.o hci.o hid.o
|
||||
-common-obj-y += hci-csr.o
|
||||
+#common-obj-y += core.o l2cap.o sdp.o hci.o hid.o
|
||||
+#common-obj-y += hci-csr.o
|
||||
|
||||
diff --git a/hw/cpu/Makefile.objs b/hw/cpu/Makefile.objs
|
||||
index 8db9e8a7b3..1601ea93c7 100644
|
||||
--- a/hw/cpu/Makefile.objs
|
||||
+++ b/hw/cpu/Makefile.objs
|
||||
@@ -1,5 +1,6 @@
|
||||
obj-$(CONFIG_ARM11MPCORE) += arm11mpcore.o
|
||||
obj-$(CONFIG_REALVIEW) += realview_mpcore.o
|
||||
obj-$(CONFIG_A9MPCORE) += a9mpcore.o
|
||||
-obj-$(CONFIG_A15MPCORE) += a15mpcore.o
|
||||
-common-obj-y += core.o cluster.o
|
||||
+#obj-$(CONFIG_A15MPCORE) += a15mpcore.o
|
||||
+common-obj-y += core.o
|
||||
+# cluster.o
|
||||
diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs
|
||||
index f2182e3bef..3d0cda1b52 100644
|
||||
--- a/hw/display/Makefile.objs
|
||||
+++ b/hw/display/Makefile.objs
|
||||
@@ -1,8 +1,9 @@
|
||||
common-obj-$(CONFIG_DDC) += i2c-ddc.o
|
||||
common-obj-$(CONFIG_EDID) += edid-generate.o edid-region.o
|
||||
|
||||
-common-obj-$(CONFIG_FW_CFG_DMA) += ramfb.o
|
||||
-common-obj-$(CONFIG_FW_CFG_DMA) += ramfb-standalone.o
|
||||
+# Disabled for Red Hat Enterprise Linux
|
||||
+#common-obj-$(CONFIG_FW_CFG_DMA) += ramfb.o
|
||||
+#common-obj-$(CONFIG_FW_CFG_DMA) += ramfb-standalone.o
|
||||
|
||||
common-obj-$(CONFIG_ADS7846) += ads7846.o
|
||||
common-obj-$(CONFIG_VGA_CIRRUS) += cirrus_vga.o
|
||||
diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
|
||||
index cd283e53b4..93afa26fda 100644
|
||||
--- a/hw/display/cirrus_vga.c
|
||||
+++ b/hw/display/cirrus_vga.c
|
||||
@@ -2975,6 +2975,9 @@ 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. */
|
||||
if (s->vga.vram_size_mb != 4 && s->vga.vram_size_mb != 8 &&
|
||||
diff --git a/hw/ide/piix.c b/hw/ide/piix.c
|
||||
index db313dd3b1..e14858ca64 100644
|
||||
--- a/hw/ide/piix.c
|
||||
+++ b/hw/ide/piix.c
|
||||
@@ -251,7 +251,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 = {
|
||||
@@ -279,6 +280,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 f0acfd86f7..390eb6579c 100644
|
||||
--- a/hw/input/pckbd.c
|
||||
+++ b/hw/input/pckbd.c
|
||||
@@ -571,6 +571,8 @@ static void i8042_class_initfn(ObjectClass *klass, void *data)
|
||||
dc->realize = i8042_realizefn;
|
||||
dc->vmsd = &vmstate_kbd_isa;
|
||||
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 a73f8d404e..fc73fdd6fa 100644
|
||||
--- a/hw/net/e1000.c
|
||||
+++ b/hw/net/e1000.c
|
||||
@@ -1795,6 +1795,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,
|
||||
@@ -1807,6 +1808,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/pci-host/i440fx.c b/hw/pci-host/i440fx.c
|
||||
index f27131102d..17f10efae2 100644
|
||||
--- a/hw/pci-host/i440fx.c
|
||||
+++ b/hw/pci-host/i440fx.c
|
||||
@@ -386,6 +386,7 @@ static const TypeInfo i440fx_info = {
|
||||
},
|
||||
};
|
||||
|
||||
+#if 0 /* Disabled in Red Hat Enterprise Linux */
|
||||
/* IGD Passthrough Host Bridge. */
|
||||
typedef struct {
|
||||
uint8_t offset;
|
||||
@@ -469,6 +470,7 @@ static const TypeInfo igd_passthrough_i440fx_info = {
|
||||
.instance_size = sizeof(PCII440FXState),
|
||||
.class_init = igd_passthrough_i440fx_class_init,
|
||||
};
|
||||
+#endif
|
||||
|
||||
static const char *i440fx_pcihost_root_bus_path(PCIHostState *host_bridge,
|
||||
PCIBus *rootbus)
|
||||
@@ -514,7 +516,9 @@ static const TypeInfo i440fx_pcihost_info = {
|
||||
static void i440fx_register_types(void)
|
||||
{
|
||||
type_register_static(&i440fx_info);
|
||||
+#if 0 /* Disabled in Red Hat Enterprise Linux */
|
||||
type_register_static(&igd_passthrough_i440fx_info);
|
||||
+#endif
|
||||
type_register_static(&i440fx_pcihost_info);
|
||||
}
|
||||
|
||||
diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
|
||||
index 8339c4c0f8..301cd7b4e4 100644
|
||||
--- a/hw/ppc/spapr_cpu_core.c
|
||||
+++ b/hw/ppc/spapr_cpu_core.c
|
||||
@@ -403,10 +403,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/Makefile.objs b/hw/usb/Makefile.objs
|
||||
index 303ac084a0..700a91886e 100644
|
||||
--- a/hw/usb/Makefile.objs
|
||||
+++ b/hw/usb/Makefile.objs
|
||||
@@ -30,7 +30,9 @@ common-obj-$(CONFIG_USB_BLUETOOTH) += dev-bluetooth.o
|
||||
ifeq ($(CONFIG_USB_SMARTCARD),y)
|
||||
common-obj-y += dev-smartcard-reader.o
|
||||
common-obj-$(CONFIG_SMARTCARD) += smartcard.mo
|
||||
-smartcard.mo-objs := ccid-card-passthru.o ccid-card-emulated.o
|
||||
+# Disabled for Red Hat Enterprise Linux:
|
||||
+# smartcard.mo-objs := ccid-card-passthru.o ccid-card-emulated.o
|
||||
+smartcard.mo-objs := ccid-card-passthru.o
|
||||
smartcard.mo-cflags := $(SMARTCARD_CFLAGS)
|
||||
smartcard.mo-libs := $(SMARTCARD_LIBS)
|
||||
endif
|
||||
diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c
|
||||
index 136f3a9ad6..4505ffe48a 100644
|
||||
--- a/hw/vfio/pci-quirks.c
|
||||
+++ b/hw/vfio/pci-quirks.c
|
||||
@@ -1166,6 +1166,7 @@ static void vfio_probe_rtl8168_bar2_quirk(VFIOPCIDevice *vdev, int nr)
|
||||
trace_vfio_quirk_rtl8168_probe(vdev->vbasedev.name);
|
||||
}
|
||||
|
||||
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
||||
/*
|
||||
* Intel IGD support
|
||||
*
|
||||
@@ -1239,6 +1240,7 @@ static int igd_gen(VFIOPCIDevice *vdev)
|
||||
|
||||
return 8; /* Assume newer is compatible */
|
||||
}
|
||||
+#endif
|
||||
|
||||
typedef struct VFIOIGDQuirk {
|
||||
struct VFIOPCIDevice *vdev;
|
||||
@@ -1311,6 +1313,7 @@ typedef struct {
|
||||
uint8_t len;
|
||||
} IGDHostInfo;
|
||||
|
||||
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
||||
static const IGDHostInfo igd_host_bridge_infos[] = {
|
||||
{PCI_REVISION_ID, 2},
|
||||
{PCI_SUBSYSTEM_VENDOR_ID, 2},
|
||||
@@ -1559,9 +1562,11 @@ static const MemoryRegionOps vfio_igd_index_quirk = {
|
||||
.write = vfio_igd_quirk_index_write,
|
||||
.endianness = DEVICE_LITTLE_ENDIAN,
|
||||
};
|
||||
+#endif
|
||||
|
||||
static void vfio_probe_igd_bar4_quirk(VFIOPCIDevice *vdev, int nr)
|
||||
{
|
||||
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
||||
struct vfio_region_info *rom = NULL, *opregion = NULL,
|
||||
*host = NULL, *lpc = NULL;
|
||||
VFIOQuirk *quirk;
|
||||
@@ -1572,6 +1577,7 @@ static void vfio_probe_igd_bar4_quirk(VFIOPCIDevice *vdev, int nr)
|
||||
uint32_t gmch;
|
||||
uint16_t cmd_orig, cmd;
|
||||
Error *err = NULL;
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* This must be an Intel VGA device at address 00:02.0 for us to even
|
||||
@@ -1585,6 +1591,8 @@ static void vfio_probe_igd_bar4_quirk(VFIOPCIDevice *vdev, int nr)
|
||||
return;
|
||||
}
|
||||
|
||||
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
||||
+
|
||||
/*
|
||||
* We need to create an LPC/ISA bridge at PCI bus address 00:1f.0 that we
|
||||
* can stuff host values into, so if there's already one there and it's not
|
||||
@@ -1809,6 +1817,7 @@ out:
|
||||
g_free(opregion);
|
||||
g_free(host);
|
||||
g_free(lpc);
|
||||
+#endif
|
||||
}
|
||||
|
||||
/*
|
||||
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
|
||||
index 2d40b396f2..c8534d3035 100644
|
||||
--- a/hw/vfio/pci.c
|
||||
+++ b/hw/vfio/pci.c
|
||||
@@ -3220,6 +3220,7 @@ static const TypeInfo vfio_pci_dev_info = {
|
||||
},
|
||||
};
|
||||
|
||||
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
||||
static Property vfio_pci_dev_nohotplug_properties[] = {
|
||||
DEFINE_PROP_BOOL("ramfb", VFIOPCIDevice, enable_ramfb, false),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
@@ -3239,11 +3240,15 @@ static const TypeInfo vfio_pci_nohotplug_dev_info = {
|
||||
.instance_size = sizeof(VFIOPCIDevice),
|
||||
.class_init = vfio_pci_nohotplug_dev_class_init,
|
||||
};
|
||||
+#endif
|
||||
|
||||
static void register_vfio_pci_dev_type(void)
|
||||
{
|
||||
type_register_static(&vfio_pci_dev_info);
|
||||
+
|
||||
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
||||
type_register_static(&vfio_pci_nohotplug_dev_info);
|
||||
+#endif
|
||||
}
|
||||
|
||||
type_init(register_vfio_pci_dev_type)
|
||||
diff --git a/qemu-options.hx b/qemu-options.hx
|
||||
index 65c9473b73..fc17aca631 100644
|
||||
--- a/qemu-options.hx
|
||||
+++ b/qemu-options.hx
|
||||
@@ -2111,11 +2111,6 @@ ETEXI
|
||||
|
||||
DEF("no-hpet", 0, QEMU_OPTION_no_hpet,
|
||||
"-no-hpet disable HPET\n", QEMU_ARCH_I386)
|
||||
-STEXI
|
||||
-@item -no-hpet
|
||||
-@findex -no-hpet
|
||||
-Disable HPET support.
|
||||
-ETEXI
|
||||
|
||||
DEF("acpitable", HAS_ARG, QEMU_OPTION_acpitable,
|
||||
"-acpitable [sig=str][,rev=n][,oem_id=str][,oem_table_id=str][,oem_rev=n][,asl_compiler_id=str][,asl_compiler_rev=n][,{data|file}=file1[:file2]...]\n"
|
||||
@@ -3125,6 +3120,7 @@ STEXI
|
||||
ETEXI
|
||||
DEFHEADING()
|
||||
|
||||
+#if 0
|
||||
DEFHEADING(Bluetooth(R) options:)
|
||||
STEXI
|
||||
@table @option
|
||||
@@ -3203,6 +3199,7 @@ STEXI
|
||||
@end table
|
||||
ETEXI
|
||||
DEFHEADING()
|
||||
+#endif
|
||||
|
||||
#ifdef CONFIG_TPM
|
||||
DEFHEADING(TPM device options:)
|
||||
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
|
||||
index 7a4ac9339b..3788fc3c4a 100644
|
||||
--- a/target/arm/cpu.c
|
||||
+++ b/target/arm/cpu.c
|
||||
@@ -2744,7 +2744,9 @@ static void arm_cpu_register_types(void)
|
||||
type_register_static(&idau_interface_type_info);
|
||||
|
||||
while (info->name) {
|
||||
- cpu_register(info);
|
||||
+ /* RHEL specific: Filter out unsupported cpu models */
|
||||
+ if (!strcmp(info->name, "cortex-a15"))
|
||||
+ cpu_register(info);
|
||||
info++;
|
||||
}
|
||||
|
||||
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
|
||||
index 69f518a21a..1b7880ae3a 100644
|
||||
--- a/target/i386/cpu.c
|
||||
+++ b/target/i386/cpu.c
|
||||
@@ -1835,14 +1835,14 @@ static X86CPUDefinition builtin_x86_defs[] = {
|
||||
.family = 6,
|
||||
.model = 6,
|
||||
.stepping = 3,
|
||||
- .features[FEAT_1_EDX] =
|
||||
- PPRO_FEATURES |
|
||||
- CPUID_MTRR | CPUID_CLFLUSH | CPUID_MCA |
|
||||
- CPUID_PSE36,
|
||||
- .features[FEAT_1_ECX] =
|
||||
- CPUID_EXT_SSE3 | CPUID_EXT_CX16,
|
||||
- .features[FEAT_8000_0001_EDX] =
|
||||
- CPUID_EXT2_LM | CPUID_EXT2_SYSCALL | CPUID_EXT2_NX,
|
||||
+ .features[FEAT_1_EDX] = CPUID_SSE2 | CPUID_SSE | CPUID_FXSR |
|
||||
+ CPUID_MMX | CPUID_CLFLUSH | CPUID_PSE36 | CPUID_PAT | CPUID_CMOV |
|
||||
+ CPUID_MCA | CPUID_PGE | CPUID_MTRR | CPUID_SEP | CPUID_APIC |
|
||||
+ CPUID_CX8 | CPUID_MCE | CPUID_PAE | CPUID_MSR | CPUID_TSC |
|
||||
+ CPUID_PSE | CPUID_DE | CPUID_FP87,
|
||||
+ .features[FEAT_1_ECX] = CPUID_EXT_CX16 | CPUID_EXT_SSE3,
|
||||
+ .features[FEAT_8000_0001_EDX] = CPUID_EXT2_LM | CPUID_EXT2_NX |
|
||||
+ CPUID_EXT2_SYSCALL,
|
||||
.features[FEAT_8000_0001_ECX] =
|
||||
CPUID_EXT3_LAHF_LM | CPUID_EXT3_SVM,
|
||||
.xlevel = 0x8000000A,
|
||||
@@ -2128,6 +2128,25 @@ static X86CPUDefinition builtin_x86_defs[] = {
|
||||
.xlevel = 0x80000008,
|
||||
.model_id = "Intel(R) Atom(TM) CPU N270 @ 1.60GHz",
|
||||
},
|
||||
+ {
|
||||
+ .name = "cpu64-rhel6",
|
||||
+ .level = 4,
|
||||
+ .vendor = CPUID_VENDOR_AMD,
|
||||
+ .family = 6,
|
||||
+ .model = 13,
|
||||
+ .stepping = 3,
|
||||
+ .features[FEAT_1_EDX] = CPUID_SSE2 | CPUID_SSE | CPUID_FXSR |
|
||||
+ CPUID_MMX | CPUID_CLFLUSH | CPUID_PSE36 | CPUID_PAT | CPUID_CMOV |
|
||||
+ CPUID_MCA | CPUID_PGE | CPUID_MTRR | CPUID_SEP | CPUID_APIC |
|
||||
+ CPUID_CX8 | CPUID_MCE | CPUID_PAE | CPUID_MSR | CPUID_TSC |
|
||||
+ CPUID_PSE | CPUID_DE | CPUID_FP87,
|
||||
+ .features[FEAT_1_ECX] = CPUID_EXT_CX16 | CPUID_EXT_SSE3,
|
||||
+ .features[FEAT_8000_0001_EDX] = CPUID_EXT2_LM | CPUID_EXT2_NX | CPUID_EXT2_SYSCALL,
|
||||
+ .features[FEAT_8000_0001_ECX] = CPUID_EXT3_SSE4A | CPUID_EXT3_ABM |
|
||||
+ CPUID_EXT3_SVM | CPUID_EXT3_LAHF_LM,
|
||||
+ .xlevel = 0x8000000A,
|
||||
+ .model_id = "QEMU Virtual CPU version (cpu64-rhel6)",
|
||||
+ },
|
||||
{
|
||||
.name = "Conroe",
|
||||
.level = 10,
|
||||
diff --git a/target/ppc/cpu-models.c b/target/ppc/cpu-models.c
|
||||
index 086548e9b9..1bbf378c18 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 401 family */
|
||||
POWERPC_DEF("401", CPU_POWERPC_401, 401,
|
||||
@@ -740,8 +741,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,
|
||||
@@ -760,6 +763,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,
|
||||
@@ -780,6 +784,7 @@
|
||||
/* PowerPC CPU aliases */
|
||||
|
||||
PowerPCCPUAlias ppc_cpu_aliases[] = {
|
||||
+#if 0 /* Embedded and 32-bit CPUs disabled for Red Hat Enterprise Linux */
|
||||
{ "403", "403gc" },
|
||||
{ "405", "405d4" },
|
||||
{ "405cr", "405crc" },
|
||||
@@ -938,12 +943,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" },
|
||||
@@ -952,6 +960,7 @@ PowerPCCPUAlias ppc_cpu_aliases[] = {
|
||||
{ "power9", "power9_v2.0" },
|
||||
#endif
|
||||
|
||||
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
||||
/* Generic PowerPCs */
|
||||
#if defined(TARGET_PPC64)
|
||||
{ "ppc64", "970fx_v3.1" },
|
||||
@@ -959,5 +968,6 @@ PowerPCCPUAlias ppc_cpu_aliases[] = {
|
||||
{ "ppc32", "604" },
|
||||
{ "ppc", "604" },
|
||||
{ "default", "604" },
|
||||
+#endif
|
||||
{ NULL, NULL }
|
||||
};
|
||||
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
|
||||
index 7e92fb2e15..be718220d7 100644
|
||||
--- a/target/s390x/cpu_models.c
|
||||
+++ b/target/s390x/cpu_models.c
|
||||
@@ -404,6 +404,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.c b/target/s390x/kvm.c
|
||||
index 0c9d14b4b1..a02d569537 100644
|
||||
--- a/target/s390x/kvm.c
|
||||
+++ b/target/s390x/kvm.c
|
||||
@@ -2387,6 +2387,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) */
|
||||
diff --git a/util/memfd.c b/util/memfd.c
|
||||
index 4a3c07e0be..3303ec9da4 100644
|
||||
--- a/util/memfd.c
|
||||
+++ b/util/memfd.c
|
||||
@@ -193,7 +193,7 @@ bool qemu_memfd_alloc_check(void)
|
||||
*/
|
||||
bool qemu_memfd_check(unsigned int flags)
|
||||
{
|
||||
-#ifdef CONFIG_LINUX
|
||||
+#if 0 /* RHEL: memfd support disabled */
|
||||
int mfd = memfd_create("test", flags | MFD_CLOEXEC);
|
||||
|
||||
if (mfd >= 0) {
|
||||
diff --git a/vl.c b/vl.c
|
||||
index 6a65a64bfd..668a34577e 100644
|
||||
--- a/vl.c
|
||||
+++ b/vl.c
|
||||
@@ -166,7 +166,7 @@ Chardev *parallel_hds[MAX_PARALLEL_PORTS];
|
||||
int win2k_install_hack = 0;
|
||||
int singlestep = 0;
|
||||
int acpi_enabled = 1;
|
||||
-int no_hpet = 0;
|
||||
+int no_hpet = 1; /* Always disabled for Red Hat Enterprise Linux */
|
||||
int fd_bootchk = 1;
|
||||
static int no_reboot;
|
||||
int no_shutdown = 0;
|
||||
@@ -914,6 +914,7 @@ static void configure_rtc(QemuOpts *opts)
|
||||
}
|
||||
}
|
||||
|
||||
+#if 0 // Disabled for Red Hat Enterprise Linux
|
||||
/***********************************************************/
|
||||
/* Bluetooth support */
|
||||
static int nb_hcis;
|
||||
@@ -1035,6 +1036,7 @@ static int bt_parse(const char *opt)
|
||||
error_report("bad bluetooth parameter '%s'", opt);
|
||||
return 1;
|
||||
}
|
||||
+#endif
|
||||
|
||||
static int parse_name(void *opaque, QemuOpts *opts, Error **errp)
|
||||
{
|
||||
@@ -3128,6 +3130,7 @@ int main(int argc, char **argv, char **envp)
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
||||
case QEMU_OPTION_bt:
|
||||
warn_report("The bluetooth subsystem is deprecated and will "
|
||||
"be removed soon. If the bluetooth subsystem is "
|
||||
@@ -3135,6 +3138,7 @@ int main(int argc, char **argv, char **envp)
|
||||
"qemu-devel@nongnu.org with your usecase.");
|
||||
add_device_config(DEV_BT, optarg);
|
||||
break;
|
||||
+#endif
|
||||
case QEMU_OPTION_audio_help:
|
||||
audio_legacy_help();
|
||||
exit (0);
|
||||
@@ -4282,9 +4286,11 @@ int main(int argc, char **argv, char **envp)
|
||||
|
||||
tpm_init();
|
||||
|
||||
+#if 0 // Disabled for Red Hat Enterprise Linux
|
||||
/* init the bluetooth world */
|
||||
if (foreach_device_config(DEV_BT, bt_parse))
|
||||
exit(1);
|
||||
+#endif
|
||||
|
||||
if (!xen_enabled()) {
|
||||
/* On 32-bit hosts, QEMU is limited by virtual address space */
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,74 +0,0 @@
|
||||
From caa475eb19e0e235920f15828c6879c4b64499a2 Mon Sep 17 00:00:00 2001
|
||||
From: Bandan Das <bsd@redhat.com>
|
||||
Date: Tue, 3 Dec 2013 20:05:13 +0100
|
||||
Subject: vfio: cap number of devices that can be assigned
|
||||
|
||||
RH-Author: Bandan Das <bsd@redhat.com>
|
||||
Message-id: <1386101113-31560-3-git-send-email-bsd@redhat.com>
|
||||
Patchwork-id: 55984
|
||||
O-Subject: [PATCH RHEL7 qemu-kvm v2 2/2] vfio: cap number of devices that can be assigned
|
||||
Bugzilla: 678368
|
||||
RH-Acked-by: Alex Williamson <alex.williamson@redhat.com>
|
||||
RH-Acked-by: Marcelo Tosatti <mtosatti@redhat.com>
|
||||
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
||||
|
||||
Go through all groups to get count of total number of devices
|
||||
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.
|
||||
|
||||
Signed-off-by: Bandan Das <bsd@redhat.com>
|
||||
|
||||
Rebase notes (2.8.0):
|
||||
- removed return value for vfio_realize (commit 1a22aca)
|
||||
|
||||
Merged patches (2.9.0):
|
||||
- 17eb774 vfio: Use error_setg when reporting max assigned device overshoot
|
||||
|
||||
(cherry picked from commit 9fa3c9fc6dfcde76d80db1aa601b2d577f72ceec)
|
||||
(cherry picked from commit 3cb35556dc7d994f203d732fe952f95fcdb03c0a)
|
||||
---
|
||||
hw/vfio/pci.c | 15 ++++++++++++++-
|
||||
1 file changed, 14 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
|
||||
index b9bc6cd..34b9d19 100644
|
||||
--- a/hw/vfio/pci.c
|
||||
+++ b/hw/vfio/pci.c
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "qapi/error.h"
|
||||
|
||||
#define MSIX_CAP_LENGTH 12
|
||||
+#define MAX_DEV_ASSIGN_CMDLINE 32
|
||||
|
||||
static void vfio_disable_interrupts(VFIOPCIDevice *vdev);
|
||||
static void vfio_mmap_set_enabled(VFIOPCIDevice *vdev, bool enabled);
|
||||
@@ -2807,7 +2808,19 @@ static void vfio_realize(PCIDevice *pdev, Error **errp)
|
||||
ssize_t len;
|
||||
struct stat st;
|
||||
int groupid;
|
||||
- int i, ret;
|
||||
+ int ret, i = 0;
|
||||
+
|
||||
+ QLIST_FOREACH(group, &vfio_group_list, next) {
|
||||
+ QLIST_FOREACH(vbasedev_iter, &group->device_list, next) {
|
||||
+ i++;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (i >= MAX_DEV_ASSIGN_CMDLINE) {
|
||||
+ error_setg(errp, "Maximum supported vfio devices (%d) "
|
||||
+ "already attached", MAX_DEV_ASSIGN_CMDLINE);
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
if (!vdev->vbasedev.sysfsdev) {
|
||||
if (!(~vdev->host.domain || ~vdev->host.bus ||
|
||||
--
|
||||
1.8.3.1
|
||||
|
675
SOURCES/0007-Machine-type-related-general-changes.patch
Normal file
675
SOURCES/0007-Machine-type-related-general-changes.patch
Normal file
@ -0,0 +1,675 @@
|
||||
From 113078b23a4747b07eb363719d7cbc0af403dd2a Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Fri, 11 Jan 2019 09:54:45 +0100
|
||||
Subject: Machine type related general changes
|
||||
|
||||
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 <mrezanin@redhat.com>
|
||||
|
||||
Rebase changes (4.0.0):
|
||||
- Remove e1000 device duplication changes to reflect upstream solution
|
||||
- Rewrite machine compat properties to upstream solution
|
||||
|
||||
Rebase changes (4.1.0):
|
||||
- Removed optional flag for machine compat properties (upstream)
|
||||
- Remove c3e002cb chunk from hw/net/e1000.c
|
||||
- Reorder compat structures
|
||||
- Use one format for compat scructures
|
||||
- Added compat for virtio-balloon-pci.any_layout for rhel71
|
||||
|
||||
Merged patches (4.0.0):
|
||||
- d4c0957 compat: Generic HW_COMPAT_RHEL7_6
|
||||
- cbac773 virtio: Make disable-legacy/disable-modern compat properties optional
|
||||
|
||||
Merged patches (4.1.0):
|
||||
- 479ad30 redhat: fix cut'n'paste garbage in hw_compat comments
|
||||
- f19738e compat: Generic hw_compat_rhel_8_0
|
||||
|
||||
Merged patches (4.2.0):
|
||||
- 9f2bfaa machine types: Update hw_compat_rhel_8_0 from hw_compat_4_0
|
||||
- ca4a5e8 virtio: Make disable-legacy/disable-modern compat properties optional
|
||||
- compat: Generic hw_compat_rhel_8_1 (patch 93040/92956)
|
||||
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
hw/acpi/ich9.c | 16 ++++
|
||||
hw/acpi/piix4.c | 5 +-
|
||||
hw/char/serial.c | 16 ++++
|
||||
hw/core/machine.c | 170 ++++++++++++++++++++++++++++++++++++++++
|
||||
hw/display/vga-isa.c | 2 +-
|
||||
hw/net/e1000e.c | 21 +++++
|
||||
hw/net/rtl8139.c | 4 +-
|
||||
hw/rtc/mc146818rtc.c | 6 ++
|
||||
hw/smbios/smbios.c | 1 +
|
||||
hw/timer/i8254_common.c | 2 +-
|
||||
hw/usb/hcd-uhci.c | 4 +-
|
||||
hw/usb/hcd-xhci.c | 20 +++++
|
||||
hw/usb/hcd-xhci.h | 2 +
|
||||
include/hw/acpi/ich9.h | 3 +
|
||||
include/hw/boards.h | 24 ++++++
|
||||
include/hw/usb.h | 4 +
|
||||
migration/migration.c | 2 +
|
||||
migration/migration.h | 5 ++
|
||||
18 files changed, 301 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
|
||||
index ab203ad448..7ec26884e8 100644
|
||||
--- a/hw/acpi/ich9.c
|
||||
+++ b/hw/acpi/ich9.c
|
||||
@@ -444,6 +444,18 @@ static void ich9_pm_set_enable_tco(Object *obj, bool value, Error **errp)
|
||||
s->pm.enable_tco = value;
|
||||
}
|
||||
|
||||
+static bool ich9_pm_get_force_rev1_fadt(Object *obj, Error **errp)
|
||||
+{
|
||||
+ ICH9LPCState *s = ICH9_LPC_DEVICE(obj);
|
||||
+ return s->pm.force_rev1_fadt;
|
||||
+}
|
||||
+
|
||||
+static void ich9_pm_set_force_rev1_fadt(Object *obj, bool value, Error **errp)
|
||||
+{
|
||||
+ ICH9LPCState *s = ICH9_LPC_DEVICE(obj);
|
||||
+ s->pm.force_rev1_fadt = value;
|
||||
+}
|
||||
+
|
||||
void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm, Error **errp)
|
||||
{
|
||||
static const uint32_t gpe0_len = ICH9_PMIO_GPE0_LEN;
|
||||
@@ -468,6 +480,10 @@ void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm, Error **errp)
|
||||
ich9_pm_get_cpu_hotplug_legacy,
|
||||
ich9_pm_set_cpu_hotplug_legacy,
|
||||
NULL);
|
||||
+ object_property_add_bool(obj, "__com.redhat_force-rev1-fadt",
|
||||
+ ich9_pm_get_force_rev1_fadt,
|
||||
+ ich9_pm_set_force_rev1_fadt,
|
||||
+ NULL);
|
||||
object_property_add(obj, ACPI_PM_PROP_S3_DISABLED, "uint8",
|
||||
ich9_pm_get_disable_s3,
|
||||
ich9_pm_set_disable_s3,
|
||||
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
|
||||
index 93aec2dd2c..3a26193cbe 100644
|
||||
--- a/hw/acpi/piix4.c
|
||||
+++ b/hw/acpi/piix4.c
|
||||
@@ -274,6 +274,7 @@ 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),
|
||||
@@ -627,8 +628,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-pci-hotplug-with-bridge-support", PIIX4PMState,
|
||||
use_acpi_pci_hotplug, true),
|
||||
diff --git a/hw/char/serial.c b/hw/char/serial.c
|
||||
index b4aa250950..0012f0e44d 100644
|
||||
--- a/hw/char/serial.c
|
||||
+++ b/hw/char/serial.c
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "sysemu/runstate.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "trace.h"
|
||||
+#include "migration/migration.h"
|
||||
|
||||
//#define DEBUG_SERIAL
|
||||
|
||||
@@ -703,6 +704,9 @@ static int serial_post_load(void *opaque, int version_id)
|
||||
static bool serial_thr_ipending_needed(void *opaque)
|
||||
{
|
||||
SerialState *s = opaque;
|
||||
+ if (migrate_pre_2_2) {
|
||||
+ return false;
|
||||
+ }
|
||||
|
||||
if (s->ier & UART_IER_THRI) {
|
||||
bool expected_value = ((s->iir & UART_IIR_ID) == UART_IIR_THRI);
|
||||
@@ -784,6 +788,10 @@ static const VMStateDescription vmstate_serial_xmit_fifo = {
|
||||
static bool serial_fifo_timeout_timer_needed(void *opaque)
|
||||
{
|
||||
SerialState *s = (SerialState *)opaque;
|
||||
+ if (migrate_pre_2_2) {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
return timer_pending(s->fifo_timeout_timer);
|
||||
}
|
||||
|
||||
@@ -801,6 +809,10 @@ static const VMStateDescription vmstate_serial_fifo_timeout_timer = {
|
||||
static bool serial_timeout_ipending_needed(void *opaque)
|
||||
{
|
||||
SerialState *s = (SerialState *)opaque;
|
||||
+ if (migrate_pre_2_2) {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
return s->timeout_ipending != 0;
|
||||
}
|
||||
|
||||
@@ -818,6 +830,10 @@ static const VMStateDescription vmstate_serial_timeout_ipending = {
|
||||
static bool serial_poll_needed(void *opaque)
|
||||
{
|
||||
SerialState *s = (SerialState *)opaque;
|
||||
+ if (migrate_pre_2_2) {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
return s->poll_msl >= 0;
|
||||
}
|
||||
|
||||
diff --git a/hw/core/machine.c b/hw/core/machine.c
|
||||
index 1689ad3bf8..e0e0eec8bf 100644
|
||||
--- a/hw/core/machine.c
|
||||
+++ b/hw/core/machine.c
|
||||
@@ -27,6 +27,176 @@
|
||||
#include "hw/pci/pci.h"
|
||||
#include "hw/mem/nvdimm.h"
|
||||
|
||||
+/*
|
||||
+ * 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-pci", "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);
|
||||
+
|
||||
+/* The same as hw_compat_2_11 + hw_compat_2_10 */
|
||||
+GlobalProperty hw_compat_rhel_7_5[] = {
|
||||
+ /* hw_compat_rhel_7_5 from hw_compat_2_11 */
|
||||
+ { "hpet", "hpet-offset-saved", "false" },
|
||||
+ /* hw_compat_rhel_7_5 from hw_compat_2_11 */
|
||||
+ { "virtio-blk-pci", "vectors", "2" },
|
||||
+ /* hw_compat_rhel_7_5 from hw_compat_2_11 */
|
||||
+ { "vhost-user-blk-pci", "vectors", "2" },
|
||||
+ /* hw_compat_rhel_7_5 from hw_compat_2_11
|
||||
+ bz 1608778 modified for our naming */
|
||||
+ { "e1000-82540em", "migrate_tso_props", "off" },
|
||||
+ /* hw_compat_rhel_7_5 from hw_compat_2_10 */
|
||||
+ { "virtio-mouse-device", "wheel-axis", "false" },
|
||||
+ /* hw_compat_rhel_7_5 from hw_compat_2_10 */
|
||||
+ { "virtio-tablet-device", "wheel-axis", "false" },
|
||||
+ { "cirrus-vga", "vgamem_mb", "16" },
|
||||
+ { "migration", "decompress-error-check", "off" },
|
||||
+};
|
||||
+const size_t hw_compat_rhel_7_5_len = G_N_ELEMENTS(hw_compat_rhel_7_5);
|
||||
+
|
||||
+/* Mostly like hw_compat_2_9 except
|
||||
+ * x-mtu-bypass-backend, x-migrate-msix has already been
|
||||
+ * backported to RHEL7.4. shpc was already on in 7.4.
|
||||
+ */
|
||||
+GlobalProperty hw_compat_rhel_7_4[] = {
|
||||
+ { "intel-iommu", "pt", "off" },
|
||||
+};
|
||||
+
|
||||
+const size_t hw_compat_rhel_7_4_len = G_N_ELEMENTS(hw_compat_rhel_7_4);
|
||||
+/* Mostly like HW_COMPAT_2_6 + HW_COMPAT_2_7 + HW_COMPAT_2_8 except
|
||||
+ * disable-modern, disable-legacy, page-per-vq have already been
|
||||
+ * backported to RHEL7.3
|
||||
+ */
|
||||
+GlobalProperty hw_compat_rhel_7_3[] = {
|
||||
+ { "virtio-mmio", "format_transport_address", "off" },
|
||||
+ { "virtio-serial-device", "emergency-write", "off" },
|
||||
+ { "ioapic", "version", "0x11" },
|
||||
+ { "intel-iommu", "x-buggy-eim", "true" },
|
||||
+ { "virtio-pci", "x-ignore-backend-features", "on" },
|
||||
+ { "fw_cfg_mem", "x-file-slots", stringify(0x10) },
|
||||
+ { "fw_cfg_io", "x-file-slots", stringify(0x10) },
|
||||
+ { "pflash_cfi01", "old-multiple-chip-handling", "on" },
|
||||
+ { TYPE_PCI_DEVICE, "x-pcie-extcap-init", "off" },
|
||||
+ { "virtio-pci", "x-pcie-deverr-init", "off" },
|
||||
+ { "virtio-pci", "x-pcie-lnkctl-init", "off" },
|
||||
+ { "virtio-pci", "x-pcie-pm-init", "off" },
|
||||
+ { "virtio-net-device", "x-mtu-bypass-backend", "off" },
|
||||
+ { "e1000e", "__redhat_e1000e_7_3_intr_state", "on" },
|
||||
+};
|
||||
+const size_t hw_compat_rhel_7_3_len = G_N_ELEMENTS(hw_compat_rhel_7_3);
|
||||
+
|
||||
+/* Mostly like hw_compat_2_4 + 2_3 but:
|
||||
+ * we don't need "any_layout" as it has been backported to 7.2
|
||||
+ */
|
||||
+GlobalProperty hw_compat_rhel_7_2[] = {
|
||||
+ { "virtio-blk-device", "scsi", "true" },
|
||||
+ { "e1000-82540em", "extra_mac_registers", "off" },
|
||||
+ { "virtio-pci", "x-disable-pcie", "on" },
|
||||
+ { "virtio-pci", "migrate-extra", "off" },
|
||||
+ { "fw_cfg_mem", "dma_enabled", "off" },
|
||||
+ { "fw_cfg_io", "dma_enabled", "off" },
|
||||
+ { "isa-fdc", "fallback", "144" },
|
||||
+ /* Optional because not all virtio-pci devices support legacy mode */
|
||||
+ { "virtio-pci", "disable-modern", "on", .optional = true },
|
||||
+ { "virtio-pci", "disable-legacy", "off", .optional = true },
|
||||
+ { TYPE_PCI_DEVICE, "x-pcie-lnksta-dllla", "off" },
|
||||
+ { "virtio-pci", "page-per-vq", "on" },
|
||||
+ /* hw_compat_rhel_7_2 - introduced with 2.10.0 */
|
||||
+ { "migration", "send-section-footer", "off" },
|
||||
+ /* hw_compat_rhel_7_2 - introduced with 2.10.0 */
|
||||
+ { "migration", "store-global-state", "off",
|
||||
+ },
|
||||
+};
|
||||
+const size_t hw_compat_rhel_7_2_len = G_N_ELEMENTS(hw_compat_rhel_7_2);
|
||||
+
|
||||
+/* Mostly like hw_compat_2_1 but:
|
||||
+ * we don't need virtio-scsi-pci since 7.0 already had that on
|
||||
+ *
|
||||
+ * RH: Note, qemu-extended-regs should have been enabled in the 7.1
|
||||
+ * machine type, but was accidentally turned off in 7.2 onwards.
|
||||
+ */
|
||||
+GlobalProperty hw_compat_rhel_7_1[] = {
|
||||
+ { "intel-hda-generic", "old_msi_addr", "on" },
|
||||
+ { "VGA", "qemu-extended-regs", "off" },
|
||||
+ { "secondary-vga", "qemu-extended-regs", "off" },
|
||||
+ { "usb-mouse", "usb_version", stringify(1) },
|
||||
+ { "usb-kbd", "usb_version", stringify(1) },
|
||||
+ { "virtio-pci", "virtio-pci-bus-master-bug-migration", "on" },
|
||||
+ { "virtio-blk-pci", "any_layout", "off" },
|
||||
+ { "virtio-balloon-pci", "any_layout", "off" },
|
||||
+ { "virtio-serial-pci", "any_layout", "off" },
|
||||
+ { "virtio-9p-pci", "any_layout", "off" },
|
||||
+ { "virtio-rng-pci", "any_layout", "off" },
|
||||
+ /* HW_COMPAT_RHEL7_1 - introduced with 2.10.0 */
|
||||
+ { "migration", "send-configuration", "off" },
|
||||
+};
|
||||
+const size_t hw_compat_rhel_7_1_len = G_N_ELEMENTS(hw_compat_rhel_7_1);
|
||||
+
|
||||
GlobalProperty hw_compat_4_1[] = {
|
||||
{ "virtio-pci", "x-pcie-flr-init", "off" },
|
||||
};
|
||||
diff --git a/hw/display/vga-isa.c b/hw/display/vga-isa.c
|
||||
index 873e5e9706..d1a2efe47e 100644
|
||||
--- a/hw/display/vga-isa.c
|
||||
+++ b/hw/display/vga-isa.c
|
||||
@@ -82,7 +82,7 @@ static void vga_isa_realizefn(DeviceState *dev, Error **errp)
|
||||
}
|
||||
|
||||
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/net/e1000e.c b/hw/net/e1000e.c
|
||||
index b69fd7d8ad..d8be50a1ce 100644
|
||||
--- a/hw/net/e1000e.c
|
||||
+++ b/hw/net/e1000e.c
|
||||
@@ -79,6 +79,11 @@ typedef struct E1000EState {
|
||||
|
||||
E1000ECore core;
|
||||
|
||||
+ /* 7.3 had the intr_state field that was in the original e1000e code
|
||||
+ * but that was removed prior to 2.7's release
|
||||
+ */
|
||||
+ bool redhat_7_3_intr_state_enable;
|
||||
+ uint32_t redhat_7_3_intr_state;
|
||||
} E1000EState;
|
||||
|
||||
#define E1000E_MMIO_IDX 0
|
||||
@@ -94,6 +99,10 @@ typedef struct E1000EState {
|
||||
#define E1000E_MSIX_TABLE (0x0000)
|
||||
#define E1000E_MSIX_PBA (0x2000)
|
||||
|
||||
+/* Values as in RHEL 7.3 build and original upstream */
|
||||
+#define RH_E1000E_USE_MSI BIT(0)
|
||||
+#define RH_E1000E_USE_MSIX BIT(1)
|
||||
+
|
||||
static uint64_t
|
||||
e1000e_mmio_read(void *opaque, hwaddr addr, unsigned size)
|
||||
{
|
||||
@@ -305,6 +314,8 @@ e1000e_init_msix(E1000EState *s)
|
||||
} else {
|
||||
if (!e1000e_use_msix_vectors(s, E1000E_MSIX_VEC_NUM)) {
|
||||
msix_uninit(d, &s->msix, &s->msix);
|
||||
+ } else {
|
||||
+ s->redhat_7_3_intr_state |= RH_E1000E_USE_MSIX;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -476,6 +487,8 @@ static void e1000e_pci_realize(PCIDevice *pci_dev, Error **errp)
|
||||
ret = msi_init(PCI_DEVICE(s), 0xD0, 1, true, false, NULL);
|
||||
if (ret) {
|
||||
trace_e1000e_msi_init_fail(ret);
|
||||
+ } else {
|
||||
+ s->redhat_7_3_intr_state |= RH_E1000E_USE_MSI;
|
||||
}
|
||||
|
||||
if (e1000e_add_pm_capability(pci_dev, e1000e_pmrb_offset,
|
||||
@@ -599,6 +612,11 @@ static const VMStateDescription e1000e_vmstate_intr_timer = {
|
||||
VMSTATE_STRUCT_ARRAY(_f, _s, _num, 0, \
|
||||
e1000e_vmstate_intr_timer, E1000IntrDelayTimer)
|
||||
|
||||
+static bool rhel_7_3_check(void *opaque, int version_id)
|
||||
+{
|
||||
+ return ((E1000EState *)opaque)->redhat_7_3_intr_state_enable;
|
||||
+}
|
||||
+
|
||||
static const VMStateDescription e1000e_vmstate = {
|
||||
.name = "e1000e",
|
||||
.version_id = 1,
|
||||
@@ -610,6 +628,7 @@ static const VMStateDescription e1000e_vmstate = {
|
||||
VMSTATE_MSIX(parent_obj, E1000EState),
|
||||
|
||||
VMSTATE_UINT32(ioaddr, E1000EState),
|
||||
+ VMSTATE_UINT32_TEST(redhat_7_3_intr_state, E1000EState, rhel_7_3_check),
|
||||
VMSTATE_UINT32(core.rxbuf_min_shift, E1000EState),
|
||||
VMSTATE_UINT8(core.rx_desc_len, E1000EState),
|
||||
VMSTATE_UINT32_ARRAY(core.rxbuf_sizes, E1000EState,
|
||||
@@ -658,6 +677,8 @@ static PropertyInfo e1000e_prop_disable_vnet,
|
||||
|
||||
static Property e1000e_properties[] = {
|
||||
DEFINE_NIC_PROPERTIES(E1000EState, conf),
|
||||
+ DEFINE_PROP_BOOL("__redhat_e1000e_7_3_intr_state", E1000EState,
|
||||
+ redhat_7_3_intr_state_enable, false),
|
||||
DEFINE_PROP_SIGNED("disable_vnet_hdr", E1000EState, disable_vnet, false,
|
||||
e1000e_prop_disable_vnet, bool),
|
||||
DEFINE_PROP_SIGNED("subsys_ven", E1000EState, subsys_ven,
|
||||
diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c
|
||||
index 88a97d756d..21d80e96cf 100644
|
||||
--- a/hw/net/rtl8139.c
|
||||
+++ b/hw/net/rtl8139.c
|
||||
@@ -3177,7 +3177,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,
|
||||
@@ -3258,7 +3258,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/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c
|
||||
index 74ae74bc5c..73820517df 100644
|
||||
--- a/hw/rtc/mc146818rtc.c
|
||||
+++ b/hw/rtc/mc146818rtc.c
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "qapi/visitor.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "hw/rtc/mc146818rtc_regs.h"
|
||||
+#include "migration/migration.h"
|
||||
|
||||
#ifdef TARGET_I386
|
||||
#include "qapi/qapi-commands-misc-target.h"
|
||||
@@ -820,6 +821,11 @@ static int rtc_post_load(void *opaque, int version_id)
|
||||
static bool rtc_irq_reinject_on_ack_count_needed(void *opaque)
|
||||
{
|
||||
RTCState *s = (RTCState *)opaque;
|
||||
+
|
||||
+ if (migrate_pre_2_2) {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
return s->irq_reinject_on_ack_count != 0;
|
||||
}
|
||||
|
||||
diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c
|
||||
index 11d476c4a2..e6e9355384 100644
|
||||
--- a/hw/smbios/smbios.c
|
||||
+++ b/hw/smbios/smbios.c
|
||||
@@ -777,6 +777,7 @@ void smbios_set_defaults(const char *manufacturer, const char *product,
|
||||
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");
|
||||
SMBIOS_SET_DEFAULT(type2.manufacturer, manufacturer);
|
||||
SMBIOS_SET_DEFAULT(type2.product, product);
|
||||
SMBIOS_SET_DEFAULT(type2.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-uhci.c b/hw/usb/hcd-uhci.c
|
||||
index 23507ad3b5..9fd87a7ad9 100644
|
||||
--- a/hw/usb/hcd-uhci.c
|
||||
+++ b/hw/usb/hcd-uhci.c
|
||||
@@ -1219,12 +1219,14 @@ static void usb_uhci_common_realize(PCIDevice *dev, Error **errp)
|
||||
UHCIState *s = UHCI(dev);
|
||||
uint8_t *pci_conf = s->dev.config;
|
||||
int i;
|
||||
+ int irq_pin;
|
||||
|
||||
pci_conf[PCI_CLASS_PROG] = 0x00;
|
||||
/* TODO: reset value should be 0. */
|
||||
pci_conf[USB_SBRN] = USB_RELEASE_1; // release number
|
||||
|
||||
- pci_config_set_interrupt_pin(pci_conf, u->info.irq_pin + 1);
|
||||
+ irq_pin = u->info.irq_pin;
|
||||
+ pci_config_set_interrupt_pin(pci_conf, irq_pin + 1);
|
||||
|
||||
if (s->masterbus) {
|
||||
USBPort *ports[NB_PORTS];
|
||||
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
|
||||
index 80988bb305..8fed2eedd6 100644
|
||||
--- a/hw/usb/hcd-xhci.c
|
||||
+++ b/hw/usb/hcd-xhci.c
|
||||
@@ -3590,9 +3590,27 @@ static const VMStateDescription vmstate_xhci_slot = {
|
||||
}
|
||||
};
|
||||
|
||||
+static int xhci_event_pre_save(void *opaque)
|
||||
+{
|
||||
+ XHCIEvent *s = opaque;
|
||||
+
|
||||
+ s->cve_2014_5263_a = ((uint8_t *)&s->type)[0];
|
||||
+ s->cve_2014_5263_b = ((uint8_t *)&s->type)[1];
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+bool migrate_cve_2014_5263_xhci_fields;
|
||||
+
|
||||
+static bool xhci_event_cve_2014_5263(void *opaque, int version_id)
|
||||
+{
|
||||
+ return migrate_cve_2014_5263_xhci_fields;
|
||||
+}
|
||||
+
|
||||
static const VMStateDescription vmstate_xhci_event = {
|
||||
.name = "xhci-event",
|
||||
.version_id = 1,
|
||||
+ .pre_save = xhci_event_pre_save,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINT32(type, XHCIEvent),
|
||||
VMSTATE_UINT32(ccode, XHCIEvent),
|
||||
@@ -3601,6 +3619,8 @@ static const VMStateDescription vmstate_xhci_event = {
|
||||
VMSTATE_UINT32(flags, XHCIEvent),
|
||||
VMSTATE_UINT8(slotid, XHCIEvent),
|
||||
VMSTATE_UINT8(epid, XHCIEvent),
|
||||
+ VMSTATE_UINT8_TEST(cve_2014_5263_a, XHCIEvent, xhci_event_cve_2014_5263),
|
||||
+ VMSTATE_UINT8_TEST(cve_2014_5263_b, XHCIEvent, xhci_event_cve_2014_5263),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
};
|
||||
diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h
|
||||
index 2fad4df2a7..f554b671e3 100644
|
||||
--- a/hw/usb/hcd-xhci.h
|
||||
+++ b/hw/usb/hcd-xhci.h
|
||||
@@ -157,6 +157,8 @@ typedef struct XHCIEvent {
|
||||
uint32_t flags;
|
||||
uint8_t slotid;
|
||||
uint8_t epid;
|
||||
+ uint8_t cve_2014_5263_a;
|
||||
+ uint8_t cve_2014_5263_b;
|
||||
} XHCIEvent;
|
||||
|
||||
typedef struct XHCIInterrupter {
|
||||
diff --git a/include/hw/acpi/ich9.h b/include/hw/acpi/ich9.h
|
||||
index 41568d1837..1a23ccc412 100644
|
||||
--- a/include/hw/acpi/ich9.h
|
||||
+++ b/include/hw/acpi/ich9.h
|
||||
@@ -61,6 +61,9 @@ typedef struct ICH9LPCPMRegs {
|
||||
uint8_t smm_enabled;
|
||||
bool enable_tco;
|
||||
TCOIORegs tco_regs;
|
||||
+
|
||||
+ /* RH addition, see bz 1489800 */
|
||||
+ bool force_rev1_fadt;
|
||||
} ICH9LPCPMRegs;
|
||||
|
||||
#define ACPI_PM_PROP_TCO_ENABLED "enable_tco"
|
||||
diff --git a/include/hw/boards.h b/include/hw/boards.h
|
||||
index de45087f34..6f85a0e032 100644
|
||||
--- a/include/hw/boards.h
|
||||
+++ b/include/hw/boards.h
|
||||
@@ -377,4 +377,28 @@ 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_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;
|
||||
+
|
||||
+extern GlobalProperty hw_compat_rhel_7_5[];
|
||||
+extern const size_t hw_compat_rhel_7_5_len;
|
||||
+
|
||||
+extern GlobalProperty hw_compat_rhel_7_4[];
|
||||
+extern const size_t hw_compat_rhel_7_4_len;
|
||||
+
|
||||
+extern GlobalProperty hw_compat_rhel_7_3[];
|
||||
+extern const size_t hw_compat_rhel_7_3_len;
|
||||
+
|
||||
+extern GlobalProperty hw_compat_rhel_7_2[];
|
||||
+extern const size_t hw_compat_rhel_7_2_len;
|
||||
+
|
||||
+extern GlobalProperty hw_compat_rhel_7_1[];
|
||||
+extern const size_t hw_compat_rhel_7_1_len;
|
||||
+
|
||||
#endif
|
||||
diff --git a/include/hw/usb.h b/include/hw/usb.h
|
||||
index c24d968a19..b353438ea0 100644
|
||||
--- a/include/hw/usb.h
|
||||
+++ b/include/hw/usb.h
|
||||
@@ -605,4 +605,8 @@ int usb_get_quirks(uint16_t vendor_id, uint16_t product_id,
|
||||
uint8_t interface_class, uint8_t interface_subclass,
|
||||
uint8_t interface_protocol);
|
||||
|
||||
+
|
||||
+/* hcd-xhci.c -- rhel7.0.0 machine type compatibility */
|
||||
+extern bool migrate_cve_2014_5263_xhci_fields;
|
||||
+
|
||||
#endif
|
||||
diff --git a/migration/migration.c b/migration/migration.c
|
||||
index 354ad072fa..30c53c623b 100644
|
||||
--- a/migration/migration.c
|
||||
+++ b/migration/migration.c
|
||||
@@ -121,6 +121,8 @@ enum mig_rp_message_type {
|
||||
MIG_RP_MSG_MAX
|
||||
};
|
||||
|
||||
+bool migrate_pre_2_2;
|
||||
+
|
||||
/* When we add fault tolerance, we could have several
|
||||
migrations at once. For now we don't need to add
|
||||
dynamic creation of migration */
|
||||
diff --git a/migration/migration.h b/migration/migration.h
|
||||
index 79b3dda146..0b1b0d4df5 100644
|
||||
--- a/migration/migration.h
|
||||
+++ b/migration/migration.h
|
||||
@@ -335,6 +335,11 @@ void init_dirty_bitmap_incoming_migration(void);
|
||||
void migrate_add_address(SocketAddress *address);
|
||||
|
||||
int foreach_not_ignored_block(RAMBlockIterFunc func, void *opaque);
|
||||
+/*
|
||||
+ * Disables a load of subsections that were added in 2.2/rh7.2 for backwards
|
||||
+ * migration compatibility.
|
||||
+ */
|
||||
+extern bool migrate_pre_2_2;
|
||||
|
||||
#define qemu_ram_foreach_block \
|
||||
#warning "Use foreach_not_ignored_block in migration code"
|
||||
--
|
||||
2.21.0
|
||||
|
276
SOURCES/0008-Add-aarch64-machine-types.patch
Normal file
276
SOURCES/0008-Add-aarch64-machine-types.patch
Normal file
@ -0,0 +1,276 @@
|
||||
From 49164264d9928f73961acbbe4d56d8dfa23d8099 Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Fri, 19 Oct 2018 12:53:31 +0200
|
||||
Subject: Add aarch64 machine types
|
||||
|
||||
Adding changes to add RHEL machine types for aarch64 architecture.
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
Rebase changes (4.0.0):
|
||||
- Use upstream compat handling
|
||||
|
||||
Rebase changes (4.1.0-rc0):
|
||||
- Removed a15memmap (upstream)
|
||||
- Use virt_flash_create in rhel800_virt_instance_init
|
||||
|
||||
Rebase changes (4.2.0-rc0):
|
||||
- Set numa_mem_supported
|
||||
|
||||
Rebase notes (4.2.0-rc3):
|
||||
- aarch64: Add virt-rhel8.2.0 machine type for ARM (patch 92246)
|
||||
- aarch64: virt: Allow more than 1TB of RAM (patch 92249)
|
||||
- aarch64: virt: Allow PCDIMM instantiation (patch 92247)
|
||||
- aarch64: virt: Enhance the comment related to gic-version (patch 92248)
|
||||
|
||||
Merged patches (4.0.0):
|
||||
- 7bfdb4c aarch64: Add virt-rhel8.0.0 machine type for ARM
|
||||
- 3433e69 aarch64: Set virt-rhel8.0.0 max_cpus to 512
|
||||
- 4d20863 aarch64: Use 256MB ECAM region by default
|
||||
|
||||
Merged patches (4.1.0):
|
||||
- c3e39ef aarch64: Add virt-rhel8.1.0 machine type for ARM
|
||||
- 59a46d1 aarch64: Allow ARM VIRT iommu option in RHEL8.1 machine
|
||||
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
hw/arm/virt.c | 161 +++++++++++++++++++++++++++++++++++++++++-
|
||||
include/hw/arm/virt.h | 11 +++
|
||||
2 files changed, 171 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
|
||||
index d4bedc2607..e10839100e 100644
|
||||
--- a/hw/arm/virt.c
|
||||
+++ b/hw/arm/virt.c
|
||||
@@ -72,6 +72,7 @@
|
||||
#include "hw/mem/nvdimm.h"
|
||||
#include "hw/acpi/generic_event_device.h"
|
||||
|
||||
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
||||
#define DEFINE_VIRT_MACHINE_LATEST(major, minor, latest) \
|
||||
static void virt_##major##_##minor##_class_init(ObjectClass *oc, \
|
||||
void *data) \
|
||||
@@ -98,7 +99,49 @@
|
||||
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, \
|
||||
+ .instance_init = rhel##m##n##s##_virt_instance_init, \
|
||||
+ .class_init = rhel##m##n##s##_virt_class_init, \
|
||||
+ }; \
|
||||
+ static void rhel##m##n##s##_machvirt_init(void) \
|
||||
+ { \
|
||||
+ 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
|
||||
@@ -1763,6 +1806,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);
|
||||
@@ -1791,6 +1835,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)
|
||||
{
|
||||
VirtMachineState *vms = VIRT_MACHINE(obj);
|
||||
@@ -2022,6 +2067,7 @@ static int virt_kvm_type(MachineState *ms, const char *type_str)
|
||||
return requested_pa_size > 40 ? requested_pa_size : 0;
|
||||
}
|
||||
|
||||
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
||||
static void virt_machine_class_init(ObjectClass *oc, void *data)
|
||||
{
|
||||
MachineClass *mc = MACHINE_CLASS(oc);
|
||||
@@ -2258,3 +2304,116 @@ static void virt_machine_2_6_options(MachineClass *mc)
|
||||
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;
|
||||
+ /* Start with max_cpus set to 512, which is the maximum supported by KVM.
|
||||
+ * The value may be reduced later when we have more information about the
|
||||
+ * configuration of the particular instance.
|
||||
+ */
|
||||
+ mc->max_cpus = 512;
|
||||
+ 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;
|
||||
+ mc->numa_mem_supported = true;
|
||||
+ mc->auto_enable_numa_with_memhp = true;
|
||||
+}
|
||||
+
|
||||
+static const TypeInfo rhel_machine_info = {
|
||||
+ .name = TYPE_RHEL_MACHINE,
|
||||
+ .parent = TYPE_MACHINE,
|
||||
+ .abstract = true,
|
||||
+ .instance_size = sizeof(VirtMachineState),
|
||||
+ .class_size = sizeof(VirtMachineClass),
|
||||
+ .class_init = rhel_machine_class_init,
|
||||
+ .interfaces = (InterfaceInfo[]) {
|
||||
+ { TYPE_HOTPLUG_HANDLER },
|
||||
+ { }
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static void rhel_machine_init(void)
|
||||
+{
|
||||
+ type_register_static(&rhel_machine_info);
|
||||
+}
|
||||
+type_init(rhel_machine_init);
|
||||
+
|
||||
+static void rhel820_virt_instance_init(Object *obj)
|
||||
+{
|
||||
+ VirtMachineState *vms = VIRT_MACHINE(obj);
|
||||
+ VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
|
||||
+
|
||||
+ /* EL3 is disabled by default and non-configurable for RHEL */
|
||||
+ vms->secure = false;
|
||||
+ /* EL2 is disabled by default and non-configurable for RHEL */
|
||||
+ vms->virt = false;
|
||||
+ /* High memory is enabled by default for RHEL */
|
||||
+ vms->highmem = true;
|
||||
+ object_property_add_bool(obj, "highmem", virt_get_highmem,
|
||||
+ virt_set_highmem, NULL);
|
||||
+ object_property_set_description(obj, "highmem",
|
||||
+ "Set on/off to enable/disable using "
|
||||
+ "physical address space above 32 bits",
|
||||
+ NULL);
|
||||
+ /*
|
||||
+ * Default GIC type is still v2, but became configurable for RHEL. We
|
||||
+ * keep v2 instead of max as TCG CI test cases require an MSI controller
|
||||
+ * and there is no userspace ITS MSI emulation available.
|
||||
+ */
|
||||
+ vms->gic_version = 2;
|
||||
+ object_property_add_str(obj, "gic-version", virt_get_gic_version,
|
||||
+ virt_set_gic_version, NULL);
|
||||
+ object_property_set_description(obj, "gic-version",
|
||||
+ "Set GIC version. "
|
||||
+ "Valid values are 2, 3 and host", NULL);
|
||||
+
|
||||
+ vms->highmem_ecam = !vmc->no_highmem_ecam;
|
||||
+
|
||||
+ if (vmc->no_its) {
|
||||
+ vms->its = false;
|
||||
+ } else {
|
||||
+ /* Default allows ITS instantiation */
|
||||
+ vms->its = true;
|
||||
+ object_property_add_bool(obj, "its", virt_get_its,
|
||||
+ virt_set_its, NULL);
|
||||
+ object_property_set_description(obj, "its",
|
||||
+ "Set on/off to enable/disable "
|
||||
+ "ITS instantiation",
|
||||
+ NULL);
|
||||
+ }
|
||||
+
|
||||
+ /* Default disallows iommu instantiation */
|
||||
+ vms->iommu = VIRT_IOMMU_NONE;
|
||||
+ object_property_add_str(obj, "iommu", virt_get_iommu, virt_set_iommu, NULL);
|
||||
+ object_property_set_description(obj, "iommu",
|
||||
+ "Set the IOMMU type. "
|
||||
+ "Valid values are none and smmuv3",
|
||||
+ NULL);
|
||||
+
|
||||
+ vms->irqmap=a15irqmap;
|
||||
+ virt_flash_create(vms);
|
||||
+}
|
||||
+
|
||||
+static void rhel820_virt_options(MachineClass *mc)
|
||||
+{
|
||||
+ compat_props_add(mc->compat_props, arm_rhel_compat, arm_rhel_compat_len);
|
||||
+}
|
||||
+DEFINE_RHEL_MACHINE_AS_LATEST(8, 2, 0)
|
||||
diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
|
||||
index 0b41083e9d..53fdf16563 100644
|
||||
--- a/include/hw/arm/virt.h
|
||||
+++ b/include/hw/arm/virt.h
|
||||
@@ -142,6 +142,7 @@ typedef struct {
|
||||
|
||||
#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")
|
||||
#define VIRT_MACHINE(obj) \
|
||||
OBJECT_CHECK(VirtMachineState, (obj), TYPE_VIRT_MACHINE)
|
||||
@@ -150,6 +151,16 @@ typedef struct {
|
||||
#define VIRT_MACHINE_CLASS(klass) \
|
||||
OBJECT_CLASS_CHECK(VirtMachineClass, klass, TYPE_VIRT_MACHINE)
|
||||
|
||||
+#else
|
||||
+#define TYPE_RHEL_MACHINE MACHINE_TYPE_NAME("virt-rhel")
|
||||
+#define VIRT_MACHINE(obj) \
|
||||
+ OBJECT_CHECK(VirtMachineState, (obj), TYPE_RHEL_MACHINE)
|
||||
+#define VIRT_MACHINE_GET_CLASS(obj) \
|
||||
+ OBJECT_GET_CLASS(VirtMachineClass, obj, TYPE_RHEL_MACHINE)
|
||||
+#define VIRT_MACHINE_CLASS(klass) \
|
||||
+ OBJECT_CLASS_CHECK(VirtMachineClass, klass, TYPE_RHEL_MACHINE)
|
||||
+#endif
|
||||
+
|
||||
void virt_acpi_setup(VirtMachineState *vms);
|
||||
|
||||
/* Return the number of used redistributor regions */
|
||||
--
|
||||
2.21.0
|
||||
|
463
SOURCES/0009-Add-ppc64-machine-types.patch
Normal file
463
SOURCES/0009-Add-ppc64-machine-types.patch
Normal file
@ -0,0 +1,463 @@
|
||||
From 136eae41007e2e5b0d693cc656f3ec36cbabf16f Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Fri, 19 Oct 2018 13:27:13 +0200
|
||||
Subject: Add ppc64 machine types
|
||||
|
||||
Adding changes to add RHEL machine types for ppc64 architecture.
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
Rebase changes (4.0.0):
|
||||
- remove instance options and use upstream solution
|
||||
- Use upstream compat handling
|
||||
- Replace SPAPR_PCI_2_7_MMIO_WIN_SIZE with value (changed upstream)
|
||||
- re-add handling of instance_options (removed upstream)
|
||||
- Use p8 as default for rhel machine types (p9 default upstream)
|
||||
- sPAPRMachineClass renamed to SpaprMachineClass (upstream)
|
||||
|
||||
Rebase changes (4.1.0):
|
||||
- Update format for compat structures
|
||||
|
||||
Merged patches (4.0.0):
|
||||
- 467d59a redhat: define pseries-rhel8.0.0 machine type
|
||||
|
||||
Merged patches (4.1.0):
|
||||
- f21757edc target/ppc/spapr: Enable mitigations by default for pseries-4.0 machine type
|
||||
- 2511c63 redhat: sync pseries-rhel7.6.0 with rhel-av-8.0.1
|
||||
- 89f01da redhat: define pseries-rhel8.1.0 machine type
|
||||
|
||||
Merged patches (4.2.0):
|
||||
- bcba728 redhat: update pseries-rhel8.1.0 machine type
|
||||
- redhat: update pseries-rhel-7.6.0 machine type (patch 93039)
|
||||
- redhat: define pseries-rhel8.2.0 machine type (patch 93041)
|
||||
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
hw/ppc/spapr.c | 278 ++++++++++++++++++++++++++++++++++++++++
|
||||
hw/ppc/spapr_cpu_core.c | 13 ++
|
||||
include/hw/ppc/spapr.h | 1 +
|
||||
target/ppc/compat.c | 13 +-
|
||||
target/ppc/cpu.h | 1 +
|
||||
5 files changed, 305 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
|
||||
index e076f6023c..8749c72066 100644
|
||||
--- a/hw/ppc/spapr.c
|
||||
+++ b/hw/ppc/spapr.c
|
||||
@@ -4447,6 +4447,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data)
|
||||
smc->linux_pci_probe = true;
|
||||
smc->smp_threads_vsmt = true;
|
||||
smc->nr_xirqs = SPAPR_NR_XIRQS;
|
||||
+ smc->has_power9_support = true;
|
||||
}
|
||||
|
||||
static const TypeInfo spapr_machine_info = {
|
||||
@@ -4491,6 +4492,7 @@ static const TypeInfo spapr_machine_info = {
|
||||
} \
|
||||
type_init(spapr_machine_register_##suffix)
|
||||
|
||||
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
||||
/*
|
||||
* pseries-4.2
|
||||
*/
|
||||
@@ -4520,6 +4522,7 @@ static void spapr_machine_4_1_class_options(MachineClass *mc)
|
||||
}
|
||||
|
||||
DEFINE_SPAPR_MACHINE(4_1, "4.1", false);
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* pseries-4.0
|
||||
@@ -4536,6 +4539,7 @@ static void phb_placement_4_0(SpaprMachineState *spapr, uint32_t index,
|
||||
*nv2atsd = 0;
|
||||
}
|
||||
|
||||
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
||||
static void spapr_machine_4_0_class_options(MachineClass *mc)
|
||||
{
|
||||
SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
|
||||
@@ -4695,6 +4699,7 @@ DEFINE_SPAPR_MACHINE(2_8, "2.8", false);
|
||||
/*
|
||||
* pseries-2.7
|
||||
*/
|
||||
+#endif
|
||||
|
||||
static void phb_placement_2_7(SpaprMachineState *spapr, uint32_t index,
|
||||
uint64_t *buid, hwaddr *pio,
|
||||
@@ -4749,6 +4754,7 @@ static void phb_placement_2_7(SpaprMachineState *spapr, uint32_t index,
|
||||
*nv2atsd = 0;
|
||||
}
|
||||
|
||||
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
||||
static void spapr_machine_2_7_class_options(MachineClass *mc)
|
||||
{
|
||||
SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
|
||||
@@ -4863,6 +4869,278 @@ 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
|
||||
+
|
||||
+/*
|
||||
+ * pseries-rhel8.2.0
|
||||
+ */
|
||||
+
|
||||
+static void spapr_machine_rhel820_class_options(MachineClass *mc)
|
||||
+{
|
||||
+ /* Defaults for the latest behaviour inherited from the base class */
|
||||
+}
|
||||
+
|
||||
+DEFINE_SPAPR_MACHINE(rhel820, "rhel8.2.0", true);
|
||||
+
|
||||
+/*
|
||||
+ * 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));
|
||||
+
|
||||
+}
|
||||
+
|
||||
+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_rhel750_class_options(MachineClass *mc)
|
||||
+{
|
||||
+ spapr_machine_rhel760_class_options(mc);
|
||||
+ compat_props_add(mc->compat_props, hw_compat_rhel_7_5, hw_compat_rhel_7_5_len);
|
||||
+
|
||||
+}
|
||||
+
|
||||
+DEFINE_SPAPR_MACHINE(rhel750, "rhel7.5.0", false);
|
||||
+
|
||||
+/*
|
||||
+ * pseries-rhel7.5.0-sxxm
|
||||
+ *
|
||||
+ * pseries-rhel7.5.0 with speculative execution exploit mitigations enabled by default
|
||||
+ */
|
||||
+
|
||||
+static void spapr_machine_rhel750sxxm_class_options(MachineClass *mc)
|
||||
+{
|
||||
+ SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
|
||||
+
|
||||
+ spapr_machine_rhel750_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(rhel750sxxm, "rhel7.5.0-sxxm", false);
|
||||
+
|
||||
+/*
|
||||
+ * pseries-rhel7.4.0
|
||||
+ * like spapr_compat_2_9
|
||||
+ */
|
||||
+GlobalProperty spapr_compat_rhel7_4[] = {
|
||||
+ { TYPE_POWERPC_CPU, "pre-2.10-migration", "on" },
|
||||
+};
|
||||
+const size_t spapr_compat_rhel7_4_len = G_N_ELEMENTS(spapr_compat_rhel7_4);
|
||||
+
|
||||
+static void spapr_machine_rhel740_class_options(MachineClass *mc)
|
||||
+{
|
||||
+ SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
|
||||
+
|
||||
+ spapr_machine_rhel750_class_options(mc);
|
||||
+ compat_props_add(mc->compat_props, hw_compat_rhel_7_4, hw_compat_rhel_7_4_len);
|
||||
+ compat_props_add(mc->compat_props, spapr_compat_rhel7_4, spapr_compat_rhel7_4_len);
|
||||
+ mc->numa_auto_assign_ram = numa_legacy_auto_assign_ram;
|
||||
+ smc->has_power9_support = false;
|
||||
+ smc->pre_2_10_has_unused_icps = true;
|
||||
+ smc->resize_hpt_default = SPAPR_RESIZE_HPT_DISABLED;
|
||||
+ smc->default_caps.caps[SPAPR_CAP_HTM] = SPAPR_CAP_ON;
|
||||
+}
|
||||
+
|
||||
+DEFINE_SPAPR_MACHINE(rhel740, "rhel7.4.0", false);
|
||||
+
|
||||
+/*
|
||||
+ * pseries-rhel7.4.0-sxxm
|
||||
+ *
|
||||
+ * pseries-rhel7.4.0 with speculative execution exploit mitigations enabled by default
|
||||
+ */
|
||||
+
|
||||
+static void spapr_machine_rhel740sxxm_class_options(MachineClass *mc)
|
||||
+{
|
||||
+ SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
|
||||
+
|
||||
+ spapr_machine_rhel740_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(rhel740sxxm, "rhel7.4.0-sxxm", false);
|
||||
+
|
||||
+/*
|
||||
+ * pseries-rhel7.3.0
|
||||
+ * like spapr_compat_2_6/_2_7/_2_8 but "ddw" has been backported to RHEL7_3
|
||||
+ */
|
||||
+GlobalProperty spapr_compat_rhel7_3[] = {
|
||||
+ { TYPE_SPAPR_PCI_HOST_BRIDGE, "mem_win_size", "0xf80000000" },
|
||||
+ { TYPE_SPAPR_PCI_HOST_BRIDGE, "mem64_win_size", "0" },
|
||||
+ { TYPE_POWERPC_CPU, "pre-2.8-migration", "on" },
|
||||
+ { TYPE_SPAPR_PCI_HOST_BRIDGE, "pre-2.8-migration", "on" },
|
||||
+ { TYPE_SPAPR_PCI_HOST_BRIDGE, "pcie-extended-configuration-space", "off" },
|
||||
+};
|
||||
+const size_t spapr_compat_rhel7_3_len = G_N_ELEMENTS(spapr_compat_rhel7_3);
|
||||
+
|
||||
+static void spapr_machine_rhel730_class_options(MachineClass *mc)
|
||||
+{
|
||||
+ SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
|
||||
+
|
||||
+ spapr_machine_rhel740_class_options(mc);
|
||||
+ mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power7_v2.3");
|
||||
+ mc->default_machine_opts = "modern-hotplug-events=off";
|
||||
+ compat_props_add(mc->compat_props, hw_compat_rhel_7_3, hw_compat_rhel_7_3_len);
|
||||
+ compat_props_add(mc->compat_props, spapr_compat_rhel7_3, spapr_compat_rhel7_3_len);
|
||||
+
|
||||
+ smc->phb_placement = phb_placement_2_7;
|
||||
+}
|
||||
+
|
||||
+DEFINE_SPAPR_MACHINE(rhel730, "rhel7.3.0", false);
|
||||
+
|
||||
+/*
|
||||
+ * pseries-rhel7.3.0-sxxm
|
||||
+ *
|
||||
+ * pseries-rhel7.3.0 with speculative execution exploit mitigations enabled by default
|
||||
+ */
|
||||
+
|
||||
+static void spapr_machine_rhel730sxxm_class_options(MachineClass *mc)
|
||||
+{
|
||||
+ SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
|
||||
+
|
||||
+ spapr_machine_rhel730_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(rhel730sxxm, "rhel7.3.0-sxxm", false);
|
||||
+
|
||||
+/*
|
||||
+ * pseries-rhel7.2.0
|
||||
+ */
|
||||
+/* Should be like spapr_compat_2_5 + 2_4 + 2_3, but "dynamic-reconfiguration"
|
||||
+ * has been backported to RHEL7_2 so we don't need it here.
|
||||
+ */
|
||||
+
|
||||
+GlobalProperty spapr_compat_rhel7_2[] = {
|
||||
+ { "spapr-vlan", "use-rx-buffer-pools", "off" },
|
||||
+ { TYPE_SPAPR_PCI_HOST_BRIDGE, "ddw", "off" },
|
||||
+};
|
||||
+const size_t spapr_compat_rhel7_2_len = G_N_ELEMENTS(spapr_compat_rhel7_2);
|
||||
+
|
||||
+static void spapr_machine_rhel720_class_options(MachineClass *mc)
|
||||
+{
|
||||
+ SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
|
||||
+
|
||||
+ spapr_machine_rhel730_class_options(mc);
|
||||
+ smc->use_ohci_by_default = true;
|
||||
+ mc->has_hotpluggable_cpus = NULL;
|
||||
+ compat_props_add(mc->compat_props, hw_compat_rhel_7_2, hw_compat_rhel_7_2_len);
|
||||
+ compat_props_add(mc->compat_props, spapr_compat_rhel7_2, spapr_compat_rhel7_2_len);
|
||||
+}
|
||||
+
|
||||
+DEFINE_SPAPR_MACHINE(rhel720, "rhel7.2.0", 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 301cd7b4e4..ba5a8fb82b 100644
|
||||
--- a/hw/ppc/spapr_cpu_core.c
|
||||
+++ b/hw/ppc/spapr_cpu_core.c
|
||||
@@ -24,6 +24,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)
|
||||
{
|
||||
@@ -242,6 +243,7 @@ static void spapr_realize_vcpu(PowerPCCPU *cpu, SpaprMachineState *spapr,
|
||||
CPUPPCState *env = &cpu->env;
|
||||
CPUState *cs = CPU(cpu);
|
||||
Error *local_err = NULL;
|
||||
+ SpaprMachineClass *smc = SPAPR_MACHINE_GET_CLASS(spapr);
|
||||
|
||||
object_property_set_bool(OBJECT(cpu), true, "realized", &local_err);
|
||||
if (local_err) {
|
||||
@@ -254,6 +256,17 @@ static void spapr_realize_vcpu(PowerPCCPU *cpu, SpaprMachineState *spapr,
|
||||
cpu_ppc_set_vhyp(cpu, PPC_VIRTUAL_HYPERVISOR(spapr));
|
||||
kvmppc_set_papr(cpu);
|
||||
|
||||
+ 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;
|
||||
+ }
|
||||
+
|
||||
if (spapr_irq_cpu_intc_create(spapr, cpu, &local_err) < 0) {
|
||||
goto error_intc_create;
|
||||
}
|
||||
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
|
||||
index d5ab5ea7b2..aa89cc4a95 100644
|
||||
--- a/include/hw/ppc/spapr.h
|
||||
+++ b/include/hw/ppc/spapr.h
|
||||
@@ -125,6 +125,7 @@ struct SpaprMachineClass {
|
||||
bool linux_pci_probe;
|
||||
bool smp_threads_vsmt; /* set VSMT to smp_threads by default */
|
||||
|
||||
+ bool has_power9_support;
|
||||
void (*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 7de4bf3122..3e2e35342d 100644
|
||||
--- a/target/ppc/compat.c
|
||||
+++ b/target/ppc/compat.c
|
||||
@@ -105,8 +105,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 e3e82327b7..5c53801cfd 100644
|
||||
--- a/target/ppc/cpu.h
|
||||
+++ b/target/ppc/cpu.h
|
||||
@@ -1367,6 +1367,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.21.0
|
||||
|
126
SOURCES/0010-Add-s390x-machine-types.patch
Normal file
126
SOURCES/0010-Add-s390x-machine-types.patch
Normal file
@ -0,0 +1,126 @@
|
||||
From 0842700b3a01891c316e9169fa651f26714cafa5 Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
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 <mrezanin@redhat.com>
|
||||
|
||||
Rebase changes (weekly-4.1.0):
|
||||
- Use upstream compat handling
|
||||
|
||||
Merged patches (3.1.0):
|
||||
- 29df663 s390x/cpumodel: default enable bpb and ppa15 for z196 and later
|
||||
|
||||
Merged patches (4.1.0):
|
||||
- 6c200d665b hw/s390x/s390-virtio-ccw: Add machine types for RHEL8.0.0
|
||||
|
||||
Merged patches (4.2.0):
|
||||
- fb192e5 redhat: s390x: Rename s390-ccw-virtio-rhel8.0.0 to s390-ccw-virtio-rhel8.1.0
|
||||
- a9b22e8 redhat: s390x: Add proper compatibility options for the -rhel7.6.0 machine
|
||||
- hw/s390x: Add the s390-ccw-virtio-rhel8.2.0 machine types (patch 92954)
|
||||
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
hw/s390x/s390-virtio-ccw.c | 70 +++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 69 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
|
||||
index d3edeef0ad..c2c83d2fce 100644
|
||||
--- a/hw/s390x/s390-virtio-ccw.c
|
||||
+++ b/hw/s390x/s390-virtio-ccw.c
|
||||
@@ -615,7 +615,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 = 1; \
|
||||
@@ -639,6 +639,7 @@ bool css_migration_enabled(void)
|
||||
} \
|
||||
type_init(ccw_machine_register_##suffix)
|
||||
|
||||
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
||||
static void ccw_machine_4_2_instance_options(MachineState *machine)
|
||||
{
|
||||
}
|
||||
@@ -866,6 +867,73 @@ 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_rhel820_instance_options(MachineState *machine)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+static void ccw_machine_rhel820_class_options(MachineClass *mc)
|
||||
+{
|
||||
+}
|
||||
+DEFINE_CCW_MACHINE(rhel820, "rhel8.2.0", true);
|
||||
+
|
||||
+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_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_rhel750_instance_options(MachineState *machine)
|
||||
+{
|
||||
+ static const S390FeatInit qemu_cpu_feat = { S390_FEAT_LIST_QEMU_V2_11 };
|
||||
+ ccw_machine_rhel760_instance_options(machine);
|
||||
+
|
||||
+ /* before 2.12 we emulated the very first z900, and RHEL 7.5 is
|
||||
+ based on 2.10 */
|
||||
+ s390_set_qemu_cpu_model(0x2064, 7, 1, qemu_cpu_feat);
|
||||
+
|
||||
+ /* bpb and ppa15 were only in the full model in RHEL 7.5 */
|
||||
+ s390_cpudef_featoff_greater(11, 1, S390_FEAT_PPA15);
|
||||
+ s390_cpudef_featoff_greater(11, 1, S390_FEAT_BPB);
|
||||
+}
|
||||
+
|
||||
+GlobalProperty ccw_compat_rhel_7_5[] = {
|
||||
+ {
|
||||
+ .driver = TYPE_SCLP_EVENT_FACILITY,
|
||||
+ .property = "allow_all_mask_sizes",
|
||||
+ .value = "off",
|
||||
+ },
|
||||
+};
|
||||
+const size_t ccw_compat_rhel_7_5_len = G_N_ELEMENTS(ccw_compat_rhel_7_5);
|
||||
+
|
||||
+static void ccw_machine_rhel750_class_options(MachineClass *mc)
|
||||
+{
|
||||
+ ccw_machine_rhel760_class_options(mc);
|
||||
+ compat_props_add(mc->compat_props, hw_compat_rhel_7_5, hw_compat_rhel_7_5_len);
|
||||
+ compat_props_add(mc->compat_props, ccw_compat_rhel_7_5, ccw_compat_rhel_7_5_len);
|
||||
+ S390_MACHINE_CLASS(mc)->hpage_1m_allowed = false;
|
||||
+}
|
||||
+DEFINE_CCW_MACHINE(rhel750, "rhel7.5.0", false);
|
||||
|
||||
static void ccw_machine_register_types(void)
|
||||
{
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,943 +0,0 @@
|
||||
From 9d7996484c665193e02927bb76ba93c84efb273f Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Fri, 14 Nov 2014 08:51:50 +0100
|
||||
Subject: Use qemu-kvm in documentation instead of qemu-system-<arch>
|
||||
|
||||
Patchwork-id: 62380
|
||||
O-Subject: [RHEV-7.1 qemu-kvm-rhev PATCHv4] Use qemu-kvm in documentation instead of qemu-system-i386
|
||||
Bugzilla: 1140620
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
|
||||
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
We change the name and location of qemu-kvm binaries. Update documentation
|
||||
to reflect this change. Only architectures available in RHEL are updated.
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
Rebase Notes (2.12.0):
|
||||
- Additional fixes included
|
||||
|
||||
Rebase Notes (2.11.0):
|
||||
- Fixing docs/qemu-block-drivers.texi
|
||||
|
||||
Rebase Notes (2.10.0):
|
||||
- Changed patch name and updated commit message.
|
||||
|
||||
Rebase Notes (2.9.0):
|
||||
- fixed chunks missed on 2.8 rebase
|
||||
|
||||
(cherry picked from commit 1c2dac56d5e710faebe25b7aa9cac594ec0f9d4b)
|
||||
(cherry picked from commit dfa2037d390047a7d7c7b13f779443bfc6c3709d)
|
||||
|
||||
Conflicts:
|
||||
qemu-options.hx
|
||||
|
||||
(cherry picked from commit c7985367ba8258c99526549ab94ef066ae52da14)
|
||||
|
||||
Conflicts:
|
||||
qemu-options.hx
|
||||
|
||||
(cherry picked from commit e7dc2155506c1ead844f1faef85e5f71bc2adf9e)
|
||||
---
|
||||
docs/can.txt | 10 +--
|
||||
docs/pr-manager.rst | 4 +-
|
||||
docs/qemu-block-drivers.texi | 70 ++++++++++-----------
|
||||
docs/replay.txt | 4 +-
|
||||
docs/specs/tpm.txt | 4 +-
|
||||
qemu-doc.texi | 40 ++++++------
|
||||
qemu-options.hx | 144 ++++++++++++++++++++++---------------------
|
||||
7 files changed, 140 insertions(+), 136 deletions(-)
|
||||
|
||||
diff --git a/docs/can.txt b/docs/can.txt
|
||||
index a357105..0c0fc11 100644
|
||||
--- a/docs/can.txt
|
||||
+++ b/docs/can.txt
|
||||
@@ -50,9 +50,9 @@ CAN boards can be selected
|
||||
The ''kvaser_pci'' board/device model is compatible with and has been tested with
|
||||
''kvaser_pci'' driver included in mainline Linux kernel.
|
||||
The tested setup was Linux 4.9 kernel on the host and guest side.
|
||||
-Example for qemu-system-x86_64:
|
||||
+Example for qemu-kvm (intel architecture):
|
||||
|
||||
- qemu-system-x86_64 -enable-kvm -kernel /boot/vmlinuz-4.9.0-4-amd64 \
|
||||
+ qemu-kvm -enable-kvm -kernel /boot/vmlinuz-4.9.0-4-amd64 \
|
||||
-initrd ramdisk.cpio \
|
||||
-virtfs local,path=shareddir,security_model=none,mount_tag=shareddir \
|
||||
-object can-bus,id=canbus0 \
|
||||
@@ -60,9 +60,9 @@ Example for qemu-system-x86_64:
|
||||
-device kvaser_pci,canbus=canbus0 \
|
||||
-nographic -append "console=ttyS0"
|
||||
|
||||
-Example for qemu-system-arm:
|
||||
+Example for qemu-kvm (arm architecture):
|
||||
|
||||
- qemu-system-arm -cpu arm1176 -m 256 -M versatilepb \
|
||||
+ qemu-kvm -cpu arm1176 -m 256 -M versatilepb \
|
||||
-kernel kernel-qemu-arm1176-versatilepb \
|
||||
-hda rpi-wheezy-overlay \
|
||||
-append "console=ttyAMA0 root=/dev/sda2 ro init=/sbin/init-overlay" \
|
||||
@@ -104,4 +104,4 @@ Links to other resources
|
||||
Slides
|
||||
http://rtime.felk.cvut.cz/publications/public/rtlws2015-qemu-can-slides.pdf
|
||||
(5) Linux SocketCAN utilities
|
||||
- https://github.com/linux-can/can-utils/
|
||||
\ No newline at end of file
|
||||
+ https://github.com/linux-can/can-utils/
|
||||
diff --git a/docs/pr-manager.rst b/docs/pr-manager.rst
|
||||
index 9b1de19..45cb8be 100644
|
||||
--- a/docs/pr-manager.rst
|
||||
+++ b/docs/pr-manager.rst
|
||||
@@ -36,7 +36,7 @@ accepts the path to the helper program's Unix socket. For example,
|
||||
the following command line defines a ``pr-manager-helper`` object and
|
||||
attaches it to a SCSI passthrough device::
|
||||
|
||||
- $ qemu-system-x86_64
|
||||
+ $ qemu-kvm
|
||||
-device virtio-scsi \
|
||||
-object pr-manager-helper,id=helper0,path=/var/run/qemu-pr-helper.sock
|
||||
-drive if=none,id=hd,driver=raw,file.filename=/dev/sdb,file.pr-manager=helper0
|
||||
@@ -44,7 +44,7 @@ attaches it to a SCSI passthrough device::
|
||||
|
||||
Alternatively, using ``-blockdev``::
|
||||
|
||||
- $ qemu-system-x86_64
|
||||
+ $ qemu-kvm
|
||||
-device virtio-scsi \
|
||||
-object pr-manager-helper,id=helper0,path=/var/run/qemu-pr-helper.sock
|
||||
-blockdev node-name=hd,driver=raw,file.driver=host_device,file.filename=/dev/sdb,file.pr-manager=helper0
|
||||
diff --git a/docs/qemu-block-drivers.texi b/docs/qemu-block-drivers.texi
|
||||
index f179369..e0d752a 100644
|
||||
--- a/docs/qemu-block-drivers.texi
|
||||
+++ b/docs/qemu-block-drivers.texi
|
||||
@@ -405,7 +405,7 @@ QEMU can automatically create a virtual FAT disk image from a
|
||||
directory tree. In order to use it, just type:
|
||||
|
||||
@example
|
||||
-qemu-system-i386 linux.img -hdb fat:/my_directory
|
||||
+qemu-kvm linux.img -hdb fat:/my_directory
|
||||
@end example
|
||||
|
||||
Then you access access to all the files in the @file{/my_directory}
|
||||
@@ -415,14 +415,14 @@ them via SAMBA or NFS. The default access is @emph{read-only}.
|
||||
Floppies can be emulated with the @code{:floppy:} option:
|
||||
|
||||
@example
|
||||
-qemu-system-i386 linux.img -fda fat:floppy:/my_directory
|
||||
+qemu-kvm linux.img -fda fat:floppy:/my_directory
|
||||
@end example
|
||||
|
||||
A read/write support is available for testing (beta stage) with the
|
||||
@code{:rw:} option:
|
||||
|
||||
@example
|
||||
-qemu-system-i386 linux.img -fda fat:floppy:rw:/my_directory
|
||||
+qemu-kvm linux.img -fda fat:floppy:rw:/my_directory
|
||||
@end example
|
||||
|
||||
What you should @emph{never} do:
|
||||
@@ -440,14 +440,14 @@ QEMU can access directly to block device exported using the Network Block Device
|
||||
protocol.
|
||||
|
||||
@example
|
||||
-qemu-system-i386 linux.img -hdb nbd://my_nbd_server.mydomain.org:1024/
|
||||
+qemu-kvm linux.img -hdb nbd://my_nbd_server.mydomain.org:1024/
|
||||
@end example
|
||||
|
||||
If the NBD server is located on the same host, you can use an unix socket instead
|
||||
of an inet socket:
|
||||
|
||||
@example
|
||||
-qemu-system-i386 linux.img -hdb nbd+unix://?socket=/tmp/my_socket
|
||||
+qemu-kvm linux.img -hdb nbd+unix://?socket=/tmp/my_socket
|
||||
@end example
|
||||
|
||||
In this case, the block device must be exported using qemu-nbd:
|
||||
@@ -464,23 +464,23 @@ qemu-nbd --socket=/tmp/my_socket --share=2 my_disk.qcow2
|
||||
@noindent
|
||||
and then you can use it with two guests:
|
||||
@example
|
||||
-qemu-system-i386 linux1.img -hdb nbd+unix://?socket=/tmp/my_socket
|
||||
-qemu-system-i386 linux2.img -hdb nbd+unix://?socket=/tmp/my_socket
|
||||
+qemu-kvm linux1.img -hdb nbd+unix://?socket=/tmp/my_socket
|
||||
+qemu-kvm linux2.img -hdb nbd+unix://?socket=/tmp/my_socket
|
||||
@end example
|
||||
|
||||
If the nbd-server uses named exports (supported since NBD 2.9.18, or with QEMU's
|
||||
own embedded NBD server), you must specify an export name in the URI:
|
||||
@example
|
||||
-qemu-system-i386 -cdrom nbd://localhost/debian-500-ppc-netinst
|
||||
-qemu-system-i386 -cdrom nbd://localhost/openSUSE-11.1-ppc-netinst
|
||||
+qemu-kvm -cdrom nbd://localhost/debian-500-ppc-netinst
|
||||
+qemu-kvm -cdrom nbd://localhost/openSUSE-11.1-ppc-netinst
|
||||
@end example
|
||||
|
||||
The URI syntax for NBD is supported since QEMU 1.3. An alternative syntax is
|
||||
also available. Here are some example of the older syntax:
|
||||
@example
|
||||
-qemu-system-i386 linux.img -hdb nbd:my_nbd_server.mydomain.org:1024
|
||||
-qemu-system-i386 linux2.img -hdb nbd:unix:/tmp/my_socket
|
||||
-qemu-system-i386 -cdrom nbd:localhost:10809:exportname=debian-500-ppc-netinst
|
||||
+qemu-kvm linux.img -hdb nbd:my_nbd_server.mydomain.org:1024
|
||||
+qemu-kvm linux2.img -hdb nbd:unix:/tmp/my_socket
|
||||
+qemu-kvm -cdrom nbd:localhost:10809:exportname=debian-500-ppc-netinst
|
||||
@end example
|
||||
|
||||
@node disk_images_sheepdog
|
||||
@@ -505,7 +505,7 @@ qemu-img convert @var{filename} sheepdog:///@var{image}
|
||||
|
||||
You can boot from the Sheepdog disk image with the command:
|
||||
@example
|
||||
-qemu-system-i386 sheepdog:///@var{image}
|
||||
+qemu-kvm sheepdog:///@var{image}
|
||||
@end example
|
||||
|
||||
You can also create a snapshot of the Sheepdog image like qcow2.
|
||||
@@ -517,7 +517,7 @@ where @var{tag} is a tag name of the newly created snapshot.
|
||||
To boot from the Sheepdog snapshot, specify the tag name of the
|
||||
snapshot.
|
||||
@example
|
||||
-qemu-system-i386 sheepdog:///@var{image}#@var{tag}
|
||||
+qemu-kvm sheepdog:///@var{image}#@var{tag}
|
||||
@end example
|
||||
|
||||
You can create a cloned image from the existing snapshot.
|
||||
@@ -530,14 +530,14 @@ is its tag name.
|
||||
You can use an unix socket instead of an inet socket:
|
||||
|
||||
@example
|
||||
-qemu-system-i386 sheepdog+unix:///@var{image}?socket=@var{path}
|
||||
+qemu-kvm sheepdog+unix:///@var{image}?socket=@var{path}
|
||||
@end example
|
||||
|
||||
If the Sheepdog daemon doesn't run on the local host, you need to
|
||||
specify one of the Sheepdog servers to connect to.
|
||||
@example
|
||||
qemu-img create sheepdog://@var{hostname}:@var{port}/@var{image} @var{size}
|
||||
-qemu-system-i386 sheepdog://@var{hostname}:@var{port}/@var{image}
|
||||
+qemu-kvm sheepdog://@var{hostname}:@var{port}/@var{image}
|
||||
@end example
|
||||
|
||||
@node disk_images_iscsi
|
||||
@@ -627,7 +627,7 @@ cat >iscsi.conf <<EOF
|
||||
header-digest = "CRC32C"
|
||||
EOF
|
||||
|
||||
-qemu-system-i386 -drive file=iscsi://127.0.0.1/iqn.qemu.test/1 \
|
||||
+qemu-kvm -drive file=iscsi://127.0.0.1/iqn.qemu.test/1 \
|
||||
-readconfig iscsi.conf
|
||||
@end example
|
||||
|
||||
@@ -646,7 +646,7 @@ tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 2 \
|
||||
-b /IMAGES/cd.iso --device-type=cd
|
||||
tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL
|
||||
|
||||
-qemu-system-i386 -iscsi initiator-name=iqn.qemu.test:my-initiator \
|
||||
+qemu-kvm -iscsi initiator-name=iqn.qemu.test:my-initiator \
|
||||
-boot d -drive file=iscsi://127.0.0.1/iqn.qemu.test/1 \
|
||||
-cdrom iscsi://127.0.0.1/iqn.qemu.test/2
|
||||
@end example
|
||||
@@ -659,11 +659,11 @@ GlusterFS is a user space distributed file system.
|
||||
You can boot from the GlusterFS disk image with the command:
|
||||
@example
|
||||
URI:
|
||||
-qemu-system-x86_64 -drive file=gluster[+@var{type}]://[@var{host}[:@var{port}]]/@var{volume}/@var{path}
|
||||
+qemu-kvm -drive file=gluster[+@var{type}]://[@var{host}[:@var{port}]]/@var{volume}/@var{path}
|
||||
[?socket=...][,file.debug=9][,file.logfile=...]
|
||||
|
||||
JSON:
|
||||
-qemu-system-x86_64 'json:@{"driver":"qcow2",
|
||||
+qemu-kvm 'json:@{"driver":"qcow2",
|
||||
"file":@{"driver":"gluster",
|
||||
"volume":"testvol","path":"a.img","debug":9,"logfile":"...",
|
||||
"server":[@{"type":"tcp","host":"...","port":"..."@},
|
||||
@@ -711,22 +711,22 @@ qemu-img create gluster://@var{host}/@var{volume}/@var{path} @var{size}
|
||||
|
||||
Examples
|
||||
@example
|
||||
-qemu-system-x86_64 -drive file=gluster://1.2.3.4/testvol/a.img
|
||||
-qemu-system-x86_64 -drive file=gluster+tcp://1.2.3.4/testvol/a.img
|
||||
-qemu-system-x86_64 -drive file=gluster+tcp://1.2.3.4:24007/testvol/dir/a.img
|
||||
-qemu-system-x86_64 -drive file=gluster+tcp://[1:2:3:4:5:6:7:8]/testvol/dir/a.img
|
||||
-qemu-system-x86_64 -drive file=gluster+tcp://[1:2:3:4:5:6:7:8]:24007/testvol/dir/a.img
|
||||
-qemu-system-x86_64 -drive file=gluster+tcp://server.domain.com:24007/testvol/dir/a.img
|
||||
-qemu-system-x86_64 -drive file=gluster+unix:///testvol/dir/a.img?socket=/tmp/glusterd.socket
|
||||
-qemu-system-x86_64 -drive file=gluster+rdma://1.2.3.4:24007/testvol/a.img
|
||||
-qemu-system-x86_64 -drive file=gluster://1.2.3.4/testvol/a.img,file.debug=9,file.logfile=/var/log/qemu-gluster.log
|
||||
-qemu-system-x86_64 'json:@{"driver":"qcow2",
|
||||
+qemu-kvm -drive file=gluster://1.2.3.4/testvol/a.img
|
||||
+qemu-kvm -drive file=gluster+tcp://1.2.3.4/testvol/a.img
|
||||
+qemu-kvm -drive file=gluster+tcp://1.2.3.4:24007/testvol/dir/a.img
|
||||
+qemu-kvm -drive file=gluster+tcp://[1:2:3:4:5:6:7:8]/testvol/dir/a.img
|
||||
+qemu-kvm -drive file=gluster+tcp://[1:2:3:4:5:6:7:8]:24007/testvol/dir/a.img
|
||||
+qemu-kvm -drive file=gluster+tcp://server.domain.com:24007/testvol/dir/a.img
|
||||
+qemu-kvm -drive file=gluster+unix:///testvol/dir/a.img?socket=/tmp/glusterd.socket
|
||||
+qemu-kvm -drive file=gluster+rdma://1.2.3.4:24007/testvol/a.img
|
||||
+qemu-kvm -drive file=gluster://1.2.3.4/testvol/a.img,file.debug=9,file.logfile=/var/log/qemu-gluster.log
|
||||
+qemu-kvm 'json:@{"driver":"qcow2",
|
||||
"file":@{"driver":"gluster",
|
||||
"volume":"testvol","path":"a.img",
|
||||
"debug":9,"logfile":"/var/log/qemu-gluster.log",
|
||||
"server":[@{"type":"tcp","host":"1.2.3.4","port":24007@},
|
||||
@{"type":"unix","socket":"/var/run/glusterd.socket"@}]@}@}'
|
||||
-qemu-system-x86_64 -drive driver=qcow2,file.driver=gluster,file.volume=testvol,file.path=/path/a.img,
|
||||
+qemu-kvm -drive driver=qcow2,file.driver=gluster,file.volume=testvol,file.path=/path/a.img,
|
||||
file.debug=9,file.logfile=/var/log/qemu-gluster.log,
|
||||
file.server.0.type=tcp,file.server.0.host=1.2.3.4,file.server.0.port=24007,
|
||||
file.server.1.type=unix,file.server.1.socket=/var/run/glusterd.socket
|
||||
@@ -739,13 +739,13 @@ You can access disk images located on a remote ssh server
|
||||
by using the ssh protocol:
|
||||
|
||||
@example
|
||||
-qemu-system-x86_64 -drive file=ssh://[@var{user}@@]@var{server}[:@var{port}]/@var{path}[?host_key_check=@var{host_key_check}]
|
||||
+qemu-kvm -drive file=ssh://[@var{user}@@]@var{server}[:@var{port}]/@var{path}[?host_key_check=@var{host_key_check}]
|
||||
@end example
|
||||
|
||||
Alternative syntax using properties:
|
||||
|
||||
@example
|
||||
-qemu-system-x86_64 -drive file.driver=ssh[,file.user=@var{user}],file.host=@var{server}[,file.port=@var{port}],file.path=@var{path}[,file.host_key_check=@var{host_key_check}]
|
||||
+qemu-kvm -drive file.driver=ssh[,file.user=@var{user}],file.host=@var{server}[,file.port=@var{port}],file.path=@var{path}[,file.host_key_check=@var{host_key_check}]
|
||||
@end example
|
||||
|
||||
@var{ssh} is the protocol.
|
||||
@@ -808,13 +808,13 @@ driver. For example:
|
||||
# echo 0000:06:0d.0 > /sys/bus/pci/devices/0000:06:0d.0/driver/unbind
|
||||
# echo 1102 0002 > /sys/bus/pci/drivers/vfio-pci/new_id
|
||||
|
||||
-# qemu-system-x86_64 -drive file=nvme://@var{host}:@var{bus}:@var{slot}.@var{func}/@var{namespace}
|
||||
+# qemu-kvm -drive file=nvme://@var{host}:@var{bus}:@var{slot}.@var{func}/@var{namespace}
|
||||
@end example
|
||||
|
||||
Alternative syntax using properties:
|
||||
|
||||
@example
|
||||
-qemu-system-x86_64 -drive file.driver=nvme,file.device=@var{host}:@var{bus}:@var{slot}.@var{func},file.namespace=@var{namespace}
|
||||
+qemu-kvm -drive file.driver=nvme,file.device=@var{host}:@var{bus}:@var{slot}.@var{func},file.namespace=@var{namespace}
|
||||
@end example
|
||||
|
||||
@var{host}:@var{bus}:@var{slot}.@var{func} is the NVMe controller's PCI device
|
||||
diff --git a/docs/replay.txt b/docs/replay.txt
|
||||
index 2e21e9c..f1923e8 100644
|
||||
--- a/docs/replay.txt
|
||||
+++ b/docs/replay.txt
|
||||
@@ -25,7 +25,7 @@ Deterministic replay has the following features:
|
||||
|
||||
Usage of the record/replay:
|
||||
* First, record the execution with the following command line:
|
||||
- qemu-system-i386 \
|
||||
+ qemu-kvm \
|
||||
-icount shift=7,rr=record,rrfile=replay.bin \
|
||||
-drive file=disk.qcow2,if=none,id=img-direct \
|
||||
-drive driver=blkreplay,if=none,image=img-direct,id=img-blkreplay \
|
||||
@@ -33,7 +33,7 @@ Usage of the record/replay:
|
||||
-netdev user,id=net1 -device rtl8139,netdev=net1 \
|
||||
-object filter-replay,id=replay,netdev=net1
|
||||
* After recording, you can replay it by using another command line:
|
||||
- qemu-system-i386 \
|
||||
+ qemu-kvm \
|
||||
-icount shift=7,rr=replay,rrfile=replay.bin \
|
||||
-drive file=disk.qcow2,if=none,id=img-direct \
|
||||
-drive driver=blkreplay,if=none,image=img-direct,id=img-blkreplay \
|
||||
diff --git a/docs/specs/tpm.txt b/docs/specs/tpm.txt
|
||||
index d1d7157..897c300 100644
|
||||
--- a/docs/specs/tpm.txt
|
||||
+++ b/docs/specs/tpm.txt
|
||||
@@ -98,7 +98,7 @@ QEMU files related to the TPM passthrough device:
|
||||
Command line to start QEMU with the TPM passthrough device using the host's
|
||||
hardware TPM /dev/tpm0:
|
||||
|
||||
-qemu-system-x86_64 -display sdl -enable-kvm \
|
||||
+qemu-kvm -display vnc -enable-kvm \
|
||||
-m 1024 -boot d -bios bios-256k.bin -boot menu=on \
|
||||
-tpmdev passthrough,id=tpm0,path=/dev/tpm0 \
|
||||
-device tpm-tis,tpmdev=tpm0 test.img
|
||||
@@ -164,7 +164,7 @@ swtpm socket --tpmstate dir=/tmp/mytpm1 \
|
||||
Command line to start QEMU with the TPM emulator device communicating with
|
||||
the swtpm:
|
||||
|
||||
-qemu-system-x86_64 -display sdl -enable-kvm \
|
||||
+qemu-kvm -display sdl -enable-kvm \
|
||||
-m 1024 -boot d -bios bios-256k.bin -boot menu=on \
|
||||
-chardev socket,id=chrtpm,path=/tmp/mytpm1/swtpm-sock \
|
||||
-tpmdev emulator,id=tpm0,chardev=chrtpm \
|
||||
diff --git a/qemu-doc.texi b/qemu-doc.texi
|
||||
index 5813d27..de5097a 100644
|
||||
--- a/qemu-doc.texi
|
||||
+++ b/qemu-doc.texi
|
||||
@@ -203,12 +203,12 @@ Note that, by default, GUS shares IRQ(7) with parallel ports and so
|
||||
QEMU must be told to not have parallel ports to have working GUS.
|
||||
|
||||
@example
|
||||
-qemu-system-i386 dos.img -soundhw gus -parallel none
|
||||
+qemu-kvm dos.img -soundhw gus -parallel none
|
||||
@end example
|
||||
|
||||
Alternatively:
|
||||
@example
|
||||
-qemu-system-i386 dos.img -device gus,irq=5
|
||||
+qemu-kvm dos.img -device gus,irq=5
|
||||
@end example
|
||||
|
||||
Or some other unclaimed IRQ.
|
||||
@@ -224,7 +224,7 @@ CS4231A is the chip used in Windows Sound System and GUSMAX products
|
||||
Download and uncompress the linux image (@file{linux.img}) and type:
|
||||
|
||||
@example
|
||||
-qemu-system-i386 linux.img
|
||||
+qemu-kvm linux.img
|
||||
@end example
|
||||
|
||||
Linux should boot and give you a prompt.
|
||||
@@ -234,7 +234,7 @@ Linux should boot and give you a prompt.
|
||||
|
||||
@example
|
||||
@c man begin SYNOPSIS
|
||||
-@command{qemu-system-i386} [@var{options}] [@var{disk_image}]
|
||||
+@command{qemu-kvm} [@var{options}] [@var{disk_image}]
|
||||
@c man end
|
||||
@end example
|
||||
|
||||
@@ -813,7 +813,7 @@ On Linux hosts, a shared memory device is available. The basic syntax
|
||||
is:
|
||||
|
||||
@example
|
||||
-qemu-system-x86_64 -device ivshmem-plain,memdev=@var{hostmem}
|
||||
+qemu-kvm -device ivshmem-plain,memdev=@var{hostmem}
|
||||
@end example
|
||||
|
||||
where @var{hostmem} names a host memory backend. For a POSIX shared
|
||||
@@ -834,7 +834,7 @@ memory server is:
|
||||
ivshmem-server -p @var{pidfile} -S @var{path} -m @var{shm-name} -l @var{shm-size} -n @var{vectors}
|
||||
|
||||
# Then start your qemu instances with matching arguments
|
||||
-qemu-system-x86_64 -device ivshmem-doorbell,vectors=@var{vectors},chardev=@var{id}
|
||||
+qemu-kvm -device ivshmem-doorbell,vectors=@var{vectors},chardev=@var{id}
|
||||
-chardev socket,path=@var{path},id=@var{id}
|
||||
@end example
|
||||
|
||||
@@ -859,7 +859,7 @@ Instead of specifying the <shm size> using POSIX shm, you may specify
|
||||
a memory backend that has hugepage support:
|
||||
|
||||
@example
|
||||
-qemu-system-x86_64 -object memory-backend-file,size=1G,mem-path=/dev/hugepages/my-shmem-file,share,id=mb1
|
||||
+qemu-kvm -object memory-backend-file,size=1G,mem-path=/dev/hugepages/my-shmem-file,share,id=mb1
|
||||
-device ivshmem-plain,memdev=mb1
|
||||
@end example
|
||||
|
||||
@@ -875,7 +875,7 @@ kernel testing.
|
||||
|
||||
The syntax is:
|
||||
@example
|
||||
-qemu-system-i386 -kernel arch/i386/boot/bzImage -hda root-2.4.20.img -append "root=/dev/hda"
|
||||
+qemu-kvm -kernel arch/i386/boot/bzImage -hda root-2.4.20.img -append "root=/dev/hda"
|
||||
@end example
|
||||
|
||||
Use @option{-kernel} to provide the Linux kernel image and
|
||||
@@ -890,7 +890,7 @@ If you do not need graphical output, you can disable it and redirect
|
||||
the virtual serial port and the QEMU monitor to the console with the
|
||||
@option{-nographic} option. The typical command line is:
|
||||
@example
|
||||
-qemu-system-i386 -kernel arch/i386/boot/bzImage -hda root-2.4.20.img \
|
||||
+qemu-kvm -kernel arch/i386/boot/bzImage -hda root-2.4.20.img \
|
||||
-append "root=/dev/hda console=ttyS0" -nographic
|
||||
@end example
|
||||
|
||||
@@ -956,7 +956,7 @@ Network adapter that supports CDC ethernet and RNDIS protocols. @var{id}
|
||||
specifies a netdev defined with @code{-netdev @dots{},id=@var{id}}.
|
||||
For instance, user-mode networking can be used with
|
||||
@example
|
||||
-qemu-system-i386 [...] -netdev user,id=net0 -device usb-net,netdev=net0
|
||||
+qemu-kvm [...] -netdev user,id=net0 -device usb-net,netdev=net0
|
||||
@end example
|
||||
@item usb-ccid
|
||||
Smartcard reader device
|
||||
@@ -975,7 +975,7 @@ no type is given, the HCI logic corresponds to @code{-bt hci,vlan=0}.
|
||||
This USB device implements the USB Transport Layer of HCI. Example
|
||||
usage:
|
||||
@example
|
||||
-@command{qemu-system-i386} [...@var{OPTIONS}...] @option{-usbdevice} bt:hci,vlan=3 @option{-bt} device:keyboard,vlan=3
|
||||
+@command{qemu-kvm} [...@var{OPTIONS}...] @option{-usbdevice} bt:hci,vlan=3 @option{-bt} device:keyboard,vlan=3
|
||||
@end example
|
||||
@end table
|
||||
|
||||
@@ -1052,7 +1052,7 @@ For this setup it is recommended to restrict it to listen on a UNIX domain
|
||||
socket only. For example
|
||||
|
||||
@example
|
||||
-qemu-system-i386 [...OPTIONS...] -vnc unix:/home/joebloggs/.qemu-myvm-vnc
|
||||
+qemu-kvm [...OPTIONS...] -vnc unix:/home/joebloggs/.qemu-myvm-vnc
|
||||
@end example
|
||||
|
||||
This ensures that only users on local box with read/write access to that
|
||||
@@ -1075,7 +1075,7 @@ is running the password is set with the monitor. Until the monitor is used to
|
||||
set the password all clients will be rejected.
|
||||
|
||||
@example
|
||||
-qemu-system-i386 [...OPTIONS...] -vnc :1,password -monitor stdio
|
||||
+qemu-kvm [...OPTIONS...] -vnc :1,password -monitor stdio
|
||||
(qemu) change vnc password
|
||||
Password: ********
|
||||
(qemu)
|
||||
@@ -1092,7 +1092,7 @@ support provides a secure session, but no authentication. This allows any
|
||||
client to connect, and provides an encrypted session.
|
||||
|
||||
@example
|
||||
-qemu-system-i386 [...OPTIONS...] -vnc :1,tls,x509=/etc/pki/qemu -monitor stdio
|
||||
+qemu-kvm [...OPTIONS...] -vnc :1,tls,x509=/etc/pki/qemu -monitor stdio
|
||||
@end example
|
||||
|
||||
In the above example @code{/etc/pki/qemu} should contain at least three files,
|
||||
@@ -1110,7 +1110,7 @@ then validate against the CA certificate. This is a good choice if deploying
|
||||
in an environment with a private internal certificate authority.
|
||||
|
||||
@example
|
||||
-qemu-system-i386 [...OPTIONS...] -vnc :1,tls,x509verify=/etc/pki/qemu -monitor stdio
|
||||
+qemu-kvm [...OPTIONS...] -vnc :1,tls,x509verify=/etc/pki/qemu -monitor stdio
|
||||
@end example
|
||||
|
||||
|
||||
@@ -1121,7 +1121,7 @@ Finally, the previous method can be combined with VNC password authentication
|
||||
to provide two layers of authentication for clients.
|
||||
|
||||
@example
|
||||
-qemu-system-i386 [...OPTIONS...] -vnc :1,password,tls,x509verify=/etc/pki/qemu -monitor stdio
|
||||
+qemu-kvm [...OPTIONS...] -vnc :1,password,tls,x509verify=/etc/pki/qemu -monitor stdio
|
||||
(qemu) change vnc password
|
||||
Password: ********
|
||||
(qemu)
|
||||
@@ -1144,7 +1144,7 @@ used for authentication, but assuming use of one supporting SSF,
|
||||
then QEMU can be launched with:
|
||||
|
||||
@example
|
||||
-qemu-system-i386 [...OPTIONS...] -vnc :1,sasl -monitor stdio
|
||||
+qemu-kvm [...OPTIONS...] -vnc :1,sasl -monitor stdio
|
||||
@end example
|
||||
|
||||
@node vnc_sec_certificate_sasl
|
||||
@@ -1158,7 +1158,7 @@ credentials. This can be enabled, by combining the 'sasl' option
|
||||
with the aforementioned TLS + x509 options:
|
||||
|
||||
@example
|
||||
-qemu-system-i386 [...OPTIONS...] -vnc :1,tls,x509,sasl -monitor stdio
|
||||
+qemu-kvm [...OPTIONS...] -vnc :1,tls,x509,sasl -monitor stdio
|
||||
@end example
|
||||
|
||||
@node vnc_setup_sasl
|
||||
@@ -1514,7 +1514,7 @@ QEMU has a primitive support to work with gdb, so that you can do
|
||||
In order to use gdb, launch QEMU with the '-s' option. It will wait for a
|
||||
gdb connection:
|
||||
@example
|
||||
-qemu-system-i386 -s -kernel arch/i386/boot/bzImage -hda root-2.4.20.img \
|
||||
+qemu-kvm -s -kernel arch/i386/boot/bzImage -hda root-2.4.20.img \
|
||||
-append "root=/dev/hda"
|
||||
Connected to host network interface: tun0
|
||||
Waiting gdb connection on port 1234
|
||||
@@ -1760,7 +1760,7 @@ Set the initial VGA graphic mode. The default is 800x600x32.
|
||||
Set OpenBIOS variables in NVRAM, for example:
|
||||
|
||||
@example
|
||||
-qemu-system-ppc -prom-env 'auto-boot?=false' \
|
||||
+qemu-kvm -prom-env 'auto-boot?=false' \
|
||||
-prom-env 'boot-device=hd:2,\yaboot' \
|
||||
-prom-env 'boot-args=conf=hd:2,\yaboot.conf'
|
||||
@end example
|
||||
diff --git a/qemu-options.hx b/qemu-options.hx
|
||||
index 2042dba..43f10b1 100644
|
||||
--- a/qemu-options.hx
|
||||
+++ b/qemu-options.hx
|
||||
@@ -263,7 +263,7 @@ This option defines a free-form string that can be used to describe @var{fd}.
|
||||
|
||||
You can open an image using pre-opened file descriptors from an fd set:
|
||||
@example
|
||||
-qemu-system-i386
|
||||
+qemu-kvm
|
||||
-add-fd fd=3,set=2,opaque="rdwr:/path/to/file"
|
||||
-add-fd fd=4,set=2,opaque="rdonly:/path/to/file"
|
||||
-drive file=/dev/fdset/2,index=0,media=disk
|
||||
@@ -292,7 +292,7 @@ STEXI
|
||||
Set default value of @var{driver}'s property @var{prop} to @var{value}, e.g.:
|
||||
|
||||
@example
|
||||
-qemu-system-i386 -global ide-hd.physical_block_size=4096 disk-image.img
|
||||
+qemu-kvm -global ide-hd.physical_block_size=4096 disk-image.img
|
||||
@end example
|
||||
|
||||
In particular, you can use this to set driver properties for devices which are
|
||||
@@ -346,11 +346,11 @@ bootindex options. The default is non-strict boot.
|
||||
|
||||
@example
|
||||
# try to boot from network first, then from hard disk
|
||||
-qemu-system-i386 -boot order=nc
|
||||
+qemu-kvm -boot order=nc
|
||||
# boot from CD-ROM first, switch back to default order after reboot
|
||||
-qemu-system-i386 -boot once=d
|
||||
+qemu-kvm -boot once=d
|
||||
# boot with a splash picture for 5 seconds.
|
||||
-qemu-system-i386 -boot menu=on,splash=/root/boot.bmp,splash-time=5000
|
||||
+qemu-kvm -boot menu=on,splash=/root/boot.bmp,splash-time=5000
|
||||
@end example
|
||||
|
||||
Note: The legacy format '-boot @var{drives}' is still supported but its
|
||||
@@ -379,7 +379,7 @@ For example, the following command-line sets the guest startup RAM size to
|
||||
memory the guest can reach to 4GB:
|
||||
|
||||
@example
|
||||
-qemu-system-x86_64 -m 1G,slots=3,maxmem=4G
|
||||
+qemu-kvm -m 1G,slots=3,maxmem=4G
|
||||
@end example
|
||||
|
||||
If @var{slots} and @var{maxmem} are not specified, memory hotplug won't
|
||||
@@ -448,12 +448,12 @@ Enable audio and selected sound hardware. Use 'help' to print all
|
||||
available sound hardware.
|
||||
|
||||
@example
|
||||
-qemu-system-i386 -soundhw sb16,adlib disk.img
|
||||
-qemu-system-i386 -soundhw es1370 disk.img
|
||||
-qemu-system-i386 -soundhw ac97 disk.img
|
||||
-qemu-system-i386 -soundhw hda disk.img
|
||||
-qemu-system-i386 -soundhw all disk.img
|
||||
-qemu-system-i386 -soundhw help
|
||||
+qemu-kvm -soundhw sb16,adlib disk.img
|
||||
+qemu-kvm -soundhw es1370 disk.img
|
||||
+qemu-kvm -soundhw ac97 disk.img
|
||||
+qemu-kvm -soundhw hda disk.img
|
||||
+qemu-kvm -soundhw all disk.img
|
||||
+qemu-kvm -soundhw help
|
||||
@end example
|
||||
|
||||
Note that Linux's i810_audio OSS kernel (for AC97) module might
|
||||
@@ -946,21 +946,21 @@ is off.
|
||||
|
||||
Instead of @option{-cdrom} you can use:
|
||||
@example
|
||||
-qemu-system-i386 -drive file=file,index=2,media=cdrom
|
||||
+qemu-kvm -drive file=file,index=2,media=cdrom
|
||||
@end example
|
||||
|
||||
Instead of @option{-hda}, @option{-hdb}, @option{-hdc}, @option{-hdd}, you can
|
||||
use:
|
||||
@example
|
||||
-qemu-system-i386 -drive file=file,index=0,media=disk
|
||||
-qemu-system-i386 -drive file=file,index=1,media=disk
|
||||
-qemu-system-i386 -drive file=file,index=2,media=disk
|
||||
-qemu-system-i386 -drive file=file,index=3,media=disk
|
||||
+qemu-kvm -drive file=file,index=0,media=disk
|
||||
+qemu-kvm -drive file=file,index=1,media=disk
|
||||
+qemu-kvm -drive file=file,index=2,media=disk
|
||||
+qemu-kvm -drive file=file,index=3,media=disk
|
||||
@end example
|
||||
|
||||
You can open an image using pre-opened file descriptors from an fd set:
|
||||
@example
|
||||
-qemu-system-i386
|
||||
+qemu-kvm
|
||||
-add-fd fd=3,set=2,opaque="rdwr:/path/to/file"
|
||||
-add-fd fd=4,set=2,opaque="rdonly:/path/to/file"
|
||||
-drive file=/dev/fdset/2,index=0,media=disk
|
||||
@@ -968,28 +968,28 @@ qemu-system-i386
|
||||
|
||||
You can connect a CDROM to the slave of ide0:
|
||||
@example
|
||||
-qemu-system-i386 -drive file=file,if=ide,index=1,media=cdrom
|
||||
+qemu-kvm -drive file=file,if=ide,index=1,media=cdrom
|
||||
@end example
|
||||
|
||||
If you don't specify the "file=" argument, you define an empty drive:
|
||||
@example
|
||||
-qemu-system-i386 -drive if=ide,index=1,media=cdrom
|
||||
+qemu-kvm -drive if=ide,index=1,media=cdrom
|
||||
@end example
|
||||
|
||||
Instead of @option{-fda}, @option{-fdb}, you can use:
|
||||
@example
|
||||
-qemu-system-i386 -drive file=file,index=0,if=floppy
|
||||
-qemu-system-i386 -drive file=file,index=1,if=floppy
|
||||
+qemu-kvm -drive file=file,index=0,if=floppy
|
||||
+qemu-kvm -drive file=file,index=1,if=floppy
|
||||
@end example
|
||||
|
||||
By default, @var{interface} is "ide" and @var{index} is automatically
|
||||
incremented:
|
||||
@example
|
||||
-qemu-system-i386 -drive file=a -drive file=b"
|
||||
+qemu-kvm -drive file=a -drive file=b"
|
||||
@end example
|
||||
is interpreted like:
|
||||
@example
|
||||
-qemu-system-i386 -hda a -hdb b
|
||||
+qemu-kvm -hda a -hdb b
|
||||
@end example
|
||||
ETEXI
|
||||
|
||||
@@ -2056,8 +2056,8 @@ The following two example do exactly the same, to show how @option{-nic} can
|
||||
be used to shorten the command line length (note that the e1000 is the default
|
||||
on i386, so the @option{model=e1000} parameter could even be omitted here, too):
|
||||
@example
|
||||
-qemu-system-i386 -netdev user,id=n1,ipv6=off -device e1000,netdev=n1,mac=52:54:98:76:54:32
|
||||
-qemu-system-i386 -nic user,ipv6=off,model=e1000,mac=52:54:98:76:54:32
|
||||
+qemu-kvm -netdev user,id=n1,ipv6=off -device e1000,netdev=n1,mac=52:54:98:76:54:32
|
||||
+qemu-kvm -nic user,ipv6=off,model=e1000,mac=52:54:98:76:54:32
|
||||
@end example
|
||||
|
||||
@item -nic none
|
||||
@@ -2128,7 +2128,7 @@ can not be resolved.
|
||||
|
||||
Example:
|
||||
@example
|
||||
-qemu-system-i386 -nic user,dnssearch=mgmt.example.org,dnssearch=example.org
|
||||
+qemu-kvm -nic user,dnssearch=mgmt.example.org,dnssearch=example.org
|
||||
@end example
|
||||
|
||||
@item tftp=@var{dir}
|
||||
@@ -2144,7 +2144,7 @@ a guest from a local directory.
|
||||
|
||||
Example (using pxelinux):
|
||||
@example
|
||||
-qemu-system-i386 -hda linux.img -boot n -device e1000,netdev=n1 \
|
||||
+qemu-kvm -hda linux.img -boot n -device e1000,netdev=n1 \
|
||||
-netdev user,id=n1,tftp=/path/to/tftp/files,bootfile=/pxelinux.0
|
||||
@end example
|
||||
|
||||
@@ -2178,7 +2178,7 @@ screen 0, use the following:
|
||||
|
||||
@example
|
||||
# on the host
|
||||
-qemu-system-i386 -nic user,hostfwd=tcp:127.0.0.1:6001-:6000
|
||||
+qemu-kvm -nic user,hostfwd=tcp:127.0.0.1:6001-:6000
|
||||
# this host xterm should open in the guest X11 server
|
||||
xterm -display :1
|
||||
@end example
|
||||
@@ -2188,7 +2188,7 @@ the guest, use the following:
|
||||
|
||||
@example
|
||||
# on the host
|
||||
-qemu-system-i386 -nic user,hostfwd=tcp::5555-:23
|
||||
+qemu-kvm -nic user,hostfwd=tcp::5555-:23
|
||||
telnet localhost 5555
|
||||
@end example
|
||||
|
||||
@@ -2207,7 +2207,7 @@ lifetime, like in the following example:
|
||||
@example
|
||||
# open 10.10.1.1:4321 on bootup, connect 10.0.2.100:1234 to it whenever
|
||||
# the guest accesses it
|
||||
-qemu-system-i386 -nic user,guestfwd=tcp:10.0.2.100:1234-tcp:10.10.1.1:4321
|
||||
+qemu-kvm -nic user,guestfwd=tcp:10.0.2.100:1234-tcp:10.10.1.1:4321
|
||||
@end example
|
||||
|
||||
Or you can execute a command on every TCP connection established by the guest,
|
||||
@@ -2216,7 +2216,7 @@ so that QEMU behaves similar to an inetd process for that virtual server:
|
||||
@example
|
||||
# call "netcat 10.10.1.1 4321" on every TCP connection to 10.0.2.100:1234
|
||||
# and connect the TCP stream to its stdin/stdout
|
||||
-qemu-system-i386 -nic 'user,id=n1,guestfwd=tcp:10.0.2.100:1234-cmd:netcat 10.10.1.1 4321'
|
||||
+qemu-kvm -nic 'user,id=n1,guestfwd=tcp:10.0.2.100:1234-cmd:netcat 10.10.1.1 4321'
|
||||
@end example
|
||||
|
||||
@end table
|
||||
@@ -2248,21 +2248,22 @@ Examples:
|
||||
|
||||
@example
|
||||
#launch a QEMU instance with the default network script
|
||||
-qemu-system-i386 linux.img -nic tap
|
||||
+qemu-kvm linux.img -nic tap
|
||||
@end example
|
||||
|
||||
@example
|
||||
#launch a QEMU instance with two NICs, each one connected
|
||||
#to a TAP device
|
||||
-qemu-system-i386 linux.img \
|
||||
+qemu-kvm linux.img \
|
||||
-netdev tap,id=nd0,ifname=tap0 -device e1000,netdev=nd0 \
|
||||
-netdev tap,id=nd1,ifname=tap1 -device rtl8139,netdev=nd1
|
||||
+ -net nic,vlan=1 -net tap,vlan=1,ifname=tap1
|
||||
@end example
|
||||
|
||||
@example
|
||||
#launch a QEMU instance with the default network helper to
|
||||
#connect a TAP device to bridge br0
|
||||
-qemu-system-i386 linux.img -device virtio-net-pci,netdev=n1 \
|
||||
+qemu-kvm linux.img -device virtio-net-pci,netdev=n1 \
|
||||
-netdev tap,id=n1,"helper=/path/to/qemu-bridge-helper"
|
||||
@end example
|
||||
|
||||
@@ -2279,13 +2280,13 @@ Examples:
|
||||
@example
|
||||
#launch a QEMU instance with the default network helper to
|
||||
#connect a TAP device to bridge br0
|
||||
-qemu-system-i386 linux.img -netdev bridge,id=n1 -device virtio-net,netdev=n1
|
||||
+qemu-kvm linux.img -netdev bridge,id=n1 -device virtio-net,netdev=n1
|
||||
@end example
|
||||
|
||||
@example
|
||||
#launch a QEMU instance with the default network helper to
|
||||
#connect a TAP device to bridge qemubr0
|
||||
-qemu-system-i386 linux.img -netdev bridge,br=qemubr0,id=n1 -device virtio-net,netdev=n1
|
||||
+qemu-kvm linux.img -netdev bridge,br=qemubr0,id=n1 -device virtio-net,netdev=n1
|
||||
@end example
|
||||
|
||||
@item -netdev socket,id=@var{id}[,fd=@var{h}][,listen=[@var{host}]:@var{port}][,connect=@var{host}:@var{port}]
|
||||
@@ -2300,13 +2301,13 @@ specifies an already opened TCP socket.
|
||||
Example:
|
||||
@example
|
||||
# launch a first QEMU instance
|
||||
-qemu-system-i386 linux.img \
|
||||
- -device e1000,netdev=n1,mac=52:54:00:12:34:56 \
|
||||
- -netdev socket,id=n1,listen=:1234
|
||||
+qemu-kvm linux.img \
|
||||
+ -device e1000,netdev=n1,mac=52:54:00:12:34:56 \
|
||||
+ -netdev socket,id=n1,listen=:1234
|
||||
# connect the network of this instance to the network of the first instance
|
||||
-qemu-system-i386 linux.img \
|
||||
- -device e1000,netdev=n2,mac=52:54:00:12:34:57 \
|
||||
- -netdev socket,id=n2,connect=127.0.0.1:1234
|
||||
+qemu-kvm linux.img \
|
||||
+ -device e1000,netdev=n2,mac=52:54:00:12:34:57 \
|
||||
+ -netdev socket,id=n2,connect=127.0.0.1:1234
|
||||
@end example
|
||||
|
||||
@item -netdev socket,id=@var{id}[,fd=@var{h}][,mcast=@var{maddr}:@var{port}[,localaddr=@var{addr}]]
|
||||
@@ -2329,23 +2330,23 @@ Use @option{fd=h} to specify an already opened UDP multicast socket.
|
||||
Example:
|
||||
@example
|
||||
# launch one QEMU instance
|
||||
-qemu-system-i386 linux.img \
|
||||
- -device e1000,netdev=n1,mac=52:54:00:12:34:56 \
|
||||
- -netdev socket,id=n1,mcast=230.0.0.1:1234
|
||||
+qemu-kvm linux.img \
|
||||
+ -device e1000,netdev=n1,mac=52:54:00:12:34:56 \
|
||||
+ -netdev socket,id=n1,mcast=230.0.0.1:1234
|
||||
# launch another QEMU instance on same "bus"
|
||||
-qemu-system-i386 linux.img \
|
||||
- -device e1000,netdev=n2,mac=52:54:00:12:34:57 \
|
||||
- -netdev socket,id=n2,mcast=230.0.0.1:1234
|
||||
+qemu-kvm linux.img \
|
||||
+ -device e1000,netdev=n2,mac=52:54:00:12:34:57 \
|
||||
+ -netdev socket,id=n2,mcast=230.0.0.1:1234
|
||||
# launch yet another QEMU instance on same "bus"
|
||||
-qemu-system-i386 linux.img \
|
||||
- -device e1000,netdev=n3,macaddr=52:54:00:12:34:58 \
|
||||
- -netdev socket,id=n3,mcast=230.0.0.1:1234
|
||||
+qemu-kvm linux.img \
|
||||
+ -device e1000,netdev=n3,macaddr=52:54:00:12:34:58 \
|
||||
+ -netdev socket,id=n3,mcast=230.0.0.1:1234
|
||||
@end example
|
||||
|
||||
Example (User Mode Linux compat.):
|
||||
@example
|
||||
# launch QEMU instance (note mcast address selected is UML's default)
|
||||
-qemu-system-i386 linux.img \
|
||||
+qemu-kvm linux.img \
|
||||
-device e1000,netdev=n1,mac=52:54:00:12:34:56 \
|
||||
-netdev socket,id=n1,mcast=239.192.168.1:1102
|
||||
# launch UML
|
||||
@@ -2354,9 +2355,12 @@ qemu-system-i386 linux.img \
|
||||
|
||||
Example (send packets from host's 1.2.3.4):
|
||||
@example
|
||||
-qemu-system-i386 linux.img \
|
||||
- -device e1000,netdev=n1,mac=52:54:00:12:34:56 \
|
||||
- -netdev socket,id=n1,mcast=239.192.168.1:1102,localaddr=1.2.3.4
|
||||
+qemu-kvm linux.img \
|
||||
+ -device e1000,netdev=n1,mac=52:54:00:12:34:56 \
|
||||
+ -netdev socket,id=n1,mcast=239.192.168.1:1102,localaddr=1.2.3.4
|
||||
+qemu-kvm linux.img \
|
||||
+ -net nic,macaddr=52:54:00:12:34:56 \
|
||||
+ -net socket,mcast=239.192.168.1:1102,localaddr=1.2.3.4
|
||||
@end example
|
||||
|
||||
@item -netdev l2tpv3,id=@var{id},src=@var{srcaddr},dst=@var{dstaddr}[,srcport=@var{srcport}][,dstport=@var{dstport}],txsession=@var{txsession}[,rxsession=@var{rxsession}][,ipv6][,udp][,cookie64][,counter][,pincounter][,txcookie=@var{txcookie}][,rxcookie=@var{rxcookie}][,offset=@var{offset}]
|
||||
@@ -2414,7 +2418,7 @@ brctl addif br-lan vmtunnel0
|
||||
# on 4.3.2.1
|
||||
# launch QEMU instance - if your network has reorder or is very lossy add ,pincounter
|
||||
|
||||
-qemu-system-i386 linux.img -device e1000,netdev=n1 \
|
||||
+qemu-kvm linux.img -device e1000,netdev=n1 \
|
||||
-netdev l2tpv3,id=n1,src=4.2.3.1,dst=1.2.3.4,udp,srcport=16384,dstport=16384,rxsession=0xffffffff,txsession=0xffffffff,counter
|
||||
|
||||
@end example
|
||||
@@ -2431,7 +2435,7 @@ Example:
|
||||
# launch vde switch
|
||||
vde_switch -F -sock /tmp/myswitch
|
||||
# launch QEMU instance
|
||||
-qemu-system-i386 linux.img -nic vde,sock=/tmp/myswitch
|
||||
+qemu-kvm linux.img -nic vde,sock=/tmp/myswitch
|
||||
@end example
|
||||
|
||||
@item -netdev vhost-user,chardev=@var{id}[,vhostforce=on|off][,queues=n]
|
||||
@@ -2445,11 +2449,11 @@ be created for multiqueue vhost-user.
|
||||
|
||||
Example:
|
||||
@example
|
||||
-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
|
||||
@end example
|
||||
|
||||
@item -netdev hubport,id=@var{id},hubid=@var{hubid}[,netdev=@var{nd}]
|
||||
@@ -2879,7 +2883,7 @@ and communicate. Requires the Linux @code{vhci} driver installed. Can
|
||||
be used as following:
|
||||
|
||||
@example
|
||||
-qemu-system-i386 [...OPTIONS...] -bt hci,vlan=5 -bt vhci,vlan=5
|
||||
+qemu-kvm [...OPTIONS...] -bt hci,vlan=5 -bt vhci,vlan=5
|
||||
@end example
|
||||
|
||||
@item -bt device:@var{dev}[,vlan=@var{n}]
|
||||
@@ -3310,14 +3314,14 @@ ETEXI
|
||||
|
||||
DEF("realtime", HAS_ARG, QEMU_OPTION_realtime,
|
||||
"-realtime [mlock=on|off]\n"
|
||||
- " run qemu with realtime features\n"
|
||||
+ " run qemu-kvm with realtime features\n"
|
||||
" mlock=on|off controls mlock support (default: on)\n",
|
||||
QEMU_ARCH_ALL)
|
||||
STEXI
|
||||
@item -realtime mlock=on|off
|
||||
@findex -realtime
|
||||
-Run qemu with realtime features.
|
||||
-mlocking qemu and guest memory can be enabled via @option{mlock=on}
|
||||
+Run qemu-kvm with realtime features.
|
||||
+mlocking qemu-kvm and guest memory can be enabled via @option{mlock=on}
|
||||
(enabled by default).
|
||||
ETEXI
|
||||
|
||||
@@ -3331,7 +3335,7 @@ connections will likely be TCP-based, but also UDP, pseudo TTY, or even
|
||||
stdio are reasonable use case. The latter is allowing to start QEMU from
|
||||
within gdb and establish the connection via a pipe:
|
||||
@example
|
||||
-(gdb) target remote | exec qemu-system-i386 -gdb stdio ...
|
||||
+(gdb) target remote | exec qemu-kvm -gdb stdio ...
|
||||
@end example
|
||||
ETEXI
|
||||
|
||||
@@ -4251,7 +4255,7 @@ which specify the queue number of cryptodev backend, the default of
|
||||
|
||||
@example
|
||||
|
||||
- # qemu-system-x86_64 \
|
||||
+ # qemu-kvm \
|
||||
[...] \
|
||||
-object cryptodev-backend-builtin,id=cryptodev0 \
|
||||
-device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0 \
|
||||
@@ -4271,7 +4275,7 @@ of cryptodev backend for multiqueue vhost-user, the default of @var{queues} is 1
|
||||
|
||||
@example
|
||||
|
||||
- # qemu-system-x86_64 \
|
||||
+ # qemu-kvm \
|
||||
[...] \
|
||||
-chardev socket,id=chardev0,path=/path/to/socket \
|
||||
-object cryptodev-vhost-user,id=cryptodev0,chardev=chardev0 \
|
||||
--
|
||||
1.8.3.1
|
||||
|
897
SOURCES/0011-Add-x86_64-machine-types.patch
Normal file
897
SOURCES/0011-Add-x86_64-machine-types.patch
Normal file
@ -0,0 +1,897 @@
|
||||
From 2ebaeca6e26950f401a8169d1324be2bafd11741 Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
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 <mrezanin@redhat.com>
|
||||
|
||||
Rebase changes (qemu-4.0.0):
|
||||
- Use upstream compat handling
|
||||
|
||||
Rebase notes (3.1.0):
|
||||
- Removed xsave changes
|
||||
|
||||
Rebase notes (4.1.0):
|
||||
- Updated format for compat structures
|
||||
|
||||
Rebase notes (4.2.0-rc2):
|
||||
- Use X86MachineClass for save_tsc_khz (upstream change)
|
||||
|
||||
Merged patches (4.1.0):
|
||||
- f4dc802 pc: 7.5 compat entries
|
||||
- 456ed3e pc: PC_RHEL7_6_COMPAT
|
||||
- 04119ee pc: Add compat for pc-i440fx-rhel7.6.0 machine type
|
||||
- b3b3687 pc: Add pc-q35-8.0.0 machine type
|
||||
- 8d46fc6 pc: Add x-migrate-smi-count=off to PC_RHEL7_6_COMPAT
|
||||
- 1de7949 kvm: clear out KVM_ASYNC_PF_DELIVERY_AS_PF_VMEXIT for older machine types
|
||||
- 18cf0d7 target/i386: Disable MPX support on named CPU models (partialy)
|
||||
- 2660667 rhel: Set host-phys-bits-limit=48 on rhel machine-types
|
||||
|
||||
Merged patches (4.2.0):
|
||||
- 7d5c2ef pc: Don't make die-id mandatory unless necessary
|
||||
- e42808c x86 machine types: pc_rhel_8_0_compat
|
||||
- 9de83a8 x86 machine types: q35: Fixup units_per_default_bus
|
||||
- 6df1559 x86 machine types: Fixup dynamic sysbus entries
|
||||
- 0784125 x86 machine types: add pc-q35-rhel8.1.0
|
||||
- machines/x86: Add rhel 8.2 machine type (patch 92959)
|
||||
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
hw/i386/acpi-build.c | 3 +
|
||||
hw/i386/pc.c | 263 ++++++++++++++++++++++++++++++++++++++++++-
|
||||
hw/i386/pc_piix.c | 210 +++++++++++++++++++++++++++++++++-
|
||||
hw/i386/pc_q35.c | 156 ++++++++++++++++++++++++-
|
||||
include/hw/boards.h | 2 +
|
||||
include/hw/i386/pc.h | 33 ++++++
|
||||
target/i386/cpu.c | 9 +-
|
||||
target/i386/kvm.c | 4 +
|
||||
8 files changed, 673 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
|
||||
index 12ff55fcfb..64001893ab 100644
|
||||
--- a/hw/i386/acpi-build.c
|
||||
+++ b/hw/i386/acpi-build.c
|
||||
@@ -204,6 +204,9 @@ static void acpi_get_pm_info(MachineState *machine, AcpiPmInfo *pm)
|
||||
pm->fadt.reset_reg = r;
|
||||
pm->fadt.reset_val = 0xf;
|
||||
pm->fadt.flags |= 1 << ACPI_FADT_F_RESET_REG_SUP;
|
||||
+ if (object_property_get_bool(lpc,
|
||||
+ "__com.redhat_force-rev1-fadt", NULL))
|
||||
+ pm->fadt.rev = 1;
|
||||
pm->cpu_hp_io_base = ICH9_CPU_HOTPLUG_IO_BASE;
|
||||
}
|
||||
|
||||
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
|
||||
index ac08e63604..61e70e4811 100644
|
||||
--- a/hw/i386/pc.c
|
||||
+++ b/hw/i386/pc.c
|
||||
@@ -344,6 +344,261 @@ 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" },
|
||||
+ /* bz 1508330 */
|
||||
+ { "vfio-pci", "x-no-geforce-quirks", "on" },
|
||||
+};
|
||||
+const size_t pc_rhel_compat_len = G_N_ELEMENTS(pc_rhel_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);
|
||||
+
|
||||
+/* Similar to PC_COMPAT_2_11 + PC_COMPAT_2_10, but:
|
||||
+ * - x-hv-max-vps was backported to 7.5
|
||||
+ * - x-pci-hole64-fix was backported to 7.5
|
||||
+ */
|
||||
+GlobalProperty pc_rhel_7_5_compat[] = {
|
||||
+ /* pc_rhel_7_5_compat from pc_compat_2_11 */
|
||||
+ { "Skylake-Server" "-" TYPE_X86_CPU, "clflushopt", "off" },
|
||||
+ /* pc_rhel_7_5_compat from pc_compat_2_12 */
|
||||
+ { TYPE_X86_CPU, "legacy-cache", "on" },
|
||||
+ /* pc_rhel_7_5_compat from pc_compat_2_12 */
|
||||
+ { TYPE_X86_CPU, "topoext", "off" },
|
||||
+ /* pc_rhel_7_5_compat from pc_compat_2_12 */
|
||||
+ { "EPYC-" TYPE_X86_CPU, "xlevel", stringify(0x8000000a) },
|
||||
+ /* pc_rhel_7_5_compat from pc_compat_2_12 */
|
||||
+ { "EPYC-IBPB-" TYPE_X86_CPU, "xlevel", stringify(0x8000000a) },
|
||||
+};
|
||||
+const size_t pc_rhel_7_5_compat_len = G_N_ELEMENTS(pc_rhel_7_5_compat);
|
||||
+
|
||||
+GlobalProperty pc_rhel_7_4_compat[] = {
|
||||
+ /* pc_rhel_7_4_compat from pc_compat_2_9 */
|
||||
+ { "mch", "extended-tseg-mbytes", stringify(0) },
|
||||
+ /* bz 1489800 */
|
||||
+ { "ICH9-LPC", "__com.redhat_force-rev1-fadt", "on" },
|
||||
+ /* pc_rhel_7_4_compat from pc_compat_2_10 */
|
||||
+ { "i440FX-pcihost", "x-pci-hole64-fix", "off" },
|
||||
+ /* pc_rhel_7_4_compat from pc_compat_2_10 */
|
||||
+ { "q35-pcihost", "x-pci-hole64-fix", "off" },
|
||||
+ /* pc_rhel_7_4_compat from pc_compat_2_10 */
|
||||
+ { TYPE_X86_CPU, "x-hv-max-vps", "0x40" },
|
||||
+};
|
||||
+const size_t pc_rhel_7_4_compat_len = G_N_ELEMENTS(pc_rhel_7_4_compat);
|
||||
+
|
||||
+GlobalProperty pc_rhel_7_3_compat[] = {
|
||||
+ /* pc_rhel_7_3_compat from pc_compat_2_8 */
|
||||
+ { "kvmclock", "x-mach-use-reliable-get-clock", "off" },
|
||||
+ /* pc_rhel_7_3_compat from pc_compat_2_7 */
|
||||
+ { TYPE_X86_CPU, "l3-cache", "off" },
|
||||
+ /* pc_rhel_7_3_compat from pc_compat_2_7 */
|
||||
+ { TYPE_X86_CPU, "full-cpuid-auto-level", "off" },
|
||||
+ /* pc_rhel_7_3_compat from pc_compat_2_7 */
|
||||
+ { "Opteron_G3" "-" TYPE_X86_CPU, "family", "15" },
|
||||
+ /* pc_rhel_7_3_compat from pc_compat_2_7 */
|
||||
+ { "Opteron_G3" "-" TYPE_X86_CPU, "model", "6" },
|
||||
+ /* pc_rhel_7_3_compat from pc_compat_2_7 */
|
||||
+ { "Opteron_G3" "-" TYPE_X86_CPU, "stepping", "1" },
|
||||
+ /* pc_rhel_7_3_compat from pc_compat_2_7 */
|
||||
+ { "isa-pcspk", "migrate", "off" },
|
||||
+ /* pc_rhel_7_3_compat from pc_compat_2_6 */
|
||||
+ { TYPE_X86_CPU, "cpuid-0xb", "off" },
|
||||
+ /* pc_rhel_7_3_compat from pc_compat_2_8 */
|
||||
+ { "ICH9-LPC", "x-smi-broadcast", "off" },
|
||||
+ /* pc_rhel_7_3_compat from pc_compat_2_8 */
|
||||
+ { TYPE_X86_CPU, "vmware-cpuid-freq", "off" },
|
||||
+ /* pc_rhel_7_3_compat from pc_compat_2_8 */
|
||||
+ { "Haswell-" TYPE_X86_CPU, "stepping", "1" },
|
||||
+ /* pc_rhel_7_3_compat from pc_compat_2_3 added in 2.9*/
|
||||
+ { TYPE_X86_CPU, "kvm-no-smi-migration", "on" },
|
||||
+};
|
||||
+const size_t pc_rhel_7_3_compat_len = G_N_ELEMENTS(pc_rhel_7_3_compat);
|
||||
+
|
||||
+GlobalProperty pc_rhel_7_2_compat[] = {
|
||||
+ { "phenom" "-" TYPE_X86_CPU, "rdtscp", "off"},
|
||||
+ { "qemu64" "-" TYPE_X86_CPU, "sse4a", "on" },
|
||||
+ { "qemu64" "-" TYPE_X86_CPU, "abm", "on" },
|
||||
+ { "Haswell-" TYPE_X86_CPU, "abm", "off" },
|
||||
+ { "Haswell-IBRS" "-" TYPE_X86_CPU, "abm", "off" },
|
||||
+ { "Haswell-noTSX-" TYPE_X86_CPU, "abm", "off" },
|
||||
+ { "Haswell-noTSX-IBRS" "-" TYPE_X86_CPU, "abm", "off" },
|
||||
+ { "Broadwell-" TYPE_X86_CPU, "abm", "off" },
|
||||
+ { "Broadwell-IBRS" "-" TYPE_X86_CPU, "abm", "off" },
|
||||
+ { "Broadwell-noTSX-" TYPE_X86_CPU, "abm", "off" },
|
||||
+ { "Broadwell-noTSX-IBRS" "-" TYPE_X86_CPU, "abm", "off" },
|
||||
+ { "host" "-" TYPE_X86_CPU, "host-cache-info", "on" },
|
||||
+ { TYPE_X86_CPU, "check", "off" },
|
||||
+ { "qemu32" "-" TYPE_X86_CPU, "popcnt", "on" },
|
||||
+ { TYPE_X86_CPU, "arat", "off" },
|
||||
+ { "usb-redir", "streams", "off" },
|
||||
+ { TYPE_X86_CPU, "fill-mtrr-mask", "off" },
|
||||
+ { "apic-common", "legacy-instance-id", "on" },
|
||||
+};
|
||||
+const size_t pc_rhel_7_2_compat_len = G_N_ELEMENTS(pc_rhel_7_2_compat);
|
||||
+
|
||||
+GlobalProperty pc_rhel_7_1_compat[] = {
|
||||
+ { "kvm64" "-" TYPE_X86_CPU, "vme", "off" },
|
||||
+ { "kvm32" "-" TYPE_X86_CPU, "vme", "off" },
|
||||
+ { "Conroe" "-" TYPE_X86_CPU, "vme", "off" },
|
||||
+ { "Penryn" "-" TYPE_X86_CPU, "vme", "off" },
|
||||
+ { "Nehalem" "-" TYPE_X86_CPU, "vme", "off" },
|
||||
+ { "Nehalem-IBRS" "-" TYPE_X86_CPU, "vme", "off" },
|
||||
+ { "Westmere" "-" TYPE_X86_CPU, "vme", "off" },
|
||||
+ { "Westmere-IBRS" "-" TYPE_X86_CPU, "vme", "off" },
|
||||
+ { "SandyBridge" "-" TYPE_X86_CPU, "vme", "off" },
|
||||
+ { "SandyBridge-IBRS" "-" TYPE_X86_CPU, "vme", "off" },
|
||||
+ { "Haswell" "-" TYPE_X86_CPU, "vme", "off" },
|
||||
+ { "Haswell-IBRS" "-" TYPE_X86_CPU, "vme", "off" },
|
||||
+ { "Broadwell" "-" TYPE_X86_CPU, "vme", "off" },
|
||||
+ { "Broadwell-IBRS" "-" TYPE_X86_CPU, "vme", "off" },
|
||||
+ { "Opteron_G1" "-" TYPE_X86_CPU, "vme", "off" },
|
||||
+ { "Opteron_G2" "-" TYPE_X86_CPU, "vme", "off" },
|
||||
+ { "Opteron_G3" "-" TYPE_X86_CPU, "vme", "off" },
|
||||
+ { "Opteron_G4" "-" TYPE_X86_CPU, "vme", "off" },
|
||||
+ { "Opteron_G5" "-" TYPE_X86_CPU, "vme", "off" },
|
||||
+ { "Haswell" "-" TYPE_X86_CPU, "f16c", "off" },
|
||||
+ { "Haswell-IBRS" "-" TYPE_X86_CPU, "f16c", "off" },
|
||||
+ { "Haswell" "-" TYPE_X86_CPU, "rdrand", "off" },
|
||||
+ { "Haswell-IBRS" "-" TYPE_X86_CPU, "rdrand", "off" },
|
||||
+ { "Broadwell" "-" TYPE_X86_CPU, "f16c", "off" },
|
||||
+ { "Broadwell-IBRS" "-" TYPE_X86_CPU, "f16c", "off" },
|
||||
+ { "Broadwell" "-" TYPE_X86_CPU, "rdrand", "off" },
|
||||
+ { "Broadwell-IBRS" "-" TYPE_X86_CPU, "rdrand", "off" },
|
||||
+ { "coreduo" "-" TYPE_X86_CPU, "vmx", "on" },
|
||||
+ { "core2duo" "-" TYPE_X86_CPU, "vmx", "on" },
|
||||
+ { "qemu64" "-" TYPE_X86_CPU, "min-level", stringify(4) },
|
||||
+ { "kvm64" "-" TYPE_X86_CPU, "min-level", stringify(5) },
|
||||
+ { "pentium3" "-" TYPE_X86_CPU, "min-level", stringify(2) },
|
||||
+ { "n270" "-" TYPE_X86_CPU, "min-level", stringify(5) },
|
||||
+ { "Conroe" "-" TYPE_X86_CPU, "min-level", stringify(4) },
|
||||
+ { "Penryn" "-" TYPE_X86_CPU, "min-level", stringify(4) },
|
||||
+ { "Nehalem" "-" TYPE_X86_CPU, "min-level", stringify(4) },
|
||||
+ { "n270" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) },
|
||||
+ { "Penryn" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) },
|
||||
+ { "Conroe" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) },
|
||||
+ { "Nehalem" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) },
|
||||
+ { "Westmere" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) },
|
||||
+ { "SandyBridge" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) },
|
||||
+ { "IvyBridge" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) },
|
||||
+ { "Haswell" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) },
|
||||
+ { "Haswell-noTSX" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) },
|
||||
+ { "Broadwell" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) },
|
||||
+ { "Broadwell-noTSX" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) },
|
||||
+};
|
||||
+const size_t pc_rhel_7_1_compat_len = G_N_ELEMENTS(pc_rhel_7_1_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.
|
||||
+ */
|
||||
+
|
||||
+/*
|
||||
+ * RHEL-7 is based on QEMU 1.5.3, so this needs the PC_COMPAT_*
|
||||
+ * between our base and 1.5, less stuff backported to RHEL-7.0
|
||||
+ * (usb-device.msos-desc), less stuff for devices we changed
|
||||
+ * (qemu64-x86_64-cpu) or don't support (hpet, pci-serial-2x,
|
||||
+ * pci-serial-4x) in 7.0.
|
||||
+ */
|
||||
+GlobalProperty pc_rhel_7_0_compat[] = {
|
||||
+ { "virtio-scsi-pci", "any_layout", "off" },
|
||||
+ { "PIIX4_PM", "memory-hotplug-support", "off" },
|
||||
+ { "apic", "version", stringify(0x11) },
|
||||
+ { "nec-usb-xhci", "superspeed-ports-first", "off" },
|
||||
+ { "nec-usb-xhci", "force-pcie-endcap", "on" },
|
||||
+ { "pci-serial", "prog_if", stringify(0) },
|
||||
+ { "virtio-net-pci", "guest_announce", "off" },
|
||||
+ { "ICH9-LPC", "memory-hotplug-support", "off" },
|
||||
+ { "xio3130-downstream", COMPAT_PROP_PCP, "off" },
|
||||
+ { "ioh3420", COMPAT_PROP_PCP, "off" },
|
||||
+ { "PIIX4_PM", "acpi-pci-hotplug-with-bridge-support", "off" },
|
||||
+ { "e1000", "mitigation", "off" },
|
||||
+ { "virtio-net-pci", "ctrl_guest_offloads", "off" },
|
||||
+ { "Conroe" "-" TYPE_X86_CPU, "x2apic", "on" },
|
||||
+ { "Penryn" "-" TYPE_X86_CPU, "x2apic", "on" },
|
||||
+ { "Nehalem" "-" TYPE_X86_CPU, "x2apic", "on" },
|
||||
+ { "Nehalem-IBRS" "-" TYPE_X86_CPU, "x2apic", "on" },
|
||||
+ { "Westmere" "-" TYPE_X86_CPU, "x2apic", "on" },
|
||||
+ { "Westmere-IBRS" "-" TYPE_X86_CPU, "x2apic", "on" },
|
||||
+ { "Opteron_G1" "-" TYPE_X86_CPU, "x2apic", "on" },
|
||||
+ { "Opteron_G2" "-" TYPE_X86_CPU, "x2apic", "on" },
|
||||
+ { "Opteron_G3" "-" TYPE_X86_CPU, "x2apic", "on" },
|
||||
+ { "Opteron_G4" "-" TYPE_X86_CPU, "x2apic", "on" },
|
||||
+ { "Opteron_G5" "-" TYPE_X86_CPU, "x2apic", "on" },
|
||||
+};
|
||||
+const size_t pc_rhel_7_0_compat_len = G_N_ELEMENTS(pc_rhel_7_0_compat);
|
||||
+
|
||||
void gsi_handler(void *opaque, int n, int level)
|
||||
{
|
||||
GSIState *s = opaque;
|
||||
@@ -1225,7 +1480,8 @@ void pc_memory_init(PCMachineState *pcms,
|
||||
option_rom_mr = g_malloc(sizeof(*option_rom_mr));
|
||||
memory_region_init_ram(option_rom_mr, NULL, "pc.rom", PC_ROM_SIZE,
|
||||
&error_fatal);
|
||||
- if (pcmc->pci_enabled) {
|
||||
+ /* RH difference: See bz 1489800, explicitly make ROM ro */
|
||||
+ if (pcmc->pc_rom_ro) {
|
||||
memory_region_set_readonly(option_rom_mr, true);
|
||||
}
|
||||
memory_region_add_subregion_overlap(rom_memory,
|
||||
@@ -2198,6 +2454,8 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
|
||||
pcmc->linuxboot_dma_enabled = true;
|
||||
pcmc->pvh_enabled = true;
|
||||
assert(!mc->get_hotplug_handler);
|
||||
+ pcmc->pc_rom_ro = true;
|
||||
+ 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;
|
||||
@@ -2209,7 +2467,8 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
|
||||
mc->hot_add_cpu = pc_hot_add_cpu;
|
||||
mc->smp_parse = pc_smp_parse;
|
||||
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 1bd70d1abb..bd7fdb99bb 100644
|
||||
--- a/hw/i386/pc_piix.c
|
||||
+++ b/hw/i386/pc_piix.c
|
||||
@@ -53,6 +53,7 @@
|
||||
#include "cpu.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/error-report.h"
|
||||
+#include "migration/migration.h"
|
||||
#ifdef CONFIG_XEN
|
||||
#include <xen/hvm/hvm_info_table.h>
|
||||
#include "hw/xen/xen_pt.h"
|
||||
@@ -173,8 +174,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,
|
||||
SMBIOS_ENTRY_POINT_21);
|
||||
}
|
||||
@@ -307,6 +308,7 @@ else {
|
||||
* 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)
|
||||
{
|
||||
PCMachineState *pcms = PC_MACHINE(machine);
|
||||
@@ -1026,3 +1028,207 @@ static void xenfv_machine_options(MachineClass *m)
|
||||
DEFINE_PC_MACHINE(xenfv, "xenfv", pc_xen_hvm_init,
|
||||
xenfv_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";
|
||||
+ pcmc->default_nic_model = "e1000";
|
||||
+ m->default_display = "std";
|
||||
+ m->no_parallel = 1;
|
||||
+ 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;
|
||||
+}
|
||||
+
|
||||
+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;
|
||||
+ pcmc->pvh_enabled = false;
|
||||
+ pcmc->default_cpu_version = CPU_VERSION_LEGACY;
|
||||
+ 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);
|
||||
+
|
||||
+static void pc_init_rhel750(MachineState *machine)
|
||||
+{
|
||||
+ pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
|
||||
+ TYPE_I440FX_PCI_DEVICE);
|
||||
+}
|
||||
+
|
||||
+static void pc_machine_rhel750_options(MachineClass *m)
|
||||
+{
|
||||
+ pc_machine_rhel760_options(m);
|
||||
+ m->alias = NULL;
|
||||
+ m->is_default = 0;
|
||||
+ m->desc = "RHEL 7.5.0 PC (i440FX + PIIX, 1996)";
|
||||
+ m->auto_enable_numa_with_memhp = false;
|
||||
+ compat_props_add(m->compat_props, hw_compat_rhel_7_5, hw_compat_rhel_7_5_len);
|
||||
+ compat_props_add(m->compat_props, pc_rhel_7_5_compat, pc_rhel_7_5_compat_len);
|
||||
+}
|
||||
+
|
||||
+DEFINE_PC_MACHINE(rhel750, "pc-i440fx-rhel7.5.0", pc_init_rhel750,
|
||||
+ pc_machine_rhel750_options);
|
||||
+
|
||||
+static void pc_init_rhel740(MachineState *machine)
|
||||
+{
|
||||
+ pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
|
||||
+ TYPE_I440FX_PCI_DEVICE);
|
||||
+}
|
||||
+
|
||||
+static void pc_machine_rhel740_options(MachineClass *m)
|
||||
+{
|
||||
+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
|
||||
+ pc_machine_rhel750_options(m);
|
||||
+ m->desc = "RHEL 7.4.0 PC (i440FX + PIIX, 1996)";
|
||||
+ m->numa_auto_assign_ram = numa_legacy_auto_assign_ram;
|
||||
+ pcmc->pc_rom_ro = false;
|
||||
+ compat_props_add(m->compat_props, hw_compat_rhel_7_4, hw_compat_rhel_7_4_len);
|
||||
+ compat_props_add(m->compat_props, pc_rhel_7_4_compat, pc_rhel_7_4_compat_len);
|
||||
+}
|
||||
+
|
||||
+DEFINE_PC_MACHINE(rhel740, "pc-i440fx-rhel7.4.0", pc_init_rhel740,
|
||||
+ pc_machine_rhel740_options);
|
||||
+
|
||||
+static void pc_init_rhel730(MachineState *machine)
|
||||
+{
|
||||
+ pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
|
||||
+ TYPE_I440FX_PCI_DEVICE);
|
||||
+}
|
||||
+
|
||||
+static void pc_machine_rhel730_options(MachineClass *m)
|
||||
+{
|
||||
+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
|
||||
+ pc_machine_rhel740_options(m);
|
||||
+ m->desc = "RHEL 7.3.0 PC (i440FX + PIIX, 1996)";
|
||||
+ pcmc->linuxboot_dma_enabled = false;
|
||||
+ compat_props_add(m->compat_props, hw_compat_rhel_7_3, hw_compat_rhel_7_3_len);
|
||||
+ compat_props_add(m->compat_props, pc_rhel_7_3_compat, pc_rhel_7_3_compat_len);
|
||||
+}
|
||||
+
|
||||
+DEFINE_PC_MACHINE(rhel730, "pc-i440fx-rhel7.3.0", pc_init_rhel730,
|
||||
+ pc_machine_rhel730_options);
|
||||
+
|
||||
+
|
||||
+static void pc_init_rhel720(MachineState *machine)
|
||||
+{
|
||||
+ pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
|
||||
+ TYPE_I440FX_PCI_DEVICE);
|
||||
+}
|
||||
+
|
||||
+static void pc_machine_rhel720_options(MachineClass *m)
|
||||
+{
|
||||
+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
|
||||
+ X86MachineClass *x86mc = X86_MACHINE_CLASS(m);
|
||||
+ pc_machine_rhel730_options(m);
|
||||
+ m->desc = "RHEL 7.2.0 PC (i440FX + PIIX, 1996)";
|
||||
+ /* From pc_i440fx_2_5_machine_options */
|
||||
+ x86mc->save_tsc_khz = false;
|
||||
+ m->legacy_fw_cfg_order = 1;
|
||||
+ /* Note: broken_reserved_end was already in 7.2 */
|
||||
+ /* From pc_i440fx_2_6_machine_options */
|
||||
+ pcmc->legacy_cpu_hotplug = true;
|
||||
+ compat_props_add(m->compat_props, hw_compat_rhel_7_2, hw_compat_rhel_7_2_len);
|
||||
+ compat_props_add(m->compat_props, pc_rhel_7_2_compat, pc_rhel_7_2_compat_len);
|
||||
+}
|
||||
+
|
||||
+DEFINE_PC_MACHINE(rhel720, "pc-i440fx-rhel7.2.0", pc_init_rhel720,
|
||||
+ pc_machine_rhel720_options);
|
||||
+
|
||||
+static void pc_compat_rhel710(MachineState *machine)
|
||||
+{
|
||||
+ PCMachineState *pcms = PC_MACHINE(machine);
|
||||
+ PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
|
||||
+
|
||||
+ /* From pc_compat_2_2 */
|
||||
+ pcmc->rsdp_in_ram = false;
|
||||
+ machine->suppress_vmdesc = true;
|
||||
+
|
||||
+ /* From pc_compat_2_1 */
|
||||
+ pcmc->smbios_uuid_encoded = false;
|
||||
+ x86_cpu_change_kvm_default("svm", NULL);
|
||||
+ pcmc->enforce_aligned_dimm = false;
|
||||
+
|
||||
+ /* Disable all the extra subsections that were added in 2.2 */
|
||||
+ migrate_pre_2_2 = true;
|
||||
+
|
||||
+ /* From pc_i440fx_2_4_machine_options */
|
||||
+ pcmc->broken_reserved_end = true;
|
||||
+}
|
||||
+
|
||||
+static void pc_init_rhel710(MachineState *machine)
|
||||
+{
|
||||
+ pc_compat_rhel710(machine);
|
||||
+ pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
|
||||
+ TYPE_I440FX_PCI_DEVICE);
|
||||
+}
|
||||
+
|
||||
+static void pc_machine_rhel710_options(MachineClass *m)
|
||||
+{
|
||||
+ pc_machine_rhel720_options(m);
|
||||
+ m->family = "pc_piix_Y";
|
||||
+ m->desc = "RHEL 7.1.0 PC (i440FX + PIIX, 1996)";
|
||||
+ m->default_display = "cirrus";
|
||||
+ compat_props_add(m->compat_props, hw_compat_rhel_7_1, hw_compat_rhel_7_1_len);
|
||||
+ compat_props_add(m->compat_props, pc_rhel_7_1_compat, pc_rhel_7_1_compat_len);
|
||||
+}
|
||||
+
|
||||
+DEFINE_PC_MACHINE(rhel710, "pc-i440fx-rhel7.1.0", pc_init_rhel710,
|
||||
+ pc_machine_rhel710_options);
|
||||
+
|
||||
+static void pc_compat_rhel700(MachineState *machine)
|
||||
+{
|
||||
+ PCMachineState *pcms = PC_MACHINE(machine);
|
||||
+ PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
|
||||
+
|
||||
+ pc_compat_rhel710(machine);
|
||||
+
|
||||
+ /* Upstream enables it for everyone, we're a little more selective */
|
||||
+ x86_cpu_change_kvm_default("x2apic", NULL);
|
||||
+ x86_cpu_change_kvm_default("svm", NULL);
|
||||
+ pcmc->legacy_acpi_table_size = 6418; /* see pc_compat_2_0() */
|
||||
+ pcmc->smbios_legacy_mode = true;
|
||||
+ pcmc->has_reserved_memory = false;
|
||||
+ migrate_cve_2014_5263_xhci_fields = true;
|
||||
+}
|
||||
+
|
||||
+static void pc_init_rhel700(MachineState *machine)
|
||||
+{
|
||||
+ pc_compat_rhel700(machine);
|
||||
+ pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
|
||||
+ TYPE_I440FX_PCI_DEVICE);
|
||||
+}
|
||||
+
|
||||
+static void pc_machine_rhel700_options(MachineClass *m)
|
||||
+{
|
||||
+ pc_machine_rhel710_options(m);
|
||||
+ m->family = "pc_piix_Y";
|
||||
+ m->desc = "RHEL 7.0.0 PC (i440FX + PIIX, 1996)";
|
||||
+ compat_props_add(m->compat_props, pc_rhel_7_0_compat, pc_rhel_7_0_compat_len);
|
||||
+}
|
||||
+
|
||||
+DEFINE_PC_MACHINE(rhel700, "pc-i440fx-rhel7.0.0", pc_init_rhel700,
|
||||
+ pc_machine_rhel700_options);
|
||||
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
|
||||
index 385e5cffb1..7531d8ed76 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,
|
||||
SMBIOS_ENTRY_POINT_21);
|
||||
}
|
||||
@@ -330,6 +330,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);
|
||||
@@ -533,3 +534,154 @@ 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";
|
||||
+ m->family = "pc_q35_Z";
|
||||
+ m->units_per_default_bus = 1;
|
||||
+ m->default_machine_opts = "firmware=bios-256k.bin";
|
||||
+ 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 = 384;
|
||||
+ compat_props_add(m->compat_props, pc_rhel_compat, pc_rhel_compat_len);
|
||||
+}
|
||||
+
|
||||
+static void pc_q35_init_rhel820(MachineState *machine)
|
||||
+{
|
||||
+ pc_q35_init(machine);
|
||||
+}
|
||||
+
|
||||
+static void pc_q35_machine_rhel820_options(MachineClass *m)
|
||||
+{
|
||||
+ pc_q35_machine_rhel_options(m);
|
||||
+ m->desc = "RHEL-8.2.0 PC (Q35 + ICH9, 2009)";
|
||||
+}
|
||||
+
|
||||
+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)
|
||||
+{
|
||||
+ pc_q35_machine_rhel820_options(m);
|
||||
+ m->desc = "RHEL-8.1.0 PC (Q35 + ICH9, 2009)";
|
||||
+ m->alias = 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);
|
||||
+
|
||||
+static void pc_q35_init_rhel750(MachineState *machine)
|
||||
+{
|
||||
+ pc_q35_init(machine);
|
||||
+}
|
||||
+
|
||||
+static void pc_q35_machine_rhel750_options(MachineClass *m)
|
||||
+{
|
||||
+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
|
||||
+ pc_q35_machine_rhel760_options(m);
|
||||
+ m->alias = NULL;
|
||||
+ m->desc = "RHEL-7.5.0 PC (Q35 + ICH9, 2009)";
|
||||
+ m->auto_enable_numa_with_memhp = false;
|
||||
+ pcmc->default_nic_model = "e1000";
|
||||
+ compat_props_add(m->compat_props, hw_compat_rhel_7_5, hw_compat_rhel_7_5_len);
|
||||
+ compat_props_add(m->compat_props, pc_rhel_7_5_compat, pc_rhel_7_5_compat_len);
|
||||
+}
|
||||
+
|
||||
+DEFINE_PC_MACHINE(q35_rhel750, "pc-q35-rhel7.5.0", pc_q35_init_rhel750,
|
||||
+ pc_q35_machine_rhel750_options);
|
||||
+
|
||||
+static void pc_q35_init_rhel740(MachineState *machine)
|
||||
+{
|
||||
+ pc_q35_init(machine);
|
||||
+}
|
||||
+
|
||||
+static void pc_q35_machine_rhel740_options(MachineClass *m)
|
||||
+{
|
||||
+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
|
||||
+ pc_q35_machine_rhel750_options(m);
|
||||
+ m->desc = "RHEL-7.4.0 PC (Q35 + ICH9, 2009)";
|
||||
+ m->numa_auto_assign_ram = numa_legacy_auto_assign_ram;
|
||||
+ pcmc->pc_rom_ro = false;
|
||||
+ compat_props_add(m->compat_props, hw_compat_rhel_7_4, hw_compat_rhel_7_4_len);
|
||||
+ compat_props_add(m->compat_props, pc_rhel_7_4_compat, pc_rhel_7_4_compat_len);
|
||||
+}
|
||||
+
|
||||
+DEFINE_PC_MACHINE(q35_rhel740, "pc-q35-rhel7.4.0", pc_q35_init_rhel740,
|
||||
+ pc_q35_machine_rhel740_options);
|
||||
+
|
||||
+static void pc_q35_init_rhel730(MachineState *machine)
|
||||
+{
|
||||
+ pc_q35_init(machine);
|
||||
+}
|
||||
+
|
||||
+static void pc_q35_machine_rhel730_options(MachineClass *m)
|
||||
+{
|
||||
+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
|
||||
+ pc_q35_machine_rhel740_options(m);
|
||||
+ m->desc = "RHEL-7.3.0 PC (Q35 + ICH9, 2009)";
|
||||
+ m->max_cpus = 255;
|
||||
+ pcmc->linuxboot_dma_enabled = false;
|
||||
+ compat_props_add(m->compat_props, hw_compat_rhel_7_3, hw_compat_rhel_7_3_len);
|
||||
+ compat_props_add(m->compat_props, pc_rhel_7_3_compat, pc_rhel_7_3_compat_len);
|
||||
+}
|
||||
+
|
||||
+DEFINE_PC_MACHINE(q35_rhel730, "pc-q35-rhel7.3.0", pc_q35_init_rhel730,
|
||||
+ pc_q35_machine_rhel730_options);
|
||||
diff --git a/include/hw/boards.h b/include/hw/boards.h
|
||||
index 6f85a0e032..2920bdef5b 100644
|
||||
--- a/include/hw/boards.h
|
||||
+++ b/include/hw/boards.h
|
||||
@@ -222,6 +222,8 @@ struct MachineClass {
|
||||
const char **valid_cpu_types;
|
||||
strList *allowed_dynamic_sysbus_devices;
|
||||
bool auto_enable_numa_with_memhp;
|
||||
+ /* RHEL only */
|
||||
+ bool async_pf_vmexit_disable;
|
||||
void (*numa_auto_assign_ram)(MachineClass *mc, NodeInfo *nodes,
|
||||
int nb_nodes, ram_addr_t size);
|
||||
bool ignore_boot_device_suffixes;
|
||||
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
|
||||
index 1f86eba3f9..2e362c8faa 100644
|
||||
--- a/include/hw/i386/pc.h
|
||||
+++ b/include/hw/i386/pc.h
|
||||
@@ -124,6 +124,9 @@ typedef struct PCMachineClass {
|
||||
|
||||
/* use PVH to load kernels that support this feature */
|
||||
bool pvh_enabled;
|
||||
+
|
||||
+ /* RH only, see bz 1489800 */
|
||||
+ bool pc_rom_ro;
|
||||
} PCMachineClass;
|
||||
|
||||
#define TYPE_PC_MACHINE "generic-pc-machine"
|
||||
@@ -300,6 +303,36 @@ 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_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;
|
||||
+
|
||||
+extern GlobalProperty pc_rhel_7_5_compat[];
|
||||
+extern const size_t pc_rhel_7_5_compat_len;
|
||||
+
|
||||
+extern GlobalProperty pc_rhel_7_4_compat[];
|
||||
+extern const size_t pc_rhel_7_4_compat_len;
|
||||
+
|
||||
+extern GlobalProperty pc_rhel_7_3_compat[];
|
||||
+extern const size_t pc_rhel_7_3_compat_len;
|
||||
+
|
||||
+extern GlobalProperty pc_rhel_7_2_compat[];
|
||||
+extern const size_t pc_rhel_7_2_compat_len;
|
||||
+
|
||||
+extern GlobalProperty pc_rhel_7_1_compat[];
|
||||
+extern const size_t pc_rhel_7_1_compat_len;
|
||||
+
|
||||
+extern GlobalProperty pc_rhel_7_0_compat[];
|
||||
+extern const size_t pc_rhel_7_0_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/cpu.c b/target/i386/cpu.c
|
||||
index 1b7880ae3a..790db778ab 100644
|
||||
--- a/target/i386/cpu.c
|
||||
+++ b/target/i386/cpu.c
|
||||
@@ -1829,11 +1829,17 @@ static CPUCaches epyc_cache_info = {
|
||||
|
||||
static X86CPUDefinition builtin_x86_defs[] = {
|
||||
{
|
||||
+ /* qemu64 is the default CPU model for all *-rhel7.* machine-types.
|
||||
+ * The default on RHEL-6 was cpu64-rhel6.
|
||||
+ * libvirt assumes that qemu64 is the default for _all_ machine-types,
|
||||
+ * so we should try to keep qemu64 and cpu64-rhel6 as similar as
|
||||
+ * possible.
|
||||
+ */
|
||||
.name = "qemu64",
|
||||
.level = 0xd,
|
||||
.vendor = CPUID_VENDOR_AMD,
|
||||
.family = 6,
|
||||
- .model = 6,
|
||||
+ .model = 13,
|
||||
.stepping = 3,
|
||||
.features[FEAT_1_EDX] = CPUID_SSE2 | CPUID_SSE | CPUID_FXSR |
|
||||
CPUID_MMX | CPUID_CLFLUSH | CPUID_PSE36 | CPUID_PAT | CPUID_CMOV |
|
||||
@@ -3932,6 +3938,7 @@ static PropValue kvm_default_props[] = {
|
||||
{ "acpi", "off" },
|
||||
{ "monitor", "off" },
|
||||
{ "svm", "off" },
|
||||
+ { "kvm-pv-unhalt", "on" },
|
||||
{ NULL, NULL },
|
||||
};
|
||||
|
||||
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
|
||||
index 1d10046a6c..86d9a1f364 100644
|
||||
--- a/target/i386/kvm.c
|
||||
+++ b/target/i386/kvm.c
|
||||
@@ -3079,6 +3079,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);
|
||||
|
||||
@@ -3388,6 +3389,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_PV_EOI_EN:
|
||||
env->pv_eoi_en_msr = msrs[i].data;
|
||||
--
|
||||
2.21.0
|
||||
|
307
SOURCES/0012-Enable-make-check.patch
Normal file
307
SOURCES/0012-Enable-make-check.patch
Normal file
@ -0,0 +1,307 @@
|
||||
From 154215041df085271a780a2989f4f481226e3e34 Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Fri, 19 Oct 2018 13:48: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 <mrezanin@redhat.com>
|
||||
|
||||
Rebase changes (4.0.0):
|
||||
- Remove testing for pseries-2.7 in endianess test
|
||||
- Disable device-plug-test on s390x as it use disabled device
|
||||
- Do not run cpu-plug-tests on 7.3 and older machine types
|
||||
|
||||
Rebase changes (4.1.0-rc0):
|
||||
- removed iotests 068
|
||||
|
||||
Rebase changes (4.1.0-rc1):
|
||||
- remove all 205 tests (unstable)
|
||||
|
||||
Rebase changes (4.2.0-rc0):
|
||||
- partially disable hd-geo-test (requires lsi53c895a)
|
||||
|
||||
Merged patches (4.0.0):
|
||||
- f7ffd13 Remove 7 qcow2 and luks iotests that are taking > 25 sec to run during the fast train build proce
|
||||
|
||||
Merged patches (4.1.0-rc0):
|
||||
- 41288ff redhat: Remove raw iotest 205
|
||||
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
redhat/qemu-kvm.spec.template | 2 +-
|
||||
tests/Makefile.include | 10 +++++-----
|
||||
tests/boot-serial-test.c | 6 +++++-
|
||||
tests/cpu-plug-test.c | 4 ++--
|
||||
tests/e1000-test.c | 2 ++
|
||||
tests/hd-geo-test.c | 4 ++++
|
||||
tests/prom-env-test.c | 4 ++++
|
||||
tests/qemu-iotests/051 | 12 ++++++------
|
||||
tests/qemu-iotests/group | 4 ++--
|
||||
tests/test-x86-cpuid-compat.c | 2 ++
|
||||
tests/usb-hcd-xhci-test.c | 4 ++++
|
||||
11 files changed, 37 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/tests/Makefile.include b/tests/Makefile.include
|
||||
index b483790cf3..53bdbdfee0 100644
|
||||
--- a/tests/Makefile.include
|
||||
+++ b/tests/Makefile.include
|
||||
@@ -172,7 +172,7 @@ check-qtest-i386-y += tests/ide-test$(EXESUF)
|
||||
check-qtest-i386-y += tests/ahci-test$(EXESUF)
|
||||
check-qtest-i386-y += tests/hd-geo-test$(EXESUF)
|
||||
check-qtest-i386-y += tests/boot-order-test$(EXESUF)
|
||||
-check-qtest-i386-y += tests/bios-tables-test$(EXESUF)
|
||||
+#check-qtest-i386-y += tests/bios-tables-test$(EXESUF)
|
||||
check-qtest-i386-$(CONFIG_SGA) += tests/boot-serial-test$(EXESUF)
|
||||
check-qtest-i386-$(CONFIG_SLIRP) += tests/pxe-test$(EXESUF)
|
||||
check-qtest-i386-y += tests/rtc-test$(EXESUF)
|
||||
@@ -230,7 +230,7 @@ check-qtest-mips64el-$(CONFIG_VGA) += tests/display-vga-test$(EXESUF)
|
||||
check-qtest-moxie-y += tests/boot-serial-test$(EXESUF)
|
||||
|
||||
check-qtest-ppc-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
|
||||
-check-qtest-ppc-y += tests/boot-order-test$(EXESUF)
|
||||
+#check-qtest-ppc-y += tests/boot-order-test$(EXESUF)
|
||||
check-qtest-ppc-y += tests/prom-env-test$(EXESUF)
|
||||
check-qtest-ppc-y += tests/drive_del-test$(EXESUF)
|
||||
check-qtest-ppc-y += tests/boot-serial-test$(EXESUF)
|
||||
@@ -244,8 +244,8 @@ check-qtest-ppc64-$(CONFIG_PSERIES) += tests/rtas-test$(EXESUF)
|
||||
check-qtest-ppc64-$(CONFIG_SLIRP) += tests/pxe-test$(EXESUF)
|
||||
check-qtest-ppc64-$(CONFIG_USB_UHCI) += tests/usb-hcd-uhci-test$(EXESUF)
|
||||
check-qtest-ppc64-$(CONFIG_USB_XHCI_NEC) += tests/usb-hcd-xhci-test$(EXESUF)
|
||||
-check-qtest-ppc64-$(CONFIG_SLIRP) += tests/test-netfilter$(EXESUF)
|
||||
-check-qtest-ppc64-$(CONFIG_POSIX) += tests/test-filter-mirror$(EXESUF)
|
||||
+#check-qtest-ppc64-$(CONFIG_SLIRP) += tests/test-netfilter$(EXESUF)
|
||||
+#check-qtest-ppc64-$(CONFIG_POSIX) += tests/test-filter-mirror$(EXESUF)
|
||||
check-qtest-ppc64-$(CONFIG_RTL8139_PCI) += tests/test-filter-redirector$(EXESUF)
|
||||
check-qtest-ppc64-$(CONFIG_VGA) += tests/display-vga-test$(EXESUF)
|
||||
check-qtest-ppc64-y += tests/numa-test$(EXESUF)
|
||||
@@ -291,7 +291,7 @@ check-qtest-s390x-$(CONFIG_SLIRP) += tests/test-netfilter$(EXESUF)
|
||||
check-qtest-s390x-$(CONFIG_POSIX) += tests/test-filter-mirror$(EXESUF)
|
||||
check-qtest-s390x-$(CONFIG_POSIX) += tests/test-filter-redirector$(EXESUF)
|
||||
check-qtest-s390x-y += tests/drive_del-test$(EXESUF)
|
||||
-check-qtest-s390x-y += tests/device-plug-test$(EXESUF)
|
||||
+#check-qtest-s390x-y += tests/device-plug-test$(EXESUF)
|
||||
check-qtest-s390x-y += tests/virtio-ccw-test$(EXESUF)
|
||||
check-qtest-s390x-y += tests/cpu-plug-test$(EXESUF)
|
||||
check-qtest-s390x-y += tests/migration-test$(EXESUF)
|
||||
diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c
|
||||
index d3a54a0ba5..33ce72b89c 100644
|
||||
--- a/tests/boot-serial-test.c
|
||||
+++ b/tests/boot-serial-test.c
|
||||
@@ -108,19 +108,23 @@ static testdef_t tests[] = {
|
||||
{ "ppc", "g3beige", "", "PowerPC,750" },
|
||||
{ "ppc", "mac99", "", "PowerPC,G4" },
|
||||
{ "ppc", "sam460ex", "-m 256", "DRAM: 256 MiB" },
|
||||
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
||||
{ "ppc64", "ppce500", "", "U-Boot" },
|
||||
{ "ppc64", "40p", "-m 192", "Memory: 192M" },
|
||||
{ "ppc64", "mac99", "", "PowerPC,970FX" },
|
||||
+#endif
|
||||
{ "ppc64", "pseries",
|
||||
"-machine cap-cfpc=broken,cap-sbbc=broken,cap-ibs=broken",
|
||||
"Open Firmware" },
|
||||
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
||||
{ "ppc64", "powernv8", "", "OPAL" },
|
||||
{ "ppc64", "powernv9", "", "OPAL" },
|
||||
{ "ppc64", "sam460ex", "-device e1000", "8086 100e" },
|
||||
+#endif
|
||||
{ "i386", "isapc", "-cpu qemu32 -device sga", "SGABIOS" },
|
||||
{ "i386", "pc", "-device sga", "SGABIOS" },
|
||||
{ "i386", "q35", "-device sga", "SGABIOS" },
|
||||
- { "x86_64", "isapc", "-cpu qemu32 -device sga", "SGABIOS" },
|
||||
+ { "x86_64", "pc", "-cpu qemu32 -device sga", "SGABIOS" },
|
||||
{ "x86_64", "q35", "-device sga", "SGABIOS" },
|
||||
{ "sparc", "LX", "", "TMS390S10" },
|
||||
{ "sparc", "SS-4", "", "MB86904" },
|
||||
diff --git a/tests/cpu-plug-test.c b/tests/cpu-plug-test.c
|
||||
index 30e514bbfb..a04beae1c6 100644
|
||||
--- a/tests/cpu-plug-test.c
|
||||
+++ b/tests/cpu-plug-test.c
|
||||
@@ -185,8 +185,8 @@ static void add_pseries_test_case(const char *mname)
|
||||
char *path;
|
||||
PlugTestData *data;
|
||||
|
||||
- if (!g_str_has_prefix(mname, "pseries-") ||
|
||||
- (g_str_has_prefix(mname, "pseries-2.") && atoi(&mname[10]) < 7)) {
|
||||
+ if (!g_str_has_prefix(mname, "pseries-rhel") ||
|
||||
+ (g_str_has_prefix(mname, "pseries-rhel7.") && atoi(&mname[14]) < 4)) {
|
||||
return;
|
||||
}
|
||||
data = g_new(PlugTestData, 1);
|
||||
diff --git a/tests/e1000-test.c b/tests/e1000-test.c
|
||||
index c387984ef6..c89112d6f8 100644
|
||||
--- a/tests/e1000-test.c
|
||||
+++ b/tests/e1000-test.c
|
||||
@@ -22,9 +22,11 @@ struct QE1000 {
|
||||
|
||||
static const char *models[] = {
|
||||
"e1000",
|
||||
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
||||
"e1000-82540em",
|
||||
"e1000-82544gc",
|
||||
"e1000-82545em",
|
||||
+#endif
|
||||
};
|
||||
|
||||
static void *e1000_get_driver(void *obj, const char *interface)
|
||||
diff --git a/tests/hd-geo-test.c b/tests/hd-geo-test.c
|
||||
index 7e86c5416c..cc068bad87 100644
|
||||
--- a/tests/hd-geo-test.c
|
||||
+++ b/tests/hd-geo-test.c
|
||||
@@ -732,6 +732,7 @@ static void test_override_ide(void)
|
||||
test_override(args, expected);
|
||||
}
|
||||
|
||||
+#if 0 /* Require lsi53c895a - not supported on RHEL */
|
||||
static void test_override_scsi(void)
|
||||
{
|
||||
TestArgs *args = create_args();
|
||||
@@ -776,6 +777,7 @@ static void test_override_scsi_2_controllers(void)
|
||||
add_scsi_disk(args, 3, 1, 0, 1, 2, 0, 1, 0);
|
||||
test_override(args, expected);
|
||||
}
|
||||
+#endif
|
||||
|
||||
static void test_override_virtio_blk(void)
|
||||
{
|
||||
@@ -951,9 +953,11 @@ int main(int argc, char **argv)
|
||||
qtest_add_func("hd-geo/ide/device/user/chst", test_ide_device_user_chst);
|
||||
if (have_qemu_img()) {
|
||||
qtest_add_func("hd-geo/override/ide", test_override_ide);
|
||||
+#if 0 /* Require lsi53c895a - not supported on RHEL */
|
||||
qtest_add_func("hd-geo/override/scsi", test_override_scsi);
|
||||
qtest_add_func("hd-geo/override/scsi_2_controllers",
|
||||
test_override_scsi_2_controllers);
|
||||
+#endif
|
||||
qtest_add_func("hd-geo/override/virtio_blk", test_override_virtio_blk);
|
||||
qtest_add_func("hd-geo/override/zero_chs", test_override_zero_chs);
|
||||
qtest_add_func("hd-geo/override/scsi_hot_unplug",
|
||||
diff --git a/tests/prom-env-test.c b/tests/prom-env-test.c
|
||||
index 61bc1d1e7b..028d45c7d7 100644
|
||||
--- a/tests/prom-env-test.c
|
||||
+++ b/tests/prom-env-test.c
|
||||
@@ -88,10 +88,14 @@ int main(int argc, char *argv[])
|
||||
if (!strcmp(arch, "ppc")) {
|
||||
add_tests(ppc_machines);
|
||||
} else if (!strcmp(arch, "ppc64")) {
|
||||
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
||||
add_tests(ppc_machines);
|
||||
if (g_test_slow()) {
|
||||
+#endif
|
||||
qtest_add_data_func("prom-env/pseries", "pseries", test_machine);
|
||||
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
||||
}
|
||||
+#endif
|
||||
} else if (!strcmp(arch, "sparc")) {
|
||||
add_tests(sparc_machines);
|
||||
} else if (!strcmp(arch, "sparc64")) {
|
||||
diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051
|
||||
index 53bcdbc911..b387e0c233 100755
|
||||
--- a/tests/qemu-iotests/051
|
||||
+++ b/tests/qemu-iotests/051
|
||||
@@ -181,11 +181,11 @@ run_qemu -drive if=virtio
|
||||
case "$QEMU_DEFAULT_MACHINE" in
|
||||
pc)
|
||||
run_qemu -drive if=none,id=disk -device ide-cd,drive=disk
|
||||
- run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk
|
||||
+# run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk
|
||||
run_qemu -drive if=none,id=disk -device ide-drive,drive=disk
|
||||
run_qemu -drive if=none,id=disk -device ide-hd,drive=disk
|
||||
- run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk
|
||||
- run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
|
||||
+# run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk
|
||||
+# run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
@@ -234,11 +234,11 @@ run_qemu -drive file="$TEST_IMG",if=virtio,readonly=on
|
||||
case "$QEMU_DEFAULT_MACHINE" in
|
||||
pc)
|
||||
run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-cd,drive=disk
|
||||
- run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-cd,drive=disk
|
||||
+# run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-cd,drive=disk
|
||||
run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-drive,drive=disk
|
||||
run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-hd,drive=disk
|
||||
- run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-disk,drive=disk
|
||||
- run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-hd,drive=disk
|
||||
+# run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-disk,drive=disk
|
||||
+# run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-hd,drive=disk
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group
|
||||
index 6b10a6a762..06cc734b26 100644
|
||||
--- a/tests/qemu-iotests/group
|
||||
+++ b/tests/qemu-iotests/group
|
||||
@@ -92,7 +92,7 @@
|
||||
068 rw quick
|
||||
069 rw auto quick
|
||||
070 rw quick
|
||||
-071 rw auto quick
|
||||
+# 071 rw auto quick -- requires whitelisted blkverify
|
||||
072 rw auto quick
|
||||
073 rw auto quick
|
||||
074 rw auto quick
|
||||
@@ -120,7 +120,7 @@
|
||||
096 rw quick
|
||||
097 rw auto backing
|
||||
098 rw auto backing quick
|
||||
-099 rw auto quick
|
||||
+# 099 rw auto quick -- requires whitelisted blkverify
|
||||
# 100 was removed, do not reuse
|
||||
101 rw quick
|
||||
102 rw quick
|
||||
diff --git a/tests/test-x86-cpuid-compat.c b/tests/test-x86-cpuid-compat.c
|
||||
index 772287bdb4..e7c075ed98 100644
|
||||
--- a/tests/test-x86-cpuid-compat.c
|
||||
+++ b/tests/test-x86-cpuid-compat.c
|
||||
@@ -300,6 +300,7 @@ int main(int argc, char **argv)
|
||||
"-cpu 486,xlevel2=0xC0000002,+xstore",
|
||||
"xlevel2", 0xC0000002);
|
||||
|
||||
+#if 0 /* Disabled in Red Hat Enterprise Linux */
|
||||
/* Check compatibility of old machine-types that didn't
|
||||
* auto-increase level/xlevel/xlevel2: */
|
||||
|
||||
@@ -350,6 +351,7 @@ int main(int argc, char **argv)
|
||||
add_cpuid_test("x86/cpuid/xlevel-compat/pc-i440fx-2.4/npt-on",
|
||||
"-machine pc-i440fx-2.4 -cpu SandyBridge,+npt",
|
||||
"xlevel", 0x80000008);
|
||||
+#endif
|
||||
|
||||
/* Test feature parsing */
|
||||
add_feature_test("x86/cpuid/features/plus",
|
||||
diff --git a/tests/usb-hcd-xhci-test.c b/tests/usb-hcd-xhci-test.c
|
||||
index 10ef9d2a91..3855873050 100644
|
||||
--- a/tests/usb-hcd-xhci-test.c
|
||||
+++ b/tests/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"
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,36 +0,0 @@
|
||||
From bfee0603a426dd57f60e70d05a86f5e5786bb4b0 Mon Sep 17 00:00:00 2001
|
||||
From: Wei Huang <wei@redhat.com>
|
||||
Date: Thu, 5 Apr 2018 10:01:03 -0500
|
||||
Subject: AArch64: Enable CONFIG_FW_CFG_DMA for aarch64
|
||||
|
||||
Upstream: Downstream only
|
||||
RH-Author: Wei Huang <wei@redhat.com>
|
||||
Message-id: <20180405150103.21732-1-wei@redhat.com>
|
||||
Patchwork-id: 79487
|
||||
O-Subject: [RHEL-8 qemu-kvm-rhev PATCH 1/1] AArch64: Enable CONFIG_FW_CFG_DMA for aarch64
|
||||
Bugzilla: 1564172
|
||||
RH-Acked-by: Andrew Jones <drjones@redhat.com>
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
|
||||
This patch enables the vmcoreinfo device for aarch64. This device is
|
||||
required for the crash utility to support qemu guest dump when KASLR is
|
||||
enabled.
|
||||
|
||||
Signed-off-by: Wei Huang <wei@redhat.com>
|
||||
---
|
||||
default-configs/aarch64-softmmu.mak | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/default-configs/aarch64-softmmu.mak b/default-configs/aarch64-softmmu.mak
|
||||
index 001eb8e..860140e 100644
|
||||
--- a/default-configs/aarch64-softmmu.mak
|
||||
+++ b/default-configs/aarch64-softmmu.mak
|
||||
@@ -27,3 +27,4 @@ CONFIG_IOH3420=y
|
||||
CONFIG_USB_XHCI=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_I2C=y
|
||||
+CONFIG_FW_CFG_DMA=y
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,114 @@
|
||||
From de433da59448eaad4ac1b902d07d57b57f922aff Mon Sep 17 00:00:00 2001
|
||||
From: Bandan Das <bsd@redhat.com>
|
||||
Date: Tue, 3 Dec 2013 20:05:13 +0100
|
||||
Subject: vfio: cap number of devices that can be assigned
|
||||
|
||||
RH-Author: Bandan Das <bsd@redhat.com>
|
||||
Message-id: <1386101113-31560-3-git-send-email-bsd@redhat.com>
|
||||
Patchwork-id: 55984
|
||||
O-Subject: [PATCH RHEL7 qemu-kvm v2 2/2] vfio: cap number of devices that can be assigned
|
||||
Bugzilla: 678368
|
||||
RH-Acked-by: Alex Williamson <alex.williamson@redhat.com>
|
||||
RH-Acked-by: Marcelo Tosatti <mtosatti@redhat.com>
|
||||
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
||||
|
||||
Go through all groups to get count of total number of devices
|
||||
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.
|
||||
|
||||
Signed-off-by: Bandan Das <bsd@redhat.com>
|
||||
|
||||
Rebase notes (2.8.0):
|
||||
- removed return value for vfio_realize (commit 1a22aca)
|
||||
|
||||
Merged patches (2.9.0):
|
||||
- 17eb774 vfio: Use error_setg when reporting max assigned device overshoot
|
||||
|
||||
Merged patches (4.1.0-rc3):
|
||||
- 2b89558 vfio: increase the cap on number of assigned devices to 64
|
||||
|
||||
(cherry picked from commit 9fa3c9fc6dfcde76d80db1aa601b2d577f72ceec)
|
||||
(cherry picked from commit 3cb35556dc7d994f203d732fe952f95fcdb03c0a)
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
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 c8534d3035..309535f306 100644
|
||||
--- a/hw/vfio/pci.c
|
||||
+++ b/hw/vfio/pci.c
|
||||
@@ -47,6 +47,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);
|
||||
|
||||
@@ -2722,9 +2725,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)) {
|
||||
@@ -3167,6 +3191,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 35626cd63e..0cd4803aee 100644
|
||||
--- a/hw/vfio/pci.h
|
||||
+++ b/hw/vfio/pci.h
|
||||
@@ -135,6 +135,7 @@ typedef 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.21.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 9fad36498006352be79a39ca3428079b6b7ddcc9 Mon Sep 17 00:00:00 2001
|
||||
From 2754dd8da8975757753fd491985d5e7b36966106 Mon Sep 17 00:00:00 2001
|
||||
From: Eduardo Habkost <ehabkost@redhat.com>
|
||||
Date: Wed, 4 Dec 2013 18:53:17 +0100
|
||||
Subject: Add support statement to -help output
|
||||
@ -18,15 +18,16 @@ as unsupported by Red Hat, and advising users to use libvirt instead.
|
||||
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
(cherry picked from commit 2a07700936e39856cc9f149c6a6517f0715536a6)
|
||||
(cherry picked from commit 5dd2f4706e2fef945771949e59a8fcc1b5452de9)
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
vl.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/vl.c b/vl.c
|
||||
index 03950fc..8c89bee 100644
|
||||
index 668a34577e..9f3e7e7733 100644
|
||||
--- a/vl.c
|
||||
+++ b/vl.c
|
||||
@@ -1953,9 +1953,17 @@ static void version(void)
|
||||
@@ -1822,9 +1822,17 @@ static void version(void)
|
||||
QEMU_COPYRIGHT "\n");
|
||||
}
|
||||
|
||||
@ -44,7 +45,7 @@ index 03950fc..8c89bee 100644
|
||||
printf("usage: %s [options] [disk_image]\n\n"
|
||||
"'disk_image' is a raw hard disk image for IDE hard disk 0\n\n",
|
||||
error_get_progname());
|
||||
@@ -1972,6 +1980,7 @@ static void help(int exitcode)
|
||||
@@ -1841,6 +1849,7 @@ static void help(int exitcode)
|
||||
"\n"
|
||||
QEMU_HELP_BOTTOM "\n");
|
||||
|
||||
@ -53,5 +54,5 @@ index 03950fc..8c89bee 100644
|
||||
}
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
2.21.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 9324eac6e41aa7667042e117dc3581859cecbf5f Mon Sep 17 00:00:00 2001
|
||||
From c9c3cf721b0e9e359418f64c2a5121c3f8b5d27a Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Jones <drjones@redhat.com>
|
||||
Date: Tue, 21 Jan 2014 10:46:52 +0100
|
||||
Subject: globally limit the maximum number of CPUs
|
||||
@ -74,16 +74,18 @@ The recommended vcpu max limit (KVM_CAP_NR_VCPUS) should be used instead
|
||||
of the actual max vcpu limit (KVM_CAP_MAX_VCPUS) to give an error.
|
||||
|
||||
This commit matches the limit to current KVM_CAP_NR_VCPUS value.
|
||||
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
accel/kvm/kvm-all.c | 12 ++++++++++++
|
||||
vl.c | 19 +++++++++++++++++++
|
||||
2 files changed, 31 insertions(+)
|
||||
vl.c | 18 ++++++++++++++++++
|
||||
2 files changed, 30 insertions(+)
|
||||
|
||||
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
|
||||
index ffee68e..3f1c06e 100644
|
||||
index ca00daa2f5..dc3ed7f04e 100644
|
||||
--- a/accel/kvm/kvm-all.c
|
||||
+++ b/accel/kvm/kvm-all.c
|
||||
@@ -1587,6 +1587,18 @@ static int kvm_init(MachineState *ms)
|
||||
@@ -1943,6 +1943,18 @@ static int kvm_init(MachineState *ms)
|
||||
soft_vcpus_limit = kvm_recommended_vcpus(s);
|
||||
hard_vcpus_limit = kvm_max_vcpus(s);
|
||||
|
||||
@ -103,20 +105,20 @@ index ffee68e..3f1c06e 100644
|
||||
if (nc->num > soft_vcpus_limit) {
|
||||
warn_report("Number of %s cpus requested (%d) exceeds "
|
||||
diff --git a/vl.c b/vl.c
|
||||
index 8c89bee..ce7d04d 100644
|
||||
index 9f3e7e7733..1550aa2aaa 100644
|
||||
--- a/vl.c
|
||||
+++ b/vl.c
|
||||
@@ -135,6 +135,8 @@ int main(int argc, char **argv)
|
||||
@@ -134,6 +134,8 @@ int main(int argc, char **argv)
|
||||
|
||||
#define MAX_VIRTIO_CONSOLES 1
|
||||
#define MAX_SCLP_CONSOLES 1
|
||||
|
||||
+#define RHEL_MAX_CPUS 384
|
||||
+
|
||||
static const char *data_dir[16];
|
||||
static int data_dir_idx;
|
||||
const char *bios_name = NULL;
|
||||
@@ -1520,6 +1522,20 @@ MachineClass *find_default_machine(void)
|
||||
return mc;
|
||||
@@ -1339,6 +1341,20 @@ static MachineClass *find_default_machine(GSList *machines)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+/* Maximum number of CPUs limited for Red Hat Enterprise Linux */
|
||||
@ -133,19 +135,18 @@ index 8c89bee..ce7d04d 100644
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
MachineInfoList *qmp_query_machines(Error **errp)
|
||||
static int machine_help_func(QemuOpts *opts, MachineState *machine)
|
||||
{
|
||||
GSList *el, *machines = object_class_get_list(TYPE_MACHINE, false);
|
||||
@@ -4082,6 +4098,9 @@ int main(int argc, char **argv, char **envp)
|
||||
|
||||
replay_configure(icount_opts);
|
||||
|
||||
ObjectProperty *prop;
|
||||
@@ -3857,6 +3873,8 @@ int main(int argc, char **argv, char **envp)
|
||||
"mutually exclusive");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
+ /* Maximum number of CPUs limited for Red Hat Enterprise Linux */
|
||||
+ limit_max_cpus_in_machines();
|
||||
+
|
||||
machine_class = select_machine();
|
||||
|
||||
set_memory_options(&ram_slots, &maxram_size, machine_class);
|
||||
configure_rtc(qemu_find_opts_singleton("rtc"));
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
2.21.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From e10de328869f0b7b990b74863111c172fb45d7a4 Mon Sep 17 00:00:00 2001
|
||||
From 26128b3ede339e292a3c50a84e3248af46ecd0ec Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Thu, 8 Oct 2015 09:50:17 +0200
|
||||
Subject: Add support for simpletrace
|
||||
@ -7,6 +7,9 @@ As simpletrace is upstream, we just need to properly handle it during rpmbuild.
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
Rebase notes (3.1.0):
|
||||
- Fixed python 2 to python3 switch
|
||||
|
||||
Rebase notes (2.9.0):
|
||||
- Added group argument for tracetool.py (upstream)
|
||||
|
||||
@ -19,24 +22,24 @@ Merged patches (2.3.0):
|
||||
- eda9e5e simpletrace: install simpletrace.py
|
||||
- 85c4c8f trace: add systemtap-initscript README file to RPM
|
||||
|
||||
(cherry picked from commit bfc1d7f3628f2ffbabbae71d57a506cea6663ddf)
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
.gitignore | 2 ++
|
||||
Makefile | 4 +++
|
||||
README.systemtap | 43 +++++++++++++++++++++++++++++++++
|
||||
redhat/qemu-kvm.spec.template | 27 +++++++++++++++++++--
|
||||
README.systemtap | 43 +++++++++++++++++++++++++
|
||||
redhat/qemu-kvm.spec.template | 26 ++++++++++++++-
|
||||
scripts/systemtap/conf.d/qemu_kvm.conf | 4 +++
|
||||
scripts/systemtap/script.d/qemu_kvm.stp | 1 +
|
||||
6 files changed, 79 insertions(+), 2 deletions(-)
|
||||
6 files changed, 79 insertions(+), 1 deletion(-)
|
||||
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/Makefile b/Makefile
|
||||
index 89ba4c5..d0a848e 100644
|
||||
index 086727dbb9..4254950f7f 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -864,6 +864,10 @@ endif
|
||||
@@ -939,6 +939,10 @@ endif
|
||||
$(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \
|
||||
done
|
||||
$(INSTALL_DATA) $(BUILD_DIR)/trace-events-all "$(DESTDIR)$(qemu_datadir)/trace-events-all"
|
||||
@ -44,12 +47,12 @@ index 89ba4c5..d0a848e 100644
|
||||
+ $(INSTALL_DATA) $(SRC_PATH)/scripts/systemtap/script.d/qemu_kvm.stp "$(DESTDIR)$(qemu_datadir)/systemtap/script.d/"
|
||||
+ $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/systemtap/conf.d"
|
||||
+ $(INSTALL_DATA) $(SRC_PATH)/scripts/systemtap/conf.d/qemu_kvm.conf "$(DESTDIR)$(qemu_datadir)/systemtap/conf.d/"
|
||||
for d in $(TARGET_DIRS); do \
|
||||
$(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \
|
||||
done
|
||||
|
||||
.PHONY: ctags
|
||||
ctags:
|
||||
diff --git a/README.systemtap b/README.systemtap
|
||||
new file mode 100644
|
||||
index 0000000..ad913fc
|
||||
index 0000000000..ad913fc990
|
||||
--- /dev/null
|
||||
+++ b/README.systemtap
|
||||
@@ -0,0 +1,43 @@
|
||||
@ -98,7 +101,7 @@ index 0000000..ad913fc
|
||||
+ # /usr/share/qemu-kvm/simpletrace.py --no-header /usr/share/qemu-kvm/trace-events /tmp/trace.log
|
||||
diff --git a/scripts/systemtap/conf.d/qemu_kvm.conf b/scripts/systemtap/conf.d/qemu_kvm.conf
|
||||
new file mode 100644
|
||||
index 0000000..372d816
|
||||
index 0000000000..372d8160a4
|
||||
--- /dev/null
|
||||
+++ b/scripts/systemtap/conf.d/qemu_kvm.conf
|
||||
@@ -0,0 +1,4 @@
|
||||
@ -108,11 +111,11 @@ index 0000000..372d816
|
||||
+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 0000000..c04abf9
|
||||
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 {}
|
||||
--
|
||||
1.8.3.1
|
||||
2.21.0
|
||||
|
@ -1,41 +0,0 @@
|
||||
From 3e38e82fc6601763cb597d8849a61a871ab06b72 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Huth <thuth@redhat.com>
|
||||
Date: Tue, 8 May 2018 12:01:10 +0200
|
||||
Subject: pc-bios/s390-ccw: struct tpi_info must be declared as aligned(4)
|
||||
|
||||
Upstream-status: n/a yet (likely later, but downstream fix is required now)
|
||||
|
||||
I've run into a compilation error today with the current version of GCC:
|
||||
|
||||
In file included from s390-ccw.h:49,
|
||||
from main.c:12:
|
||||
cio.h:128:1: error: alignment 1 of 'struct tpi_info' is less than 4 [-Werror=packed-not-aligned]
|
||||
} __attribute__ ((packed));
|
||||
^
|
||||
cc1: all warnings being treated as errors
|
||||
|
||||
Since the struct tpi_info contains an element ("struct subchannel_id schid")
|
||||
which is marked as aligned(4), we've got to mark the struct tpi_info as
|
||||
aligned(4), too.
|
||||
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
---
|
||||
pc-bios/s390-ccw/cio.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/pc-bios/s390-ccw/cio.h b/pc-bios/s390-ccw/cio.h
|
||||
index 55eaeee..1a0795f 100644
|
||||
--- a/pc-bios/s390-ccw/cio.h
|
||||
+++ b/pc-bios/s390-ccw/cio.h
|
||||
@@ -125,7 +125,7 @@ struct tpi_info {
|
||||
__u32 reserved3 : 12;
|
||||
__u32 int_type : 3;
|
||||
__u32 reserved4 : 12;
|
||||
-} __attribute__ ((packed));
|
||||
+} __attribute__ ((packed, aligned(4)));
|
||||
|
||||
/* channel command word (type 1) */
|
||||
struct ccw1 {
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,118 @@
|
||||
From 97ed62562b883c384346bfef3e1c7e379f03ccab Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Fri, 30 Nov 2018 09:11:03 +0100
|
||||
Subject: Use qemu-kvm in documentation instead of qemu-system-<arch>
|
||||
|
||||
Patchwork-id: 62380
|
||||
O-Subject: [RHEV-7.1 qemu-kvm-rhev PATCHv4] Use qemu-kvm in documentation instead of qemu-system-i386
|
||||
Bugzilla: 1140620
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
|
||||
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
We change the name and location of qemu-kvm binaries. Update documentation
|
||||
to reflect this change. Only architectures available in RHEL are updated.
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
docs/qemu-block-drivers.texi | 2 +-
|
||||
docs/qemu-cpu-models.texi | 2 +-
|
||||
qemu-doc.texi | 6 +++---
|
||||
qemu-options.hx | 16 ++++++++--------
|
||||
4 files changed, 13 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/docs/qemu-block-drivers.texi b/docs/qemu-block-drivers.texi
|
||||
index 2c7ea49c32..5d0afb3dee 100644
|
||||
--- a/docs/qemu-block-drivers.texi
|
||||
+++ b/docs/qemu-block-drivers.texi
|
||||
@@ -2,7 +2,7 @@
|
||||
QEMU block driver reference manual
|
||||
@c man end
|
||||
|
||||
-@set qemu_system qemu-system-x86_64
|
||||
+@set qemu_system qemu-kvm
|
||||
|
||||
@c man begin DESCRIPTION
|
||||
|
||||
diff --git a/docs/qemu-cpu-models.texi b/docs/qemu-cpu-models.texi
|
||||
index f88a1def0d..c82cf8fab7 100644
|
||||
--- a/docs/qemu-cpu-models.texi
|
||||
+++ b/docs/qemu-cpu-models.texi
|
||||
@@ -2,7 +2,7 @@
|
||||
QEMU / KVM CPU model configuration
|
||||
@c man end
|
||||
|
||||
-@set qemu_system_x86 qemu-system-x86_64
|
||||
+@set qemu_system_x86 qemu-kvm
|
||||
|
||||
@c man begin DESCRIPTION
|
||||
|
||||
diff --git a/qemu-doc.texi b/qemu-doc.texi
|
||||
index 3ddf5c0a68..d460f8d2c0 100644
|
||||
--- a/qemu-doc.texi
|
||||
+++ b/qemu-doc.texi
|
||||
@@ -11,8 +11,8 @@
|
||||
@paragraphindent 0
|
||||
@c %**end of header
|
||||
|
||||
-@set qemu_system qemu-system-x86_64
|
||||
-@set qemu_system_x86 qemu-system-x86_64
|
||||
+@set qemu_system qemu-kvm
|
||||
+@set qemu_system_x86 qemu-kvm
|
||||
|
||||
@ifinfo
|
||||
@direntry
|
||||
@@ -1827,7 +1827,7 @@ Set the initial VGA graphic mode. The default is 800x600x32.
|
||||
Set OpenBIOS variables in NVRAM, for example:
|
||||
|
||||
@example
|
||||
-qemu-system-ppc -prom-env 'auto-boot?=false' \
|
||||
+qemu-kvm -prom-env 'auto-boot?=false' \
|
||||
-prom-env 'boot-device=hd:2,\yaboot' \
|
||||
-prom-env 'boot-args=conf=hd:2,\yaboot.conf'
|
||||
@end example
|
||||
diff --git a/qemu-options.hx b/qemu-options.hx
|
||||
index fc17aca631..df1d27b6f2 100644
|
||||
--- a/qemu-options.hx
|
||||
+++ b/qemu-options.hx
|
||||
@@ -2737,11 +2737,11 @@ be created for multiqueue vhost-user.
|
||||
|
||||
Example:
|
||||
@example
|
||||
-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
|
||||
@end example
|
||||
|
||||
@item -netdev hubport,id=@var{id},hubid=@var{hubid}[,netdev=@var{nd}]
|
||||
@@ -3631,14 +3631,14 @@ ETEXI
|
||||
|
||||
DEF("realtime", HAS_ARG, QEMU_OPTION_realtime,
|
||||
"-realtime [mlock=on|off]\n"
|
||||
- " run qemu with realtime features\n"
|
||||
+ " run qemu-kvm with realtime features\n"
|
||||
" mlock=on|off controls mlock support (default: on)\n",
|
||||
QEMU_ARCH_ALL)
|
||||
STEXI
|
||||
@item -realtime mlock=on|off
|
||||
@findex -realtime
|
||||
-Run qemu with realtime features.
|
||||
-mlocking qemu and guest memory can be enabled via @option{mlock=on}
|
||||
+Run qemu-kvm with realtime features.
|
||||
+mlocking qemu-kvm and guest memory can be enabled via @option{mlock=on}
|
||||
(enabled by default).
|
||||
ETEXI
|
||||
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From b4b549d6ab0d43ca16d492aa1b6ac75a0f880942 Mon Sep 17 00:00:00 2001
|
||||
From b13a7d3527c5c91e7a50236de30a2244b8453911 Mon Sep 17 00:00:00 2001
|
||||
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
|
||||
Date: Fri, 5 May 2017 19:06:14 +0200
|
||||
Subject: usb-xhci: Fix PCI capability order
|
||||
@ -56,15 +56,16 @@ Conflicts:
|
||||
|
||||
(cherry picked from commit a42f86dc906cc7d2c16d02bf125ed76847b469cb)
|
||||
(cherry picked from commit 992ab2e4f6e15d3e51bc716763aa8d6f45c6d29d)
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
hw/usb/hcd-xhci.c | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
|
||||
index 883141f..181e803 100644
|
||||
index 8fed2eedd6..d2b9744030 100644
|
||||
--- a/hw/usb/hcd-xhci.c
|
||||
+++ b/hw/usb/hcd-xhci.c
|
||||
@@ -3368,6 +3368,12 @@ static void usb_xhci_realize(struct PCIDevice *dev, Error **errp)
|
||||
@@ -3403,6 +3403,12 @@ static void usb_xhci_realize(struct PCIDevice *dev, Error **errp)
|
||||
xhci->max_pstreams_mask = 0;
|
||||
}
|
||||
|
||||
@ -77,7 +78,7 @@ index 883141f..181e803 100644
|
||||
if (xhci->msi != ON_OFF_AUTO_OFF) {
|
||||
ret = msi_init(dev, 0x70, xhci->numintrs, true, false, &err);
|
||||
/* Any error other than -ENOTSUP(board's MSI support is broken)
|
||||
@@ -3416,12 +3422,6 @@ static void usb_xhci_realize(struct PCIDevice *dev, Error **errp)
|
||||
@@ -3451,12 +3457,6 @@ static void usb_xhci_realize(struct PCIDevice *dev, Error **errp)
|
||||
PCI_BASE_ADDRESS_SPACE_MEMORY|PCI_BASE_ADDRESS_MEM_TYPE_64,
|
||||
&xhci->mem);
|
||||
|
||||
@ -91,5 +92,5 @@ index 883141f..181e803 100644
|
||||
/* TODO check for errors, and should fail when msix=on */
|
||||
msix_init(dev, xhci->numintrs,
|
||||
--
|
||||
1.8.3.1
|
||||
2.21.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 4ae8dc3b7a9a1c24380d68d8babd20f66dc0e368 Mon Sep 17 00:00:00 2001
|
||||
From 3fab8f5e8a9e190c1ed6916ac13c7c4d65e874b7 Mon Sep 17 00:00:00 2001
|
||||
From: Fam Zheng <famz@redhat.com>
|
||||
Date: Wed, 14 Jun 2017 15:37:01 +0200
|
||||
Subject: virtio-scsi: Reject scsi-cd if data plane enabled [RHEL only]
|
||||
@ -45,12 +45,12 @@ Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
|
||||
index 3aa9971..9f754c4 100644
|
||||
index e8b2b64d09..54108c0056 100644
|
||||
--- a/hw/scsi/virtio-scsi.c
|
||||
+++ b/hw/scsi/virtio-scsi.c
|
||||
@@ -790,6 +790,15 @@ static void virtio_scsi_hotplug(HotplugHandler *hotplug_dev, DeviceState *dev,
|
||||
VirtIOSCSI *s = VIRTIO_SCSI(vdev);
|
||||
@@ -808,6 +808,15 @@ static void virtio_scsi_hotplug(HotplugHandler *hotplug_dev, DeviceState *dev,
|
||||
SCSIDevice *sd = SCSI_DEVICE(dev);
|
||||
int ret;
|
||||
|
||||
+ /* XXX: Remove this check once block backend is capable of handling
|
||||
+ * AioContext change upon eject/insert.
|
||||
@ -65,5 +65,5 @@ index 3aa9971..9f754c4 100644
|
||||
if (blk_op_is_blocked(sd->conf.blk, BLOCK_OP_TYPE_DATAPLANE, errp)) {
|
||||
return;
|
||||
--
|
||||
1.8.3.1
|
||||
2.21.0
|
||||
|
@ -0,0 +1,60 @@
|
||||
From 148e9e80a3a430615b552075082fad22d007d851 Mon Sep 17 00:00:00 2001
|
||||
From: David Gibson <dgibson@redhat.com>
|
||||
Date: Wed, 6 Feb 2019 03:58:56 +0000
|
||||
Subject: BZ1653590: Require at least 64kiB pages for downstream guests & hosts
|
||||
|
||||
RH-Author: David Gibson <dgibson@redhat.com>
|
||||
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 <lvivier@redhat.com>
|
||||
RH-Acked-by: Serhii Popovych <spopovyc@redhat.com>
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
|
||||
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 <dgibson@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
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 481dfd2a27..805f38533e 100644
|
||||
--- a/hw/ppc/spapr_caps.c
|
||||
+++ b/hw/ppc/spapr_caps.c
|
||||
@@ -351,12 +351,19 @@ void 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.21.0
|
||||
|
@ -1,126 +0,0 @@
|
||||
From 411b30bec63d20ebcbc90d933a3ff73851d60f5a Mon Sep 17 00:00:00 2001
|
||||
From: Eduardo Habkost <ehabkost@redhat.com>
|
||||
Date: Sun, 22 Apr 2018 02:44:30 +0100
|
||||
Subject: pc: pc-*-rhel75.5.0 compat code
|
||||
|
||||
RH-Author: Eduardo Habkost <ehabkost@redhat.com>
|
||||
Message-id: <20180422024430.10218-1-ehabkost@redhat.com>
|
||||
Patchwork-id: 79845
|
||||
O-Subject: [RHEL-8.0 qemu-kvm PATCH] pc: pc-*-rhel75.5.0 compat code
|
||||
Bugzilla: 1569675
|
||||
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
||||
RH-Acked-by: Danilo de Paula <ddepaula@redhat.com>
|
||||
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
||||
RH-Acked-by: Peter Xu <peterx@redhat.com>
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1569675
|
||||
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=15862256
|
||||
|
||||
Based on the pc-*-2.11 and pc-*-2.10 compat code from upstream.
|
||||
|
||||
Not tested yet, but still better than having it completely broken
|
||||
on RHEL-8.0 Alpha. I plan to test it next week.
|
||||
|
||||
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
hw/i386/pc_piix.c | 2 ++
|
||||
hw/i386/pc_q35.c | 4 ++++
|
||||
include/hw/compat.h | 28 ++++++++++++++++++++++++++++
|
||||
include/hw/i386/pc.h | 13 +++++++++++++
|
||||
4 files changed, 47 insertions(+)
|
||||
|
||||
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
|
||||
index cc72512..e5add39 100644
|
||||
--- a/hw/i386/pc_piix.c
|
||||
+++ b/hw/i386/pc_piix.c
|
||||
@@ -1166,6 +1166,8 @@ static void pc_machine_rhel750_options(MachineClass *m)
|
||||
{
|
||||
pc_machine_rhel7_options(m);
|
||||
m->desc = "RHEL 7.5.0 PC (i440FX + PIIX, 1996)";
|
||||
+ m->auto_enable_numa_with_memhp = false;
|
||||
+ SET_MACHINE_COMPAT(m, PC_RHEL7_5_COMPAT);
|
||||
}
|
||||
|
||||
DEFINE_PC_MACHINE(rhel750, "pc-i440fx-rhel7.5.0", pc_init_rhel750,
|
||||
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
|
||||
index dbf6bfa..ffc461d 100644
|
||||
--- a/hw/i386/pc_q35.c
|
||||
+++ b/hw/i386/pc_q35.c
|
||||
@@ -431,8 +431,12 @@ static void pc_q35_init_rhel750(MachineState *machine)
|
||||
|
||||
static void pc_q35_machine_rhel750_options(MachineClass *m)
|
||||
{
|
||||
+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
|
||||
pc_q35_machine_rhel7_options(m);
|
||||
m->desc = "RHEL-7.5.0 PC (Q35 + ICH9, 2009)";
|
||||
+ m->auto_enable_numa_with_memhp = false;
|
||||
+ pcmc->default_nic_model = "e1000";
|
||||
+ SET_MACHINE_COMPAT(m, PC_RHEL7_5_COMPAT);
|
||||
}
|
||||
|
||||
DEFINE_PC_MACHINE(q35_rhel750, "pc-q35-rhel7.5.0", pc_q35_init_rhel750,
|
||||
diff --git a/include/hw/compat.h b/include/hw/compat.h
|
||||
index de251fd..f7b39c5 100644
|
||||
--- a/include/hw/compat.h
|
||||
+++ b/include/hw/compat.h
|
||||
@@ -446,4 +446,32 @@
|
||||
.value = "off",\
|
||||
},
|
||||
|
||||
+/* The same as HW_COMPAT_2_11 + HW_COMPAT_2_10 */
|
||||
+#define HW_COMPAT_RHEL7_5 \
|
||||
+ { /* HW_COMPAT_RHEL7_5 from HW_COMPAT_2_11 */ \
|
||||
+ .driver = "hpet",\
|
||||
+ .property = "hpet-offset-saved",\
|
||||
+ .value = "false",\
|
||||
+ },{ /* HW_COMPAT_RHEL7_5 from HW_COMPAT_2_11 */ \
|
||||
+ .driver = "virtio-blk-pci",\
|
||||
+ .property = "vectors",\
|
||||
+ .value = "2",\
|
||||
+ },{ /* HW_COMPAT_RHEL7_5 from HW_COMPAT_2_11 */ \
|
||||
+ .driver = "vhost-user-blk-pci",\
|
||||
+ .property = "vectors",\
|
||||
+ .value = "2",\
|
||||
+ },{ /* HW_COMPAT_RHEL7_5 from HW_COMPAT_2_11 */ \
|
||||
+ .driver = "e1000",\
|
||||
+ .property = "migrate_tso_props",\
|
||||
+ .value = "off",\
|
||||
+ },{ /* HW_COMPAT_RHEL7_5 from HW_COMPAT_2_10 */ \
|
||||
+ .driver = "virtio-mouse-device",\
|
||||
+ .property = "wheel-axis",\
|
||||
+ .value = "false",\
|
||||
+ },{ /* HW_COMPAT_RHEL7_5 from HW_COMPAT_2_10 */ \
|
||||
+ .driver = "virtio-tablet-device",\
|
||||
+ .property = "wheel-axis",\
|
||||
+ .value = "false",\
|
||||
+ },
|
||||
+
|
||||
#endif /* HW_COMPAT_H */
|
||||
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
|
||||
index faddeba..e94424f 100644
|
||||
--- a/include/hw/i386/pc.h
|
||||
+++ b/include/hw/i386/pc.h
|
||||
@@ -969,6 +969,19 @@ extern void igd_passthrough_isa_bridge_create(PCIBus *bus, uint16_t gpu_dev_id);
|
||||
.value = "on",\
|
||||
},
|
||||
|
||||
+/* Similar to PC_COMPAT_2_11 + PC_COMPAT_2_10, but:
|
||||
+ * - x-hv-max-vps was backported to 7.5
|
||||
+ * - x-pci-hole64-fix was backported to 7.5
|
||||
+ */
|
||||
+#define PC_RHEL7_5_COMPAT \
|
||||
+ HW_COMPAT_RHEL7_5 \
|
||||
+ { /* PC_RHEL7_5_COMPAT from PC_COMPAT_2_11 */ \
|
||||
+ .driver = "Skylake-Server" "-" TYPE_X86_CPU,\
|
||||
+ .property = "clflushopt",\
|
||||
+ .value = "off",\
|
||||
+ },
|
||||
+
|
||||
+
|
||||
#define PC_RHEL7_4_COMPAT \
|
||||
HW_COMPAT_RHEL7_4 \
|
||||
{ /* PC_RHEL7_4_COMPAT from PC_COMPAT_2_9 */ \
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,61 @@
|
||||
From ab9ebc29bb9bb142e73a160750a451d40bfe9746 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@redhat.com>
|
||||
Date: Mon, 16 Sep 2019 17:07:00 +0100
|
||||
Subject: Using ip_deq after m_free might read pointers from an allocation
|
||||
reuse.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
Message-id: <20190916170700.647-2-philmd@redhat.com>
|
||||
Patchwork-id: 90470
|
||||
O-Subject: [RHEL-AV-8.1.0 qemu-kvm PATCH 1/1] Using ip_deq after m_free might read pointers from an allocation reuse.
|
||||
Bugzilla: 1749737
|
||||
RH-Acked-by: Danilo de Paula <ddepaula@redhat.com>
|
||||
RH-Acked-by: John Snow <jsnow@redhat.com>
|
||||
|
||||
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||
|
||||
This would be difficult to exploit, but that is still related with
|
||||
CVE-2019-14378 which generates fragmented IP packets that would trigger this
|
||||
issue and at least produce a DoS.
|
||||
|
||||
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||
(cherry picked from libslirp commit c59279437eda91841b9d26079c70b8a540d41204)
|
||||
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
slirp/src/ip_input.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/slirp/src/ip_input.c b/slirp/src/ip_input.c
|
||||
index 8c75d91495..df1c846ade 100644
|
||||
--- a/slirp/src/ip_input.c
|
||||
+++ b/slirp/src/ip_input.c
|
||||
@@ -292,6 +292,7 @@ static struct ip *ip_reass(Slirp *slirp, struct ip *ip, struct ipq *fp)
|
||||
*/
|
||||
while (q != (struct ipasfrag *)&fp->frag_link &&
|
||||
ip->ip_off + ip->ip_len > q->ipf_off) {
|
||||
+ struct ipasfrag *prev;
|
||||
i = (ip->ip_off + ip->ip_len) - q->ipf_off;
|
||||
if (i < q->ipf_len) {
|
||||
q->ipf_len -= i;
|
||||
@@ -299,9 +300,11 @@ static struct ip *ip_reass(Slirp *slirp, struct ip *ip, struct ipq *fp)
|
||||
m_adj(dtom(slirp, q), i);
|
||||
break;
|
||||
}
|
||||
+ prev = q;
|
||||
q = q->ipf_next;
|
||||
- m_free(dtom(slirp, q->ipf_prev));
|
||||
- ip_deq(q->ipf_prev);
|
||||
+ ip_deq(prev);
|
||||
+ m_free(dtom(slirp, prev));
|
||||
+
|
||||
}
|
||||
|
||||
insert:
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,106 +0,0 @@
|
||||
From 3319e2fd5b151695f30f8574bbd9250f86a96e16 Mon Sep 17 00:00:00 2001
|
||||
From: Laurent Vivier <lvivier@redhat.com>
|
||||
Date: Thu, 3 May 2018 14:59:08 +0100
|
||||
Subject: tcg: workaround branch instruction overflow in tcg_out_qemu_ld/st
|
||||
|
||||
RH-Author: Laurent Vivier <lvivier@redhat.com>
|
||||
Message-id: <20180503145908.8110-1-lvivier@redhat.com>
|
||||
Patchwork-id: 80019
|
||||
O-Subject: [qemu-kvm RHEL8/virt212 PATCH] tcg: workaround branch instruction overflow in tcg_out_qemu_ld/st
|
||||
Bugzilla: 1571145
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: Serhii Popovych <spopovyc@redhat.com>
|
||||
RH-Acked-by: David Gibson <dgibson@redhat.com>
|
||||
|
||||
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1571145
|
||||
BRANCH:rhel8/master-2.12.0
|
||||
UPSTREAM: https://github.com/qemu/qemu/commit/6001f7729e12dd1d810291e4cbf83cee8e07441d
|
||||
BREW: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=15973114
|
||||
|
||||
ppc64 uses a BC instruction to call the tcg_out_qemu_ld/st
|
||||
slow path. BC instruction uses a relative address encoded
|
||||
on 14 bits.
|
||||
|
||||
The slow path functions are added at the end of the generated
|
||||
instructions buffer, in the reverse order of the callers.
|
||||
So more we have slow path functions more the distance between
|
||||
the caller (BC) and the function increases.
|
||||
|
||||
This patch changes the behavior to generate the functions in
|
||||
the same order of the callers.
|
||||
|
||||
Cc: qemu-stable@nongnu.org
|
||||
Fixes: 15fa08f845 ("tcg: Dynamically allocate TCGOps")
|
||||
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
|
||||
Message-Id: <20180429235840.16659-1-lvivier@redhat.com>
|
||||
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
|
||||
(cherry picked from commit 6001f7729e12dd1d810291e4cbf83cee8e07441d)
|
||||
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
tcg/tcg-ldst.inc.c | 8 ++++----
|
||||
tcg/tcg.c | 2 +-
|
||||
tcg/tcg.h | 2 +-
|
||||
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/tcg/tcg-ldst.inc.c b/tcg/tcg-ldst.inc.c
|
||||
index 0e14cf4..47f41b9 100644
|
||||
--- a/tcg/tcg-ldst.inc.c
|
||||
+++ b/tcg/tcg-ldst.inc.c
|
||||
@@ -30,7 +30,7 @@ typedef struct TCGLabelQemuLdst {
|
||||
TCGReg datahi_reg; /* reg index for high word to be loaded or stored */
|
||||
tcg_insn_unit *raddr; /* gen code addr of the next IR of qemu_ld/st IR */
|
||||
tcg_insn_unit *label_ptr[2]; /* label pointers to be updated */
|
||||
- struct TCGLabelQemuLdst *next;
|
||||
+ QSIMPLEQ_ENTRY(TCGLabelQemuLdst) next;
|
||||
} TCGLabelQemuLdst;
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ static bool tcg_out_ldst_finalize(TCGContext *s)
|
||||
TCGLabelQemuLdst *lb;
|
||||
|
||||
/* qemu_ld/st slow paths */
|
||||
- for (lb = s->ldst_labels; lb != NULL; lb = lb->next) {
|
||||
+ QSIMPLEQ_FOREACH(lb, &s->ldst_labels, next) {
|
||||
if (lb->is_ld) {
|
||||
tcg_out_qemu_ld_slow_path(s, lb);
|
||||
} else {
|
||||
@@ -72,7 +72,7 @@ static inline TCGLabelQemuLdst *new_ldst_label(TCGContext *s)
|
||||
{
|
||||
TCGLabelQemuLdst *l = tcg_malloc(sizeof(*l));
|
||||
|
||||
- l->next = s->ldst_labels;
|
||||
- s->ldst_labels = l;
|
||||
+ QSIMPLEQ_INSERT_TAIL(&s->ldst_labels, l, next);
|
||||
+
|
||||
return l;
|
||||
}
|
||||
diff --git a/tcg/tcg.c b/tcg/tcg.c
|
||||
index bb24526..b84850b 100644
|
||||
--- a/tcg/tcg.c
|
||||
+++ b/tcg/tcg.c
|
||||
@@ -3324,7 +3324,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb)
|
||||
s->code_ptr = tb->tc.ptr;
|
||||
|
||||
#ifdef TCG_TARGET_NEED_LDST_LABELS
|
||||
- s->ldst_labels = NULL;
|
||||
+ QSIMPLEQ_INIT(&s->ldst_labels);
|
||||
#endif
|
||||
#ifdef TCG_TARGET_NEED_POOL_LABELS
|
||||
s->pool_labels = NULL;
|
||||
diff --git a/tcg/tcg.h b/tcg/tcg.h
|
||||
index 30896ca..a3076c5 100644
|
||||
--- a/tcg/tcg.h
|
||||
+++ b/tcg/tcg.h
|
||||
@@ -699,7 +699,7 @@ struct TCGContext {
|
||||
|
||||
/* These structures are private to tcg-target.inc.c. */
|
||||
#ifdef TCG_TARGET_NEED_LDST_LABELS
|
||||
- struct TCGLabelQemuLdst *ldst_labels;
|
||||
+ QSIMPLEQ_HEAD(ldst_labels, TCGLabelQemuLdst) ldst_labels;
|
||||
#endif
|
||||
#ifdef TCG_TARGET_NEED_POOL_LABELS
|
||||
struct TCGLabelPoolData *pool_labels;
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,41 +0,0 @@
|
||||
From 2b09944ad35c48e37801d5abe9069283f8835fb2 Mon Sep 17 00:00:00 2001
|
||||
From: Cornelia Huck <cohuck@redhat.com>
|
||||
Date: Tue, 8 May 2018 09:01:11 +0000
|
||||
Subject: s390-ccw: force diag 308 subcode to unsigned long
|
||||
|
||||
We currently pass an integer as the subcode parameter. However,
|
||||
the upper bits of the register containing the subcode need to
|
||||
be 0, which is not guaranteed unless we explicitly specify the
|
||||
subcode to be an unsigned long value.
|
||||
|
||||
Fixes: d046c51dad3 ("pc-bios/s390-ccw: Get device address via diag 308/6")
|
||||
Cc: qemu-stable@nongnu.org
|
||||
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
|
||||
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
|
||||
Tested-by: Thomas Huth <thuth@redhat.com>
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
(cherry picked from commit 63d8b5ace31c1e1f3996fe4cd551d6d377594d5a)
|
||||
---
|
||||
pc-bios/s390-ccw/iplb.h | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/pc-bios/s390-ccw/iplb.h b/pc-bios/s390-ccw/iplb.h
|
||||
index 5357a36..ded20c8 100644
|
||||
--- a/pc-bios/s390-ccw/iplb.h
|
||||
+++ b/pc-bios/s390-ccw/iplb.h
|
||||
@@ -101,10 +101,11 @@ static inline bool manage_iplb(IplParameterBlock *iplb, bool store)
|
||||
{
|
||||
register unsigned long addr asm("0") = (unsigned long) iplb;
|
||||
register unsigned long rc asm("1") = 0;
|
||||
+ unsigned long subcode = store ? 6 : 5;
|
||||
|
||||
asm volatile ("diag %0,%2,0x308\n"
|
||||
: "+d" (addr), "+d" (rc)
|
||||
- : "d" (store ? 6 : 5)
|
||||
+ : "d" (subcode)
|
||||
: "memory", "cc");
|
||||
return rc == 0x01;
|
||||
}
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,50 +0,0 @@
|
||||
From 0384fba1d0550f0bb2a6cfeb24b13d8c8186524d Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Huth <thuth@redhat.com>
|
||||
Date: Tue, 8 May 2018 09:01:12 +0000
|
||||
Subject: pc-bios/s390-ccw: size_t should be unsigned
|
||||
|
||||
"size_t" should be an unsigned type according to the C standard.
|
||||
Thus we should also use this convention in the s390-ccw firmware to avoid
|
||||
confusion. I checked the sources, and apart from one spot in libc.c, the
|
||||
code should all be fine with this change.
|
||||
|
||||
Buglink: https://bugs.launchpad.net/qemu/+bug/1753437
|
||||
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
|
||||
Reviewed-by: Halil Pasic <pasic@linux.vnet.ibm.com>
|
||||
Reviewed-by: Collin Walling <walling@linux.ibm.com>
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
(cherry picked from commit e4f869621203955761cf274c87d5595e9facd319)
|
||||
---
|
||||
pc-bios/s390-ccw/libc.c | 2 +-
|
||||
pc-bios/s390-ccw/libc.h | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/pc-bios/s390-ccw/libc.c b/pc-bios/s390-ccw/libc.c
|
||||
index 38ea77d..a786566 100644
|
||||
--- a/pc-bios/s390-ccw/libc.c
|
||||
+++ b/pc-bios/s390-ccw/libc.c
|
||||
@@ -63,7 +63,7 @@ uint64_t atoui(const char *str)
|
||||
*/
|
||||
char *uitoa(uint64_t num, char *str, size_t len)
|
||||
{
|
||||
- size_t num_idx = 1; /* account for NUL */
|
||||
+ long num_idx = 1; /* account for NUL */
|
||||
uint64_t tmp = num;
|
||||
|
||||
IPL_assert(str != NULL, "uitoa: no space allocated to store string");
|
||||
diff --git a/pc-bios/s390-ccw/libc.h b/pc-bios/s390-ccw/libc.h
|
||||
index 63ece70..818517f 100644
|
||||
--- a/pc-bios/s390-ccw/libc.h
|
||||
+++ b/pc-bios/s390-ccw/libc.h
|
||||
@@ -12,7 +12,7 @@
|
||||
#ifndef S390_CCW_LIBC_H
|
||||
#define S390_CCW_LIBC_H
|
||||
|
||||
-typedef long size_t;
|
||||
+typedef unsigned long size_t;
|
||||
typedef int bool;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,82 +0,0 @@
|
||||
From f21a07e653b25bf6d99c28f709a88ed1dfe6170f Mon Sep 17 00:00:00 2001
|
||||
From: Collin Walling <walling@linux.ibm.com>
|
||||
Date: Tue, 8 May 2018 09:01:13 +0000
|
||||
Subject: pc-bios/s390-ccw: rename MAX_TABLE_ENTRIES to MAX_BOOT_ENTRIES
|
||||
|
||||
The MAX_TABLE_ENTRIES constant has a name that is too generic. As we
|
||||
want to declare a limit for boot menu entries, let's rename it to a more
|
||||
fitting MAX_BOOT_ENTRIES and set its value to 31 (30 boot entries and
|
||||
1 default entry). Also we move it from bootmap.h to s390-ccw.h to make
|
||||
it available for menu.c in a later patch.
|
||||
|
||||
Signed-off-by: Collin Walling <walling@linux.ibm.com>
|
||||
Reviewed-by: Thomas Huth <thuth@redhat.com>
|
||||
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
(cherry picked from commit 6df2a829dfacfbf10a78199ad4b023a7ea65d9cd)
|
||||
---
|
||||
pc-bios/s390-ccw/bootmap.c | 6 +++---
|
||||
pc-bios/s390-ccw/bootmap.h | 2 --
|
||||
pc-bios/s390-ccw/s390-ccw.h | 2 ++
|
||||
3 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/pc-bios/s390-ccw/bootmap.c b/pc-bios/s390-ccw/bootmap.c
|
||||
index 9287b7a..b767fa2 100644
|
||||
--- a/pc-bios/s390-ccw/bootmap.c
|
||||
+++ b/pc-bios/s390-ccw/bootmap.c
|
||||
@@ -297,7 +297,7 @@ static void run_eckd_boot_script(block_number_t bmt_block_nr,
|
||||
}
|
||||
|
||||
debug_print_int("loadparm", loadparm);
|
||||
- IPL_assert(loadparm <= MAX_TABLE_ENTRIES, "loadparm value greater than"
|
||||
+ IPL_assert(loadparm < MAX_BOOT_ENTRIES, "loadparm value greater than"
|
||||
" maximum number of boot entries allowed");
|
||||
|
||||
memset(sec, FREE_SPACE_FILLER, sizeof(sec));
|
||||
@@ -585,7 +585,7 @@ static void ipl_scsi(void)
|
||||
read_block(mbr->pt.blockno, sec, "Error reading Program Table");
|
||||
IPL_assert(magic_match(sec, ZIPL_MAGIC), "No zIPL magic in PT");
|
||||
|
||||
- while (program_table_entries <= MAX_TABLE_ENTRIES) {
|
||||
+ while (program_table_entries < MAX_BOOT_ENTRIES) {
|
||||
if (!prog_table->entry[program_table_entries].scsi.blockno) {
|
||||
break;
|
||||
}
|
||||
@@ -600,7 +600,7 @@ static void ipl_scsi(void)
|
||||
}
|
||||
|
||||
debug_print_int("loadparm", loadparm);
|
||||
- IPL_assert(loadparm <= MAX_TABLE_ENTRIES, "loadparm value greater than"
|
||||
+ IPL_assert(loadparm < MAX_BOOT_ENTRIES, "loadparm value greater than"
|
||||
" maximum number of boot entries allowed");
|
||||
|
||||
zipl_run(&prog_table->entry[loadparm].scsi); /* no return */
|
||||
diff --git a/pc-bios/s390-ccw/bootmap.h b/pc-bios/s390-ccw/bootmap.h
|
||||
index 07eb600..732c111 100644
|
||||
--- a/pc-bios/s390-ccw/bootmap.h
|
||||
+++ b/pc-bios/s390-ccw/bootmap.h
|
||||
@@ -57,8 +57,6 @@ typedef union BootMapPointer {
|
||||
ExtEckdBlockPtr xeckd;
|
||||
} __attribute__ ((packed)) BootMapPointer;
|
||||
|
||||
-#define MAX_TABLE_ENTRIES 30
|
||||
-
|
||||
/* aka Program Table */
|
||||
typedef struct BootMapTable {
|
||||
uint8_t magic[4];
|
||||
diff --git a/pc-bios/s390-ccw/s390-ccw.h b/pc-bios/s390-ccw/s390-ccw.h
|
||||
index fd18da2..2c9e601 100644
|
||||
--- a/pc-bios/s390-ccw/s390-ccw.h
|
||||
+++ b/pc-bios/s390-ccw/s390-ccw.h
|
||||
@@ -94,6 +94,8 @@ bool menu_is_enabled_zipl(void);
|
||||
int menu_get_enum_boot_index(int entries);
|
||||
bool menu_is_enabled_enum(void);
|
||||
|
||||
+#define MAX_BOOT_ENTRIES 31
|
||||
+
|
||||
static inline void fill_hex(char *out, unsigned char val)
|
||||
{
|
||||
const char hex[] = "0123456789abcdef";
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,94 +0,0 @@
|
||||
From 3301328699d574c8d6617eb4105cd9d4794f722c Mon Sep 17 00:00:00 2001
|
||||
From: Collin Walling <walling@linux.ibm.com>
|
||||
Date: Tue, 8 May 2018 09:01:14 +0000
|
||||
Subject: pc-bios/s390-ccw: fix loadparm initialization and int conversion
|
||||
|
||||
Rename the loadparm char array in main.c to loadparm_str and
|
||||
increased the size by one byte to account for a null termination
|
||||
when converting the loadparm string to an int via atoui. We
|
||||
also allow the boot menu to be enabled when loadparm is set to
|
||||
an empty string or a series of spaces.
|
||||
|
||||
Signed-off-by: Collin Walling <walling@linux.ibm.com>
|
||||
Reported-by: Vasily Gorbik <gor@linux.ibm.com>
|
||||
Reviewed-by: Thomas Huth <thuth@redhat.com>
|
||||
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
(cherry picked from commit 074afe60d4c8167dcfaee7aca1065c6360449eaa)
|
||||
---
|
||||
hw/s390x/ipl.c | 4 ++++
|
||||
pc-bios/s390-ccw/main.c | 14 +++++++-------
|
||||
2 files changed, 11 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
|
||||
index fb554ab..150f6c0 100644
|
||||
--- a/hw/s390x/ipl.c
|
||||
+++ b/hw/s390x/ipl.c
|
||||
@@ -373,6 +373,10 @@ int s390_ipl_set_loadparm(uint8_t *loadparm)
|
||||
loadparm[i] = ascii2ebcdic[(uint8_t) lp[i]];
|
||||
}
|
||||
|
||||
+ if (i < 8) {
|
||||
+ memset(loadparm + i, 0x40, 8 - i); /* fill with EBCDIC spaces */
|
||||
+ }
|
||||
+
|
||||
g_free(lp);
|
||||
return 0;
|
||||
}
|
||||
diff --git a/pc-bios/s390-ccw/main.c b/pc-bios/s390-ccw/main.c
|
||||
index 9d9f8cf..26f9adf 100644
|
||||
--- a/pc-bios/s390-ccw/main.c
|
||||
+++ b/pc-bios/s390-ccw/main.c
|
||||
@@ -15,11 +15,11 @@
|
||||
char stack[PAGE_SIZE * 8] __attribute__((__aligned__(PAGE_SIZE)));
|
||||
static SubChannelId blk_schid = { .one = 1 };
|
||||
IplParameterBlock iplb __attribute__((__aligned__(PAGE_SIZE)));
|
||||
-static char loadparm[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
+static char loadparm_str[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
QemuIplParameters qipl;
|
||||
|
||||
#define LOADPARM_PROMPT "PROMPT "
|
||||
-#define LOADPARM_EMPTY "........"
|
||||
+#define LOADPARM_EMPTY " "
|
||||
#define BOOT_MENU_FLAG_MASK (QIPL_FLAG_BM_OPTS_CMD | QIPL_FLAG_BM_OPTS_ZIPL)
|
||||
|
||||
/*
|
||||
@@ -45,7 +45,7 @@ void panic(const char *string)
|
||||
|
||||
unsigned int get_loadparm_index(void)
|
||||
{
|
||||
- return atoui(loadparm);
|
||||
+ return atoui(loadparm_str);
|
||||
}
|
||||
|
||||
static bool find_dev(Schib *schib, int dev_no)
|
||||
@@ -80,13 +80,13 @@ static bool find_dev(Schib *schib, int dev_no)
|
||||
|
||||
static void menu_setup(void)
|
||||
{
|
||||
- if (memcmp(loadparm, LOADPARM_PROMPT, 8) == 0) {
|
||||
+ if (memcmp(loadparm_str, LOADPARM_PROMPT, 8) == 0) {
|
||||
menu_set_parms(QIPL_FLAG_BM_OPTS_CMD, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
/* If loadparm was set to any other value, then do not enable menu */
|
||||
- if (memcmp(loadparm, LOADPARM_EMPTY, 8) != 0) {
|
||||
+ if (memcmp(loadparm_str, LOADPARM_EMPTY, 8) != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -116,8 +116,8 @@ static void virtio_setup(void)
|
||||
*/
|
||||
enable_mss_facility();
|
||||
|
||||
- sclp_get_loadparm_ascii(loadparm);
|
||||
- memcpy(ldp + 10, loadparm, 8);
|
||||
+ sclp_get_loadparm_ascii(loadparm_str);
|
||||
+ memcpy(ldp + 10, loadparm_str, 8);
|
||||
sclp_print(ldp);
|
||||
|
||||
memcpy(&qipl, early_qipl, sizeof(QemuIplParameters));
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,105 +0,0 @@
|
||||
From c0577fcb360841afe54f76deee37ea4a52761bf3 Mon Sep 17 00:00:00 2001
|
||||
From: Collin Walling <walling@linux.ibm.com>
|
||||
Date: Tue, 8 May 2018 09:01:15 +0000
|
||||
Subject: pc-bios/s390-ccw: fix non-sequential boot entries (eckd)
|
||||
|
||||
zIPL boot menu entries can be non-sequential. Let's account
|
||||
for this issue for the s390 zIPL boot menu. Since this boot
|
||||
menu is actually an imitation and is not completely capable
|
||||
of everything the real zIPL menu can do, let's also print a
|
||||
different banner to the user.
|
||||
|
||||
Signed-off-by: Collin Walling <walling@linux.ibm.com>
|
||||
Reported-by: Vasily Gorbik <gor@linux.ibm.com>
|
||||
Reviewed-by: Thomas Huth <thuth@redhat.com>
|
||||
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
(cherry picked from commit 7385e947fc65a44dd05abb86c874beb915c1989c)
|
||||
---
|
||||
pc-bios/s390-ccw/menu.c | 29 ++++++++++++++++++++---------
|
||||
1 file changed, 20 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/pc-bios/s390-ccw/menu.c b/pc-bios/s390-ccw/menu.c
|
||||
index 96eec81..aaf5d61 100644
|
||||
--- a/pc-bios/s390-ccw/menu.c
|
||||
+++ b/pc-bios/s390-ccw/menu.c
|
||||
@@ -158,7 +158,7 @@ static void boot_menu_prompt(bool retry)
|
||||
}
|
||||
}
|
||||
|
||||
-static int get_boot_index(int entries)
|
||||
+static int get_boot_index(bool *valid_entries)
|
||||
{
|
||||
int boot_index;
|
||||
bool retry = false;
|
||||
@@ -168,7 +168,8 @@ static int get_boot_index(int entries)
|
||||
boot_menu_prompt(retry);
|
||||
boot_index = get_index();
|
||||
retry = true;
|
||||
- } while (boot_index < 0 || boot_index >= entries);
|
||||
+ } while (boot_index < 0 || boot_index >= MAX_BOOT_ENTRIES ||
|
||||
+ !valid_entries[boot_index]);
|
||||
|
||||
sclp_print("\nBooting entry #");
|
||||
sclp_print(uitoa(boot_index, tmp, sizeof(tmp)));
|
||||
@@ -176,7 +177,8 @@ static int get_boot_index(int entries)
|
||||
return boot_index;
|
||||
}
|
||||
|
||||
-static void zipl_println(const char *data, size_t len)
|
||||
+/* Returns the entry number that was printed */
|
||||
+static int zipl_print_entry(const char *data, size_t len)
|
||||
{
|
||||
char buf[len + 2];
|
||||
|
||||
@@ -185,12 +187,15 @@ static void zipl_println(const char *data, size_t len)
|
||||
buf[len + 1] = '\0';
|
||||
|
||||
sclp_print(buf);
|
||||
+
|
||||
+ return buf[0] == ' ' ? atoui(buf + 1) : atoui(buf);
|
||||
}
|
||||
|
||||
int menu_get_zipl_boot_index(const char *menu_data)
|
||||
{
|
||||
size_t len;
|
||||
- int entries;
|
||||
+ int entry;
|
||||
+ bool valid_entries[MAX_BOOT_ENTRIES] = {false};
|
||||
uint16_t zipl_flag = *(uint16_t *)(menu_data - ZIPL_FLAG_OFFSET);
|
||||
uint16_t zipl_timeout = *(uint16_t *)(menu_data - ZIPL_TIMEOUT_OFFSET);
|
||||
|
||||
@@ -202,19 +207,25 @@ int menu_get_zipl_boot_index(const char *menu_data)
|
||||
timeout = zipl_timeout * 1000;
|
||||
}
|
||||
|
||||
- /* Print and count all menu items, including the banner */
|
||||
- for (entries = 0; *menu_data; entries++) {
|
||||
+ /* Print banner */
|
||||
+ sclp_print("s390-ccw zIPL Boot Menu\n\n");
|
||||
+ menu_data += strlen(menu_data) + 1;
|
||||
+
|
||||
+ /* Print entries */
|
||||
+ while (*menu_data) {
|
||||
len = strlen(menu_data);
|
||||
- zipl_println(menu_data, len);
|
||||
+ entry = zipl_print_entry(menu_data, len);
|
||||
menu_data += len + 1;
|
||||
|
||||
- if (entries < 2) {
|
||||
+ valid_entries[entry] = true;
|
||||
+
|
||||
+ if (entry == 0) {
|
||||
sclp_print("\n");
|
||||
}
|
||||
}
|
||||
|
||||
sclp_print("\n");
|
||||
- return get_boot_index(entries - 1); /* subtract 1 to exclude banner */
|
||||
+ return get_boot_index(valid_entries);
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,135 +0,0 @@
|
||||
From f6d3898264a5083ebe7bcc663eab353bfa6ba1f4 Mon Sep 17 00:00:00 2001
|
||||
From: Collin Walling <walling@linux.ibm.com>
|
||||
Date: Tue, 8 May 2018 09:01:16 +0000
|
||||
Subject: pc-bios/s390-ccw: fix non-sequential boot entries (enum)
|
||||
|
||||
zIPL boot menu entries can be non-sequential. Let's account
|
||||
for this issue for the s390 enumerated boot menu. Since we
|
||||
can no longer print a range of available entries to the
|
||||
user, we have to present a list of each available entry.
|
||||
|
||||
An example of this menu:
|
||||
|
||||
s390-ccw Enumerated Boot Menu.
|
||||
|
||||
[0] default
|
||||
|
||||
[1]
|
||||
[2]
|
||||
[7]
|
||||
[8]
|
||||
[9]
|
||||
[11]
|
||||
[12]
|
||||
|
||||
Please choose:
|
||||
|
||||
Signed-off-by: Collin Walling <walling@linux.ibm.com>
|
||||
Reported-by: Vasily Gorbik <gor@linux.ibm.com>
|
||||
Reviewed-by: Thomas Huth <thuth@redhat.com>
|
||||
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
(cherry picked from commit 622b39178057289a1c8c1b5148f513e658e90ea1)
|
||||
---
|
||||
pc-bios/s390-ccw/bootmap.c | 12 +++++++-----
|
||||
pc-bios/s390-ccw/menu.c | 29 ++++++++++++++++++++---------
|
||||
pc-bios/s390-ccw/s390-ccw.h | 2 +-
|
||||
3 files changed, 28 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/pc-bios/s390-ccw/bootmap.c b/pc-bios/s390-ccw/bootmap.c
|
||||
index b767fa2..e41e715 100644
|
||||
--- a/pc-bios/s390-ccw/bootmap.c
|
||||
+++ b/pc-bios/s390-ccw/bootmap.c
|
||||
@@ -565,6 +565,8 @@ static void ipl_scsi(void)
|
||||
int program_table_entries = 0;
|
||||
BootMapTable *prog_table = (void *)sec;
|
||||
unsigned int loadparm = get_loadparm_index();
|
||||
+ bool valid_entries[MAX_BOOT_ENTRIES] = {false};
|
||||
+ size_t i;
|
||||
|
||||
/* Grab the MBR */
|
||||
memset(sec, FREE_SPACE_FILLER, sizeof(sec));
|
||||
@@ -585,18 +587,18 @@ static void ipl_scsi(void)
|
||||
read_block(mbr->pt.blockno, sec, "Error reading Program Table");
|
||||
IPL_assert(magic_match(sec, ZIPL_MAGIC), "No zIPL magic in PT");
|
||||
|
||||
- while (program_table_entries < MAX_BOOT_ENTRIES) {
|
||||
- if (!prog_table->entry[program_table_entries].scsi.blockno) {
|
||||
- break;
|
||||
+ for (i = 0; i < MAX_BOOT_ENTRIES; i++) {
|
||||
+ if (prog_table->entry[i].scsi.blockno) {
|
||||
+ valid_entries[i] = true;
|
||||
+ program_table_entries++;
|
||||
}
|
||||
- program_table_entries++;
|
||||
}
|
||||
|
||||
debug_print_int("program table entries", program_table_entries);
|
||||
IPL_assert(program_table_entries != 0, "Empty Program Table");
|
||||
|
||||
if (menu_is_enabled_enum()) {
|
||||
- loadparm = menu_get_enum_boot_index(program_table_entries);
|
||||
+ loadparm = menu_get_enum_boot_index(valid_entries);
|
||||
}
|
||||
|
||||
debug_print_int("loadparm", loadparm);
|
||||
diff --git a/pc-bios/s390-ccw/menu.c b/pc-bios/s390-ccw/menu.c
|
||||
index aaf5d61..82a4ae6 100644
|
||||
--- a/pc-bios/s390-ccw/menu.c
|
||||
+++ b/pc-bios/s390-ccw/menu.c
|
||||
@@ -228,19 +228,30 @@ int menu_get_zipl_boot_index(const char *menu_data)
|
||||
return get_boot_index(valid_entries);
|
||||
}
|
||||
|
||||
-
|
||||
-int menu_get_enum_boot_index(int entries)
|
||||
+int menu_get_enum_boot_index(bool *valid_entries)
|
||||
{
|
||||
- char tmp[4];
|
||||
+ char tmp[3];
|
||||
+ int i;
|
||||
|
||||
- sclp_print("s390x Enumerated Boot Menu.\n\n");
|
||||
+ sclp_print("s390-ccw Enumerated Boot Menu.\n\n");
|
||||
|
||||
- sclp_print(uitoa(entries, tmp, sizeof(tmp)));
|
||||
- sclp_print(" entries detected. Select from boot index 0 to ");
|
||||
- sclp_print(uitoa(entries - 1, tmp, sizeof(tmp)));
|
||||
- sclp_print(".\n\n");
|
||||
+ for (i = 0; i < MAX_BOOT_ENTRIES; i++) {
|
||||
+ if (valid_entries[i]) {
|
||||
+ if (i < 10) {
|
||||
+ sclp_print(" ");
|
||||
+ }
|
||||
+ sclp_print("[");
|
||||
+ sclp_print(uitoa(i, tmp, sizeof(tmp)));
|
||||
+ sclp_print("]");
|
||||
+ if (i == 0) {
|
||||
+ sclp_print(" default\n");
|
||||
+ }
|
||||
+ sclp_print("\n");
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- return get_boot_index(entries);
|
||||
+ sclp_print("\n");
|
||||
+ return get_boot_index(valid_entries);
|
||||
}
|
||||
|
||||
void menu_set_parms(uint8_t boot_menu_flag, uint32_t boot_menu_timeout)
|
||||
diff --git a/pc-bios/s390-ccw/s390-ccw.h b/pc-bios/s390-ccw/s390-ccw.h
|
||||
index 2c9e601..a1bdb4c 100644
|
||||
--- a/pc-bios/s390-ccw/s390-ccw.h
|
||||
+++ b/pc-bios/s390-ccw/s390-ccw.h
|
||||
@@ -91,7 +91,7 @@ void zipl_load(void);
|
||||
void menu_set_parms(uint8_t boot_menu_flag, uint32_t boot_menu_timeout);
|
||||
int menu_get_zipl_boot_index(const char *menu_data);
|
||||
bool menu_is_enabled_zipl(void);
|
||||
-int menu_get_enum_boot_index(int entries);
|
||||
+int menu_get_enum_boot_index(bool *valid_entries);
|
||||
bool menu_is_enabled_enum(void);
|
||||
|
||||
#define MAX_BOOT_ENTRIES 31
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,112 +0,0 @@
|
||||
From 188fa8896734043c11798495072b7f98111c5d94 Mon Sep 17 00:00:00 2001
|
||||
From: Eduardo Habkost <ehabkost@redhat.com>
|
||||
Date: Wed, 25 Apr 2018 13:30:35 +0000
|
||||
Subject: pc: rhel7.6.0 machine-types
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1557051
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1559791
|
||||
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=15893027
|
||||
|
||||
The rhel7.6.0 machine-type was going to be added much later
|
||||
because RHEL-7.6 is not ready yet. However, adding a new
|
||||
machine-type is the only way to change the default NIC to e1000e.
|
||||
This patch adds pc-*-rhel7.6.0 machine-types.
|
||||
|
||||
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
---
|
||||
hw/i386/pc_piix.c | 21 ++++++++++++++++++---
|
||||
hw/i386/pc_q35.c | 18 ++++++++++++++++--
|
||||
2 files changed, 34 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
|
||||
index e5add39..0ff1e2d 100644
|
||||
--- a/hw/i386/pc_piix.c
|
||||
+++ b/hw/i386/pc_piix.c
|
||||
@@ -1156,6 +1156,21 @@ static void pc_machine_rhel7_options(MachineClass *m)
|
||||
m->is_default = 1;
|
||||
}
|
||||
|
||||
+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)
|
||||
+{
|
||||
+ pc_machine_rhel7_options(m);
|
||||
+ m->desc = "RHEL 7.6.0 PC (i440FX + PIIX, 1996)";
|
||||
+}
|
||||
+
|
||||
+DEFINE_PC_MACHINE(rhel760, "pc-i440fx-rhel7.6.0", pc_init_rhel760,
|
||||
+ pc_machine_rhel760_options);
|
||||
+
|
||||
static void pc_init_rhel750(MachineState *machine)
|
||||
{
|
||||
pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
|
||||
@@ -1164,7 +1179,9 @@ static void pc_init_rhel750(MachineState *machine)
|
||||
|
||||
static void pc_machine_rhel750_options(MachineClass *m)
|
||||
{
|
||||
- pc_machine_rhel7_options(m);
|
||||
+ pc_machine_rhel760_options(m);
|
||||
+ m->alias = NULL;
|
||||
+ m->is_default = 0;
|
||||
m->desc = "RHEL 7.5.0 PC (i440FX + PIIX, 1996)";
|
||||
m->auto_enable_numa_with_memhp = false;
|
||||
SET_MACHINE_COMPAT(m, PC_RHEL7_5_COMPAT);
|
||||
@@ -1183,8 +1200,6 @@ static void pc_machine_rhel740_options(MachineClass *m)
|
||||
{
|
||||
PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
|
||||
pc_machine_rhel750_options(m);
|
||||
- m->alias = NULL;
|
||||
- m->is_default = 0;
|
||||
m->desc = "RHEL 7.4.0 PC (i440FX + PIIX, 1996)";
|
||||
m->numa_auto_assign_ram = numa_legacy_auto_assign_ram;
|
||||
pcmc->pc_rom_ro = false;
|
||||
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
|
||||
index ffc461d..e1fd23e 100644
|
||||
--- a/hw/i386/pc_q35.c
|
||||
+++ b/hw/i386/pc_q35.c
|
||||
@@ -424,6 +424,20 @@ static void pc_q35_machine_rhel7_options(MachineClass *m)
|
||||
SET_MACHINE_COMPAT(m, PC_RHEL_COMPAT);
|
||||
}
|
||||
|
||||
+static void pc_q35_init_rhel760(MachineState *machine)
|
||||
+{
|
||||
+ pc_q35_init(machine);
|
||||
+}
|
||||
+
|
||||
+static void pc_q35_machine_rhel760_options(MachineClass *m)
|
||||
+{
|
||||
+ pc_q35_machine_rhel7_options(m);
|
||||
+ m->desc = "RHEL-7.6.0 PC (Q35 + ICH9, 2009)";
|
||||
+}
|
||||
+
|
||||
+DEFINE_PC_MACHINE(q35_rhel760, "pc-q35-rhel7.6.0", pc_q35_init_rhel760,
|
||||
+ pc_q35_machine_rhel760_options);
|
||||
+
|
||||
static void pc_q35_init_rhel750(MachineState *machine)
|
||||
{
|
||||
pc_q35_init(machine);
|
||||
@@ -432,7 +446,8 @@ static void pc_q35_init_rhel750(MachineState *machine)
|
||||
static void pc_q35_machine_rhel750_options(MachineClass *m)
|
||||
{
|
||||
PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
|
||||
- pc_q35_machine_rhel7_options(m);
|
||||
+ pc_q35_machine_rhel760_options(m);
|
||||
+ m->alias = NULL;
|
||||
m->desc = "RHEL-7.5.0 PC (Q35 + ICH9, 2009)";
|
||||
m->auto_enable_numa_with_memhp = false;
|
||||
pcmc->default_nic_model = "e1000";
|
||||
@@ -451,7 +466,6 @@ static void pc_q35_machine_rhel740_options(MachineClass *m)
|
||||
{
|
||||
PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
|
||||
pc_q35_machine_rhel750_options(m);
|
||||
- m->alias = NULL;
|
||||
m->desc = "RHEL-7.4.0 PC (Q35 + ICH9, 2009)";
|
||||
m->numa_auto_assign_ram = numa_legacy_auto_assign_ram;
|
||||
pcmc->pc_rom_ro = false;
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,755 +0,0 @@
|
||||
From 88b450562f14b4b246f88c31d0bdd48e47f3afce Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Thu, 26 Apr 2018 02:54:03 +0000
|
||||
Subject: Remove rhel6* machine types
|
||||
|
||||
As we do not support RHEL 6 compatibility on RHEL 8 we remove rhel6*
|
||||
machine types.
|
||||
|
||||
Types were originally added for BZ 983991 (Provide RHEL-6 machine types) and were
|
||||
updated multipletimes during the RHEL 7 development to keep the compatibility. As
|
||||
all machine types changes are located in pc_piix.c file there are only tests to
|
||||
be fixed beside this file (and one comment removal in pc.h).
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
hw/i386/pc_piix.c | 696 ---------------------------------------------------
|
||||
include/hw/i386/pc.h | 2 -
|
||||
tests/qom-test.c | 4 +-
|
||||
3 files changed, 1 insertion(+), 701 deletions(-)
|
||||
|
||||
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
|
||||
index 0ff1e2d..229d551 100644
|
||||
--- a/hw/i386/pc_piix.c
|
||||
+++ b/hw/i386/pc_piix.c
|
||||
@@ -1324,699 +1324,3 @@ static void pc_machine_rhel700_options(MachineClass *m)
|
||||
|
||||
DEFINE_PC_MACHINE(rhel700, "pc-i440fx-rhel7.0.0", pc_init_rhel700,
|
||||
pc_machine_rhel700_options);
|
||||
-
|
||||
-#define PC_RHEL6_6_COMPAT \
|
||||
- {\
|
||||
- .driver = "scsi-hd",\
|
||||
- .property = "discard_granularity",\
|
||||
- .value = stringify(0),\
|
||||
- },{\
|
||||
- .driver = "scsi-cd",\
|
||||
- .property = "discard_granularity",\
|
||||
- .value = stringify(0),\
|
||||
- },{\
|
||||
- .driver = "scsi-disk",\
|
||||
- .property = "discard_granularity",\
|
||||
- .value = stringify(0),\
|
||||
- },{\
|
||||
- .driver = "ide-hd",\
|
||||
- .property = "discard_granularity",\
|
||||
- .value = stringify(0),\
|
||||
- },{\
|
||||
- .driver = "ide-cd",\
|
||||
- .property = "discard_granularity",\
|
||||
- .value = stringify(0),\
|
||||
- },{\
|
||||
- .driver = "ide-drive",\
|
||||
- .property = "discard_granularity",\
|
||||
- .value = stringify(0),\
|
||||
- },{\
|
||||
- .driver = "virtio-blk-pci",\
|
||||
- .property = "discard_granularity",\
|
||||
- .value = stringify(0),\
|
||||
- },{\
|
||||
- .driver = "virtio-serial-pci",\
|
||||
- .property = "vectors",\
|
||||
- /* DEV_NVECTORS_UNSPECIFIED as a uint32_t string */\
|
||||
- .value = stringify(0xFFFFFFFF),\
|
||||
- },{\
|
||||
- .driver = "486-" TYPE_X86_CPU,\
|
||||
- .property = "model",\
|
||||
- .value = stringify(0),\
|
||||
- },{\
|
||||
- .driver = "usb-tablet",\
|
||||
- .property = "usb_version",\
|
||||
- .value = stringify(1),\
|
||||
- },{\
|
||||
- .driver = "virtio-net-pci",\
|
||||
- .property = "mq",\
|
||||
- .value = "off",\
|
||||
- },{\
|
||||
- .driver = "VGA",\
|
||||
- .property = "mmio",\
|
||||
- .value = "off",\
|
||||
- },{\
|
||||
- .driver = "virtio-blk-pci",\
|
||||
- .property = "config-wce",\
|
||||
- .value = "off",\
|
||||
- },{\
|
||||
- .driver = TYPE_ISA_FDC,\
|
||||
- .property = "check_media_rate",\
|
||||
- .value = "off",\
|
||||
- },{\
|
||||
- .driver = "virtio-balloon-pci",\
|
||||
- .property = "class",\
|
||||
- .value = stringify(PCI_CLASS_MEMORY_RAM),\
|
||||
- },{\
|
||||
- .driver = TYPE_PCI_DEVICE,\
|
||||
- .property = "command_serr_enable",\
|
||||
- .value = "off",\
|
||||
- },{\
|
||||
- .driver = "AC97",\
|
||||
- .property = "use_broken_id",\
|
||||
- .value = stringify(1),\
|
||||
- },{\
|
||||
- .driver = "intel-hda",\
|
||||
- .property = "msi",\
|
||||
- .value = "off",\
|
||||
- },{\
|
||||
- .driver = "qemu32-" TYPE_X86_CPU,\
|
||||
- .property = "min-xlevel",\
|
||||
- .value = stringify(0),\
|
||||
- },{\
|
||||
- .driver = "486-" TYPE_X86_CPU,\
|
||||
- .property = "min-level",\
|
||||
- .value = stringify(0),\
|
||||
- },{\
|
||||
- .driver = "qemu32-" TYPE_X86_CPU,\
|
||||
- .property = "model",\
|
||||
- .value = stringify(3),\
|
||||
- },{\
|
||||
- .driver = "usb-ccid",\
|
||||
- .property = "serial",\
|
||||
- .value = "1",\
|
||||
- },{\
|
||||
- .driver = "virtio-net-pci",\
|
||||
- .property = "any_layout",\
|
||||
- .value = "off",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "pentium" "-" TYPE_X86_CPU,\
|
||||
- .property = "apic",\
|
||||
- .value = "off",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "pentium2" "-" TYPE_X86_CPU,\
|
||||
- .property = "apic",\
|
||||
- .value = "off",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "pentium3" "-" TYPE_X86_CPU,\
|
||||
- .property = "apic",\
|
||||
- .value = "off",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Conroe" "-" TYPE_X86_CPU,\
|
||||
- .property = "x2apic",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Penryn" "-" TYPE_X86_CPU,\
|
||||
- .property = "x2apic",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Nehalem" "-" TYPE_X86_CPU,\
|
||||
- .property = "x2apic",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- { /* PC_RHEL6_6_COMPAT (copied from the entry above) */ \
|
||||
- .driver = "Nehalem-IBRS" "-" TYPE_X86_CPU,\
|
||||
- .property = "x2apic",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Westmere" "-" TYPE_X86_CPU,\
|
||||
- .property = "x2apic",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- { /* PC_RHEL6_6_COMPAT (copied from the entry above) */ \
|
||||
- .driver = "Westmere-IBRS" "-" TYPE_X86_CPU,\
|
||||
- .property = "x2apic",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Westmere" "-" TYPE_X86_CPU,\
|
||||
- .property = "pclmulqdq",\
|
||||
- .value = "off",\
|
||||
- },\
|
||||
- { /* PC_RHEL6_6_COMPAT (copied from the entry above) */ \
|
||||
- .driver = "Westmere-IBRS" "-" TYPE_X86_CPU,\
|
||||
- .property = "pclmulqdq",\
|
||||
- .value = "off",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Westmere" "-" TYPE_X86_CPU,\
|
||||
- .property = "fxsr",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- { /* PC_RHEL6_6_COMPAT (copied from the entry above) */ \
|
||||
- .driver = "Westmere-IBRS" "-" TYPE_X86_CPU,\
|
||||
- .property = "fxsr",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Westmere" "-" TYPE_X86_CPU,\
|
||||
- .property = "mmx",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- { /* PC_RHEL6_6_COMPAT (copied from the entry above) */ \
|
||||
- .driver = "Westmere-IBRS" "-" TYPE_X86_CPU,\
|
||||
- .property = "mmx",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Westmere" "-" TYPE_X86_CPU,\
|
||||
- .property = "pat",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- { /* PC_RHEL6_6_COMPAT (copied from the entry above) */ \
|
||||
- .driver = "Westmere-IBRS" "-" TYPE_X86_CPU,\
|
||||
- .property = "pat",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Westmere" "-" TYPE_X86_CPU,\
|
||||
- .property = "cmov",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- { /* PC_RHEL6_6_COMPAT (copied from the entry above) */ \
|
||||
- .driver = "Westmere-IBRS" "-" TYPE_X86_CPU,\
|
||||
- .property = "cmov",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Westmere" "-" TYPE_X86_CPU,\
|
||||
- .property = "pge",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- { /* PC_RHEL6_6_COMPAT (copied from the entry above) */ \
|
||||
- .driver = "Westmere-IBRS" "-" TYPE_X86_CPU,\
|
||||
- .property = "pge",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Westmere" "-" TYPE_X86_CPU,\
|
||||
- .property = "apic",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- { /* PC_RHEL6_6_COMPAT (copied from the entry above) */ \
|
||||
- .driver = "Westmere-IBRS" "-" TYPE_X86_CPU,\
|
||||
- .property = "apic",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Westmere" "-" TYPE_X86_CPU,\
|
||||
- .property = "cx8",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- { /* PC_RHEL6_6_COMPAT (copied from the entry above) */ \
|
||||
- .driver = "Westmere-IBRS" "-" TYPE_X86_CPU,\
|
||||
- .property = "cx8",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Westmere" "-" TYPE_X86_CPU,\
|
||||
- .property = "mce",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- { /* PC_RHEL6_6_COMPAT (copied from the entry above) */ \
|
||||
- .driver = "Westmere-IBRS" "-" TYPE_X86_CPU,\
|
||||
- .property = "mce",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Westmere" "-" TYPE_X86_CPU,\
|
||||
- .property = "pae",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- { /* PC_RHEL6_6_COMPAT (copied from the entry above) */ \
|
||||
- .driver = "Westmere-IBRS" "-" TYPE_X86_CPU,\
|
||||
- .property = "pae",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Westmere" "-" TYPE_X86_CPU,\
|
||||
- .property = "msr",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- { /* PC_RHEL6_6_COMPAT (copied from the entry above) */ \
|
||||
- .driver = "Westmere-IBRS" "-" TYPE_X86_CPU,\
|
||||
- .property = "msr",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Westmere" "-" TYPE_X86_CPU,\
|
||||
- .property = "tsc",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- { /* PC_RHEL6_6_COMPAT (copied from the entry above) */ \
|
||||
- .driver = "Westmere-IBRS" "-" TYPE_X86_CPU,\
|
||||
- .property = "tsc",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Westmere" "-" TYPE_X86_CPU,\
|
||||
- .property = "pse",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- { /* PC_RHEL6_6_COMPAT (copied from the entry above) */ \
|
||||
- .driver = "Westmere-IBRS" "-" TYPE_X86_CPU,\
|
||||
- .property = "pse",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Westmere" "-" TYPE_X86_CPU,\
|
||||
- .property = "de",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- { /* PC_RHEL6_6_COMPAT (copied from the entry above) */ \
|
||||
- .driver = "Westmere-IBRS" "-" TYPE_X86_CPU,\
|
||||
- .property = "de",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Westmere" "-" TYPE_X86_CPU,\
|
||||
- .property = "fpu",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- { /* PC_RHEL6_6_COMPAT (copied from the entry above) */ \
|
||||
- .driver = "Westmere-IBRS" "-" TYPE_X86_CPU,\
|
||||
- .property = "fpu",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Broadwell" "-" TYPE_X86_CPU,\
|
||||
- .property = "rdtscp",\
|
||||
- .value = "off",\
|
||||
- },\
|
||||
- { /* PC_RHEL6_6_COMPAT (copied from the entry above) */ \
|
||||
- .driver = "Broadwell-IBRS" "-" TYPE_X86_CPU,\
|
||||
- .property = "rdtscp",\
|
||||
- .value = "off",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Broadwell" "-" TYPE_X86_CPU,\
|
||||
- .property = "smap",\
|
||||
- .value = "off",\
|
||||
- },\
|
||||
- { /* PC_RHEL6_6_COMPAT (copied from the entry above) */ \
|
||||
- .driver = "Broadwell-IBRS" "-" TYPE_X86_CPU,\
|
||||
- .property = "smap",\
|
||||
- .value = "off",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = TYPE_X86_CPU,\
|
||||
- .property = "rdtscp",\
|
||||
- .value = "off",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Opteron_G1" "-" TYPE_X86_CPU,\
|
||||
- .property = "x2apic",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Opteron_G2" "-" TYPE_X86_CPU,\
|
||||
- .property = "x2apic",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Opteron_G3" "-" TYPE_X86_CPU,\
|
||||
- .property = "x2apic",\
|
||||
- .value = "on",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Opteron_G4" "-" TYPE_X86_CPU,\
|
||||
- .property = "x2apic",\
|
||||
- .value = "off",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "Opteron_G5" "-" TYPE_X86_CPU,\
|
||||
- .property = "x2apic",\
|
||||
- .value = "off",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = TYPE_X86_CPU,\
|
||||
- .property = "3dnow",\
|
||||
- .value = "off",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = TYPE_X86_CPU,\
|
||||
- .property = "3dnowext",\
|
||||
- .value = "off",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "virtio-net-pci",\
|
||||
- .property = "__com.redhat_rhel6_ctrl_guest_workaround", \
|
||||
- .value = "on",\
|
||||
- },
|
||||
-
|
||||
-static void pc_compat_rhel660(MachineState *machine)
|
||||
-{
|
||||
- PCMachineState *pcms = PC_MACHINE(machine);
|
||||
- PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
|
||||
-
|
||||
- pc_compat_rhel700(machine);
|
||||
- if (!machine->cpu_type) {
|
||||
- machine->cpu_type = "cpu64-rhel6";
|
||||
- }
|
||||
-
|
||||
- x86_cpu_change_kvm_default("kvm-pv-unhalt", NULL);
|
||||
-
|
||||
- pcmc->gigabyte_align = false;
|
||||
- shadow_bios_after_incoming = true;
|
||||
- ich9_uhci123_irqpin_override = true;
|
||||
-}
|
||||
-
|
||||
-static void pc_init_rhel660(MachineState *machine)
|
||||
-{
|
||||
- pc_compat_rhel660(machine);
|
||||
- pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
|
||||
- TYPE_I440FX_PCI_DEVICE);}
|
||||
-
|
||||
-static void pc_machine_rhel660_options(MachineClass *m)
|
||||
-{
|
||||
- PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
|
||||
- pc_machine_rhel700_options(m);
|
||||
- m->family = "pc_piix_Z";
|
||||
- m->desc = "RHEL 6.6.0 PC";
|
||||
- m->rom_file_has_mr = false;
|
||||
- m->default_machine_opts = "firmware=bios.bin";
|
||||
- pcmc->has_acpi_build = false;
|
||||
- SET_MACHINE_COMPAT(m, PC_RHEL6_6_COMPAT);
|
||||
-}
|
||||
-
|
||||
-DEFINE_PC_MACHINE(rhel660, "rhel6.6.0", pc_init_rhel660,
|
||||
- pc_machine_rhel660_options);
|
||||
-
|
||||
-#define PC_RHEL6_5_COMPAT \
|
||||
- {\
|
||||
- .driver = TYPE_USB_DEVICE,\
|
||||
- .property = "msos-desc",\
|
||||
- .value = "no",\
|
||||
- },
|
||||
-
|
||||
-static void pc_compat_rhel650(MachineState *machine)
|
||||
-{
|
||||
- pc_compat_rhel660(machine);
|
||||
-}
|
||||
-
|
||||
-static void pc_init_rhel650(MachineState *machine)
|
||||
-{
|
||||
- pc_compat_rhel650(machine);
|
||||
- pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
|
||||
- TYPE_I440FX_PCI_DEVICE);}
|
||||
-
|
||||
-static void pc_machine_rhel650_options(MachineClass *m)
|
||||
-{
|
||||
- pc_machine_rhel660_options(m);
|
||||
- m->family = "pc_piix_Z";
|
||||
- m->desc = "RHEL 6.5.0 PC";
|
||||
- SET_MACHINE_COMPAT(m, PC_RHEL6_5_COMPAT);
|
||||
-}
|
||||
-
|
||||
-DEFINE_PC_MACHINE(rhel650, "rhel6.5.0", pc_init_rhel650,
|
||||
- pc_machine_rhel650_options);
|
||||
-
|
||||
-#define PC_RHEL6_4_COMPAT \
|
||||
- {\
|
||||
- .driver = "virtio-scsi-pci",\
|
||||
- .property = "vectors",\
|
||||
- .value = stringify(2),\
|
||||
- },{\
|
||||
- .driver = "hda-micro",\
|
||||
- .property = "mixer",\
|
||||
- .value = "off",\
|
||||
- },{\
|
||||
- .driver = "hda-duplex",\
|
||||
- .property = "mixer",\
|
||||
- .value = "off",\
|
||||
- },{\
|
||||
- .driver = "hda-output",\
|
||||
- .property = "mixer",\
|
||||
- .value = "off",\
|
||||
- },{\
|
||||
- .driver = "virtio-net-pci",\
|
||||
- .property = "ctrl_mac_addr",\
|
||||
- .value = "off",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = TYPE_X86_CPU,\
|
||||
- .property = "sep",\
|
||||
- .value = "off",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "virtio-net-pci",\
|
||||
- .property = "__com.redhat_rhel6_ctrl_guest_workaround", \
|
||||
- .value = "off",\
|
||||
- },
|
||||
-
|
||||
-static void pc_compat_rhel640(MachineState *machine)
|
||||
-{
|
||||
- pc_compat_rhel650(machine);
|
||||
-}
|
||||
-
|
||||
-static void pc_init_rhel640(MachineState *machine)
|
||||
-{
|
||||
- pc_compat_rhel640(machine);
|
||||
- pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
|
||||
- TYPE_I440FX_PCI_DEVICE);}
|
||||
-
|
||||
-static void pc_machine_rhel640_options(MachineClass *m)
|
||||
-{
|
||||
- pc_machine_rhel650_options(m);
|
||||
- m->family = "pc_piix_Z";
|
||||
- m->desc = "RHEL 6.4.0 PC";
|
||||
- SET_MACHINE_COMPAT(m, PC_RHEL6_4_COMPAT);
|
||||
-}
|
||||
-
|
||||
-DEFINE_PC_MACHINE(rhel640, "rhel6.4.0", pc_init_rhel640,
|
||||
- pc_machine_rhel640_options);
|
||||
-
|
||||
-#define PC_RHEL6_3_COMPAT \
|
||||
- {\
|
||||
- .driver = "Conroe-" TYPE_X86_CPU,\
|
||||
- .property = "min-level",\
|
||||
- .value = stringify(2),\
|
||||
- },{\
|
||||
- .driver = "Penryn-" TYPE_X86_CPU,\
|
||||
- .property = "min-level",\
|
||||
- .value = stringify(2),\
|
||||
- },{\
|
||||
- .driver = "Nehalem-" TYPE_X86_CPU,\
|
||||
- .property = "min-level",\
|
||||
- .value = stringify(2),\
|
||||
- },{\
|
||||
- .driver = "e1000",\
|
||||
- .property = "autonegotiation",\
|
||||
- .value = "off",\
|
||||
- },{\
|
||||
- .driver = "qxl",\
|
||||
- .property = "revision",\
|
||||
- .value = stringify(3),\
|
||||
- },{\
|
||||
- .driver = "qxl-vga",\
|
||||
- .property = "revision",\
|
||||
- .value = stringify(3),\
|
||||
- },{\
|
||||
- .driver = "virtio-scsi-pci",\
|
||||
- .property = "hotplug",\
|
||||
- .value = "off",\
|
||||
- },{\
|
||||
- .driver = "virtio-scsi-pci",\
|
||||
- .property = "param_change",\
|
||||
- .value = "off",\
|
||||
- },{\
|
||||
- .driver = TYPE_X86_CPU,\
|
||||
- .property = "pmu",\
|
||||
- .value = "on",\
|
||||
- },{\
|
||||
- .driver = "usb-hub",\
|
||||
- .property = "serial",\
|
||||
- .value = "314159",\
|
||||
- },{\
|
||||
- .driver = "usb-storage",\
|
||||
- .property = "serial",\
|
||||
- .value = "1",\
|
||||
- },\
|
||||
- {\
|
||||
- .driver = "SandyBridge" "-" TYPE_X86_CPU,\
|
||||
- .property = "tsc-deadline",\
|
||||
- .value = "off",\
|
||||
- },\
|
||||
- { /* PC_RHEL6_3_COMPAT (copied from the entry above) */ \
|
||||
- .driver = "SandyBridge-IBRS" "-" TYPE_X86_CPU,\
|
||||
- .property = "tsc-deadline",\
|
||||
- .value = "off",\
|
||||
- },
|
||||
-
|
||||
-static void pc_compat_rhel630(MachineState *machine)
|
||||
-{
|
||||
- pc_compat_rhel640(machine);
|
||||
- x86_cpu_change_kvm_default("kvm-pv-eoi",NULL);
|
||||
- enable_compat_apic_id_mode();
|
||||
-}
|
||||
-
|
||||
-static void pc_init_rhel630(MachineState *machine)
|
||||
-{
|
||||
- pc_compat_rhel630(machine);
|
||||
- pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
|
||||
- TYPE_I440FX_PCI_DEVICE);}
|
||||
-
|
||||
-static void pc_machine_rhel630_options(MachineClass *m)
|
||||
-{
|
||||
- pc_machine_rhel640_options(m);
|
||||
- m->family = "pc_piix_Z";
|
||||
- m->desc = "RHEL 6.3.0 PC";
|
||||
- SET_MACHINE_COMPAT(m, PC_RHEL6_3_COMPAT);
|
||||
-}
|
||||
-
|
||||
-DEFINE_PC_MACHINE(rhel630, "rhel6.3.0", pc_init_rhel630,
|
||||
- pc_machine_rhel630_options);
|
||||
-
|
||||
-
|
||||
-#define PC_RHEL6_2_COMPAT \
|
||||
- {\
|
||||
- .driver = TYPE_X86_CPU,\
|
||||
- .property = "pmu",\
|
||||
- .value = "off",\
|
||||
- },
|
||||
-
|
||||
-static void pc_compat_rhel620(MachineState *machine)
|
||||
-{
|
||||
- pc_compat_rhel630(machine);
|
||||
-}
|
||||
-
|
||||
-static void pc_init_rhel620(MachineState *machine)
|
||||
-{
|
||||
- pc_compat_rhel620(machine);
|
||||
- pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
|
||||
- TYPE_I440FX_PCI_DEVICE);}
|
||||
-
|
||||
-static void pc_machine_rhel620_options(MachineClass *m)
|
||||
-{
|
||||
- pc_machine_rhel630_options(m);
|
||||
- m->family = "pc_piix_Z";
|
||||
- m->desc = "RHEL 6.2.0 PC";
|
||||
- SET_MACHINE_COMPAT(m, PC_RHEL6_2_COMPAT);
|
||||
-}
|
||||
-
|
||||
-DEFINE_PC_MACHINE(rhel620, "rhel6.2.0", pc_init_rhel620,
|
||||
- pc_machine_rhel620_options);
|
||||
-
|
||||
-/*
|
||||
- * NOTE: We don't have the event_idx compat entry for the
|
||||
- * virtio-balloon-pci driver because RHEL6 doesn't disable
|
||||
- * it either due to a bug (see RHBZ 1029539 fo more info)
|
||||
- */
|
||||
-#define PC_RHEL6_1_COMPAT \
|
||||
- {\
|
||||
- .driver = "PIIX4_PM",\
|
||||
- .property = "disable_s3",\
|
||||
- .value = "0",\
|
||||
- },{\
|
||||
- .driver = "PIIX4_PM",\
|
||||
- .property = "disable_s4",\
|
||||
- .value = "0",\
|
||||
- },{\
|
||||
- .driver = "qxl",\
|
||||
- .property = "revision",\
|
||||
- .value = stringify(2),\
|
||||
- },{\
|
||||
- .driver = "qxl-vga",\
|
||||
- .property = "revision",\
|
||||
- .value = stringify(2),\
|
||||
- },{\
|
||||
- .driver = "virtio-blk-pci",\
|
||||
- .property = "event_idx",\
|
||||
- .value = "off",\
|
||||
- },{\
|
||||
- .driver = "virtio-serial-pci",\
|
||||
- .property = "event_idx",\
|
||||
- .value = "off",\
|
||||
- },{\
|
||||
- .driver = "virtio-net-pci",\
|
||||
- .property = "event_idx",\
|
||||
- .value = "off",\
|
||||
- },{\
|
||||
- .driver = "usb-kbd",\
|
||||
- .property = "serial",\
|
||||
- .value = "1",\
|
||||
- },{\
|
||||
- .driver = "usb-mouse",\
|
||||
- .property = "serial",\
|
||||
- .value = "1",\
|
||||
- },{\
|
||||
- .driver = "usb-tablet",\
|
||||
- .property = "serial",\
|
||||
- .value = "1",\
|
||||
- },
|
||||
-
|
||||
-static void pc_compat_rhel610(MachineState *machine)
|
||||
-{
|
||||
- pc_compat_rhel620(machine);
|
||||
-}
|
||||
-
|
||||
-static void pc_init_rhel610(MachineState *machine)
|
||||
-{
|
||||
- pc_compat_rhel610(machine);
|
||||
- pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
|
||||
- TYPE_I440FX_PCI_DEVICE);}
|
||||
-
|
||||
-static void pc_machine_rhel610_options(MachineClass *m)
|
||||
-{
|
||||
- pc_machine_rhel620_options(m);
|
||||
- m->family = "pc_piix_Z";
|
||||
- m->desc = "RHEL 6.1.0 PC";
|
||||
- SET_MACHINE_COMPAT(m, PC_RHEL6_1_COMPAT);
|
||||
-}
|
||||
-
|
||||
-DEFINE_PC_MACHINE(rhel610, "rhel6.1.0", pc_init_rhel610,
|
||||
- pc_machine_rhel610_options);
|
||||
-
|
||||
-#define PC_RHEL6_0_COMPAT \
|
||||
- {\
|
||||
- .driver = "qxl",\
|
||||
- .property = "revision",\
|
||||
- .value = stringify(1),\
|
||||
- },{\
|
||||
- .driver = "qxl-vga",\
|
||||
- .property = "revision",\
|
||||
- .value = stringify(1),\
|
||||
- },{\
|
||||
- .driver = "VGA",\
|
||||
- .property = "rombar",\
|
||||
- .value = stringify(0),\
|
||||
- },
|
||||
-
|
||||
-static void pc_compat_rhel600(MachineState *machine)
|
||||
-{
|
||||
- pc_compat_rhel610(machine);
|
||||
-}
|
||||
-
|
||||
-static void pc_init_rhel600(MachineState *machine)
|
||||
-{
|
||||
- pc_compat_rhel600(machine);
|
||||
- pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
|
||||
- TYPE_I440FX_PCI_DEVICE);}
|
||||
-
|
||||
-static void pc_machine_rhel600_options(MachineClass *m)
|
||||
-{
|
||||
- pc_machine_rhel610_options(m);
|
||||
- m->family = "pc_piix_Z";
|
||||
- m->desc = "RHEL 6.0.0 PC";
|
||||
- SET_MACHINE_COMPAT(m, PC_RHEL6_0_COMPAT);
|
||||
-}
|
||||
-
|
||||
-DEFINE_PC_MACHINE(rhel600, "rhel6.0.0", pc_init_rhel600,
|
||||
- pc_machine_rhel600_options);
|
||||
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
|
||||
index e94424f..ae84db4 100644
|
||||
--- a/include/hw/i386/pc.h
|
||||
+++ b/include/hw/i386/pc.h
|
||||
@@ -1394,8 +1394,6 @@ extern void igd_passthrough_isa_bridge_create(PCIBus *bus, uint16_t gpu_dev_id);
|
||||
* 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.
|
||||
- * PC_RHEL6_*_COMPAT apply to i440fx types only, and therefore live
|
||||
- * in pc_piix.c.
|
||||
*/
|
||||
|
||||
/*
|
||||
diff --git a/tests/qom-test.c b/tests/qom-test.c
|
||||
index db0d3ab..2fc2670 100644
|
||||
--- a/tests/qom-test.c
|
||||
+++ b/tests/qom-test.c
|
||||
@@ -16,9 +16,7 @@
|
||||
#include "libqtest.h"
|
||||
|
||||
static const char *blacklist_x86[] = {
|
||||
- "xenfv", "xenpv", "isapc",
|
||||
- "rhel6.6.0", "rhel6.5.0", "rhel6.4.0", "rhel6.3.0",
|
||||
- "rhel6.2.0", "rhel6.1.0", "rhel6.0.0", NULL
|
||||
+ "xenfv", "xenpv", "isapc", NULL
|
||||
};
|
||||
|
||||
static const struct {
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,81 +0,0 @@
|
||||
From 8a50b1caa7e56dc2b9a2f4dc8bc9c63e9a064085 Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Thu, 26 Apr 2018 02:54:04 +0000
|
||||
Subject: Remove rhel6_ctrl_guest_workaround
|
||||
|
||||
As we are not support RHEL 6 compatibility on RHEL 8 removing hack
|
||||
to handle missing ctrl-guest-offload in RHEL 6 machine types.
|
||||
|
||||
This hack was introduced for BZ 1378334 (windows guests migration from
|
||||
rhel6.8-z to rhel7.3 with virtio-net-pci fail) in qemu-kvm-rhev for RHEL 7.4
|
||||
and was backported to qemu-kvm-rhev for RHEL 7.3 as commit 9a30ebb5 (and
|
||||
propagated to RHEL 7.4 with rebase to 2.9.0).
|
||||
|
||||
Singed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
hw/virtio/virtio.c | 22 +---------------------
|
||||
include/hw/virtio/virtio.h | 1 -
|
||||
2 files changed, 1 insertion(+), 22 deletions(-)
|
||||
|
||||
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
|
||||
index 4bcb4f4..006d3d1 100644
|
||||
--- a/hw/virtio/virtio.c
|
||||
+++ b/hw/virtio/virtio.c
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "hw/virtio/virtio-access.h"
|
||||
#include "sysemu/dma.h"
|
||||
|
||||
-#include "standard-headers/linux/virtio_net.h"
|
||||
/*
|
||||
* The alignment to use between consumer and producer parts of vring.
|
||||
* x86 pagesize again. This is the default, used by transports like PCI
|
||||
@@ -1992,24 +1991,7 @@ const VMStateInfo virtio_vmstate_info = {
|
||||
static int virtio_set_features_nocheck(VirtIODevice *vdev, uint64_t val)
|
||||
{
|
||||
VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
|
||||
- bool bad;
|
||||
- uint64_t ctrl_guest_mask = 1ull << VIRTIO_NET_F_CTRL_GUEST_OFFLOADS;
|
||||
-
|
||||
- if (vdev->rhel6_ctrl_guest_workaround && (val & ctrl_guest_mask) &&
|
||||
- !(vdev->host_features & ctrl_guest_mask)) {
|
||||
- /*
|
||||
- * This works around a mistake in the definition of the rhel6.[56].0
|
||||
- * machinetypes, ctrl-guest-offload was not set in qemu-kvm-rhev for
|
||||
- * those machine types, but is set on the rhel6 qemu-kvm-rhev build.
|
||||
- * If an incoming rhel6 guest uses it then we need to allow it.
|
||||
- * Note: There's a small race where a guest read the flag but didn't
|
||||
- * declare it's useage yet.
|
||||
- */
|
||||
- fprintf(stderr, "RHEL6 ctrl_guest_offload workaround\n");
|
||||
- vdev->host_features |= ctrl_guest_mask;
|
||||
- }
|
||||
-
|
||||
- bad = (val & ~(vdev->host_features)) != 0;
|
||||
+ bool bad = (val & ~(vdev->host_features)) != 0;
|
||||
|
||||
val &= vdev->host_features;
|
||||
if (k->set_features) {
|
||||
@@ -2584,8 +2566,6 @@ static void virtio_device_instance_finalize(Object *obj)
|
||||
|
||||
static Property virtio_properties[] = {
|
||||
DEFINE_VIRTIO_COMMON_FEATURES(VirtIODevice, host_features),
|
||||
- DEFINE_PROP_BOOL("__com.redhat_rhel6_ctrl_guest_workaround", VirtIODevice,
|
||||
- rhel6_ctrl_guest_workaround, false),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
|
||||
index 41e13d2..098bdaa 100644
|
||||
--- a/include/hw/virtio/virtio.h
|
||||
+++ b/include/hw/virtio/virtio.h
|
||||
@@ -95,7 +95,6 @@ struct VirtIODevice
|
||||
uint8_t device_endian;
|
||||
bool use_guest_notifier_mask;
|
||||
AddressSpace *dma_as;
|
||||
- bool rhel6_ctrl_guest_workaround;
|
||||
QLIST_HEAD(, VirtQueue) *vector_queues;
|
||||
};
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,242 +0,0 @@
|
||||
From 71562f446db550489bf4ba79e634a8b55e74d83f Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Thu, 26 Apr 2018 02:54:06 +0000
|
||||
Subject: Remove SeaBIOS shadowing
|
||||
|
||||
As we do not support RHEL 6 compatibility on RHEL 8 we can remove
|
||||
hacks that shadow SeaBIOS for incomming RHEL-6 host
|
||||
|
||||
This feature was added in qemu-kvm RHEL 7.1 for BZ 1027565 (fail to
|
||||
reboot guest after migration from RHEL6.5 host to RHEL7.0 host) as
|
||||
commit 9f136b4ed4ec and was backported to RHEL 7.0 as 0day fix (BZ 1091322,
|
||||
commit df9e9e9c56c7).
|
||||
|
||||
In addition, fix was provided for qemu-kvm-rhev in RHEL 7.1 (BZ 1103579,
|
||||
commit cada12245ab9).
|
||||
|
||||
For qemu-kvm, use of this hack was extended for BZ 1176283
|
||||
([migration]migrationfailed when configure guest with OVMF bios + machine
|
||||
type=rhel6.5.0) in RHEL 7.2 by commit c3f813d2f.
|
||||
|
||||
For qemu-kvm-rhev, use of this hack was extened for BZ 1170093 (guest NUMA
|
||||
failed to migrate when machine is rhel6.5.0) for RHEL 7.1 by commit 8e8107cb3
|
||||
and BZ 1175099 ([migration]migration failed when configure guest with OVMF
|
||||
bios + machine type=rhel6.5.0) for RHEL 7.2 by commit 8b220c0e.
|
||||
|
||||
In addition, during rebase to 2.10, handling was moved to separate module
|
||||
and stub version was provided.
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
hw/i386/Makefile.objs | 1 -
|
||||
hw/i386/pc_sysfw.c | 16 -------------
|
||||
hw/i386/shadow-bios.c | 64 -------------------------------------------------
|
||||
include/sysemu/sysemu.h | 2 --
|
||||
migration/savevm.c | 7 ------
|
||||
numa.c | 13 ----------
|
||||
stubs/Makefile.objs | 1 -
|
||||
stubs/shadow-bios.c | 7 ------
|
||||
8 files changed, 111 deletions(-)
|
||||
delete mode 100644 hw/i386/shadow-bios.c
|
||||
delete mode 100644 stubs/shadow-bios.c
|
||||
|
||||
diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
|
||||
index 8c25538..fa87a14 100644
|
||||
--- a/hw/i386/Makefile.objs
|
||||
+++ b/hw/i386/Makefile.objs
|
||||
@@ -10,4 +10,3 @@ obj-$(CONFIG_VMMOUSE) += vmmouse.o
|
||||
|
||||
obj-y += kvmvapic.o
|
||||
obj-y += acpi-build.o
|
||||
-obj-y += shadow-bios.o
|
||||
diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c
|
||||
index 2a6de35..73ac783 100644
|
||||
--- a/hw/i386/pc_sysfw.c
|
||||
+++ b/hw/i386/pc_sysfw.c
|
||||
@@ -207,13 +207,6 @@ static void old_pc_system_rom_init(MemoryRegion *rom_memory, bool isapc_ram_fw)
|
||||
(bios_size % 65536) != 0) {
|
||||
goto bios_error;
|
||||
}
|
||||
- if (shadow_bios_after_incoming && bios_size != 128 * 1024) {
|
||||
- MachineClass *mc;
|
||||
-
|
||||
- mc = MACHINE_GET_CLASS(current_machine);
|
||||
- error_report("machine %s only supports a 128KB BIOS image", mc->name);
|
||||
- exit(1);
|
||||
- }
|
||||
bios = g_malloc(sizeof(*bios));
|
||||
memory_region_init_ram(bios, NULL, "pc.bios", bios_size, &error_fatal);
|
||||
if (!isapc_ram_fw) {
|
||||
@@ -261,15 +254,6 @@ void pc_system_firmware_init(MemoryRegion *rom_memory, bool isapc_ram_fw)
|
||||
return;
|
||||
}
|
||||
|
||||
- if (shadow_bios_after_incoming) {
|
||||
- MachineClass *mc;
|
||||
-
|
||||
- mc = MACHINE_GET_CLASS(current_machine);
|
||||
- error_report("flash-based firmware is not supported by machine %s",
|
||||
- mc->name);
|
||||
- exit(1);
|
||||
- }
|
||||
-
|
||||
if (kvm_enabled() && !kvm_readonly_mem_enabled()) {
|
||||
/* Older KVM cannot execute from device memory. So, flash memory
|
||||
* cannot be used unless the readonly memory kvm capability is present. */
|
||||
diff --git a/hw/i386/shadow-bios.c b/hw/i386/shadow-bios.c
|
||||
deleted file mode 100644
|
||||
index 65a4cb8..0000000
|
||||
--- a/hw/i386/shadow-bios.c
|
||||
+++ /dev/null
|
||||
@@ -1,64 +0,0 @@
|
||||
-#include "qemu/osdep.h"
|
||||
-#include "sysemu/sysemu.h"
|
||||
-#include "target/i386/cpu.h"
|
||||
-#include "exec/ram_addr.h"
|
||||
-#include "qemu/cutils.h"
|
||||
-
|
||||
-void shadow_bios(void)
|
||||
-{
|
||||
- RAMBlock *block, *ram, *oprom, *bios;
|
||||
- size_t one_meg, oprom_size, bios_size;
|
||||
- uint8_t *cd_seg_host, *ef_seg_host;
|
||||
-
|
||||
- ram = NULL;
|
||||
- oprom = NULL;
|
||||
- bios = NULL;
|
||||
- rcu_read_lock();
|
||||
- QLIST_FOREACH_RCU(block, &ram_list.blocks, next) {
|
||||
- if (strcmp("pc.ram", block->idstr) == 0) {
|
||||
- assert(ram == NULL);
|
||||
- ram = block;
|
||||
- } else if (strcmp("pc.rom", block->idstr) == 0) {
|
||||
- assert(oprom == NULL);
|
||||
- oprom = block;
|
||||
- } else if (strcmp("pc.bios", block->idstr) == 0) {
|
||||
- assert(bios == NULL);
|
||||
- bios = block;
|
||||
- }
|
||||
- }
|
||||
- assert(ram != NULL);
|
||||
- assert(oprom != NULL);
|
||||
- assert(bios != NULL);
|
||||
- assert(memory_region_is_ram(ram->mr));
|
||||
- assert(memory_region_is_ram(oprom->mr));
|
||||
- assert(memory_region_is_ram(bios->mr));
|
||||
- assert(int128_eq(ram->mr->size, int128_make64(ram->used_length)));
|
||||
- assert(int128_eq(oprom->mr->size, int128_make64(oprom->used_length)));
|
||||
- assert(int128_eq(bios->mr->size, int128_make64(bios->used_length)));
|
||||
-
|
||||
- one_meg = 1024 * 1024;
|
||||
- oprom_size = 128 * 1024;
|
||||
- bios_size = 128 * 1024;
|
||||
- assert(ram->used_length >= one_meg);
|
||||
- assert(oprom->used_length == oprom_size);
|
||||
- assert(bios->used_length == bios_size);
|
||||
-
|
||||
- ef_seg_host = memory_region_get_ram_ptr(ram->mr) + (one_meg - bios_size);
|
||||
- cd_seg_host = ef_seg_host - oprom_size;
|
||||
-
|
||||
- /* This is a crude hack, but we must distinguish a rhel6.x.0 machtype guest
|
||||
- * coming in from a RHEL-6 emulator (where shadowing has had no effect on
|
||||
- * "pc.ram") from a similar guest coming in from a RHEL-7 emulator (where
|
||||
- * shadowing has worked). In the latter case we must not trample the live
|
||||
- * SeaBIOS variables in "pc.ram".
|
||||
- */
|
||||
- if (buffer_is_zero(ef_seg_host, bios_size)) {
|
||||
- fprintf(stderr, "copying E and F segments from pc.bios to pc.ram\n");
|
||||
- memcpy(ef_seg_host, memory_region_get_ram_ptr(bios->mr), bios_size);
|
||||
- }
|
||||
- if (buffer_is_zero(cd_seg_host, oprom_size)) {
|
||||
- fprintf(stderr, "copying C and D segments from pc.rom to pc.ram\n");
|
||||
- memcpy(cd_seg_host, memory_region_get_ram_ptr(oprom->mr), oprom_size);
|
||||
- }
|
||||
- rcu_read_unlock();
|
||||
-}
|
||||
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
|
||||
index 5832c38..2b42151 100644
|
||||
--- a/include/sysemu/sysemu.h
|
||||
+++ b/include/sysemu/sysemu.h
|
||||
@@ -94,8 +94,6 @@ void qemu_add_machine_init_done_notifier(Notifier *notify);
|
||||
void qemu_remove_machine_init_done_notifier(Notifier *notify);
|
||||
|
||||
void qemu_announce_self(void);
|
||||
-extern bool shadow_bios_after_incoming;
|
||||
-void shadow_bios(void);
|
||||
|
||||
extern int autostart;
|
||||
|
||||
diff --git a/migration/savevm.c b/migration/savevm.c
|
||||
index 56c9feb..6c539d1 100644
|
||||
--- a/migration/savevm.c
|
||||
+++ b/migration/savevm.c
|
||||
@@ -84,7 +84,6 @@ enum qemu_vm_cmd {
|
||||
MIG_CMD_PACKAGED, /* Send a wrapped stream within this stream */
|
||||
MIG_CMD_MAX
|
||||
};
|
||||
-bool shadow_bios_after_incoming;
|
||||
|
||||
#define MAX_VM_CMD_PACKAGED_SIZE UINT32_MAX
|
||||
static struct mig_cmd_args {
|
||||
@@ -2206,12 +2205,6 @@ int qemu_loadvm_state(QEMUFile *f)
|
||||
}
|
||||
|
||||
qemu_loadvm_state_cleanup();
|
||||
- /* Supplement SeaBIOS's shadowing now, because it was useless when the
|
||||
- * incoming VM started on the RHEL-6 emulator.
|
||||
- */
|
||||
- if (shadow_bios_after_incoming) {
|
||||
- shadow_bios();
|
||||
- }
|
||||
|
||||
cpu_synchronize_all_post_init();
|
||||
|
||||
diff --git a/numa.c b/numa.c
|
||||
index daf10d8..1116c90 100644
|
||||
--- a/numa.c
|
||||
+++ b/numa.c
|
||||
@@ -493,19 +493,6 @@ void memory_region_allocate_system_memory(MemoryRegion *mr, Object *owner,
|
||||
return;
|
||||
}
|
||||
|
||||
- /* The shadow_bios_after_incoming hack at savevm.c:shadow_bios() is not
|
||||
- * able to handle the multiple memory blocks added when using NUMA
|
||||
- * memdevs. We can disallow -numa memdev= when using rhel6.* machine-types
|
||||
- * because RHEL-6 didn't support the NUMA memdev option.
|
||||
- */
|
||||
- if (shadow_bios_after_incoming) {
|
||||
- MachineClass *mc;
|
||||
- mc = MACHINE_GET_CLASS(current_machine);
|
||||
- error_report("-numa memdev is not supported by machine %s",
|
||||
- mc->name);
|
||||
- exit(1);
|
||||
- }
|
||||
-
|
||||
memory_region_init(mr, owner, name, ram_size);
|
||||
for (i = 0; i < nb_numa_nodes; i++) {
|
||||
uint64_t size = numa_info[i].node_mem;
|
||||
diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs
|
||||
index 8f111c5..dfdfca7 100644
|
||||
--- a/stubs/Makefile.objs
|
||||
+++ b/stubs/Makefile.objs
|
||||
@@ -44,4 +44,3 @@ stub-obj-y += xen-hvm.o
|
||||
stub-obj-y += pci-host-piix.o
|
||||
stub-obj-y += ram-block.o
|
||||
stub-obj-y += ide-isa.o
|
||||
-stub-obj-y += shadow-bios.o
|
||||
diff --git a/stubs/shadow-bios.c b/stubs/shadow-bios.c
|
||||
deleted file mode 100644
|
||||
index c77cd7a..0000000
|
||||
--- a/stubs/shadow-bios.c
|
||||
+++ /dev/null
|
||||
@@ -1,7 +0,0 @@
|
||||
-#include "qemu/osdep.h"
|
||||
-#include "sysemu/sysemu.h"
|
||||
-
|
||||
-void shadow_bios(void)
|
||||
-{
|
||||
- abort();
|
||||
-}
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,67 +0,0 @@
|
||||
From 40a88676cdb22e844dce24c1745b6004a8cf7806 Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Thu, 26 Apr 2018 02:54:07 +0000
|
||||
Subject: Remove ich9_uhci123_irqpin_override
|
||||
|
||||
As we do not support RHEL 6 compatibility we remove this hack.
|
||||
|
||||
This hack was introduced in RHEL 7.1 for BZ 1085701 and 1103581 (Guest
|
||||
hits call trace migrate from RHEL6.5 to RHEL7.0 host with -M 6.1
|
||||
& balloon & uhci device) by commits 8061ffe65490 and 42a193d925b3,
|
||||
and was backported to RHEL 7.0 as 0day fix (BZ 1090981,
|
||||
commit 48addb5b5b3b).
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
hw/usb/hcd-uhci.c | 13 +------------
|
||||
include/hw/usb.h | 3 ---
|
||||
2 files changed, 1 insertion(+), 15 deletions(-)
|
||||
|
||||
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
|
||||
index 86d6ab8..9d7b9df 100644
|
||||
--- a/hw/usb/hcd-uhci.c
|
||||
+++ b/hw/usb/hcd-uhci.c
|
||||
@@ -152,8 +152,6 @@ typedef struct UHCI_QH {
|
||||
uint32_t el_link;
|
||||
} UHCI_QH;
|
||||
|
||||
-bool ich9_uhci123_irqpin_override;
|
||||
-
|
||||
static void uhci_async_cancel(UHCIAsync *async);
|
||||
static void uhci_queue_fill(UHCIQueue *q, UHCI_TD *td);
|
||||
static void uhci_resume(void *opaque);
|
||||
@@ -1222,16 +1220,7 @@ static void usb_uhci_common_realize(PCIDevice *dev, Error **errp)
|
||||
/* TODO: reset value should be 0. */
|
||||
pci_conf[USB_SBRN] = USB_RELEASE_1; // release number
|
||||
|
||||
- if (ich9_uhci123_irqpin_override &&
|
||||
- u->info.vendor_id == PCI_VENDOR_ID_INTEL &&
|
||||
- (u->info.device_id == PCI_DEVICE_ID_INTEL_82801I_UHCI1 ||
|
||||
- u->info.device_id == PCI_DEVICE_ID_INTEL_82801I_UHCI2 ||
|
||||
- u->info.device_id == PCI_DEVICE_ID_INTEL_82801I_UHCI3)) {
|
||||
- fprintf(stderr, "RHEL-6 compat: %s: irq_pin = 3\n", u->info.name);
|
||||
- irq_pin = 3;
|
||||
- } else {
|
||||
- irq_pin = u->info.irq_pin;
|
||||
- }
|
||||
+ irq_pin = u->info.irq_pin;
|
||||
pci_config_set_interrupt_pin(pci_conf, irq_pin + 1);
|
||||
|
||||
if (s->masterbus) {
|
||||
diff --git a/include/hw/usb.h b/include/hw/usb.h
|
||||
index 5b3fb1f..b943ec9 100644
|
||||
--- a/include/hw/usb.h
|
||||
+++ b/include/hw/usb.h
|
||||
@@ -607,9 +607,6 @@ int usb_get_quirks(uint16_t vendor_id, uint16_t product_id,
|
||||
uint8_t interface_protocol);
|
||||
|
||||
|
||||
-/* hcd-uhci.c -- RHEL-6 machine type compatibility */
|
||||
-extern bool ich9_uhci123_irqpin_override;
|
||||
-
|
||||
/* hcd-xhci.c -- rhel7.0.0 machine type compatibility */
|
||||
extern bool migrate_cve_2014_5263_xhci_fields;
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,50 +0,0 @@
|
||||
From db20a3f422ca948784aa74375d1977b7d0a1c7ed Mon Sep 17 00:00:00 2001
|
||||
From: Cornelia Huck <cohuck@redhat.com>
|
||||
Date: Tue, 15 May 2018 07:33:45 +0000
|
||||
Subject: s390x/css: disabled subchannels cannot be status pending
|
||||
|
||||
The 3270 code will try to post an attention interrupt when the
|
||||
3270 emulator (e.g. x3270) attaches. If the guest has not yet
|
||||
enabled the subchannel for the 3270 device, we will present a spurious
|
||||
cc 1 (status pending) when it uses msch on it later on, e.g. when
|
||||
trying to enable the subchannel.
|
||||
|
||||
To fix this, just don't do anything in css_conditional_io_interrupt()
|
||||
if the subchannel is not enabled. The 3270 code will work fine with
|
||||
that, and the other user of this function (virtio-ccw) never
|
||||
attempts to post an interrupt for a disabled device to begin with.
|
||||
|
||||
CC: qemu-stable@nongnu.org
|
||||
Reported-by: Thomas Huth <thuth@redhat.com>
|
||||
Tested-by: Thomas Huth <thuth@redhat.com>
|
||||
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
|
||||
Acked-by: Halil Pasic <pasic@linux.ibm.com>
|
||||
Reviewed-by: David Hildenbrand <david@redhat.com>
|
||||
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
|
||||
(cherry picked from commit 6e9c893ecd00afd5344c35d0d0ded50eaa0938f6)
|
||||
---
|
||||
hw/s390x/css.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/hw/s390x/css.c b/hw/s390x/css.c
|
||||
index 301bf17..56c3fa8 100644
|
||||
--- a/hw/s390x/css.c
|
||||
+++ b/hw/s390x/css.c
|
||||
@@ -617,6 +617,14 @@ void css_inject_io_interrupt(SubchDev *sch)
|
||||
void css_conditional_io_interrupt(SubchDev *sch)
|
||||
{
|
||||
/*
|
||||
+ * If the subchannel is not enabled, it is not made status pending
|
||||
+ * (see PoP p. 16-17, "Status Control").
|
||||
+ */
|
||||
+ if (!(sch->curr_status.pmcw.flags & PMCW_FLAGS_MASK_ENA)) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
* If the subchannel is not currently status pending, make it pending
|
||||
* with alert status.
|
||||
*/
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,129 +0,0 @@
|
||||
From 4772dbd9b905b7b304f24fe3d2e4ca8ba0a18816 Mon Sep 17 00:00:00 2001
|
||||
From: Cornelia Huck <cohuck@redhat.com>
|
||||
Date: Tue, 15 May 2018 07:33:46 +0000
|
||||
Subject: virtio-ccw: common reset handler
|
||||
|
||||
All the different virtio ccw devices use the same reset handler,
|
||||
so let's move setting it into the base virtio ccw device class.
|
||||
|
||||
CC: qemu-stable@nongnu.org
|
||||
Reviewed-by: Thomas Huth <thuth@redhat.com>
|
||||
Reviewed-by: David Hildenbrand <david@redhat.com>
|
||||
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
|
||||
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
|
||||
(cherry picked from commit 0c53057adb04d254bc09511880670c92ab185fc6)
|
||||
---
|
||||
hw/s390x/virtio-ccw.c | 13 +------------
|
||||
1 file changed, 1 insertion(+), 12 deletions(-)
|
||||
|
||||
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
|
||||
index 8720e46..2db8cc6 100644
|
||||
--- a/hw/s390x/virtio-ccw.c
|
||||
+++ b/hw/s390x/virtio-ccw.c
|
||||
@@ -1348,7 +1348,6 @@ static void virtio_ccw_net_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
k->realize = virtio_ccw_net_realize;
|
||||
k->unrealize = virtio_ccw_unrealize;
|
||||
- dc->reset = virtio_ccw_reset;
|
||||
dc->props = virtio_ccw_net_properties;
|
||||
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
|
||||
}
|
||||
@@ -1376,7 +1375,6 @@ static void virtio_ccw_blk_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
k->realize = virtio_ccw_blk_realize;
|
||||
k->unrealize = virtio_ccw_unrealize;
|
||||
- dc->reset = virtio_ccw_reset;
|
||||
dc->props = virtio_ccw_blk_properties;
|
||||
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
|
||||
}
|
||||
@@ -1404,7 +1402,6 @@ static void virtio_ccw_serial_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
k->realize = virtio_ccw_serial_realize;
|
||||
k->unrealize = virtio_ccw_unrealize;
|
||||
- dc->reset = virtio_ccw_reset;
|
||||
dc->props = virtio_ccw_serial_properties;
|
||||
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
|
||||
}
|
||||
@@ -1432,7 +1429,6 @@ static void virtio_ccw_balloon_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
k->realize = virtio_ccw_balloon_realize;
|
||||
k->unrealize = virtio_ccw_unrealize;
|
||||
- dc->reset = virtio_ccw_reset;
|
||||
dc->props = virtio_ccw_balloon_properties;
|
||||
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
|
||||
}
|
||||
@@ -1460,7 +1456,6 @@ static void virtio_ccw_scsi_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
k->realize = virtio_ccw_scsi_realize;
|
||||
k->unrealize = virtio_ccw_unrealize;
|
||||
- dc->reset = virtio_ccw_reset;
|
||||
dc->props = virtio_ccw_scsi_properties;
|
||||
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
|
||||
}
|
||||
@@ -1487,7 +1482,6 @@ static void vhost_ccw_scsi_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
k->realize = vhost_ccw_scsi_realize;
|
||||
k->unrealize = virtio_ccw_unrealize;
|
||||
- dc->reset = virtio_ccw_reset;
|
||||
dc->props = vhost_ccw_scsi_properties;
|
||||
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
|
||||
}
|
||||
@@ -1524,7 +1518,6 @@ static void virtio_ccw_rng_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
k->realize = virtio_ccw_rng_realize;
|
||||
k->unrealize = virtio_ccw_unrealize;
|
||||
- dc->reset = virtio_ccw_reset;
|
||||
dc->props = virtio_ccw_rng_properties;
|
||||
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
|
||||
}
|
||||
@@ -1564,7 +1557,6 @@ static void virtio_ccw_crypto_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
k->realize = virtio_ccw_crypto_realize;
|
||||
k->unrealize = virtio_ccw_unrealize;
|
||||
- dc->reset = virtio_ccw_reset;
|
||||
dc->props = virtio_ccw_crypto_properties;
|
||||
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
|
||||
}
|
||||
@@ -1603,7 +1595,6 @@ static void virtio_ccw_gpu_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
k->realize = virtio_ccw_gpu_realize;
|
||||
k->unrealize = virtio_ccw_unrealize;
|
||||
- dc->reset = virtio_ccw_reset;
|
||||
dc->props = virtio_ccw_gpu_properties;
|
||||
dc->hotpluggable = false;
|
||||
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
|
||||
@@ -1632,7 +1623,6 @@ static void virtio_ccw_input_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
k->realize = virtio_ccw_input_realize;
|
||||
k->unrealize = virtio_ccw_unrealize;
|
||||
- dc->reset = virtio_ccw_reset;
|
||||
dc->props = virtio_ccw_input_properties;
|
||||
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
|
||||
}
|
||||
@@ -1736,6 +1726,7 @@ static void virtio_ccw_device_class_init(ObjectClass *klass, void *data)
|
||||
dc->realize = virtio_ccw_busdev_realize;
|
||||
dc->unrealize = virtio_ccw_busdev_unrealize;
|
||||
dc->bus_type = TYPE_VIRTUAL_CSS_BUS;
|
||||
+ dc->reset = virtio_ccw_reset;
|
||||
}
|
||||
|
||||
static const TypeInfo virtio_ccw_device_info = {
|
||||
@@ -1812,7 +1803,6 @@ static void virtio_ccw_9p_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
k->unrealize = virtio_ccw_unrealize;
|
||||
k->realize = virtio_ccw_9p_realize;
|
||||
- dc->reset = virtio_ccw_reset;
|
||||
dc->props = virtio_ccw_9p_properties;
|
||||
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
|
||||
}
|
||||
@@ -1862,7 +1852,6 @@ static void vhost_vsock_ccw_class_init(ObjectClass *klass, void *data)
|
||||
k->unrealize = virtio_ccw_unrealize;
|
||||
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
|
||||
dc->props = vhost_vsock_ccw_properties;
|
||||
- dc->reset = virtio_ccw_reset;
|
||||
}
|
||||
|
||||
static void vhost_vsock_ccw_instance_init(Object *obj)
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,105 +0,0 @@
|
||||
From 39b8d397fe34ae375e33371ee58894d13667560b Mon Sep 17 00:00:00 2001
|
||||
From: Cornelia Huck <cohuck@redhat.com>
|
||||
Date: Tue, 15 May 2018 07:33:47 +0000
|
||||
Subject: s390x/ccw: make sure all ccw devices are properly reset
|
||||
|
||||
Thomas reported that the subchannel for a 3270 device that ended up
|
||||
in a broken state (status pending even though not enabled) did not
|
||||
get out of that state even after a reboot (which involves a subsytem
|
||||
reset). The reason for this is that the 3270 device did not define
|
||||
a reset handler.
|
||||
|
||||
Let's fix this by introducing a base reset handler (set up for all
|
||||
ccw devices) that resets the subchannel and have virtio-ccw call
|
||||
its virtio-specific reset procedure in addition to that.
|
||||
|
||||
CC: qemu-stable@nongnu.org
|
||||
Reported-by: Thomas Huth <thuth@redhat.com>
|
||||
Suggested-by: Christian Borntraeger <borntraeger@de.ibm.com>
|
||||
Reviewed-by: Thomas Huth <thuth@redhat.com>
|
||||
Tested-by: Thomas Huth <thuth@redhat.com>
|
||||
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
|
||||
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
|
||||
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
|
||||
(cherry picked from commit 838fb84f83c84f00d15b1bede5e080b495644458)
|
||||
---
|
||||
hw/s390x/ccw-device.c | 8 ++++++++
|
||||
hw/s390x/virtio-ccw.c | 9 ++++++---
|
||||
hw/s390x/virtio-ccw.h | 1 +
|
||||
3 files changed, 15 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/hw/s390x/ccw-device.c b/hw/s390x/ccw-device.c
|
||||
index f9bfa15..7cd73df 100644
|
||||
--- a/hw/s390x/ccw-device.c
|
||||
+++ b/hw/s390x/ccw-device.c
|
||||
@@ -40,6 +40,13 @@ static Property ccw_device_properties[] = {
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
+static void ccw_device_reset(DeviceState *d)
|
||||
+{
|
||||
+ CcwDevice *ccw_dev = CCW_DEVICE(d);
|
||||
+
|
||||
+ css_reset_sch(ccw_dev->sch);
|
||||
+}
|
||||
+
|
||||
static void ccw_device_class_init(ObjectClass *klass, void *data)
|
||||
{
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
@@ -48,6 +55,7 @@ static void ccw_device_class_init(ObjectClass *klass, void *data)
|
||||
k->realize = ccw_device_realize;
|
||||
k->refill_ids = ccw_device_refill_ids;
|
||||
dc->props = ccw_device_properties;
|
||||
+ dc->reset = ccw_device_reset;
|
||||
}
|
||||
|
||||
const VMStateDescription vmstate_ccw_dev = {
|
||||
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
|
||||
index 2db8cc6..dfedd84 100644
|
||||
--- a/hw/s390x/virtio-ccw.c
|
||||
+++ b/hw/s390x/virtio-ccw.c
|
||||
@@ -1061,10 +1061,12 @@ static void virtio_ccw_reset(DeviceState *d)
|
||||
{
|
||||
VirtioCcwDevice *dev = VIRTIO_CCW_DEVICE(d);
|
||||
VirtIODevice *vdev = virtio_bus_get_device(&dev->bus);
|
||||
- CcwDevice *ccw_dev = CCW_DEVICE(d);
|
||||
+ VirtIOCCWDeviceClass *vdc = VIRTIO_CCW_DEVICE_GET_CLASS(dev);
|
||||
|
||||
virtio_ccw_reset_virtio(dev, vdev);
|
||||
- css_reset_sch(ccw_dev->sch);
|
||||
+ if (vdc->parent_reset) {
|
||||
+ vdc->parent_reset(d);
|
||||
+ }
|
||||
}
|
||||
|
||||
static void virtio_ccw_vmstate_change(DeviceState *d, bool running)
|
||||
@@ -1721,12 +1723,13 @@ static void virtio_ccw_device_class_init(ObjectClass *klass, void *data)
|
||||
{
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
CCWDeviceClass *k = CCW_DEVICE_CLASS(dc);
|
||||
+ VirtIOCCWDeviceClass *vdc = VIRTIO_CCW_DEVICE_CLASS(klass);
|
||||
|
||||
k->unplug = virtio_ccw_busdev_unplug;
|
||||
dc->realize = virtio_ccw_busdev_realize;
|
||||
dc->unrealize = virtio_ccw_busdev_unrealize;
|
||||
dc->bus_type = TYPE_VIRTUAL_CSS_BUS;
|
||||
- dc->reset = virtio_ccw_reset;
|
||||
+ device_class_set_parent_reset(dc, virtio_ccw_reset, &vdc->parent_reset);
|
||||
}
|
||||
|
||||
static const TypeInfo virtio_ccw_device_info = {
|
||||
diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h
|
||||
index 2fc5130..3453aa1 100644
|
||||
--- a/hw/s390x/virtio-ccw.h
|
||||
+++ b/hw/s390x/virtio-ccw.h
|
||||
@@ -77,6 +77,7 @@ typedef struct VirtIOCCWDeviceClass {
|
||||
CCWDeviceClass parent_class;
|
||||
void (*realize)(VirtioCcwDevice *dev, Error **errp);
|
||||
void (*unrealize)(VirtioCcwDevice *dev, Error **errp);
|
||||
+ void (*parent_reset)(DeviceState *dev);
|
||||
} VirtIOCCWDeviceClass;
|
||||
|
||||
/* Performance improves when virtqueue kick processing is decoupled from the
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,32 +0,0 @@
|
||||
From 0d4f38c339fa1e200a01fdf8b17a0a5c22d07ae2 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Huth <thuth@redhat.com>
|
||||
Date: Tue, 15 May 2018 07:33:48 +0000
|
||||
Subject: s390x: Re-enable CONFIG_TERMINAL3270
|
||||
|
||||
Upstream-status: n/a (downstream only config change)
|
||||
|
||||
This is required to be able to connect to the guest via a 3270
|
||||
terminal.
|
||||
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
---
|
||||
default-configs/s390x-softmmu.mak | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/default-configs/s390x-softmmu.mak b/default-configs/s390x-softmmu.mak
|
||||
index 649bf2c..17e871a 100644
|
||||
--- a/default-configs/s390x-softmmu.mak
|
||||
+++ b/default-configs/s390x-softmmu.mak
|
||||
@@ -4,8 +4,7 @@ CONFIG_PCI=y
|
||||
#CONFIG_VHOST_USER_BLK=$(call land,$(CONFIG_VHOST_USER),$(CONFIG_LINUX))
|
||||
CONFIG_VIRTIO=y
|
||||
CONFIG_SCLPCONSOLE=y
|
||||
-# Disabled for Red Hat Enterprise Linux:
|
||||
-# CONFIG_TERMINAL3270=y
|
||||
+CONFIG_TERMINAL3270=y
|
||||
CONFIG_S390_FLIC=y
|
||||
CONFIG_S390_FLIC_KVM=$(CONFIG_KVM)
|
||||
# Disabled for Red Hat Enterprise Linux:
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,70 +0,0 @@
|
||||
From 7574808ac154ac9ddf8264bf14e775fab96d0cac Mon Sep 17 00:00:00 2001
|
||||
From: Laurent Vivier <lvivier@redhat.com>
|
||||
Date: Thu, 7 Jun 2018 12:55:12 +0000
|
||||
Subject: redhat: define pseries-rhel7.6.0 machine types
|
||||
|
||||
BREW: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=16632825
|
||||
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1585651
|
||||
BRANCH: rhel8/master-2.12.0
|
||||
UPSTREAM: downsream only
|
||||
Tested: minimal, as the change is the same as for RHEL7.6
|
||||
Tested ping-pong migration between two
|
||||
pseries-rhel7.6.0/qemu-kvm-2.12.0 and with
|
||||
pseries-rhel7.5.0/qemu-kvm-rhev-2.10
|
||||
|
||||
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
|
||||
---
|
||||
hw/ppc/spapr.c | 26 ++++++++++++++++++++++++--
|
||||
1 file changed, 24 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
|
||||
index c751111..c3f08b3 100644
|
||||
--- a/hw/ppc/spapr.c
|
||||
+++ b/hw/ppc/spapr.c
|
||||
@@ -4352,19 +4352,41 @@ DEFINE_SPAPR_MACHINE(2_1, "2.1", false);
|
||||
#endif
|
||||
|
||||
/*
|
||||
+ * pseries-rhel7.6.0
|
||||
+ */
|
||||
+
|
||||
+static void spapr_machine_rhel760_instance_options(MachineState *machine)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+static void spapr_machine_rhel760_class_options(MachineClass *mc)
|
||||
+{
|
||||
+ /* Defaults for the latest behaviour inherited from the base class */
|
||||
+}
|
||||
+
|
||||
+DEFINE_SPAPR_MACHINE(rhel760, "rhel7.6.0", true);
|
||||
+
|
||||
+/*
|
||||
* pseries-rhel7.5.0
|
||||
+ * like SPAPR_COMPAT_2_11 and SPAPR_COMPAT_2_10
|
||||
+ * SPAPR_CAP_HTM already enabled in 7.4
|
||||
+ *
|
||||
*/
|
||||
+#define SPAPR_COMPAT_RHEL7_5 \
|
||||
+ HW_COMPAT_RHEL7_5 \
|
||||
|
||||
static void spapr_machine_rhel750_instance_options(MachineState *machine)
|
||||
{
|
||||
+ spapr_machine_rhel760_instance_options(machine);
|
||||
}
|
||||
|
||||
static void spapr_machine_rhel750_class_options(MachineClass *mc)
|
||||
{
|
||||
- /* Defaults for the latest behaviour inherited from the base class */
|
||||
+ spapr_machine_rhel760_class_options(mc);
|
||||
+ SET_MACHINE_COMPAT(mc, SPAPR_COMPAT_RHEL7_5);
|
||||
}
|
||||
|
||||
-DEFINE_SPAPR_MACHINE(rhel750, "rhel7.5.0", true);
|
||||
+DEFINE_SPAPR_MACHINE(rhel750, "rhel7.5.0", false);
|
||||
|
||||
/*
|
||||
* pseries-rhel7.5.0-sxxm
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,32 +0,0 @@
|
||||
From f53aa3f10b0c22093917fc076e3ddcb41398f12a Mon Sep 17 00:00:00 2001
|
||||
From: Christian Borntraeger <borntraeger@de.ibm.com>
|
||||
Date: Wed, 20 Jun 2018 10:58:31 +0000
|
||||
Subject: s390x/cpumodels: add z14 Model ZR1
|
||||
|
||||
Introduce the new z14 Model ZR1 cpu model. Mostly identical to z14, only
|
||||
the cpu type differs (3906 vs. 3907)
|
||||
|
||||
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
|
||||
Message-Id: <20180613081819.147178-1-borntraeger@de.ibm.com>
|
||||
Reviewed-by: David Hildenbrand <david@redhat.com>
|
||||
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
|
||||
(cherry picked from commit 23ad956bff98d949057156ea3f68a9763c2dda0e)
|
||||
---
|
||||
target/s390x/cpu_models.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
|
||||
index c4016e0..24e689c 100644
|
||||
--- a/target/s390x/cpu_models.c
|
||||
+++ b/target/s390x/cpu_models.c
|
||||
@@ -79,6 +79,7 @@ static S390CPUDef s390_cpu_defs[] = {
|
||||
CPUDEF_INIT(0x2964, 13, 2, 47, 0x08000000U, "z13.2", "IBM z13 GA2"),
|
||||
CPUDEF_INIT(0x2965, 13, 2, 47, 0x08000000U, "z13s", "IBM z13s GA1"),
|
||||
CPUDEF_INIT(0x3906, 14, 1, 47, 0x08000000U, "z14", "IBM z14 GA1"),
|
||||
+ CPUDEF_INIT(0x3907, 14, 1, 47, 0x08000000U, "z14ZR1", "IBM z14 Model ZR1 GA1"),
|
||||
};
|
||||
|
||||
#define QEMU_MAX_CPU_TYPE 0x2827
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,51 +0,0 @@
|
||||
From 9cb37fdbeafdbdc28cf224fd7905a7d678961505 Mon Sep 17 00:00:00 2001
|
||||
From: Wei Huang <wei@redhat.com>
|
||||
Date: Wed, 28 Mar 2018 18:58:55 +0200
|
||||
Subject: [PATCH 001/268] AArch64: Add virt-rhel7.6 machine type
|
||||
|
||||
RH-Author: Wei Huang <wei@redhat.com>
|
||||
Message-id: <20180328185856.20056-2-wei@redhat.com>
|
||||
Patchwork-id: 79427
|
||||
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 1/2] AArch64: Add virt-rhel7.6 machine type
|
||||
Bugzilla: 1558723
|
||||
RH-Acked-by: Andrew Jones <drjones@redhat.com>
|
||||
RH-Acked-by: Auger Eric <eric.auger@redhat.com>
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
|
||||
This patch adds "virt-rhel7.6" machine type. Because RHEL 7.5 virt-arm
|
||||
was a preview product, we remove the "virt-rhel7.5" type to avoid the
|
||||
legacy support burden.
|
||||
|
||||
Signed-off-by: Wei Huang <wei@redhat.com>
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
hw/arm/virt.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
|
||||
index 806eb1e..a4d0f52 100644
|
||||
--- a/hw/arm/virt.c
|
||||
+++ b/hw/arm/virt.c
|
||||
@@ -1820,7 +1820,7 @@ static void rhel_machine_init(void)
|
||||
}
|
||||
type_init(rhel_machine_init);
|
||||
|
||||
-static void rhel750_virt_instance_init(Object *obj)
|
||||
+static void rhel760_virt_instance_init(Object *obj)
|
||||
{
|
||||
VirtMachineState *vms = VIRT_MACHINE(obj);
|
||||
VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
|
||||
@@ -1862,8 +1862,8 @@ static void rhel750_virt_instance_init(Object *obj)
|
||||
vms->irqmap=a15irqmap;
|
||||
}
|
||||
|
||||
-static void rhel750_virt_options(MachineClass *mc)
|
||||
+static void rhel760_virt_options(MachineClass *mc)
|
||||
{
|
||||
SET_MACHINE_COMPAT(mc, ARM_RHEL_COMPAT);
|
||||
}
|
||||
-DEFINE_RHEL_MACHINE_AS_LATEST(7, 5, 0)
|
||||
+DEFINE_RHEL_MACHINE_AS_LATEST(7, 6, 0)
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,41 @@
|
||||
From ff8529dcbf86b3a086d64dd630cf6a687603c571 Mon Sep 17 00:00:00 2001
|
||||
From: "plai@redhat.com" <plai@redhat.com>
|
||||
Date: Thu, 21 May 2020 23:56:55 +0100
|
||||
Subject: [PATCH 12/12] ACPI: add expected files for HMAT tests (acpihmat)
|
||||
|
||||
RH-Author: plai@redhat.com
|
||||
Message-id: <20200521235655.27141-12-plai@redhat.com>
|
||||
Patchwork-id: 96742
|
||||
O-Subject: [RHEL8.2.1 AV qemu-kvm PATCH 11/11] ACPI: add expected files for HMAT tests (acpihmat)
|
||||
Bugzilla: 1600217
|
||||
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
||||
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
|
||||
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
|
||||
From: "Michael S. Tsirkin" <mst@redhat.com>
|
||||
|
||||
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
||||
(cherry picked from commit 48892c6c8def6624a0ed57e2bd6c2a0a9878b973)
|
||||
Signed-off-by: Paul Lai <plai@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
tests/bios-tables-test-allowed-diff.h | 8 --------
|
||||
1 file changed, 8 deletions(-)
|
||||
|
||||
diff --git a/tests/bios-tables-test-allowed-diff.h b/tests/bios-tables-test-allowed-diff.h
|
||||
index 3c9e0c9..dfb8523 100644
|
||||
--- a/tests/bios-tables-test-allowed-diff.h
|
||||
+++ b/tests/bios-tables-test-allowed-diff.h
|
||||
@@ -1,9 +1 @@
|
||||
/* List of comma-separated changed AML files to ignore */
|
||||
-"tests/data/acpi/pc/APIC.acpihmat",
|
||||
-"tests/data/acpi/pc/SRAT.acpihmat",
|
||||
-"tests/data/acpi/pc/HMAT.acpihmat",
|
||||
-"tests/data/acpi/pc/DSDT.acpihmat",
|
||||
-"tests/data/acpi/q35/APIC.acpihmat",
|
||||
-"tests/data/acpi/q35/SRAT.acpihmat",
|
||||
-"tests/data/acpi/q35/HMAT.acpihmat",
|
||||
-"tests/data/acpi/q35/DSDT.acpihmat",
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,105 +0,0 @@
|
||||
From a326b17336ae12d9fa492ea34b9b1b08150262d0 Mon Sep 17 00:00:00 2001
|
||||
From: Yash Mankad <ymankad@redhat.com>
|
||||
Date: Wed, 12 Dec 2018 00:14:39 +0000
|
||||
Subject: [PATCH 11/13] Acceptance tests: add Linux kernel boot and console
|
||||
checking test
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: Yash Mankad <ymankad@redhat.com>
|
||||
Message-id: <d56f34e8ffd54d5df93dadface61538e5a3c99ab.1544573601.git.ymankad@redhat.com>
|
||||
Patchwork-id: 83433
|
||||
O-Subject: [RHEL-8.0 qemu-kvm PATCH v2 5/7] Acceptance tests: add Linux kernel boot and console checking test
|
||||
Bugzilla: 1655807
|
||||
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
RH-Acked-by: John Snow <jsnow@redhat.com>
|
||||
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
|
||||
From: Cleber Rosa <crosa@redhat.com>
|
||||
|
||||
This test boots a Linux kernel, and checks that the given command
|
||||
line was effective in two ways:
|
||||
|
||||
* It makes the kernel use the set "console device" as a console
|
||||
* The kernel records the command line as expected in the console
|
||||
|
||||
Given that way too many error conditions may occur, and detecting the
|
||||
kernel boot progress status may not be trivial, this test relies on a
|
||||
timeout to handle unexpected situations. Also, it's *not* tagged as a
|
||||
quick test for obvious reasons.
|
||||
|
||||
It may be useful, while interactively running/debugging this test, or
|
||||
tests similar to this one, to show some of the logging channels.
|
||||
Example:
|
||||
|
||||
$ avocado --show=QMP,console run boot_linux_console.py
|
||||
|
||||
Signed-off-by: Cleber Rosa <crosa@redhat.com>
|
||||
Message-Id: <20180530184156.15634-6-crosa@redhat.com>
|
||||
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
(cherry picked from commit c1cc73f407b890c4e7ab5bf520c0637e0364e92a)
|
||||
Signed-off-by: Yash Mankad <ymankad@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
tests/acceptance/boot_linux_console.py | 47 ++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 47 insertions(+)
|
||||
create mode 100644 tests/acceptance/boot_linux_console.py
|
||||
|
||||
diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
|
||||
new file mode 100644
|
||||
index 0000000..98324f7
|
||||
--- /dev/null
|
||||
+++ b/tests/acceptance/boot_linux_console.py
|
||||
@@ -0,0 +1,47 @@
|
||||
+# Functional test that boots a Linux kernel and checks the console
|
||||
+#
|
||||
+# Copyright (c) 2018 Red Hat, Inc.
|
||||
+#
|
||||
+# Author:
|
||||
+# Cleber Rosa <crosa@redhat.com>
|
||||
+#
|
||||
+# This work is licensed under the terms of the GNU GPL, version 2 or
|
||||
+# later. See the COPYING file in the top-level directory.
|
||||
+
|
||||
+import logging
|
||||
+
|
||||
+from avocado_qemu import Test
|
||||
+
|
||||
+
|
||||
+class BootLinuxConsole(Test):
|
||||
+ """
|
||||
+ Boots a x86_64 Linux kernel and checks that the console is operational
|
||||
+ and the kernel command line is properly passed from QEMU to the kernel
|
||||
+
|
||||
+ :avocado: enable
|
||||
+ :avocado: tags=x86_64
|
||||
+ """
|
||||
+
|
||||
+ timeout = 60
|
||||
+
|
||||
+ def test(self):
|
||||
+ kernel_url = ('https://mirrors.kernel.org/fedora/releases/28/'
|
||||
+ 'Everything/x86_64/os/images/pxeboot/vmlinuz')
|
||||
+ kernel_hash = '238e083e114c48200f80d889f7e32eeb2793e02a'
|
||||
+ kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
|
||||
+
|
||||
+ self.vm.set_machine('pc')
|
||||
+ self.vm.set_console()
|
||||
+ kernel_command_line = 'console=ttyS0'
|
||||
+ self.vm.add_args('-kernel', kernel_path,
|
||||
+ '-append', kernel_command_line)
|
||||
+ self.vm.launch()
|
||||
+ console = self.vm.console_socket.makefile()
|
||||
+ console_logger = logging.getLogger('console')
|
||||
+ while True:
|
||||
+ msg = console.readline()
|
||||
+ console_logger.debug(msg.strip())
|
||||
+ if 'Kernel command line: %s' % kernel_command_line in msg:
|
||||
+ break
|
||||
+ if 'Kernel panic - not syncing' in msg:
|
||||
+ self.fail("Kernel panic reached")
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,180 +0,0 @@
|
||||
From ae8198a11e507c4f4f701aa92c3ae531d140e547 Mon Sep 17 00:00:00 2001
|
||||
From: Yash Mankad <ymankad@redhat.com>
|
||||
Date: Wed, 12 Dec 2018 00:14:41 +0000
|
||||
Subject: [PATCH 13/13] Acceptance tests: add make rule for running them
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: Yash Mankad <ymankad@redhat.com>
|
||||
Message-id: <9527fefa2d8d1b27d4a647cf8355236b61fb028b.1544573601.git.ymankad@redhat.com>
|
||||
Patchwork-id: 83439
|
||||
O-Subject: [RHEL-8.0 qemu-kvm PATCH v2 7/7] Acceptance tests: add make rule for running them
|
||||
Bugzilla: 1655807
|
||||
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
RH-Acked-by: John Snow <jsnow@redhat.com>
|
||||
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
|
||||
From: Cleber Rosa <crosa@redhat.com>
|
||||
|
||||
The acceptance (aka functional, aka Avocado-based) tests are
|
||||
Python files located in "tests/acceptance" that need to be run
|
||||
with the Avocado libs and test runner.
|
||||
|
||||
Let's provide a convenient way for QEMU developers to run them,
|
||||
by making use of the tests-venv with the required setup.
|
||||
|
||||
Also, while the Avocado test runner will take care of creating a
|
||||
location to save test results to, it was understood that it's better
|
||||
if the results are kept within the build tree.
|
||||
|
||||
Signed-off-by: Cleber Rosa <crosa@redhat.com>
|
||||
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
Acked-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
|
||||
Reviewed-by: Caio Carrara <ccarrara@redhat.com>
|
||||
Message-Id: <20181018153134.8493-3-crosa@redhat.com>
|
||||
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
(cherry picked from commit a56931eef343c7564e35bcc05eaed2a469a1b1b8)
|
||||
Signed-off-by: Yash Mankad <ymankad@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
docs/devel/testing.rst | 43 ++++++++++++++++++++++++++++++++++++++-----
|
||||
tests/Makefile.include | 21 +++++++++++++++++++--
|
||||
tests/requirements.txt | 1 +
|
||||
3 files changed, 58 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
|
||||
index f33e5a8..db08a80 100644
|
||||
--- a/docs/devel/testing.rst
|
||||
+++ b/docs/devel/testing.rst
|
||||
@@ -524,10 +524,39 @@ Tests based on ``avocado_qemu.Test`` can easily:
|
||||
- http://avocado-framework.readthedocs.io/en/latest/api/test/avocado.html#avocado.Test
|
||||
- http://avocado-framework.readthedocs.io/en/latest/api/utils/avocado.utils.html
|
||||
|
||||
-Installation
|
||||
-------------
|
||||
+Running tests
|
||||
+-------------
|
||||
+
|
||||
+You can run the acceptance tests simply by executing:
|
||||
+
|
||||
+.. code::
|
||||
+
|
||||
+ make check-acceptance
|
||||
+
|
||||
+This involves the automatic creation of Python virtual environment
|
||||
+within the build tree (at ``tests/venv``) which will have all the
|
||||
+right dependencies, and will save tests results also within the
|
||||
+build tree (at ``tests/results``).
|
||||
|
||||
-To install Avocado and its dependencies, run:
|
||||
+Note: the build environment must be using a Python 3 stack, and have
|
||||
+the ``venv`` and ``pip`` packages installed. If necessary, make sure
|
||||
+``configure`` is called with ``--python=`` and that those modules are
|
||||
+available. On Debian and Ubuntu based systems, depending on the
|
||||
+specific version, they may be on packages named ``python3-venv`` and
|
||||
+``python3-pip``.
|
||||
+
|
||||
+The scripts installed inside the virtual environment may be used
|
||||
+without an "activation". For instance, the Avocado test runner
|
||||
+may be invoked by running:
|
||||
+
|
||||
+ .. code::
|
||||
+
|
||||
+ tests/venv/bin/avocado run $OPTION1 $OPTION2 tests/acceptance/
|
||||
+
|
||||
+Manual Installation
|
||||
+-------------------
|
||||
+
|
||||
+To manually install Avocado and its dependencies, run:
|
||||
|
||||
.. code::
|
||||
|
||||
@@ -668,11 +697,15 @@ The exact QEMU binary to be used on QEMUMachine.
|
||||
Uninstalling Avocado
|
||||
--------------------
|
||||
|
||||
-If you've followed the installation instructions above, you can easily
|
||||
-uninstall Avocado. Start by listing the packages you have installed::
|
||||
+If you've followed the manual installation instructions above, you can
|
||||
+easily uninstall Avocado. Start by listing the packages you have
|
||||
+installed::
|
||||
|
||||
pip list --user
|
||||
|
||||
And remove any package you want with::
|
||||
|
||||
pip uninstall <package_name>
|
||||
+
|
||||
+If you've used ``make check-acceptance``, the Python virtual environment where
|
||||
+Avocado is installed will be cleaned up as part of ``make check-clean``.
|
||||
diff --git a/tests/Makefile.include b/tests/Makefile.include
|
||||
index 99a9dcd..1177ca3 100644
|
||||
--- a/tests/Makefile.include
|
||||
+++ b/tests/Makefile.include
|
||||
@@ -10,6 +10,7 @@ check-help:
|
||||
@echo " $(MAKE) check-speed Run qobject speed tests"
|
||||
@echo " $(MAKE) check-qapi-schema Run QAPI schema tests"
|
||||
@echo " $(MAKE) check-block Run block tests"
|
||||
+ @echo " $(MAKE) check-acceptance Run all acceptance (functional) tests"
|
||||
@echo " $(MAKE) check-report.html Generates an HTML test report"
|
||||
@echo " $(MAKE) check-venv Creates a Python venv for tests"
|
||||
@echo " $(MAKE) check-clean Clean the tests"
|
||||
@@ -956,10 +957,15 @@ check-decodetree:
|
||||
|
||||
# Python venv for running tests
|
||||
|
||||
-.PHONY: check-venv
|
||||
+.PHONY: check-venv check-acceptance
|
||||
|
||||
TESTS_VENV_DIR=$(BUILD_DIR)/tests/venv
|
||||
TESTS_VENV_REQ=$(SRC_PATH)/tests/requirements.txt
|
||||
+TESTS_RESULTS_DIR=$(BUILD_DIR)/tests/results
|
||||
+# Controls the output generated by Avocado when running tests.
|
||||
+# Any number of command separated loggers are accepted. For more
|
||||
+# information please refer to "avocado --help".
|
||||
+AVOCADO_SHOW=none
|
||||
|
||||
$(shell $(PYTHON) -c 'import sys; assert sys.version_info >= (3,0)' >/dev/null 2>&1)
|
||||
ifeq ($(.SHELLSTATUS),0)
|
||||
@@ -976,8 +982,19 @@ $(TESTS_VENV_DIR):
|
||||
$(error "venv directory for tests requires Python 3")
|
||||
endif
|
||||
|
||||
+$(TESTS_RESULTS_DIR):
|
||||
+ $(call quiet-command, mkdir -p $@, \
|
||||
+ MKDIR, $@)
|
||||
+
|
||||
check-venv: $(TESTS_VENV_DIR)
|
||||
|
||||
+check-acceptance: check-venv $(TESTS_RESULTS_DIR)
|
||||
+ $(call quiet-command, \
|
||||
+ $(TESTS_VENV_DIR)/bin/python -m avocado \
|
||||
+ --show=$(AVOCADO_SHOW) run --job-results-dir=$(TESTS_RESULTS_DIR) \
|
||||
+ --failfast=on $(SRC_PATH)/tests/acceptance, \
|
||||
+ "AVOCADO", "tests/acceptance")
|
||||
+
|
||||
# Consolidated targets
|
||||
|
||||
.PHONY: check-qapi-schema check-qtest check-unit check check-clean
|
||||
@@ -992,7 +1009,7 @@ check-clean:
|
||||
rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
|
||||
rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(target)-y)) $(check-qtest-generic-y))
|
||||
rm -f tests/test-qapi-gen-timestamp
|
||||
- rm -rf $(TESTS_VENV_DIR)
|
||||
+ rm -rf $(TESTS_VENV_DIR) $(TESTS_RESULTS_DIR)
|
||||
|
||||
clean: check-clean
|
||||
|
||||
diff --git a/tests/requirements.txt b/tests/requirements.txt
|
||||
index d39f9d1..64c6e27 100644
|
||||
--- a/tests/requirements.txt
|
||||
+++ b/tests/requirements.txt
|
||||
@@ -1,3 +1,4 @@
|
||||
# Add Python module requirements, one per line, to be installed
|
||||
# in the tests/venv Python virtual environment. For more info,
|
||||
# refer to: https://pip.pypa.io/en/stable/user_guide/#id1
|
||||
+avocado-framework==65.0
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,104 +0,0 @@
|
||||
From f737591acbcb84db4da620b94970bc3ac4e3b655 Mon Sep 17 00:00:00 2001
|
||||
From: Yash Mankad <ymankad@redhat.com>
|
||||
Date: Wed, 12 Dec 2018 00:14:37 +0000
|
||||
Subject: [PATCH 09/13] Acceptance tests: add quick VNC tests
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: Yash Mankad <ymankad@redhat.com>
|
||||
Message-id: <77eca16322a6a90444210ee11d64875df2746029.1544573601.git.ymankad@redhat.com>
|
||||
Patchwork-id: 83434
|
||||
O-Subject: [RHEL-8.0 qemu-kvm PATCH v2 3/7] Acceptance tests: add quick VNC tests
|
||||
Bugzilla: 1655807
|
||||
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
RH-Acked-by: John Snow <jsnow@redhat.com>
|
||||
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
|
||||
From: Cleber Rosa <crosa@redhat.com>
|
||||
|
||||
This patch adds a few simple behavior tests for VNC.
|
||||
|
||||
Signed-off-by: Cleber Rosa <crosa@redhat.com>
|
||||
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
Message-Id: <20180530184156.15634-4-crosa@redhat.com>
|
||||
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
|
||||
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
|
||||
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
(cherry picked from commit 7b1bd11cff0915a1266c34bdfb66d70f6372340d)
|
||||
Signed-off-by: Yash Mankad <ymankad@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
tests/acceptance/vnc.py | 60 +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 60 insertions(+)
|
||||
create mode 100644 tests/acceptance/vnc.py
|
||||
|
||||
diff --git a/tests/acceptance/vnc.py b/tests/acceptance/vnc.py
|
||||
new file mode 100644
|
||||
index 0000000..b1ef9d7
|
||||
--- /dev/null
|
||||
+++ b/tests/acceptance/vnc.py
|
||||
@@ -0,0 +1,60 @@
|
||||
+# Simple functional tests for VNC functionality
|
||||
+#
|
||||
+# Copyright (c) 2018 Red Hat, Inc.
|
||||
+#
|
||||
+# Author:
|
||||
+# Cleber Rosa <crosa@redhat.com>
|
||||
+#
|
||||
+# This work is licensed under the terms of the GNU GPL, version 2 or
|
||||
+# later. See the COPYING file in the top-level directory.
|
||||
+
|
||||
+from avocado_qemu import Test
|
||||
+
|
||||
+
|
||||
+class Vnc(Test):
|
||||
+ """
|
||||
+ :avocado: enable
|
||||
+ :avocado: tags=vnc,quick
|
||||
+ """
|
||||
+ def test_no_vnc(self):
|
||||
+ self.vm.add_args('-nodefaults', '-S')
|
||||
+ self.vm.launch()
|
||||
+ self.assertFalse(self.vm.qmp('query-vnc')['return']['enabled'])
|
||||
+
|
||||
+ def test_no_vnc_change_password(self):
|
||||
+ self.vm.add_args('-nodefaults', '-S')
|
||||
+ self.vm.launch()
|
||||
+ self.assertFalse(self.vm.qmp('query-vnc')['return']['enabled'])
|
||||
+ set_password_response = self.vm.qmp('change',
|
||||
+ device='vnc',
|
||||
+ target='password',
|
||||
+ arg='new_password')
|
||||
+ self.assertIn('error', set_password_response)
|
||||
+ self.assertEqual(set_password_response['error']['class'],
|
||||
+ 'GenericError')
|
||||
+ self.assertEqual(set_password_response['error']['desc'],
|
||||
+ 'Could not set password')
|
||||
+
|
||||
+ def test_vnc_change_password_requires_a_password(self):
|
||||
+ self.vm.add_args('-nodefaults', '-S', '-vnc', ':0')
|
||||
+ self.vm.launch()
|
||||
+ self.assertTrue(self.vm.qmp('query-vnc')['return']['enabled'])
|
||||
+ set_password_response = self.vm.qmp('change',
|
||||
+ device='vnc',
|
||||
+ target='password',
|
||||
+ arg='new_password')
|
||||
+ self.assertIn('error', set_password_response)
|
||||
+ self.assertEqual(set_password_response['error']['class'],
|
||||
+ 'GenericError')
|
||||
+ self.assertEqual(set_password_response['error']['desc'],
|
||||
+ 'Could not set password')
|
||||
+
|
||||
+ def test_vnc_change_password(self):
|
||||
+ self.vm.add_args('-nodefaults', '-S', '-vnc', ':0,password')
|
||||
+ self.vm.launch()
|
||||
+ self.assertTrue(self.vm.qmp('query-vnc')['return']['enabled'])
|
||||
+ set_password_response = self.vm.qmp('change',
|
||||
+ device='vnc',
|
||||
+ target='password',
|
||||
+ arg='new_password')
|
||||
+ self.assertEqual(set_password_response['return'], {})
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,359 +0,0 @@
|
||||
From 687a123ab2165fa3adf9e3469577c22008125270 Mon Sep 17 00:00:00 2001
|
||||
From: Yash Mankad <ymankad@redhat.com>
|
||||
Date: Wed, 12 Dec 2018 00:14:35 +0000
|
||||
Subject: [PATCH 07/13] Add functional/acceptance tests infrastructure
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: Yash Mankad <ymankad@redhat.com>
|
||||
Message-id: <b1ac81d7ccd9e43f36a74dc6a008974484508c7f.1544573601.git.ymankad@redhat.com>
|
||||
Patchwork-id: 83432
|
||||
O-Subject: [RHEL-8.0 qemu-kvm PATCH v2 1/7] Add functional/acceptance tests infrastructure
|
||||
Bugzilla: 1655807
|
||||
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
RH-Acked-by: John Snow <jsnow@redhat.com>
|
||||
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
|
||||
From: Cleber Rosa <crosa@redhat.com>
|
||||
|
||||
This patch adds the very minimum infrastructure necessary for writing
|
||||
and running functional/acceptance tests, including:
|
||||
|
||||
* Documentation
|
||||
* The avocado_qemu.Test base test class
|
||||
* One example tests (version.py)
|
||||
|
||||
Additional functionality is expected to be added along the tests that
|
||||
require them.
|
||||
|
||||
Signed-off-by: Cleber Rosa <crosa@redhat.com>
|
||||
Message-Id: <20180530184156.15634-2-crosa@redhat.com>
|
||||
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
|
||||
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
|
||||
[ehabkost: fix typo on testing.rst]
|
||||
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
(cherry picked from commit c3d7e8c90db208b1d876f8d6458c2dfca169137f)
|
||||
Signed-off-by: Yash Mankad <ymankad@redhat.com>
|
||||
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
docs/devel/testing.rst | 192 ++++++++++++++++++++++++++++++
|
||||
tests/acceptance/README.rst | 10 ++
|
||||
tests/acceptance/avocado_qemu/__init__.py | 54 +++++++++
|
||||
tests/acceptance/version.py | 24 ++++
|
||||
4 files changed, 280 insertions(+)
|
||||
create mode 100644 tests/acceptance/README.rst
|
||||
create mode 100644 tests/acceptance/avocado_qemu/__init__.py
|
||||
create mode 100644 tests/acceptance/version.py
|
||||
|
||||
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
|
||||
index 0ca1a2d..f33e5a8 100644
|
||||
--- a/docs/devel/testing.rst
|
||||
+++ b/docs/devel/testing.rst
|
||||
@@ -484,3 +484,195 @@ supported. To start the fuzzer, run
|
||||
|
||||
Alternatively, some command different from "qemu-img info" can be tested, by
|
||||
changing the ``-c`` option.
|
||||
+
|
||||
+Acceptance tests using the Avocado Framework
|
||||
+============================================
|
||||
+
|
||||
+The ``tests/acceptance`` directory hosts functional tests, also known
|
||||
+as acceptance level tests. They're usually higher level tests, and
|
||||
+may interact with external resources and with various guest operating
|
||||
+systems.
|
||||
+
|
||||
+These tests are written using the Avocado Testing Framework (which must
|
||||
+be installed separately) in conjunction with a the ``avocado_qemu.Test``
|
||||
+class, implemented at ``tests/acceptance/avocado_qemu``.
|
||||
+
|
||||
+Tests based on ``avocado_qemu.Test`` can easily:
|
||||
+
|
||||
+ * Customize the command line arguments given to the convenience
|
||||
+ ``self.vm`` attribute (a QEMUMachine instance)
|
||||
+
|
||||
+ * Interact with the QEMU monitor, send QMP commands and check
|
||||
+ their results
|
||||
+
|
||||
+ * Interact with the guest OS, using the convenience console device
|
||||
+ (which may be useful to assert the effectiveness and correctness of
|
||||
+ command line arguments or QMP commands)
|
||||
+
|
||||
+ * Interact with external data files that accompany the test itself
|
||||
+ (see ``self.get_data()``)
|
||||
+
|
||||
+ * Download (and cache) remote data files, such as firmware and kernel
|
||||
+ images
|
||||
+
|
||||
+ * Have access to a library of guest OS images (by means of the
|
||||
+ ``avocado.utils.vmimage`` library)
|
||||
+
|
||||
+ * Make use of various other test related utilities available at the
|
||||
+ test class itself and at the utility library:
|
||||
+
|
||||
+ - http://avocado-framework.readthedocs.io/en/latest/api/test/avocado.html#avocado.Test
|
||||
+ - http://avocado-framework.readthedocs.io/en/latest/api/utils/avocado.utils.html
|
||||
+
|
||||
+Installation
|
||||
+------------
|
||||
+
|
||||
+To install Avocado and its dependencies, run:
|
||||
+
|
||||
+.. code::
|
||||
+
|
||||
+ pip install --user avocado-framework
|
||||
+
|
||||
+Alternatively, follow the instructions on this link:
|
||||
+
|
||||
+ http://avocado-framework.readthedocs.io/en/latest/GetStartedGuide.html#installing-avocado
|
||||
+
|
||||
+Overview
|
||||
+--------
|
||||
+
|
||||
+This directory provides the ``avocado_qemu`` Python module, containing
|
||||
+the ``avocado_qemu.Test`` class. Here's a simple usage example:
|
||||
+
|
||||
+.. code::
|
||||
+
|
||||
+ from avocado_qemu import Test
|
||||
+
|
||||
+
|
||||
+ class Version(Test):
|
||||
+ """
|
||||
+ :avocado: enable
|
||||
+ :avocado: tags=quick
|
||||
+ """
|
||||
+ def test_qmp_human_info_version(self):
|
||||
+ self.vm.launch()
|
||||
+ res = self.vm.command('human-monitor-command',
|
||||
+ command_line='info version')
|
||||
+ self.assertRegexpMatches(res, r'^(\d+\.\d+\.\d)')
|
||||
+
|
||||
+To execute your test, run:
|
||||
+
|
||||
+.. code::
|
||||
+
|
||||
+ avocado run version.py
|
||||
+
|
||||
+Tests may be classified according to a convention by using docstring
|
||||
+directives such as ``:avocado: tags=TAG1,TAG2``. To run all tests
|
||||
+in the current directory, tagged as "quick", run:
|
||||
+
|
||||
+.. code::
|
||||
+
|
||||
+ avocado run -t quick .
|
||||
+
|
||||
+The ``avocado_qemu.Test`` base test class
|
||||
+-----------------------------------------
|
||||
+
|
||||
+The ``avocado_qemu.Test`` class has a number of characteristics that
|
||||
+are worth being mentioned right away.
|
||||
+
|
||||
+First of all, it attempts to give each test a ready to use QEMUMachine
|
||||
+instance, available at ``self.vm``. Because many tests will tweak the
|
||||
+QEMU command line, launching the QEMUMachine (by using ``self.vm.launch()``)
|
||||
+is left to the test writer.
|
||||
+
|
||||
+At test "tear down", ``avocado_qemu.Test`` handles the QEMUMachine
|
||||
+shutdown.
|
||||
+
|
||||
+QEMUMachine
|
||||
+~~~~~~~~~~~
|
||||
+
|
||||
+The QEMUMachine API is already widely used in the Python iotests,
|
||||
+device-crash-test and other Python scripts. It's a wrapper around the
|
||||
+execution of a QEMU binary, giving its users:
|
||||
+
|
||||
+ * the ability to set command line arguments to be given to the QEMU
|
||||
+ binary
|
||||
+
|
||||
+ * a ready to use QMP connection and interface, which can be used to
|
||||
+ send commands and inspect its results, as well as asynchronous
|
||||
+ events
|
||||
+
|
||||
+ * convenience methods to set commonly used command line arguments in
|
||||
+ a more succinct and intuitive way
|
||||
+
|
||||
+QEMU binary selection
|
||||
+~~~~~~~~~~~~~~~~~~~~~
|
||||
+
|
||||
+The QEMU binary used for the ``self.vm`` QEMUMachine instance will
|
||||
+primarily depend on the value of the ``qemu_bin`` parameter. If it's
|
||||
+not explicitly set, its default value will be the result of a dynamic
|
||||
+probe in the same source tree. A suitable binary will be one that
|
||||
+targets the architecture matching host machine.
|
||||
+
|
||||
+Based on this description, test writers will usually rely on one of
|
||||
+the following approaches:
|
||||
+
|
||||
+1) Set ``qemu_bin``, and use the given binary
|
||||
+
|
||||
+2) Do not set ``qemu_bin``, and use a QEMU binary named like
|
||||
+ "${arch}-softmmu/qemu-system-${arch}", either in the current
|
||||
+ working directory, or in the current source tree.
|
||||
+
|
||||
+The resulting ``qemu_bin`` value will be preserved in the
|
||||
+``avocado_qemu.Test`` as an attribute with the same name.
|
||||
+
|
||||
+Attribute reference
|
||||
+-------------------
|
||||
+
|
||||
+Besides the attributes and methods that are part of the base
|
||||
+``avocado.Test`` class, the following attributes are available on any
|
||||
+``avocado_qemu.Test`` instance.
|
||||
+
|
||||
+vm
|
||||
+~~
|
||||
+
|
||||
+A QEMUMachine instance, initially configured according to the given
|
||||
+``qemu_bin`` parameter.
|
||||
+
|
||||
+qemu_bin
|
||||
+~~~~~~~~
|
||||
+
|
||||
+The preserved value of the ``qemu_bin`` parameter or the result of the
|
||||
+dynamic probe for a QEMU binary in the current working directory or
|
||||
+source tree.
|
||||
+
|
||||
+Parameter reference
|
||||
+-------------------
|
||||
+
|
||||
+To understand how Avocado parameters are accessed by tests, and how
|
||||
+they can be passed to tests, please refer to::
|
||||
+
|
||||
+ http://avocado-framework.readthedocs.io/en/latest/WritingTests.html#accessing-test-parameters
|
||||
+
|
||||
+Parameter values can be easily seen in the log files, and will look
|
||||
+like the following:
|
||||
+
|
||||
+.. code::
|
||||
+
|
||||
+ PARAMS (key=qemu_bin, path=*, default=x86_64-softmmu/qemu-system-x86_64) => 'x86_64-softmmu/qemu-system-x86_64
|
||||
+
|
||||
+qemu_bin
|
||||
+~~~~~~~~
|
||||
+
|
||||
+The exact QEMU binary to be used on QEMUMachine.
|
||||
+
|
||||
+Uninstalling Avocado
|
||||
+--------------------
|
||||
+
|
||||
+If you've followed the installation instructions above, you can easily
|
||||
+uninstall Avocado. Start by listing the packages you have installed::
|
||||
+
|
||||
+ pip list --user
|
||||
+
|
||||
+And remove any package you want with::
|
||||
+
|
||||
+ pip uninstall <package_name>
|
||||
diff --git a/tests/acceptance/README.rst b/tests/acceptance/README.rst
|
||||
new file mode 100644
|
||||
index 0000000..89260fa
|
||||
--- /dev/null
|
||||
+++ b/tests/acceptance/README.rst
|
||||
@@ -0,0 +1,10 @@
|
||||
+============================================
|
||||
+Acceptance tests using the Avocado Framework
|
||||
+============================================
|
||||
+
|
||||
+This directory contains functional tests, also known as acceptance
|
||||
+level tests. They're usually higher level, and may interact with
|
||||
+external resources and with various guest operating systems.
|
||||
+
|
||||
+For more information, please refer to ``docs/devel/testing.rst``,
|
||||
+section "Acceptance tests using the Avocado Framework".
|
||||
diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
|
||||
new file mode 100644
|
||||
index 0000000..1e54fd5
|
||||
--- /dev/null
|
||||
+++ b/tests/acceptance/avocado_qemu/__init__.py
|
||||
@@ -0,0 +1,54 @@
|
||||
+# Test class and utilities for functional tests
|
||||
+#
|
||||
+# Copyright (c) 2018 Red Hat, Inc.
|
||||
+#
|
||||
+# Author:
|
||||
+# Cleber Rosa <crosa@redhat.com>
|
||||
+#
|
||||
+# This work is licensed under the terms of the GNU GPL, version 2 or
|
||||
+# later. See the COPYING file in the top-level directory.
|
||||
+
|
||||
+import os
|
||||
+import sys
|
||||
+
|
||||
+import avocado
|
||||
+
|
||||
+SRC_ROOT_DIR = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
|
||||
+SRC_ROOT_DIR = os.path.abspath(os.path.dirname(SRC_ROOT_DIR))
|
||||
+sys.path.append(os.path.join(SRC_ROOT_DIR, 'scripts'))
|
||||
+
|
||||
+from qemu import QEMUMachine
|
||||
+
|
||||
+def is_readable_executable_file(path):
|
||||
+ return os.path.isfile(path) and os.access(path, os.R_OK | os.X_OK)
|
||||
+
|
||||
+
|
||||
+def pick_default_qemu_bin():
|
||||
+ """
|
||||
+ Picks the path of a QEMU binary, starting either in the current working
|
||||
+ directory or in the source tree root directory.
|
||||
+ """
|
||||
+ arch = os.uname()[4]
|
||||
+ qemu_bin_relative_path = os.path.join("%s-softmmu" % arch,
|
||||
+ "qemu-system-%s" % arch)
|
||||
+ if is_readable_executable_file(qemu_bin_relative_path):
|
||||
+ return qemu_bin_relative_path
|
||||
+
|
||||
+ qemu_bin_from_src_dir_path = os.path.join(SRC_ROOT_DIR,
|
||||
+ qemu_bin_relative_path)
|
||||
+ if is_readable_executable_file(qemu_bin_from_src_dir_path):
|
||||
+ return qemu_bin_from_src_dir_path
|
||||
+
|
||||
+
|
||||
+class Test(avocado.Test):
|
||||
+ def setUp(self):
|
||||
+ self.vm = None
|
||||
+ self.qemu_bin = self.params.get('qemu_bin',
|
||||
+ default=pick_default_qemu_bin())
|
||||
+ if self.qemu_bin is None:
|
||||
+ self.cancel("No QEMU binary defined or found in the source tree")
|
||||
+ self.vm = QEMUMachine(self.qemu_bin)
|
||||
+
|
||||
+ def tearDown(self):
|
||||
+ if self.vm is not None:
|
||||
+ self.vm.shutdown()
|
||||
diff --git a/tests/acceptance/version.py b/tests/acceptance/version.py
|
||||
new file mode 100644
|
||||
index 0000000..13b0a74
|
||||
--- /dev/null
|
||||
+++ b/tests/acceptance/version.py
|
||||
@@ -0,0 +1,24 @@
|
||||
+# Version check example test
|
||||
+#
|
||||
+# Copyright (c) 2018 Red Hat, Inc.
|
||||
+#
|
||||
+# Author:
|
||||
+# Cleber Rosa <crosa@redhat.com>
|
||||
+#
|
||||
+# This work is licensed under the terms of the GNU GPL, version 2 or
|
||||
+# later. See the COPYING file in the top-level directory.
|
||||
+
|
||||
+
|
||||
+from avocado_qemu import Test
|
||||
+
|
||||
+
|
||||
+class Version(Test):
|
||||
+ """
|
||||
+ :avocado: enable
|
||||
+ :avocado: tags=quick
|
||||
+ """
|
||||
+ def test_qmp_human_info_version(self):
|
||||
+ self.vm.launch()
|
||||
+ res = self.vm.command('human-monitor-command',
|
||||
+ command_line='info version')
|
||||
+ self.assertRegexpMatches(res, r'^(\d+\.\d+\.\d)')
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,160 +0,0 @@
|
||||
From 90b8d9d17a9c252427df71fbe5bd76f897529e71 Mon Sep 17 00:00:00 2001
|
||||
From: "plai@redhat.com" <plai@redhat.com>
|
||||
Date: Wed, 3 Apr 2019 15:54:30 +0100
|
||||
Subject: [PATCH 06/10] kvm: Add support to KVM_GET_MSR_FEATURE_INDEX_LIST and
|
||||
KVM_GET_MSRS system ioctl
|
||||
|
||||
RH-Author: plai@redhat.com
|
||||
Message-id: <1554306874-28796-7-git-send-email-plai@redhat.com>
|
||||
Patchwork-id: 85384
|
||||
O-Subject: [RHEL8.1 qemu-kvm PATCH resend 06/10] kvm: Add support to KVM_GET_MSR_FEATURE_INDEX_LIST and KVM_GET_MSRS system ioctl
|
||||
Bugzilla: 1561761
|
||||
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
|
||||
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
||||
|
||||
From: Robert Hoo <robert.hu@linux.intel.com>
|
||||
|
||||
Add kvm_get_supported_feature_msrs() to get supported MSR feature index list.
|
||||
Add kvm_arch_get_supported_msr_feature() to get each MSR features value.
|
||||
|
||||
Signed-off-by: Robert Hoo <robert.hu@linux.intel.com>
|
||||
Message-Id: <1539578845-37944-2-git-send-email-robert.hu@linux.intel.com>
|
||||
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
(cherry picked from commit f57bceb6ab5163ddd6c41ff4344ab8cf28a9c63d)
|
||||
Signed-off-by: Paul Lai <plai@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
include/sysemu/kvm.h | 2 ++
|
||||
target/i386/kvm.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 82 insertions(+)
|
||||
|
||||
diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
|
||||
index 23669c4..3d8f294 100644
|
||||
--- a/include/sysemu/kvm.h
|
||||
+++ b/include/sysemu/kvm.h
|
||||
@@ -464,6 +464,8 @@ int kvm_vm_check_extension(KVMState *s, unsigned int extension);
|
||||
|
||||
uint32_t kvm_arch_get_supported_cpuid(KVMState *env, uint32_t function,
|
||||
uint32_t index, int reg);
|
||||
+uint32_t kvm_arch_get_supported_msr_feature(KVMState *s, uint32_t index);
|
||||
+
|
||||
|
||||
void kvm_set_sigmask_len(KVMState *s, unsigned int sigmask_len);
|
||||
|
||||
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
|
||||
index 702e3bf..096ed24 100644
|
||||
--- a/target/i386/kvm.c
|
||||
+++ b/target/i386/kvm.c
|
||||
@@ -106,6 +106,7 @@ static int has_pit_state2;
|
||||
static bool has_msr_mcg_ext_ctl;
|
||||
|
||||
static struct kvm_cpuid2 *cpuid_cache;
|
||||
+static struct kvm_msr_list *kvm_feature_msrs;
|
||||
|
||||
int kvm_has_pit_state2(void)
|
||||
{
|
||||
@@ -405,6 +406,42 @@ uint32_t kvm_arch_get_supported_cpuid(KVMState *s, uint32_t function,
|
||||
return ret;
|
||||
}
|
||||
|
||||
+uint32_t kvm_arch_get_supported_msr_feature(KVMState *s, uint32_t index)
|
||||
+{
|
||||
+ struct {
|
||||
+ struct kvm_msrs info;
|
||||
+ struct kvm_msr_entry entries[1];
|
||||
+ } msr_data;
|
||||
+ uint32_t ret;
|
||||
+
|
||||
+ if (kvm_feature_msrs == NULL) { /* Host doesn't support feature MSRs */
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ /* Check if requested MSR is supported feature MSR */
|
||||
+ int i;
|
||||
+ for (i = 0; i < kvm_feature_msrs->nmsrs; i++)
|
||||
+ if (kvm_feature_msrs->indices[i] == index) {
|
||||
+ break;
|
||||
+ }
|
||||
+ if (i == kvm_feature_msrs->nmsrs) {
|
||||
+ return 0; /* if the feature MSR is not supported, simply return 0 */
|
||||
+ }
|
||||
+
|
||||
+ msr_data.info.nmsrs = 1;
|
||||
+ msr_data.entries[0].index = index;
|
||||
+
|
||||
+ ret = kvm_ioctl(s, KVM_GET_MSRS, &msr_data);
|
||||
+ if (ret != 1) {
|
||||
+ error_report("KVM get MSR (index=0x%x) feature failed, %s",
|
||||
+ index, strerror(-ret));
|
||||
+ exit(1);
|
||||
+ }
|
||||
+
|
||||
+ return msr_data.entries[0].data;
|
||||
+}
|
||||
+
|
||||
+
|
||||
typedef struct HWPoisonPage {
|
||||
ram_addr_t ram_addr;
|
||||
QLIST_ENTRY(HWPoisonPage) list;
|
||||
@@ -1164,6 +1201,47 @@ void kvm_arch_do_init_vcpu(X86CPU *cpu)
|
||||
}
|
||||
}
|
||||
|
||||
+static int kvm_get_supported_feature_msrs(KVMState *s)
|
||||
+{
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ if (kvm_feature_msrs != NULL) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (!kvm_check_extension(s, KVM_CAP_GET_MSR_FEATURES)) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ struct kvm_msr_list msr_list;
|
||||
+
|
||||
+ msr_list.nmsrs = 0;
|
||||
+ ret = kvm_ioctl(s, KVM_GET_MSR_FEATURE_INDEX_LIST, &msr_list);
|
||||
+ if (ret < 0 && ret != -E2BIG) {
|
||||
+ error_report("Fetch KVM feature MSR list failed: %s",
|
||||
+ strerror(-ret));
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ assert(msr_list.nmsrs > 0);
|
||||
+ kvm_feature_msrs = (struct kvm_msr_list *) \
|
||||
+ g_malloc0(sizeof(msr_list) +
|
||||
+ msr_list.nmsrs * sizeof(msr_list.indices[0]));
|
||||
+
|
||||
+ kvm_feature_msrs->nmsrs = msr_list.nmsrs;
|
||||
+ ret = kvm_ioctl(s, KVM_GET_MSR_FEATURE_INDEX_LIST, kvm_feature_msrs);
|
||||
+
|
||||
+ if (ret < 0) {
|
||||
+ error_report("Fetch KVM feature MSR list failed: %s",
|
||||
+ strerror(-ret));
|
||||
+ g_free(kvm_feature_msrs);
|
||||
+ kvm_feature_msrs = NULL;
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int kvm_get_supported_msrs(KVMState *s)
|
||||
{
|
||||
static int kvm_supported_msrs;
|
||||
@@ -1320,6 +1398,8 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ kvm_get_supported_feature_msrs(s);
|
||||
+
|
||||
uname(&utsname);
|
||||
lm_capable_kernel = strcmp(utsname.machine, "x86_64") == 0;
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,108 +0,0 @@
|
||||
From 5c0a6bb69135e0fa83a1e063dfe878e5e98c1785 Mon Sep 17 00:00:00 2001
|
||||
From: Yash Mankad <ymankad@redhat.com>
|
||||
Date: Wed, 12 Dec 2018 00:14:40 +0000
|
||||
Subject: [PATCH 12/13] Bootstrap Python venv for tests
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: Yash Mankad <ymankad@redhat.com>
|
||||
Message-id: <8e00545539681a5de548c444e7752894b12bc8ec.1544573601.git.ymankad@redhat.com>
|
||||
Patchwork-id: 83436
|
||||
O-Subject: [RHEL-8.0 qemu-kvm PATCH v2 6/7] Bootstrap Python venv for tests
|
||||
Bugzilla: 1655807
|
||||
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
RH-Acked-by: John Snow <jsnow@redhat.com>
|
||||
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
|
||||
From: Cleber Rosa <crosa@redhat.com>
|
||||
|
||||
A number of QEMU tests are written in Python, and may benefit
|
||||
from an untainted Python venv.
|
||||
|
||||
By using make rules, tests that depend on specific Python libs
|
||||
can set that rule as a requirement, along with rules that require
|
||||
the presence or installation of specific libraries.
|
||||
|
||||
The tests/requirements.txt is supposed to contain the Python
|
||||
requirements that should be added to the venv created by check-venv.
|
||||
|
||||
Signed-off-by: Cleber Rosa <crosa@redhat.com>
|
||||
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
Acked-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
|
||||
Reviewed-by: Caio Carrara <ccarrara@redhat.com>
|
||||
Message-Id: <20181018153134.8493-2-crosa@redhat.com>
|
||||
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
(cherry picked from commit 213137217a60eca18e9b55817f00dfdd6eaff74a)
|
||||
Signed-off-by: Yash Mankad <ymankad@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
tests/Makefile.include | 26 ++++++++++++++++++++++++++
|
||||
tests/requirements.txt | 3 +++
|
||||
2 files changed, 29 insertions(+)
|
||||
create mode 100644 tests/requirements.txt
|
||||
|
||||
diff --git a/tests/Makefile.include b/tests/Makefile.include
|
||||
index 3ed8531..99a9dcd 100644
|
||||
--- a/tests/Makefile.include
|
||||
+++ b/tests/Makefile.include
|
||||
@@ -11,6 +11,7 @@ check-help:
|
||||
@echo " $(MAKE) check-qapi-schema Run QAPI schema tests"
|
||||
@echo " $(MAKE) check-block Run block tests"
|
||||
@echo " $(MAKE) check-report.html Generates an HTML test report"
|
||||
+ @echo " $(MAKE) check-venv Creates a Python venv for tests"
|
||||
@echo " $(MAKE) check-clean Clean the tests"
|
||||
@echo
|
||||
@echo "Please note that HTML reports do not regenerate if the unit tests"
|
||||
@@ -953,6 +954,30 @@ check-decodetree:
|
||||
./check.sh "$(PYTHON)" "$(SRC_PATH)/scripts/decodetree.py", \
|
||||
TEST, decodetree.py)
|
||||
|
||||
+# Python venv for running tests
|
||||
+
|
||||
+.PHONY: check-venv
|
||||
+
|
||||
+TESTS_VENV_DIR=$(BUILD_DIR)/tests/venv
|
||||
+TESTS_VENV_REQ=$(SRC_PATH)/tests/requirements.txt
|
||||
+
|
||||
+$(shell $(PYTHON) -c 'import sys; assert sys.version_info >= (3,0)' >/dev/null 2>&1)
|
||||
+ifeq ($(.SHELLSTATUS),0)
|
||||
+$(TESTS_VENV_DIR): $(TESTS_VENV_REQ)
|
||||
+ $(call quiet-command, \
|
||||
+ $(PYTHON) -m venv --system-site-packages $@, \
|
||||
+ VENV, $@)
|
||||
+ $(call quiet-command, \
|
||||
+ $(TESTS_VENV_DIR)/bin/python -m pip -q install -r $(TESTS_VENV_REQ), \
|
||||
+ PIP, $(TESTS_VENV_REQ))
|
||||
+ $(call quiet-command, touch $@)
|
||||
+else
|
||||
+$(TESTS_VENV_DIR):
|
||||
+ $(error "venv directory for tests requires Python 3")
|
||||
+endif
|
||||
+
|
||||
+check-venv: $(TESTS_VENV_DIR)
|
||||
+
|
||||
# Consolidated targets
|
||||
|
||||
.PHONY: check-qapi-schema check-qtest check-unit check check-clean
|
||||
@@ -967,6 +992,7 @@ check-clean:
|
||||
rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
|
||||
rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(target)-y)) $(check-qtest-generic-y))
|
||||
rm -f tests/test-qapi-gen-timestamp
|
||||
+ rm -rf $(TESTS_VENV_DIR)
|
||||
|
||||
clean: check-clean
|
||||
|
||||
diff --git a/tests/requirements.txt b/tests/requirements.txt
|
||||
new file mode 100644
|
||||
index 0000000..d39f9d1
|
||||
--- /dev/null
|
||||
+++ b/tests/requirements.txt
|
||||
@@ -0,0 +1,3 @@
|
||||
+# Add Python module requirements, one per line, to be installed
|
||||
+# in the tests/venv Python virtual environment. For more info,
|
||||
+# refer to: https://pip.pypa.io/en/stable/user_guide/#id1
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,50 +0,0 @@
|
||||
From 4b889f33761a4447998b16846bfb983519def96d Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Huth <thuth@redhat.com>
|
||||
Date: Wed, 28 Nov 2018 07:23:59 +0000
|
||||
Subject: [PATCH 07/16] Declare cirrus-vga as deprecated
|
||||
|
||||
RH-Author: Thomas Huth <thuth@redhat.com>
|
||||
Message-id: <1543389839-8995-1-git-send-email-thuth@redhat.com>
|
||||
Patchwork-id: 83178
|
||||
O-Subject: [RHEL8 qemu-kvm PATCH v2] Declare cirrus-vga as deprecated
|
||||
Bugzilla: 1651994
|
||||
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
|
||||
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1651994
|
||||
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=19300792
|
||||
Upstream: n/a (downstream only)
|
||||
Branch: rhel8/master-2.12.0
|
||||
Branch: rhel8/master-3.0.0
|
||||
|
||||
The "cirrus" device in qemu-kvm is considered as a legacy device, which
|
||||
also had a lot of security issues in the past. KVM guest should preferably
|
||||
use "stdvga", "virtio-vga" or "qxl" as graphics card nowadays instead.
|
||||
To avoid that we have to carry along the legacy "cirrus" device in
|
||||
downstream qemu-kvm forever, let's mark it as deprecated in RHEL8 now,
|
||||
so that we can finally remove it in RHEL9.
|
||||
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
hw/display/cirrus_vga.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
|
||||
index 014268a..29d6055 100644
|
||||
--- a/hw/display/cirrus_vga.c
|
||||
+++ b/hw/display/cirrus_vga.c
|
||||
@@ -3098,6 +3098,9 @@ 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. */
|
||||
if (s->vga.vram_size_mb != 4 && s->vga.vram_size_mb != 8 &&
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,40 +0,0 @@
|
||||
From d68f80c725a05ddf0a2a997ba35832e8f32c7fe9 Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Thu, 7 Jun 2018 07:43:11 +0200
|
||||
Subject: [PATCH 259/268] Disable AT24Cx i2c eeprom
|
||||
|
||||
RH-Author: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Message-id: <fc4088a0a805b32f545c561a76d20115da8de85d.1528355911.git.mrezanin@redhat.com>
|
||||
Patchwork-id: 80598
|
||||
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 3/7] Disable AT24Cx i2c eeprom
|
||||
Bugzilla: 1586357
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
||||
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
|
||||
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
We do not want to support new eeprom_at24c device. It is protected
|
||||
by CONFIG_I2C option but we can't remove it as it cover other supported
|
||||
devices. Manually remove module with the device.
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
hw/nvram/Makefile.objs | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/nvram/Makefile.objs b/hw/nvram/Makefile.objs
|
||||
index a912d25..cbc8bba 100644
|
||||
--- a/hw/nvram/Makefile.objs
|
||||
+++ b/hw/nvram/Makefile.objs
|
||||
@@ -1,6 +1,6 @@
|
||||
common-obj-$(CONFIG_DS1225Y) += ds1225y.o
|
||||
common-obj-y += eeprom93xx.o
|
||||
-common-obj-$(CONFIG_I2C) += eeprom_at24c.o
|
||||
+#common-obj-$(CONFIG_I2C) += eeprom_at24c.o
|
||||
common-obj-y += fw_cfg.o
|
||||
common-obj-y += chrp_nvram.o
|
||||
common-obj-$(CONFIG_MAC_NVRAM) += mac_nvram.o
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,40 +0,0 @@
|
||||
From 3f953e91fb0d690f33dd6e0d4b257cbb97c410cc Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Thu, 7 Jun 2018 07:43:12 +0200
|
||||
Subject: [PATCH 260/268] Disable CAN bus devices
|
||||
|
||||
RH-Author: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Message-id: <706a21b4d25946165513ff99619c0fed0852dc50.1528355911.git.mrezanin@redhat.com>
|
||||
Patchwork-id: 80593
|
||||
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 4/7] Disable CAN bus devices
|
||||
Bugzilla: 1586357
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
||||
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
|
||||
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
We do not want to support new CAN devices (kvaser_pci, mioe3680_pci
|
||||
and pcm3680_pci).
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
default-configs/pci.mak | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/default-configs/pci.mak b/default-configs/pci.mak
|
||||
index 4c8c296..25fc382 100644
|
||||
--- a/default-configs/pci.mak
|
||||
+++ b/default-configs/pci.mak
|
||||
@@ -33,7 +33,7 @@ CONFIG_SERIAL_ISA=y
|
||||
CONFIG_SERIAL_PCI=y
|
||||
CONFIG_CAN_BUS=y
|
||||
CONFIG_CAN_SJA1000=y
|
||||
-CONFIG_CAN_PCI=y
|
||||
+#CONFIG_CAN_PCI=y
|
||||
#CONFIG_IPACK=y
|
||||
CONFIG_WDT_IB6300ESB=y
|
||||
CONFIG_PCI_TESTDEV=y
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,55 +0,0 @@
|
||||
From 9caf292924a26cbfb7e46d232a0f32f706254866 Mon Sep 17 00:00:00 2001
|
||||
From: Danilo de Paula <ddepaula@redhat.com>
|
||||
Date: Fri, 7 Dec 2018 14:16:59 +0000
|
||||
Subject: [PATCH 2/2] Disable CONFIG_CAN_BUS and CONFIG_CAN_SJA1000
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: Danilo de Paula <ddepaula@redhat.com>
|
||||
Message-id: <20181207141659.3485-1-ddepaula@redhat.com>
|
||||
Patchwork-id: 83304
|
||||
O-Subject: [RHEL-8.0/rhel qemu-kvm PATCH] Disable CONFIG_CAN_BUS and CONFIG_CAN_SJA1000
|
||||
Bugzilla: 1640042
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
|
||||
BZ: 1640042
|
||||
Branch: rhel8/master-2.12.0
|
||||
Branch: rhel8/master-3.1.0-rc2
|
||||
Upstream: Downstream only
|
||||
Brew: None
|
||||
|
||||
We currently compile qemu-kvm with CONFIG_CAN_SJA1000=y and
|
||||
CONFIG_CAN_BUS=y in default-configs/pci.mak.
|
||||
As far as I can see, this has currently no effect,
|
||||
since we already disabled the other CONFIG_CAN_* switches there
|
||||
(which control the inclusion of the emulated CAN devices).
|
||||
|
||||
Since we do not have any plans to support CAN in downstream, we should also disable
|
||||
CONFIG_CAN_BUS and CONFIG_CAN_SJA1000 in our downstream configuration.
|
||||
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
default-configs/pci.mak | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/default-configs/pci.mak b/default-configs/pci.mak
|
||||
index 763c375..2277308 100644
|
||||
--- a/default-configs/pci.mak
|
||||
+++ b/default-configs/pci.mak
|
||||
@@ -31,8 +31,8 @@ CONFIG_AHCI=y
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_SERIAL_ISA=y
|
||||
CONFIG_SERIAL_PCI=y
|
||||
-CONFIG_CAN_BUS=y
|
||||
-CONFIG_CAN_SJA1000=y
|
||||
+#CONFIG_CAN_BUS=y
|
||||
+#CONFIG_CAN_SJA1000=y
|
||||
#CONFIG_CAN_PCI=y
|
||||
#CONFIG_IPACK=y
|
||||
CONFIG_WDT_IB6300ESB=y
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,44 +0,0 @@
|
||||
From 23400c3067fab729fd0584e16f6fa84e1bb3c4f8 Mon Sep 17 00:00:00 2001
|
||||
From: Auger Eric <eric.auger@redhat.com>
|
||||
Date: Fri, 20 Sep 2019 17:25:08 +0100
|
||||
Subject: [PATCH 02/21] Disable CONFIG_I2C and CONFIG_IOH3420
|
||||
|
||||
RH-Author: Auger Eric <eric.auger@redhat.com>
|
||||
Message-id: <20190920172508.16323-1-eric.auger@redhat.com>
|
||||
Patchwork-id: 90825
|
||||
O-Subject: [RHEL-8.2.0 qemu-kvm PATCH] Disable CONFIG_I2C and CONFIG_IOH3420
|
||||
Bugzilla: 1693140
|
||||
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: Andrew Jones <drjones@redhat.com>
|
||||
|
||||
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1693140
|
||||
Branch: rhel-8.2.0
|
||||
Upstream: Downstream only
|
||||
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=23613661
|
||||
|
||||
Remove the I2C config which is of no use on aarch64. Also remove the
|
||||
IOH3420 to be consistent with AV content (See BZ 1627283).
|
||||
|
||||
Signed-off-by: Eric Auger <eric.auger@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
default-configs/aarch64-softmmu.mak | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/default-configs/aarch64-softmmu.mak b/default-configs/aarch64-softmmu.mak
|
||||
index 860140e..d718243 100644
|
||||
--- a/default-configs/aarch64-softmmu.mak
|
||||
+++ b/default-configs/aarch64-softmmu.mak
|
||||
@@ -23,8 +23,6 @@ CONFIG_GPIO_KEY=y
|
||||
CONFIG_ARM_V7M=y
|
||||
CONFIG_PCIE_PORT=y
|
||||
CONFIG_XIO3130=y
|
||||
-CONFIG_IOH3420=y
|
||||
CONFIG_USB_XHCI=y
|
||||
CONFIG_USB=y
|
||||
-CONFIG_I2C=y
|
||||
CONFIG_FW_CFG_DMA=y
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,50 +0,0 @@
|
||||
From 3eef52a0caff23b537e88009d79ec1725ccebe06 Mon Sep 17 00:00:00 2001
|
||||
From: Danilo de Paula <ddepaula@redhat.com>
|
||||
Date: Fri, 7 Dec 2018 14:12:00 +0000
|
||||
Subject: [PATCH 1/2] Disable CONFIG_IPMI and CONFIG_I2C for ppc64
|
||||
|
||||
RH-Author: Danilo de Paula <ddepaula@redhat.com>
|
||||
Message-id: <20181207141200.30857-1-ddepaula@redhat.com>
|
||||
Patchwork-id: 83303
|
||||
O-Subject: [RHEL-8.0/rhel qemu-kvm PATCH] Disable CONFIG_IPMI and CONFIG_I2C for ppc64
|
||||
Bugzilla: 1640044
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: David Gibson <dgibson@redhat.com>
|
||||
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
|
||||
BZ: 1640044
|
||||
Branch: rhel8/master-2.12.0
|
||||
Branch: rhel8/master-3.1.0-rc2
|
||||
Upstream: Downstream only
|
||||
Brew: none
|
||||
|
||||
Our downstream qemu-kvm only uses the para-virtualized "pseries" machine
|
||||
type.
|
||||
There is no need to include I2C or IPMI.
|
||||
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
default-configs/ppc64-softmmu.mak | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64-softmmu.mak
|
||||
index 0ee8f6c..cece3dc 100644
|
||||
--- a/default-configs/ppc64-softmmu.mak
|
||||
+++ b/default-configs/ppc64-softmmu.mak
|
||||
@@ -15,11 +15,11 @@ CONFIG_USB_OHCI=y
|
||||
CONFIG_VGA=y
|
||||
CONFIG_VGA_PCI=y
|
||||
CONFIG_SERIAL=y
|
||||
-CONFIG_I2C=y
|
||||
+#CONFIG_I2C=y
|
||||
|
||||
# For PowerNV
|
||||
#CONFIG_POWERNV=y
|
||||
-CONFIG_IPMI=y
|
||||
+#CONFIG_IPMI=y
|
||||
#CONFIG_IPMI_LOCAL=y
|
||||
#CONFIG_IPMI_EXTERN=y
|
||||
#CONFIG_ISA_IPMI_BT=y
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,457 +0,0 @@
|
||||
From 88780a41e05b8079cde07466c252b42c113f9e5c Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Sun, 9 Jun 2019 09:35:09 +0100
|
||||
Subject: [PATCH 8/8] Disable VXHS support
|
||||
|
||||
RH-Author: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Message-id: <1560072909-1725-1-git-send-email-mrezanin@redhat.com>
|
||||
Patchwork-id: 88629
|
||||
O-Subject: [RHEL-8 qemu-kvm PATCH] Disable VXHS support
|
||||
Bugzilla: 1714933
|
||||
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
|
||||
RH-Acked-by: Danilo de Paula <ddepaula@redhat.com>
|
||||
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1714933
|
||||
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=22065429
|
||||
Branch: rhel-8.1.0
|
||||
Upstream: n/a
|
||||
|
||||
Reverting commit e9aff9d4ab1f9c10a4cb88fc5b92c4835e8b2688 introducing
|
||||
downstream modularizaiton of VXHS driver as we do not need to support
|
||||
VXHS driver anymore.
|
||||
|
||||
Patch is not pure revert as we changed way we handle configuration
|
||||
of qemu build after this patch. In addition, reverting downstream only
|
||||
removing of vxhs.o from block/Makefile.obj.
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
block/Makefile.objs | 2 +-
|
||||
block/vxhs.c | 123 ++++--------------------------------
|
||||
configure | 33 +++++++++-
|
||||
include/block/vxhs_shim.h | 143 ------------------------------------------
|
||||
redhat/qemu-kvm.spec.template | 9 ---
|
||||
5 files changed, 42 insertions(+), 268 deletions(-)
|
||||
delete mode 100644 include/block/vxhs_shim.h
|
||||
|
||||
diff --git a/block/Makefile.objs b/block/Makefile.objs
|
||||
index 037c76b..ac7a1f8 100644
|
||||
--- a/block/Makefile.objs
|
||||
+++ b/block/Makefile.objs
|
||||
@@ -29,7 +29,7 @@ block-obj-$(CONFIG_LIBNFS) += nfs.o
|
||||
block-obj-$(CONFIG_CURL) += curl.o
|
||||
block-obj-$(CONFIG_RBD) += rbd.o
|
||||
block-obj-$(CONFIG_GLUSTERFS) += gluster.o
|
||||
-#block-obj-$(CONFIG_VXHS) += vxhs.o
|
||||
+block-obj-$(CONFIG_VXHS) += vxhs.o
|
||||
block-obj-$(CONFIG_LIBSSH2) += ssh.o
|
||||
block-obj-y += accounting.o dirty-bitmap.o
|
||||
block-obj-y += write-threshold.o
|
||||
diff --git a/block/vxhs.c b/block/vxhs.c
|
||||
index 25fea7f..d2a1f4e 100644
|
||||
--- a/block/vxhs.c
|
||||
+++ b/block/vxhs.c
|
||||
@@ -9,8 +9,7 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
-#include "block/vxhs_shim.h"
|
||||
-#include <gmodule.h>
|
||||
+#include <qnio/qnio_api.h>
|
||||
#include <sys/param.h>
|
||||
#include "block/block_int.h"
|
||||
#include "block/qdict.h"
|
||||
@@ -60,97 +59,6 @@ typedef struct BDRVVXHSState {
|
||||
char *tlscredsid; /* tlscredsid */
|
||||
} BDRVVXHSState;
|
||||
|
||||
-#define LIBVXHS_FULL_PATHNAME "/usr/lib64/qemu/libvxhs.so.1"
|
||||
-static bool libvxhs_loaded;
|
||||
-static GModule *libvxhs_handle;
|
||||
-
|
||||
-static LibVXHSFuncs libvxhs;
|
||||
-
|
||||
-typedef struct LibVXHSSymbols {
|
||||
- const char *name;
|
||||
- gpointer *addr;
|
||||
-} LibVXHSSymbols;
|
||||
-
|
||||
-static LibVXHSSymbols libvxhs_symbols[] = {
|
||||
- {"iio_init", (gpointer *) &libvxhs.iio_init},
|
||||
- {"iio_fini", (gpointer *) &libvxhs.iio_fini},
|
||||
- {"iio_min_version", (gpointer *) &libvxhs.iio_min_version},
|
||||
- {"iio_max_version", (gpointer *) &libvxhs.iio_max_version},
|
||||
- {"iio_open", (gpointer *) &libvxhs.iio_open},
|
||||
- {"iio_close", (gpointer *) &libvxhs.iio_close},
|
||||
- {"iio_writev", (gpointer *) &libvxhs.iio_writev},
|
||||
- {"iio_readv", (gpointer *) &libvxhs.iio_readv},
|
||||
- {"iio_ioctl", (gpointer *) &libvxhs.iio_ioctl},
|
||||
- {NULL}
|
||||
-};
|
||||
-
|
||||
-static void bdrv_vxhs_set_funcs(GModule *handle, Error **errp)
|
||||
-{
|
||||
- int i = 0;
|
||||
- while (libvxhs_symbols[i].name) {
|
||||
- const char *name = libvxhs_symbols[i].name;
|
||||
- if (!g_module_symbol(handle, name, libvxhs_symbols[i].addr)) {
|
||||
- error_setg(errp, "%s could not be loaded from libvxhs: %s",
|
||||
- name, g_module_error());
|
||||
- return;
|
||||
- }
|
||||
- ++i;
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-static void bdrv_vxhs_load_libs(Error **errp)
|
||||
-{
|
||||
- Error *local_err = NULL;
|
||||
- int32_t ver;
|
||||
-
|
||||
- if (libvxhs_loaded) {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- if (!g_module_supported()) {
|
||||
- error_setg(errp, "modules are not supported on this platform: %s",
|
||||
- g_module_error());
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- libvxhs_handle = g_module_open(LIBVXHS_FULL_PATHNAME,
|
||||
- G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
|
||||
- if (!libvxhs_handle) {
|
||||
- error_setg(errp, "The VXHS library from Veritas might not be installed "
|
||||
- "correctly (%s)", g_module_error());
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- g_module_make_resident(libvxhs_handle);
|
||||
-
|
||||
- bdrv_vxhs_set_funcs(libvxhs_handle, &local_err);
|
||||
- if (local_err) {
|
||||
- error_propagate(errp, local_err);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- /* Now check to see if the libvxhs we are using here is supported
|
||||
- * by the loaded version */
|
||||
-
|
||||
- ver = (*libvxhs.iio_min_version)();
|
||||
- if (ver > QNIO_VERSION) {
|
||||
- error_setg(errp, "Trying to use libvxhs version %"PRId32" API, but "
|
||||
- "only %"PRId32" or newer is supported by %s",
|
||||
- QNIO_VERSION, ver, LIBVXHS_FULL_PATHNAME);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- ver = (*libvxhs.iio_max_version)();
|
||||
- if (ver < QNIO_VERSION) {
|
||||
- error_setg(errp, "Trying to use libvxhs version %"PRId32" API, but "
|
||||
- "only %"PRId32" or earlier is supported by %s",
|
||||
- QNIO_VERSION, ver, LIBVXHS_FULL_PATHNAME);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- libvxhs_loaded = true;
|
||||
-}
|
||||
-
|
||||
static void vxhs_complete_aio_bh(void *opaque)
|
||||
{
|
||||
VXHSAIOCB *acb = opaque;
|
||||
@@ -312,7 +220,7 @@ static void vxhs_parse_filename(const char *filename, QDict *options,
|
||||
static int vxhs_init_and_ref(void)
|
||||
{
|
||||
if (vxhs_ref++ == 0) {
|
||||
- if ((*libvxhs.iio_init)(QNIO_VERSION, vxhs_iio_callback)) {
|
||||
+ if (iio_init(QNIO_VERSION, vxhs_iio_callback)) {
|
||||
return -ENODEV;
|
||||
}
|
||||
}
|
||||
@@ -322,7 +230,7 @@ static int vxhs_init_and_ref(void)
|
||||
static void vxhs_unref(void)
|
||||
{
|
||||
if (--vxhs_ref == 0) {
|
||||
- (*libvxhs.iio_fini)();
|
||||
+ iio_fini();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -392,17 +300,8 @@ static int vxhs_open(BlockDriverState *bs, QDict *options,
|
||||
char *client_key = NULL;
|
||||
char *client_cert = NULL;
|
||||
|
||||
- bdrv_vxhs_load_libs(&local_err);
|
||||
- if (local_err) {
|
||||
- error_propagate(errp, local_err);
|
||||
- /* on error, cannot cleanup because the iio_fini() function
|
||||
- * is not loaded */
|
||||
- return -EINVAL;
|
||||
- }
|
||||
-
|
||||
ret = vxhs_init_and_ref();
|
||||
if (ret < 0) {
|
||||
- error_setg(&local_err, "libvxhs iio_init() failed");
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
@@ -487,8 +386,8 @@ static int vxhs_open(BlockDriverState *bs, QDict *options,
|
||||
/*
|
||||
* Open qnio channel to storage agent if not opened before
|
||||
*/
|
||||
- dev_handlep = (*libvxhs.iio_open)(of_vsa_addr, s->vdisk_guid, 0,
|
||||
- cacert, client_key, client_cert);
|
||||
+ dev_handlep = iio_open(of_vsa_addr, s->vdisk_guid, 0,
|
||||
+ cacert, client_key, client_cert);
|
||||
if (dev_handlep == NULL) {
|
||||
trace_vxhs_open_iio_open(of_vsa_addr);
|
||||
ret = -ENODEV;
|
||||
@@ -552,12 +451,12 @@ static BlockAIOCB *vxhs_aio_rw(BlockDriverState *bs, int64_t sector_num,
|
||||
|
||||
switch (iodir) {
|
||||
case VDISK_AIO_WRITE:
|
||||
- ret = (*libvxhs.iio_writev)(dev_handle, acb, qiov->iov, qiov->niov,
|
||||
- offset, (uint64_t)size, iio_flags);
|
||||
+ ret = iio_writev(dev_handle, acb, qiov->iov, qiov->niov,
|
||||
+ offset, (uint64_t)size, iio_flags);
|
||||
break;
|
||||
case VDISK_AIO_READ:
|
||||
- ret = (*libvxhs.iio_readv)(dev_handle, acb, qiov->iov, qiov->niov,
|
||||
- offset, (uint64_t)size, iio_flags);
|
||||
+ ret = iio_readv(dev_handle, acb, qiov->iov, qiov->niov,
|
||||
+ offset, (uint64_t)size, iio_flags);
|
||||
break;
|
||||
default:
|
||||
trace_vxhs_aio_rw_invalid(iodir);
|
||||
@@ -607,7 +506,7 @@ static void vxhs_close(BlockDriverState *bs)
|
||||
* Close vDisk device
|
||||
*/
|
||||
if (s->vdisk_hostinfo.dev_handle) {
|
||||
- (*libvxhs.iio_close)(s->vdisk_hostinfo.dev_handle);
|
||||
+ iio_close(s->vdisk_hostinfo.dev_handle);
|
||||
s->vdisk_hostinfo.dev_handle = NULL;
|
||||
}
|
||||
|
||||
@@ -629,7 +528,7 @@ static int64_t vxhs_get_vdisk_stat(BDRVVXHSState *s)
|
||||
int ret = 0;
|
||||
void *dev_handle = s->vdisk_hostinfo.dev_handle;
|
||||
|
||||
- ret = (*libvxhs.iio_ioctl)(dev_handle, IOR_VDISK_STAT, &vdisk_size, 0);
|
||||
+ ret = iio_ioctl(dev_handle, IOR_VDISK_STAT, &vdisk_size, 0);
|
||||
if (ret < 0) {
|
||||
trace_vxhs_get_vdisk_stat_err(s->vdisk_guid, ret, errno);
|
||||
return -EIO;
|
||||
diff --git a/configure b/configure
|
||||
index 858b456..6d61b14 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -3428,7 +3428,7 @@ else
|
||||
glib_req_ver=2.22
|
||||
fi
|
||||
glib_modules=gthread-2.0
|
||||
-if test "$modules" = yes -o "$vxhs" = yes; then
|
||||
+if test "$modules" = yes; then
|
||||
glib_modules="$glib_modules gmodule-export-2.0"
|
||||
fi
|
||||
|
||||
@@ -5391,6 +5391,33 @@ if compile_prog "" "" ; then
|
||||
fi
|
||||
|
||||
##########################################
|
||||
+# Veritas HyperScale block driver VxHS
|
||||
+# Check if libvxhs is installed
|
||||
+
|
||||
+if test "$vxhs" != "no" ; then
|
||||
+ cat > $TMPC <<EOF
|
||||
+#include <stdint.h>
|
||||
+#include <qnio/qnio_api.h>
|
||||
+
|
||||
+void *vxhs_callback;
|
||||
+
|
||||
+int main(void) {
|
||||
+ iio_init(QNIO_VERSION, vxhs_callback);
|
||||
+ return 0;
|
||||
+}
|
||||
+EOF
|
||||
+ vxhs_libs="-lvxhs -lssl"
|
||||
+ if compile_prog "" "$vxhs_libs" ; then
|
||||
+ vxhs=yes
|
||||
+ else
|
||||
+ if test "$vxhs" = "yes" ; then
|
||||
+ feature_not_found "vxhs block device" "Install libvxhs See github"
|
||||
+ fi
|
||||
+ vxhs=no
|
||||
+ fi
|
||||
+fi
|
||||
+
|
||||
+##########################################
|
||||
# check for _Static_assert()
|
||||
|
||||
have_static_assert=no
|
||||
@@ -6707,8 +6734,8 @@ if test "$pthread_setname_np" = "yes" ; then
|
||||
fi
|
||||
|
||||
if test "$vxhs" = "yes" ; then
|
||||
- echo "CONFIG_VXHS=m" >> $config_host_mak
|
||||
- echo "VXHS_LIBS= -lssl" >> $config_host_mak
|
||||
+ echo "CONFIG_VXHS=y" >> $config_host_mak
|
||||
+ echo "VXHS_LIBS=$vxhs_libs" >> $config_host_mak
|
||||
fi
|
||||
|
||||
if test "$bochs" = "yes" ; then
|
||||
diff --git a/include/block/vxhs_shim.h b/include/block/vxhs_shim.h
|
||||
deleted file mode 100644
|
||||
index 42519ae..0000000
|
||||
--- a/include/block/vxhs_shim.h
|
||||
+++ /dev/null
|
||||
@@ -1,143 +0,0 @@
|
||||
-/*
|
||||
- * Network IO library for VxHS QEMU block driver (Veritas Technologies)
|
||||
- *
|
||||
- * This work is licensed under the terms of the GNU GPL, version 2. See
|
||||
- * the COPYING file in the top-level directory.
|
||||
- *
|
||||
- * Contributions after 2014-08-15 are licensed under the terms of the
|
||||
- * GNU GPL, version 2 or (at your option) any later version.
|
||||
- */
|
||||
-
|
||||
-#ifndef QNIO_API_H
|
||||
-#define QNIO_API_H
|
||||
-
|
||||
-#include <sys/uio.h>
|
||||
-
|
||||
-/*
|
||||
- * Bump up the version everytime this file is modified
|
||||
- */
|
||||
-#define QNIO_VERSION 34
|
||||
-
|
||||
-/*
|
||||
- * These are the opcodes referenced by callback routine.
|
||||
- */
|
||||
-#define IRP_READ_REQUEST 0x1FFF
|
||||
-#define IRP_WRITE_REQUEST 0x2FFF
|
||||
-#define IRP_VDISK_CHECK_IO_FAILOVER_READY 2020
|
||||
-
|
||||
-/*
|
||||
- * opcodes for iio_ioctl.
|
||||
- */
|
||||
-#define IOR_VDISK_STAT 1005
|
||||
-
|
||||
-/*
|
||||
- * Error values for iio_cb_t callback function.
|
||||
- */
|
||||
-#define QNIOERROR_HUP 901 /* Retriable error */
|
||||
-#define QNIOERROR_NOCONN 902 /* Non-retriable error */
|
||||
-
|
||||
-
|
||||
-/* Operation Flags */
|
||||
-#define IIO_FLAG_ASYNC 0x0001 /* Do an async send */
|
||||
-
|
||||
-/*
|
||||
- * INPUT:
|
||||
- * ctx - opaque context
|
||||
- * opcode - Operation
|
||||
- * error - 0 for sucess, non-zero for failure.
|
||||
- * RETURNS:
|
||||
- * void
|
||||
- * DESCRIPTION:
|
||||
- * This callback is called, after Async request completes.
|
||||
- *
|
||||
- * CONTEXT:
|
||||
- * The callback should be wait-free.
|
||||
- */
|
||||
-typedef void (*iio_cb_t) (void *ctx, uint32_t opcode, uint32_t error);
|
||||
-
|
||||
-typedef struct LibVXHSFuncs {
|
||||
-/*
|
||||
- * RETURNS:
|
||||
- * 0 for sucess, non-zero for failure.
|
||||
- * DESCRIPTION:
|
||||
- * Intilize the library state. This should be called at the
|
||||
- * begining before issuing any library call.
|
||||
- */
|
||||
- int (*iio_init)(int32_t version, iio_cb_t cb);
|
||||
-/*
|
||||
- * RETURNS:
|
||||
- * void
|
||||
- * DESCRIPTION:
|
||||
- * Relinquish library resources. This should be called on the
|
||||
- * close of last open device.
|
||||
- */
|
||||
- void (*iio_fini)(void);
|
||||
-/*
|
||||
- * DESCRIPTION:
|
||||
- * Returns minimum QNIO API version supported by library.
|
||||
- */
|
||||
- int32_t (*iio_min_version)(void);
|
||||
-/*
|
||||
- * DESCRIPTION:
|
||||
- * Returns maximum QNIO API version supported by library.
|
||||
- */
|
||||
- int32_t (*iio_max_version)(void);
|
||||
-/*
|
||||
- * INPUT:
|
||||
- * uri - const string of the format of://<hostname|ip>:port
|
||||
- * devid - Device ID.
|
||||
- * flags - currently unused, this must be set to 0
|
||||
- * cacert - CA certificates file in PEM format
|
||||
- * client_key - Client private key file in PEM format
|
||||
- * client_cert - Client certificate file in PEM format
|
||||
- * RETURNS:
|
||||
- * opeque device handle on success, NULL on failure.
|
||||
- * DESCRIPTION:
|
||||
- * This call returns device handle on success. Returns NULL on
|
||||
- * failure with errno set
|
||||
- * errno can be one of:
|
||||
- * ENODEV - remote device not found
|
||||
- * EBADF - Unable to open communication channel.
|
||||
- * EBUSY - The call cannot be completed right now
|
||||
- */
|
||||
- void *(*iio_open)(const char *uri, const char *devid, uint32_t flags,
|
||||
- const char *cacert, const char *client_key,
|
||||
- const char *client_cert);
|
||||
-/*
|
||||
- * Close the device.
|
||||
- * For every matching iio_open() there should be a matching iio_close()
|
||||
- * The last close free all data structures associated with the device.
|
||||
- */
|
||||
- int32_t (*iio_close)(void *dev_handle);
|
||||
-/*
|
||||
- * INPUT:
|
||||
- * dev_handle - device descriptor on which read/write needs to be performed
|
||||
- * ctx - an opaque context that is not interpreted This is set for
|
||||
- * async calls only. It can be NULL.
|
||||
- * iov - an array of iovecs (This is a scatter gather operation)
|
||||
- * iovcnt - the number of iovecs
|
||||
- * offset - an offset to perform the write
|
||||
- * size - I/O size
|
||||
- * flags - can be one of
|
||||
- * IIO_FLAG_ASYNC - indicating this is a aio call.
|
||||
- * RETURNS:
|
||||
- * -1 on error, sets errno
|
||||
- * EBADF - the remote fd is bad
|
||||
- * EBUSY - The call cannot be completed right now
|
||||
- * EPIPE - the channel got disconnected, call back would be called in
|
||||
- * addition to this.
|
||||
- */
|
||||
- int32_t (*iio_writev)(void *dev_handle, void *ctx, struct iovec *iov,
|
||||
- int iovcnt, uint64_t offset, uint64_t size,
|
||||
- uint32_t flags);
|
||||
-
|
||||
- int32_t (*iio_readv)(void *dev_handle, void *ctx, struct iovec *iov,
|
||||
- int iovcnt, uint64_t offset, uint64_t size,
|
||||
- uint32_t flags);
|
||||
-
|
||||
- int32_t (*iio_ioctl)(void *dev_handle, uint32_t opcode, void *opaque,
|
||||
- uint32_t flags);
|
||||
-
|
||||
-} LibVXHSFuncs;
|
||||
-
|
||||
-#endif
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,43 +0,0 @@
|
||||
From c670fa1f55724d096e28c9ab929ff4cb7d935d31 Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Thu, 7 Jun 2018 07:43:09 +0200
|
||||
Subject: [PATCH 257/268] Disable aarch64 devices reappeared after 2.12 rebase
|
||||
|
||||
RH-Author: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Message-id: <f72359b74f5219ef13ae074e11938a97c1314200.1528355911.git.mrezanin@redhat.com>
|
||||
Patchwork-id: 80592
|
||||
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 1/7] Disable aarch64 devices reappeared after 2.12 rebase
|
||||
Bugzilla: 1586357
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
||||
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
Up to QEMU 2.11 we disabled aarch64 devices by removing files from
|
||||
Makefile.
|
||||
As default_config options were added, we use them to disable devices
|
||||
since 2.12. However, we can't turn CONFIG_ARM_V7M (turning it off will
|
||||
break build) so we have to manually remove armv7m module from Makefile.
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
hw/arm/Makefile.objs | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/arm/Makefile.objs b/hw/arm/Makefile.objs
|
||||
index 2885e3e..3e8b167 100644
|
||||
--- a/hw/arm/Makefile.objs
|
||||
+++ b/hw/arm/Makefile.objs
|
||||
@@ -16,7 +16,7 @@ obj-$(CONFIG_STRONGARM) += collie.o
|
||||
obj-$(CONFIG_VERSATILE) += vexpress.o versatilepb.o
|
||||
obj-$(CONFIG_ZYNQ) += xilinx_zynq.o
|
||||
|
||||
-obj-$(CONFIG_ARM_V7M) += armv7m.o
|
||||
+#obj-$(CONFIG_ARM_V7M) += armv7m.o
|
||||
obj-$(CONFIG_EXYNOS4) += exynos4210.o
|
||||
obj-$(CONFIG_PXA2XX) += pxa2xx.o pxa2xx_gpio.o pxa2xx_pic.o
|
||||
obj-$(CONFIG_DIGIC) += digic.o
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,36 +0,0 @@
|
||||
From 67c5a8ce8ef97d9b08cfcbe70e05da9ca91dd62e Mon Sep 17 00:00:00 2001
|
||||
From: Markus Armbruster <armbru@redhat.com>
|
||||
Date: Wed, 10 Oct 2018 04:58:19 +0100
|
||||
Subject: [PATCH 2/5] Disable ivshmem
|
||||
|
||||
RH-Author: Markus Armbruster <armbru@redhat.com>
|
||||
Message-id: <20181010045819.32729-3-armbru@redhat.com>
|
||||
Patchwork-id: 82526
|
||||
O-Subject: [RHEL8/rhel qemu-kvm PATCH 2/2] Disable ivshmem
|
||||
Bugzilla: 1621817
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
|
||||
Signed-off-by: Markus Armbruster <armbru@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
default-configs/pci.mak | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/default-configs/pci.mak b/default-configs/pci.mak
|
||||
index 25fc382..763c375 100644
|
||||
--- a/default-configs/pci.mak
|
||||
+++ b/default-configs/pci.mak
|
||||
@@ -43,7 +43,7 @@ CONFIG_PCI_TESTDEV=y
|
||||
CONFIG_EDU=y
|
||||
CONFIG_VGA=y
|
||||
CONFIG_VGA_PCI=y
|
||||
-CONFIG_IVSHMEM_DEVICE=$(CONFIG_IVSHMEM)
|
||||
+#CONFIG_IVSHMEM_DEVICE=$(CONFIG_IVSHMEM)
|
||||
#CONFIG_ROCKER=y
|
||||
#CONFIG_VHOST_USER_SCSI=$(call land,$(CONFIG_VHOST_USER),$(CONFIG_LINUX))
|
||||
#CONFIG_VHOST_USER_BLK=$(call land,$(CONFIG_VHOST_USER),$(CONFIG_LINUX))
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,39 +0,0 @@
|
||||
From 747643ced0f1950360a2af103bb2490849aa3abf Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Thu, 7 Jun 2018 07:43:14 +0200
|
||||
Subject: [PATCH 262/268] Disable new pvrdma device
|
||||
|
||||
RH-Author: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Message-id: <5d290e25879e3ac42c247ff3c3a524001ceb0be1.1528355911.git.mrezanin@redhat.com>
|
||||
Patchwork-id: 80597
|
||||
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 6/7] Disable new pvrdma device
|
||||
Bugzilla: 1586357
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
||||
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
|
||||
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
New pvrdma device was introduced in rebase to QEMU 2.12. We do not want to
|
||||
support this device.
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
hw/rdma/Makefile.objs | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/rdma/Makefile.objs b/hw/rdma/Makefile.objs
|
||||
index 3504c39..02ca2a9 100644
|
||||
--- a/hw/rdma/Makefile.objs
|
||||
+++ b/hw/rdma/Makefile.objs
|
||||
@@ -1,5 +1,6 @@
|
||||
ifeq ($(CONFIG_RDMA),y)
|
||||
obj-$(CONFIG_PCI) += rdma_utils.o rdma_backend.o rdma_rm.o
|
||||
obj-$(CONFIG_PCI) += vmw/pvrdma_dev_ring.o vmw/pvrdma_cmd.o \
|
||||
- vmw/pvrdma_qp_ops.o vmw/pvrdma_main.o
|
||||
+ vmw/pvrdma_qp_ops.o
|
||||
+#obj-$(CONFIG_PCI) += vmw/pvrdma_main.o
|
||||
endif
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,38 +0,0 @@
|
||||
From 284c3931c86e875e86c41a838a786d4732f95b5b Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Thu, 7 Jun 2018 07:43:13 +0200
|
||||
Subject: [PATCH 261/268] Disable new superio devices
|
||||
|
||||
RH-Author: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Message-id: <51483d3f0091abc80d52485ab076581d4ca914c5.1528355911.git.mrezanin@redhat.com>
|
||||
Patchwork-id: 80595
|
||||
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 5/7] Disable new superio devices
|
||||
Bugzilla: 1586357
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
||||
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
|
||||
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
We do not want to support new superio devices (fdc37m81x-superio and
|
||||
smc37c669-superio).
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
hw/isa/Makefile.objs | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/isa/Makefile.objs b/hw/isa/Makefile.objs
|
||||
index 83e06f6..7de4f44 100644
|
||||
--- a/hw/isa/Makefile.objs
|
||||
+++ b/hw/isa/Makefile.objs
|
||||
@@ -1,5 +1,5 @@
|
||||
common-obj-$(CONFIG_ISA_BUS) += isa-bus.o
|
||||
-common-obj-$(CONFIG_ISA_BUS) += isa-superio.o smc37c669-superio.o
|
||||
+#common-obj-$(CONFIG_ISA_BUS) += isa-superio.o smc37c669-superio.o
|
||||
common-obj-$(CONFIG_APM) += apm.o
|
||||
common-obj-$(CONFIG_I82378) += i82378.o
|
||||
common-obj-$(CONFIG_PC87312) += pc87312.o
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,40 +0,0 @@
|
||||
From 3ebdb9532749bbc04458f868e7c08680a236007c Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Thu, 7 Jun 2018 07:43:10 +0200
|
||||
Subject: [PATCH 258/268] Disable split-irq device
|
||||
|
||||
RH-Author: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Message-id: <63c6336171256528761f3b4aa22c058d472b048b.1528355911.git.mrezanin@redhat.com>
|
||||
Patchwork-id: 80596
|
||||
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 2/7] Disable split-irq device
|
||||
Bugzilla: 1586357
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
||||
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
|
||||
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
There's new split-irq device introduced in QEMU 2.12. We do not want to
|
||||
support this device.
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
hw/core/Makefile.objs | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
|
||||
index 2b4491f..e967fb2 100644
|
||||
--- a/hw/core/Makefile.objs
|
||||
+++ b/hw/core/Makefile.objs
|
||||
@@ -20,7 +20,7 @@ common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o
|
||||
# common-obj-$(CONFIG_SOFTMMU) += register.o
|
||||
# obj-$(CONFIG_SOFTMMU) += generic-loader.o
|
||||
# common-obj-$(CONFIG_SOFTMMU) += or-irq.o
|
||||
-common-obj-$(CONFIG_SOFTMMU) += split-irq.o
|
||||
+#common-obj-$(CONFIG_SOFTMMU) += split-irq.o
|
||||
common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.o
|
||||
|
||||
obj-$(CONFIG_SOFTMMU) += null-machine.o
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,129 +0,0 @@
|
||||
From b579d3287a75db4b7ee37d25d99b2087f4ed4475 Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Fri, 30 Nov 2018 13:58:43 +0000
|
||||
Subject: [PATCH 08/16] Do not build bluetooth support
|
||||
|
||||
RH-Author: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Message-id: <1543586323-7323-1-git-send-email-mrezanin@redhat.com>
|
||||
Patchwork-id: 83193
|
||||
O-Subject: [RHEL-8 qemu-kvm PATCHv2] Do not build bluetooth support
|
||||
Bugzilla: 1654651
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
||||
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1654651
|
||||
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=19329246
|
||||
Branch: rhel8/master-2.12.0
|
||||
|
||||
We do not support bt devices however some bt related code is built in.
|
||||
As this code is deprecated upstream disabling build of this code downstream.
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
v2:
|
||||
- Removed -bt option from qemu-options.hx
|
||||
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
Makefile.objs | 4 ++--
|
||||
hw/bt/Makefile.objs | 4 ++--
|
||||
qemu-options.hx | 2 ++
|
||||
vl.c | 7 +++++++
|
||||
4 files changed, 13 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Makefile.objs b/Makefile.objs
|
||||
index c6c3554..be72238 100644
|
||||
--- a/Makefile.objs
|
||||
+++ b/Makefile.objs
|
||||
@@ -115,8 +115,8 @@ common-obj-y += replay/
|
||||
|
||||
common-obj-y += ui/
|
||||
common-obj-m += ui/
|
||||
-common-obj-y += bt-host.o bt-vhci.o
|
||||
-bt-host.o-cflags := $(BLUEZ_CFLAGS)
|
||||
+#common-obj-y += bt-host.o bt-vhci.o
|
||||
+#bt-host.o-cflags := $(BLUEZ_CFLAGS)
|
||||
|
||||
common-obj-y += dma-helpers.o
|
||||
common-obj-y += vl.o
|
||||
diff --git a/hw/bt/Makefile.objs b/hw/bt/Makefile.objs
|
||||
index 867a7d2..e678e9e 100644
|
||||
--- a/hw/bt/Makefile.objs
|
||||
+++ b/hw/bt/Makefile.objs
|
||||
@@ -1,3 +1,3 @@
|
||||
-common-obj-y += core.o l2cap.o sdp.o hci.o hid.o
|
||||
-common-obj-y += hci-csr.o
|
||||
+#common-obj-y += core.o l2cap.o sdp.o hci.o hid.o
|
||||
+#common-obj-y += hci-csr.o
|
||||
|
||||
diff --git a/qemu-options.hx b/qemu-options.hx
|
||||
index 4271cd3..2e05112 100644
|
||||
--- a/qemu-options.hx
|
||||
+++ b/qemu-options.hx
|
||||
@@ -2827,6 +2827,7 @@ STEXI
|
||||
ETEXI
|
||||
DEFHEADING()
|
||||
|
||||
+#if 0
|
||||
DEFHEADING(Bluetooth(R) options:)
|
||||
STEXI
|
||||
@table @option
|
||||
@@ -2901,6 +2902,7 @@ STEXI
|
||||
@end table
|
||||
ETEXI
|
||||
DEFHEADING()
|
||||
+#endif
|
||||
|
||||
#ifdef CONFIG_TPM
|
||||
DEFHEADING(TPM device options:)
|
||||
diff --git a/vl.c b/vl.c
|
||||
index f253876..74fa8f2 100644
|
||||
--- a/vl.c
|
||||
+++ b/vl.c
|
||||
@@ -923,6 +923,7 @@ static void configure_rtc(QemuOpts *opts)
|
||||
}
|
||||
}
|
||||
|
||||
+#if 0 // Disabled for Red Hat Enterprise Linux
|
||||
/***********************************************************/
|
||||
/* Bluetooth support */
|
||||
static int nb_hcis;
|
||||
@@ -1044,6 +1045,7 @@ static int bt_parse(const char *opt)
|
||||
error_report("bad bluetooth parameter '%s'", opt);
|
||||
return 1;
|
||||
}
|
||||
+#endif
|
||||
|
||||
static int parse_sandbox(void *opaque, QemuOpts *opts, Error **errp)
|
||||
{
|
||||
@@ -3367,9 +3369,12 @@ int main(int argc, char **argv, char **envp)
|
||||
exit(1);
|
||||
break;
|
||||
#endif
|
||||
+
|
||||
+#if 0 // Disabled for Red Hat Enterprise Linux
|
||||
case QEMU_OPTION_bt:
|
||||
add_device_config(DEV_BT, optarg);
|
||||
break;
|
||||
+#endif
|
||||
case QEMU_OPTION_audio_help:
|
||||
AUD_help ();
|
||||
exit (0);
|
||||
@@ -4523,9 +4528,11 @@ int main(int argc, char **argv, char **envp)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
+#if 0 // Disabled for Red Hat Enterprise Linux
|
||||
/* init the bluetooth world */
|
||||
if (foreach_device_config(DEV_BT, bt_parse))
|
||||
exit(1);
|
||||
+#endif
|
||||
|
||||
if (!xen_enabled()) {
|
||||
/* On 32-bit hosts, QEMU is limited by virtual address space */
|
||||
--
|
||||
1.8.3.1
|
||||
|
58
SOURCES/kvm-Don-t-leak-memory-when-reallocation-fails.patch
Normal file
58
SOURCES/kvm-Don-t-leak-memory-when-reallocation-fails.patch
Normal file
@ -0,0 +1,58 @@
|
||||
From bcb6107f98d7b1edf687d7afd552a4528b7e673b Mon Sep 17 00:00:00 2001
|
||||
From: jmaloy <jmaloy@redhat.com>
|
||||
Date: Tue, 12 May 2020 21:15:13 +0100
|
||||
Subject: [PATCH 2/7] Don't leak memory when reallocation fails.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: jmaloy <jmaloy@redhat.com>
|
||||
Message-id: <20200512211514.1398384-2-jmaloy@redhat.com>
|
||||
Patchwork-id: 96412
|
||||
O-Subject: [RHEL-AV-8.2.1 qemu-kvm PATCH 1/2] Don't leak memory when reallocation fails.
|
||||
Bugzilla: 1749737
|
||||
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
|
||||
From: Jindrich Novy <jnovy@redhat.com>
|
||||
|
||||
Signed-off-by: Jindrich Novy <jnovy@redhat.com>
|
||||
[ Marc-André - modified to use a temporary variable ]
|
||||
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
(cherry picked from libslirp commit d171af3732a0610a25334b06b77fa547bd677918)
|
||||
Signed-off-by: Jon Maloy <jmaloy@redhat.com>
|
||||
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
slirp/src/sbuf.c | 11 +++++++----
|
||||
1 file changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/slirp/src/sbuf.c b/slirp/src/sbuf.c
|
||||
index abced48..0569c34 100644
|
||||
--- a/slirp/src/sbuf.c
|
||||
+++ b/slirp/src/sbuf.c
|
||||
@@ -39,13 +39,16 @@ void sbreserve(struct sbuf *sb, int size)
|
||||
if (sb->sb_data) {
|
||||
/* Already alloced, realloc if necessary */
|
||||
if (sb->sb_datalen != size) {
|
||||
- sb->sb_wptr = sb->sb_rptr = sb->sb_data =
|
||||
- (char *)realloc(sb->sb_data, size);
|
||||
+ char *new = realloc(sb->sb_data, size);
|
||||
sb->sb_cc = 0;
|
||||
- if (sb->sb_wptr)
|
||||
+ if (new) {
|
||||
+ sb->sb_data = sb->sb_wptr = sb->sb_rptr = new;
|
||||
sb->sb_datalen = size;
|
||||
- else
|
||||
+ } else {
|
||||
+ free(sb->sb_data);
|
||||
+ sb->sb_data = sb->sb_wptr = sb->sb_rptr = NULL;
|
||||
sb->sb_datalen = 0;
|
||||
+ }
|
||||
}
|
||||
} else {
|
||||
sb->sb_wptr = sb->sb_rptr = sb->sb_data = (char *)malloc(size);
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,53 +0,0 @@
|
||||
From 9997a461dc882720fff3990aeca0725a91f20ac3 Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Wed, 12 Sep 2018 09:43:39 +0100
|
||||
Subject: [PATCH 2/4] Fix annocheck issues
|
||||
|
||||
RH-Author: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Message-id: <1536745419-16795-1-git-send-email-mrezanin@redhat.com>
|
||||
Patchwork-id: 82139
|
||||
O-Subject: [RHEL8/rhel qemu-kvm PATCH] Fix annocheck issues
|
||||
Bugzilla: 1624164
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: Danilo de Paula <ddepaula@redhat.com>
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1624164
|
||||
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=18283300
|
||||
BRANCH: rhel8/master-2.12.0
|
||||
Upstream: Do we want have this upstream?
|
||||
|
||||
annocheck reports several issues with qemu-kvm packages.
|
||||
|
||||
Most of them is "Compiled without -D_GLIBCXX_ASSERTIONS.". These issues
|
||||
comes from capstone submodule as we strip all -W compile flags. We can
|
||||
add missing flag downstream but I'm not sure this change should be done
|
||||
upstream too.
|
||||
|
||||
In addition, there's "Not linked with -Wl,-z,now." error for s390-ccw.img
|
||||
and s390-netboot.img. However, this flag is used for building these files
|
||||
as build log shows.
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
Makefile | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 9803f27..da3eedb 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -502,6 +502,7 @@ CAP_CFLAGS += -DCAPSTONE_HAS_ARM
|
||||
CAP_CFLAGS += -DCAPSTONE_HAS_ARM64
|
||||
CAP_CFLAGS += -DCAPSTONE_HAS_POWERPC
|
||||
CAP_CFLAGS += -DCAPSTONE_HAS_X86
|
||||
+CAP_CFLAGS += -Wp,-D_GLIBCXX_ASSERTIONS
|
||||
|
||||
subdir-capstone: .git-submodule-status
|
||||
$(call quiet-command,$(MAKE) -C $(SRC_PATH)/capstone CAPSTONE_SHARED=no BUILDDIR="$(BUILD_DIR)/capstone" CC="$(CC)" AR="$(AR)" LD="$(LD)" RANLIB="$(RANLIB)" CFLAGS="$(CAP_CFLAGS)" $(SUBDIR_MAKEFLAGS) $(BUILD_DIR)/capstone/$(LIBCAPSTONE))
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,56 +0,0 @@
|
||||
From 486e74dd9b8515f478698fee494086b339015d51 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@redhat.com>
|
||||
Date: Wed, 31 Jul 2019 18:45:29 +0100
|
||||
Subject: [PATCH 14/14] Fix heap overflow in ip_reass on big packet input
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
Message-id: <20190731184529.21905-2-philmd@redhat.com>
|
||||
Patchwork-id: 89820
|
||||
O-Subject: [RHEL-8.1.0 qemu-kvm PATCH 1/1] Fix heap overflow in ip_reass on big packet input
|
||||
Bugzilla: 1734751
|
||||
RH-Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
|
||||
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||
|
||||
When the first fragment does not fit in the preallocated buffer, q will
|
||||
already be pointing to the ext buffer, so we mustn't try to update it.
|
||||
|
||||
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||
(cherry picked from libslirp commit 126c04acbabd7ad32c2b018fe10dfac2a3bc1210)
|
||||
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
slirp/ip_input.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/slirp/ip_input.c b/slirp/ip_input.c
|
||||
index 348e1dc..07d8808 100644
|
||||
--- a/slirp/ip_input.c
|
||||
+++ b/slirp/ip_input.c
|
||||
@@ -334,6 +334,8 @@ insert:
|
||||
q = fp->frag_link.next;
|
||||
m = dtom(slirp, q);
|
||||
|
||||
+ int was_ext = m->m_flags & M_EXT;
|
||||
+
|
||||
q = (struct ipasfrag *) q->ipf_next;
|
||||
while (q != (struct ipasfrag*)&fp->frag_link) {
|
||||
struct mbuf *t = dtom(slirp, q);
|
||||
@@ -356,7 +358,7 @@ insert:
|
||||
* the old buffer (in the mbuf), so we must point ip
|
||||
* into the new buffer.
|
||||
*/
|
||||
- if (m->m_flags & M_EXT) {
|
||||
+ if (!was_ext && m->m_flags & M_EXT) {
|
||||
int delta = (char *)q - m->m_dat;
|
||||
q = (struct ipasfrag *)(m->m_ext + delta);
|
||||
}
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,67 +0,0 @@
|
||||
From f79fc6d50a69dc3443f028b8f0fa11fe0f94810c Mon Sep 17 00:00:00 2001
|
||||
From: Danilo de Paula <ddepaula@redhat.com>
|
||||
Date: Mon, 27 Aug 2018 17:15:07 +0100
|
||||
Subject: [PATCH] Fix libusb-1.0.22 deprecated libusb_set_debug with
|
||||
libusb_set_option
|
||||
|
||||
RH-Author: Danilo de Paula <ddepaula@redhat.com>
|
||||
Message-id: <20180827171507.6372-2-ddepaula@redhat.com>
|
||||
Patchwork-id: 81932
|
||||
O-Subject: [qemu-kvm RHEL8/virt212 PATCH 1/1] Fix libusb-1.0.22 deprecated libusb_set_debug with libusb_set_option
|
||||
Bugzilla: 1622656
|
||||
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
||||
|
||||
From: John Thomson <git@johnthomson.fastmail.com.au>
|
||||
|
||||
libusb-1.0.22 marked libusb_set_debug deprecated
|
||||
it is replaced with
|
||||
libusb_set_option(libusb_context, LIBUSB_OPTION_LOG_LEVEL, libusb_log_level);
|
||||
|
||||
details here: https://github.com/libusb/libusb/commit/539f22e2fd916558d11ab9a66f10f461c5593168
|
||||
|
||||
Warning here:
|
||||
|
||||
CC hw/usb/host-libusb.o
|
||||
/builds/xen/src/qemu-xen/hw/usb/host-libusb.c: In function 'usb_host_init':
|
||||
/builds/xen/src/qemu-xen/hw/usb/host-libusb.c:250:5: error: 'libusb_set_debug' is deprecated: Use libusb_set_option instead [-Werror=deprecated-declarations]
|
||||
libusb_set_debug(ctx, loglevel);
|
||||
^~~~~~~~~~~~~~~~
|
||||
In file included from /builds/xen/src/qemu-xen/hw/usb/host-libusb.c:40:0:
|
||||
/usr/include/libusb-1.0/libusb.h:1300:18: note: declared here
|
||||
void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level);
|
||||
^~~~~~~~~~~~~~~~
|
||||
cc1: all warnings being treated as errors
|
||||
make: *** [/builds/xen/src/qemu-xen/rules.mak:66: hw/usb/host-libusb.o] Error 1
|
||||
make: Leaving directory '/builds/xen/src/xen/tools/qemu-xen-build'
|
||||
|
||||
Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
|
||||
Message-id: 20180405132046.4968-1-git@johnthomson.fastmail.com.au
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
|
||||
(cherry picked from commit 9d8fa0df49af16a208fa961c2968fba4daffcc07)
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
hw/usb/host-libusb.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
|
||||
index 0290fb8..f31e9cb 100644
|
||||
--- a/hw/usb/host-libusb.c
|
||||
+++ b/hw/usb/host-libusb.c
|
||||
@@ -248,7 +248,11 @@ static int usb_host_init(void)
|
||||
if (rc != 0) {
|
||||
return -1;
|
||||
}
|
||||
+#if LIBUSB_API_VERSION >= 0x01000106
|
||||
+ libusb_set_option(ctx, LIBUSB_OPTION_LOG_LEVEL, loglevel);
|
||||
+#else
|
||||
libusb_set_debug(ctx, loglevel);
|
||||
+#endif
|
||||
#ifdef CONFIG_WIN32
|
||||
/* FIXME: add support for Windows. */
|
||||
#else
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,60 @@
|
||||
From a33ea192428d9c9307f1140f3e25631a6ef7657c Mon Sep 17 00:00:00 2001
|
||||
From: Jon Maloy <jmaloy@redhat.com>
|
||||
Date: Sat, 20 Jun 2020 15:02:59 -0400
|
||||
Subject: [PATCH 12/12] Fix use-afte-free in ip_reass() (CVE-2020-1983)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: Jon Maloy <jmaloy@redhat.com>
|
||||
Message-id: <20200620150259.3352467-2-jmaloy@redhat.com>
|
||||
Patchwork-id: 97678
|
||||
O-Subject: [RHEL-8.3.0 qemu-kvm PATCH 1/1] Fix use-afte-free in ip_reass() (CVE-2020-1983)
|
||||
Bugzilla: 1838070
|
||||
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
|
||||
From: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
|
||||
The q pointer is updated when the mbuf data is moved from m_dat to
|
||||
m_ext.
|
||||
|
||||
m_ext buffer may also be realloc()'ed and moved during m_cat():
|
||||
q should also be updated in this case.
|
||||
|
||||
Reported-by: Aviv Sasson <asasson@paloaltonetworks.com>
|
||||
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||
|
||||
(cherry picked from libslirp commit 9bd6c5913271eabcb7768a58197ed3301fe19f2d)
|
||||
Signed-off-by: Jon Maloy <jmaloy@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
slirp/src/ip_input.c | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/slirp/src/ip_input.c b/slirp/src/ip_input.c
|
||||
index df1c846ade..0f5d522ec1 100644
|
||||
--- a/slirp/src/ip_input.c
|
||||
+++ b/slirp/src/ip_input.c
|
||||
@@ -329,7 +329,7 @@ insert:
|
||||
q = fp->frag_link.next;
|
||||
m = dtom(slirp, q);
|
||||
|
||||
- int was_ext = m->m_flags & M_EXT;
|
||||
+ int delta = (char *)q - (m->m_flags & M_EXT ? m->m_ext : m->m_dat);
|
||||
|
||||
q = (struct ipasfrag *)q->ipf_next;
|
||||
while (q != (struct ipasfrag *)&fp->frag_link) {
|
||||
@@ -353,8 +353,7 @@ insert:
|
||||
* the old buffer (in the mbuf), so we must point ip
|
||||
* into the new buffer.
|
||||
*/
|
||||
- if (!was_ext && m->m_flags & M_EXT) {
|
||||
- int delta = (char *)q - m->m_dat;
|
||||
+ if (m->m_flags & M_EXT) {
|
||||
q = (struct ipasfrag *)(m->m_ext + delta);
|
||||
}
|
||||
|
||||
--
|
||||
2.27.0
|
||||
|
@ -1,60 +0,0 @@
|
||||
From 738561e0b91258ad42765d669a62e9f28784fefe Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Date: Thu, 31 May 2018 06:36:35 +0200
|
||||
Subject: [PATCH 005/268] Fix x-hv-max-vps compat value for 7.4 machine type
|
||||
|
||||
RH-Author: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
Message-id: <1527748595-28488-1-git-send-email-mrezanin@redhat.com>
|
||||
Patchwork-id: 80541
|
||||
O-Subject: [RHEL qemu-kvm/qemu-kvm-rhev PATCH] Fix x-hv-max-vps compat value for 7.4 machine type
|
||||
Bugzilla: 1583959
|
||||
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
||||
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
|
||||
Commit b2f9f4fcaad9c64f4551ab1dbe9e474c3dc6b2b4 increased the limit of vcpus
|
||||
for windows guest. In addition, it keep old limit for older machine types.
|
||||
However, due to conflict was compatibility part incorrectly placed and
|
||||
we keep this limit for 7.3 and older machine types instead of 7.4 and older.
|
||||
|
||||
Moving the chunk to correct spot so we have correct limit.
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
include/hw/i386/pc.h | 11 +++++------
|
||||
1 file changed, 5 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
|
||||
index c33ddbb..285e8df 100644
|
||||
--- a/include/hw/i386/pc.h
|
||||
+++ b/include/hw/i386/pc.h
|
||||
@@ -1019,9 +1019,13 @@ extern void igd_passthrough_isa_bridge_create(PCIBus *bus, uint16_t gpu_dev_id);
|
||||
.driver = "q35-pcihost",\
|
||||
.property = "x-pci-hole64-fix",\
|
||||
.value = "off",\
|
||||
+ },\
|
||||
+ { /* PC_RHEL7_4_COMPAT from PC_COMPAT_2_10 */ \
|
||||
+ .driver = TYPE_X86_CPU,\
|
||||
+ .property = "x-hv-max-vps",\
|
||||
+ .value = "0x40",\
|
||||
},
|
||||
|
||||
-
|
||||
#define PC_RHEL7_3_COMPAT \
|
||||
HW_COMPAT_RHEL7_3 \
|
||||
{ /* PC_RHEL7_3_COMPAT from PC_COMPAT_2_8 */ \
|
||||
@@ -1083,11 +1087,6 @@ extern void igd_passthrough_isa_bridge_create(PCIBus *bus, uint16_t gpu_dev_id);
|
||||
.driver = TYPE_X86_CPU,\
|
||||
.property = "kvm-no-smi-migration",\
|
||||
.value = "on",\
|
||||
- },\
|
||||
- { /* PC_RHEL7_4_COMPAT from PC_COMPAT_2_10 */ \
|
||||
- .driver = TYPE_X86_CPU,\
|
||||
- .property = "x-hv-max-vps",\
|
||||
- .value = "0x40",\
|
||||
},
|
||||
|
||||
#define PC_RHEL7_2_COMPAT \
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,182 +0,0 @@
|
||||
From e7dc49f6bf6fd242b5b7a83bc270664a1ca45879 Mon Sep 17 00:00:00 2001
|
||||
From: Paolo Bonzini <pbonzini@redhat.com>
|
||||
Date: Mon, 22 Jul 2019 18:22:08 +0100
|
||||
Subject: [PATCH 27/39] KVM: Introduce kvm_arch_destroy_vcpu()
|
||||
|
||||
RH-Author: Paolo Bonzini <pbonzini@redhat.com>
|
||||
Message-id: <20190722182220.19374-7-pbonzini@redhat.com>
|
||||
Patchwork-id: 89623
|
||||
O-Subject: [RHEL-8.1.0 PATCH qemu-kvm v3 06/18] KVM: Introduce kvm_arch_destroy_vcpu()
|
||||
Bugzilla: 1689269
|
||||
RH-Acked-by: Peter Xu <zhexu@redhat.com>
|
||||
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
||||
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
||||
|
||||
From: Liran Alon <liran.alon@oracle.com>
|
||||
|
||||
Simiar to how kvm_init_vcpu() calls kvm_arch_init_vcpu() to perform
|
||||
arch-dependent initialisation, introduce kvm_arch_destroy_vcpu()
|
||||
to be called from kvm_destroy_vcpu() to perform arch-dependent
|
||||
destruction.
|
||||
|
||||
This was added because some architectures (Such as i386)
|
||||
currently do not free memory that it have allocated in
|
||||
kvm_arch_init_vcpu().
|
||||
|
||||
Suggested-by: Maran Wilson <maran.wilson@oracle.com>
|
||||
Reviewed-by: Maran Wilson <maran.wilson@oracle.com>
|
||||
Signed-off-by: Liran Alon <liran.alon@oracle.com>
|
||||
Message-Id: <20190619162140.133674-3-liran.alon@oracle.com>
|
||||
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
||||
(cherry picked from commit b1115c99919cf158bb859865f14c3198a0e6f679)
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
accel/kvm/kvm-all.c | 5 +++++
|
||||
include/sysemu/kvm.h | 1 +
|
||||
target/arm/kvm32.c | 5 +++++
|
||||
target/arm/kvm64.c | 5 +++++
|
||||
target/i386/kvm.c | 12 ++++++++++++
|
||||
target/mips/kvm.c | 5 +++++
|
||||
target/ppc/kvm.c | 5 +++++
|
||||
target/s390x/kvm.c | 10 ++++++++++
|
||||
8 files changed, 48 insertions(+)
|
||||
|
||||
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
|
||||
index 3a7c8a3..a939b26 100644
|
||||
--- a/accel/kvm/kvm-all.c
|
||||
+++ b/accel/kvm/kvm-all.c
|
||||
@@ -290,6 +290,11 @@ int kvm_destroy_vcpu(CPUState *cpu)
|
||||
|
||||
DPRINTF("kvm_destroy_vcpu\n");
|
||||
|
||||
+ ret = kvm_arch_destroy_vcpu(cpu);
|
||||
+ if (ret < 0) {
|
||||
+ goto err;
|
||||
+ }
|
||||
+
|
||||
mmap_size = kvm_ioctl(s, KVM_GET_VCPU_MMAP_SIZE, 0);
|
||||
if (mmap_size < 0) {
|
||||
ret = mmap_size;
|
||||
diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
|
||||
index 3d8f294..a5a6dff 100644
|
||||
--- a/include/sysemu/kvm.h
|
||||
+++ b/include/sysemu/kvm.h
|
||||
@@ -372,6 +372,7 @@ int kvm_arch_put_registers(CPUState *cpu, int level);
|
||||
int kvm_arch_init(MachineState *ms, KVMState *s);
|
||||
|
||||
int kvm_arch_init_vcpu(CPUState *cpu);
|
||||
+int kvm_arch_destroy_vcpu(CPUState *cpu);
|
||||
|
||||
bool kvm_vcpu_id_is_valid(int vcpu_id);
|
||||
|
||||
diff --git a/target/arm/kvm32.c b/target/arm/kvm32.c
|
||||
index 1740cda..056f016 100644
|
||||
--- a/target/arm/kvm32.c
|
||||
+++ b/target/arm/kvm32.c
|
||||
@@ -237,6 +237,11 @@ int kvm_arch_init_vcpu(CPUState *cs)
|
||||
return kvm_arm_init_cpreg_list(cpu);
|
||||
}
|
||||
|
||||
+int kvm_arch_destroy_vcpu(CPUState *cs)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
typedef struct Reg {
|
||||
uint64_t id;
|
||||
int offset;
|
||||
diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c
|
||||
index e0b8246..c9c761e 100644
|
||||
--- a/target/arm/kvm64.c
|
||||
+++ b/target/arm/kvm64.c
|
||||
@@ -549,6 +549,11 @@ int kvm_arch_init_vcpu(CPUState *cs)
|
||||
return kvm_arm_init_cpreg_list(cpu);
|
||||
}
|
||||
|
||||
+int kvm_arch_destroy_vcpu(CPUState *cs)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
bool kvm_arm_reg_syncs_via_cpreg_list(uint64_t regidx)
|
||||
{
|
||||
/* Return true if the regidx is a register we should synchronize
|
||||
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
|
||||
index 8e861a1..305809f 100644
|
||||
--- a/target/i386/kvm.c
|
||||
+++ b/target/i386/kvm.c
|
||||
@@ -1196,6 +1196,18 @@ int kvm_arch_init_vcpu(CPUState *cs)
|
||||
return r;
|
||||
}
|
||||
|
||||
+int kvm_arch_destroy_vcpu(CPUState *cs)
|
||||
+{
|
||||
+ X86CPU *cpu = X86_CPU(cs);
|
||||
+
|
||||
+ if (cpu->kvm_msr_buf) {
|
||||
+ g_free(cpu->kvm_msr_buf);
|
||||
+ cpu->kvm_msr_buf = NULL;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
void kvm_arch_reset_vcpu(X86CPU *cpu)
|
||||
{
|
||||
CPUX86State *env = &cpu->env;
|
||||
diff --git a/target/mips/kvm.c b/target/mips/kvm.c
|
||||
index 8e72850..938f8f1 100644
|
||||
--- a/target/mips/kvm.c
|
||||
+++ b/target/mips/kvm.c
|
||||
@@ -91,6 +91,11 @@ int kvm_arch_init_vcpu(CPUState *cs)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+int kvm_arch_destroy_vcpu(CPUState *cs)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
void kvm_mips_reset_vcpu(MIPSCPU *cpu)
|
||||
{
|
||||
CPUMIPSState *env = &cpu->env;
|
||||
diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
|
||||
index 058dcbe..b9858fa 100644
|
||||
--- a/target/ppc/kvm.c
|
||||
+++ b/target/ppc/kvm.c
|
||||
@@ -607,6 +607,11 @@ int kvm_arch_init_vcpu(CPUState *cs)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+int kvm_arch_destroy_vcpu(CPUState *cs)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void kvm_sw_tlb_put(PowerPCCPU *cpu)
|
||||
{
|
||||
CPUPPCState *env = &cpu->env;
|
||||
diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
|
||||
index 1d6cc33..0814333 100644
|
||||
--- a/target/s390x/kvm.c
|
||||
+++ b/target/s390x/kvm.c
|
||||
@@ -370,6 +370,16 @@ int kvm_arch_init_vcpu(CPUState *cs)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+int kvm_arch_destroy_vcpu(CPUState *cs)
|
||||
+{
|
||||
+ S390CPU *cpu = S390_CPU(cs);
|
||||
+
|
||||
+ g_free(cpu->irqstate);
|
||||
+ cpu->irqstate = NULL;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
void kvm_s390_reset_vcpu(S390CPU *cpu)
|
||||
{
|
||||
CPUState *cs = CPU(cpu);
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,140 +0,0 @@
|
||||
From 7efd1d899d2478ad9fffcf0584907f38cd6d20ff Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Tue, 4 Jun 2019 05:12:43 +0100
|
||||
Subject: [PATCH 1/8] Introduce new "no_guest_reset" parameter for usb-host
|
||||
device
|
||||
|
||||
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Message-id: <20190604051246.11374-2-kraxel@redhat.com>
|
||||
Patchwork-id: 88470
|
||||
O-Subject: [RHEL-8.1.0 qemu-kvm PATCH 1/4] Introduce new "no_guest_reset" parameter for usb-host device
|
||||
Bugzilla: 1713677
|
||||
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
||||
RH-Acked-by: Max Reitz <mreitz@redhat.com>
|
||||
RH-Acked-by: Danilo de Paula <ddepaula@redhat.com>
|
||||
|
||||
From: Alexander Kappner <agk@godking.net>
|
||||
|
||||
With certain USB devices passed through via usb-host, a guest attempting to
|
||||
reset a usb-host device can trigger a reset loop that renders the USB device
|
||||
unusable. In my use case, the device was an iPhone XR that was passed through to
|
||||
a Mac OS X Mojave guest. Upon connecting the device, the following happens:
|
||||
|
||||
1) Guest recognizes new device, sends reset to emulated USB host
|
||||
2) QEMU's USB host sends reset to host kernel
|
||||
3) Host kernel resets device
|
||||
4) After reset, host kernel determines that some part of the device descriptor
|
||||
has changed ("device firmware changed" in dmesg), so host kernel decides to
|
||||
re-enumerate the device.
|
||||
5) Re-enumeration causes QEMU to disconnect and reconnect the device in the
|
||||
guest.
|
||||
6) goto 1)
|
||||
|
||||
Here's from the host kernel (note the "device firmware changed" lines")
|
||||
|
||||
[3677704.473050] usb 1-1.3: new high-speed USB device number 53 using ehci-pci
|
||||
[3677704.555594] usb 1-1.3: New USB device found, idVendor=05ac, idProduct=12a8, bcdDevice=11.08
|
||||
[3677704.555599] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
|
||||
[3677704.555602] usb 1-1.3: Product: iPhone
|
||||
[3677704.555605] usb 1-1.3: Manufacturer: Apple Inc.
|
||||
[3677704.555607] usb 1-1.3: SerialNumber: [[removed]]
|
||||
[3677709.401040] usb 1-1.3: reset high-speed USB device number 53 using ehci-pci
|
||||
[3677709.479486] usb 1-1.3: device firmware changed
|
||||
[3677709.479842] usb 1-1.3: USB disconnect, device number 53
|
||||
[3677709.546039] usb 1-1.3: new high-speed USB device number 54 using ehci-pci
|
||||
[3677709.627471] usb 1-1.3: New USB device found, idVendor=05ac, idProduct=12a8, bcdDevice=11.08
|
||||
[3677709.627476] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
|
||||
[3677709.627479] usb 1-1.3: Product: iPhone
|
||||
[3677709.627481] usb 1-1.3: Manufacturer: Apple Inc.
|
||||
[3677709.627483] usb 1-1.3: SerialNumber: [[removed]]
|
||||
[3677762.320044] usb 1-1.3: reset high-speed USB device number 54 using ehci-pci
|
||||
[3677762.615630] usb 1-1.3: USB disconnect, device number 54
|
||||
[3677762.787043] usb 1-1.3: new high-speed USB device number 55 using ehci-pci
|
||||
[3677762.869016] usb 1-1.3: New USB device found, idVendor=05ac, idProduct=12a8, bcdDevice=11.08
|
||||
[3677762.869024] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
|
||||
[3677762.869028] usb 1-1.3: Product: iPhone
|
||||
[3677762.869032] usb 1-1.3: Manufacturer: Apple Inc.
|
||||
[3677762.869035] usb 1-1.3: SerialNumber: [[removed]]
|
||||
[3677815.662036] usb 1-1.3: reset high-speed USB device number 55 using ehci-pci
|
||||
|
||||
Here's from QEMU:
|
||||
|
||||
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/005/022: No such file or directory
|
||||
libusb: error [udev_hotplug_event] ignoring udev action bind
|
||||
libusb: error [udev_hotplug_event] ignoring udev action bind
|
||||
libusb: error [_open_sysfs_attr] open /sys/bus/usb/devices/5-1/bConfigurationValue failed ret=-1 errno=2
|
||||
libusb: error [_get_usbfs_fd] File doesn't exist, wait 10 ms and try again
|
||||
|
||||
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/005/024: No such file or directory
|
||||
libusb: error [udev_hotplug_event] ignoring udev action bind
|
||||
libusb: error [udev_hotplug_event] ignoring udev action bind
|
||||
libusb: error [_open_sysfs_attr] open /sys/bus/usb/devices/5-1/bConfigurationValue failed ret=-1 errno=2
|
||||
libusb: error [_get_usbfs_fd] File doesn't exist, wait 10 ms and try again
|
||||
|
||||
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/005/026: No such file or directory
|
||||
|
||||
The result of this is that the device remains permanently unusable in the guest.
|
||||
The same problem has been previously reported for an iPad:
|
||||
https://stackoverflow.com/questions/52617634/how-do-i-get-qemu-usb-passthrough-to-work-for-ipad-iphone
|
||||
|
||||
This problem can be elegantly solved by interrupting step 2) above. Instead of
|
||||
passing through the reset, QEMU simply ignores it. To allow this to be
|
||||
configured on a per-device level, a new parameter "no_guest_reset" is
|
||||
introduced for the usb-host device. I can confirm that the configuration
|
||||
described above (iPhone XS + Mojave guest) works flawlessly with
|
||||
no_guest_reset=True specified.
|
||||
|
||||
Working command line for my scenario:
|
||||
device_add usb-host,vendorid=0x05ac,productid=0x12a8,no_guest_reset=True,id=iphone
|
||||
|
||||
Best regards
|
||||
Alexander
|
||||
|
||||
Signed-off-by: Alexander Kappner <agk@godking.net>
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Message-id: 20190128140027.9448-1-kraxel@redhat.com
|
||||
|
||||
[ kraxel: rename parameter to "guest-reset" ]
|
||||
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
(cherry picked from commit ba4c735b4fc74e309ce4b2551d258e442ef513a5)
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
hw/usb/host-libusb.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
|
||||
index f31e9cb..d82a10a 100644
|
||||
--- a/hw/usb/host-libusb.c
|
||||
+++ b/hw/usb/host-libusb.c
|
||||
@@ -82,7 +82,7 @@ struct USBHostDevice {
|
||||
uint32_t options;
|
||||
uint32_t loglevel;
|
||||
bool needs_autoscan;
|
||||
-
|
||||
+ bool allow_guest_reset;
|
||||
/* state */
|
||||
QTAILQ_ENTRY(USBHostDevice) next;
|
||||
int seen, errcount;
|
||||
@@ -1451,6 +1451,10 @@ static void usb_host_handle_reset(USBDevice *udev)
|
||||
USBHostDevice *s = USB_HOST_DEVICE(udev);
|
||||
int rc;
|
||||
|
||||
+ if (!s->allow_guest_reset) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
trace_usb_host_reset(s->bus_num, s->addr);
|
||||
|
||||
rc = libusb_reset_device(s->dh);
|
||||
@@ -1568,6 +1572,7 @@ static Property usb_host_dev_properties[] = {
|
||||
DEFINE_PROP_UINT32("productid", USBHostDevice, match.product_id, 0),
|
||||
DEFINE_PROP_UINT32("isobufs", USBHostDevice, iso_urb_count, 4),
|
||||
DEFINE_PROP_UINT32("isobsize", USBHostDevice, iso_urb_frames, 32),
|
||||
+ DEFINE_PROP_BOOL("guest-reset", USBHostDevice, allow_guest_reset, true),
|
||||
DEFINE_PROP_UINT32("loglevel", USBHostDevice, loglevel,
|
||||
LIBUSB_LOG_LEVEL_WARNING),
|
||||
DEFINE_PROP_BIT("pipeline", USBHostDevice, options,
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,55 @@
|
||||
From e3bec8c83459a68ae0c08e2ae0f1dbef24872d59 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Blake <eblake@redhat.com>
|
||||
Date: Tue, 2 Jun 2020 02:34:09 +0100
|
||||
Subject: [PATCH 04/26] MAINTAINERS: fix qcow2-bitmap.c under Dirty Bitmaps
|
||||
header
|
||||
|
||||
RH-Author: Eric Blake <eblake@redhat.com>
|
||||
Message-id: <20200602023420.2133649-2-eblake@redhat.com>
|
||||
Patchwork-id: 97068
|
||||
O-Subject: [RHEL-AV-8.2.1 qemu-kvm PATCH 01/12] MAINTAINERS: fix qcow2-bitmap.c under Dirty Bitmaps header
|
||||
Bugzilla: 1779893 1779904
|
||||
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
RH-Acked-by: Max Reitz <mreitz@redhat.com>
|
||||
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
|
||||
|
||||
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
|
||||
|
||||
Somehow I wrote not full path to the file. Fix that.
|
||||
|
||||
Also, while being here, rearrange entries, so that includes go first,
|
||||
then block, than migration, than util.
|
||||
|
||||
Fixes: 052db8e71444d
|
||||
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
|
||||
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
||||
(cherry picked from commit 00637c6b0b67694127cc01dd75f3626da23acdaa)
|
||||
Signed-off-by: Eric Blake <eblake@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
MAINTAINERS | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/MAINTAINERS b/MAINTAINERS
|
||||
index d1b3e26..3a81ac9 100644
|
||||
--- a/MAINTAINERS
|
||||
+++ b/MAINTAINERS
|
||||
@@ -1873,12 +1873,12 @@ M: John Snow <jsnow@redhat.com>
|
||||
R: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
|
||||
L: qemu-block@nongnu.org
|
||||
S: Supported
|
||||
-F: util/hbitmap.c
|
||||
-F: block/dirty-bitmap.c
|
||||
F: include/qemu/hbitmap.h
|
||||
F: include/block/dirty-bitmap.h
|
||||
-F: qcow2-bitmap.c
|
||||
+F: block/dirty-bitmap.c
|
||||
+F: block/qcow2-bitmap.c
|
||||
F: migration/block-dirty-bitmap.c
|
||||
+F: util/hbitmap.c
|
||||
F: tests/test-hbitmap.c
|
||||
F: docs/interop/bitmaps.rst
|
||||
T: git https://github.com/jnsnow/qemu.git bitmaps
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,65 +0,0 @@
|
||||
From 699be60852400ad3459992a02c8477c08944ad09 Mon Sep 17 00:00:00 2001
|
||||
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
|
||||
Date: Wed, 1 Aug 2018 13:55:18 +0100
|
||||
Subject: [PATCH] Migration+TLS: Fix crash due to double cleanup
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
||||
Message-id: <20180801135522.11658-15-dgilbert@redhat.com>
|
||||
Patchwork-id: 81569
|
||||
O-Subject: [qemu-kvm RHEL8/virt212 PATCH 14/18] Migration+TLS: Fix crash due to double cleanup
|
||||
Bugzilla: 1594384
|
||||
RH-Acked-by: Peter Xu <peterx@redhat.com>
|
||||
RH-Acked-by: John Snow <jsnow@redhat.com>
|
||||
RH-Acked-by: Juan Quintela <quintela@redhat.com>
|
||||
|
||||
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
|
||||
|
||||
During a TLS connect we see:
|
||||
migration_channel_connect calls
|
||||
migration_tls_channel_connect
|
||||
(calls after TLS setup)
|
||||
migration_channel_connect
|
||||
|
||||
My previous error handling fix made migration_channel_connect
|
||||
call migrate_fd_connect in all cases; unfortunately the above
|
||||
means it gets called twice and crashes doing double cleanup.
|
||||
|
||||
Fixes: 688a3dcba98
|
||||
|
||||
Reported-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
||||
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
Message-Id: <20180430185943.35714-1-dgilbert@redhat.com>
|
||||
Signed-off-by: Juan Quintela <quintela@redhat.com>
|
||||
(cherry picked from commit 8b7bf2badac25c0a52aff1b181ad75fdb304dd0c)
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
migration/channel.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/migration/channel.c b/migration/channel.c
|
||||
index c5eaf0f..7a32b5a 100644
|
||||
--- a/migration/channel.c
|
||||
+++ b/migration/channel.c
|
||||
@@ -71,6 +71,15 @@ void migration_channel_connect(MigrationState *s,
|
||||
!object_dynamic_cast(OBJECT(ioc),
|
||||
TYPE_QIO_CHANNEL_TLS)) {
|
||||
migration_tls_channel_connect(s, ioc, hostname, &error);
|
||||
+
|
||||
+ if (!error) {
|
||||
+ /* tls_channel_connect will call back to this
|
||||
+ * function after the TLS handshake,
|
||||
+ * so we mustn't call migrate_fd_connect until then
|
||||
+ */
|
||||
+
|
||||
+ return;
|
||||
+ }
|
||||
} else {
|
||||
QEMUFile *f = qemu_fopen_channel_output(ioc);
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,73 +0,0 @@
|
||||
From 6c2f10596f53c29687a64aa78f339e3043850936 Mon Sep 17 00:00:00 2001
|
||||
From: David Gibson <dgibson@redhat.com>
|
||||
Date: Wed, 25 Jul 2018 08:36:42 +0100
|
||||
Subject: [PATCH 03/14] RHEL-8.0: Add pseries-rhel7.6.0-sxxm machine type
|
||||
|
||||
RH-Author: David Gibson <dgibson@redhat.com>
|
||||
Message-id: <20180725083642.11004-1-dgibson@redhat.com>
|
||||
Patchwork-id: 81501
|
||||
O-Subject: [RHEL-8.0 qemu-kvm PATCH] RHEL-8.0: Add pseries-rhel7.6.0-sxxm machine type
|
||||
Bugzilla: 1595501
|
||||
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
||||
RH-Acked-by: Serhii Popovych <spopovyc@redhat.com>
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
|
||||
For the pseries-rhel7.3.0 .. pseries-rhel7.5.0 machine types we have -sxxm
|
||||
variants, the only difference being that the -sxxm variants have the
|
||||
Spectre and Meltdown mitigations available to guests by default.
|
||||
|
||||
We'd delayed on adding a similar variant for RHEL 7.6, in the hope that we
|
||||
might be able to enable the mitigations by default for the ordinary 7.6
|
||||
machine type. This requires that updated POWER8 firmware (FW860.51 or
|
||||
newer) be installed on the host.
|
||||
|
||||
The updated firmware was only released late May, and it's not clear how
|
||||
quickly and widely it will be deployed. For that reason, plus for
|
||||
consistency in how things need to be configured across rhel-7.y, we're now
|
||||
adding a pseries-rhel7.6.0-sxxm machine type.
|
||||
|
||||
Upstream status: downstream only
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1595501
|
||||
|
||||
Signed-off-by: David Gibson <dgibson@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
hw/ppc/spapr.c | 22 ++++++++++++++++++++++
|
||||
1 file changed, 22 insertions(+)
|
||||
|
||||
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
|
||||
index 7de3f07..a61dafd 100644
|
||||
--- a/hw/ppc/spapr.c
|
||||
+++ b/hw/ppc/spapr.c
|
||||
@@ -4355,6 +4355,28 @@ static void spapr_machine_rhel760_class_options(MachineClass *mc)
|
||||
DEFINE_SPAPR_MACHINE(rhel760, "rhel7.6.0", true);
|
||||
|
||||
/*
|
||||
+ * pseries-rhel7.6.0-sxxm
|
||||
+ *
|
||||
+ * pseries-rhel7.6.0 with speculative execution exploit mitigations enabled by default
|
||||
+ */
|
||||
+static void spapr_machine_rhel760sxxm_instance_options(MachineState *machine)
|
||||
+{
|
||||
+ spapr_machine_rhel760_instance_options(machine);
|
||||
+}
|
||||
+
|
||||
+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);
|
||||
+
|
||||
+/*
|
||||
* pseries-rhel7.5.0
|
||||
* like SPAPR_COMPAT_2_11 and SPAPR_COMPAT_2_10
|
||||
* SPAPR_CAP_HTM already enabled in 7.4
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,56 +0,0 @@
|
||||
From bf545f4a8f40a4ac8f6d63d887a63d9f08329eb6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
|
||||
Date: Wed, 14 Aug 2019 08:52:10 +0100
|
||||
Subject: [PATCH 10/10] RHEL: disable hostmem-memfd
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
Message-id: <20190814085210.18462-1-marcandre.lureau@redhat.com>
|
||||
Patchwork-id: 89974
|
||||
O-Subject: [RHEL-8.1.0 qemu-kvm PATCH] RHEL: disable hostmem-memfd
|
||||
Bugzilla: 1740797
|
||||
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
RH-Acked-by: John Snow <jsnow@redhat.com>
|
||||
|
||||
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1740797
|
||||
BRANCH: rhel8/rhel-8.1.0
|
||||
UPSTREAM: n/a (downstream only)
|
||||
BREW: 23060214
|
||||
|
||||
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
backends/Makefile.objs | 3 ++-
|
||||
util/memfd.c | 2 +-
|
||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/backends/Makefile.objs b/backends/Makefile.objs
|
||||
index ad7c032..673fc55 100644
|
||||
--- a/backends/Makefile.objs
|
||||
+++ b/backends/Makefile.objs
|
||||
@@ -15,4 +15,5 @@ common-obj-$(call land,$(CONFIG_VHOST_USER),$(CONFIG_LINUX)) += \
|
||||
cryptodev-vhost-user.o
|
||||
endif
|
||||
|
||||
-common-obj-$(CONFIG_LINUX) += hostmem-memfd.o
|
||||
+# RHEL: disable memfd
|
||||
+# common-obj-$(CONFIG_LINUX) += hostmem-memfd.o
|
||||
diff --git a/util/memfd.c b/util/memfd.c
|
||||
index b3ecbac..9312653 100644
|
||||
--- a/util/memfd.c
|
||||
+++ b/util/memfd.c
|
||||
@@ -202,7 +202,7 @@ bool qemu_memfd_alloc_check(void)
|
||||
*/
|
||||
bool qemu_memfd_check(void)
|
||||
{
|
||||
-#ifdef CONFIG_LINUX
|
||||
+#if 0 /* RHEL: memfd support disabled */
|
||||
static int memfd_check = MEMFD_TODO;
|
||||
|
||||
if (memfd_check == MEMFD_TODO) {
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,53 @@
|
||||
From 481357ea8ae32b6894860c296cf6a2898260195f Mon Sep 17 00:00:00 2001
|
||||
From: Paolo Bonzini <pbonzini@redhat.com>
|
||||
Date: Fri, 17 Jan 2020 13:18:27 +0100
|
||||
Subject: [PATCH 4/4] RHEL: hw/i386: disable nested PERF_GLOBAL_CTRL MSR
|
||||
support
|
||||
|
||||
RH-Author: Paolo Bonzini <pbonzini@redhat.com>
|
||||
Message-id: <20200117131827.20361-1-pbonzini@redhat.com>
|
||||
Patchwork-id: 93405
|
||||
O-Subject: [RHEL-AV-8.2.0 qemu-kvm PATCH v3] RHEL: hw/i386: disable nested PERF_GLOBAL_CTRL MSR support
|
||||
Bugzilla: 1559846
|
||||
RH-Acked-by: Vitaly Kuznetsov <vkuznets@redhat.com>
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
BZ: 1559846
|
||||
BRANCH: rhel-av-8.2.0
|
||||
BREW: 25775160
|
||||
UPSTREAM: RHEL only
|
||||
|
||||
Nested PERF_GLOBAL_CTRL support is not present in the 8.2 kernel. Drop the
|
||||
features via compat properties, they will be moved to 8.2 machine type compat
|
||||
properties in the 8.3 timeframe.
|
||||
|
||||
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
||||
---
|
||||
No change, for v2 I mistakenly wrote "origin/rhel-av-8.2.0" as the
|
||||
branch. :(
|
||||
|
||||
hw/i386/pc.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
hw/i386/pc.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
|
||||
index 61e70e4..73a0f11 100644
|
||||
--- a/hw/i386/pc.c
|
||||
+++ b/hw/i386/pc.c
|
||||
@@ -351,6 +351,8 @@ const size_t pc_compat_1_4_len = G_N_ELEMENTS(pc_compat_1_4);
|
||||
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" },
|
||||
};
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,45 +0,0 @@
|
||||
From d51e082e60b3f28d595ebb88e2b4ac17384cecee Mon Sep 17 00:00:00 2001
|
||||
From: Vitaly Kuznetsov <vkuznets@redhat.com>
|
||||
Date: Mon, 19 Nov 2018 15:47:06 +0000
|
||||
Subject: [PATCH 05/16] Re-enable CONFIG_HYPERV_TESTDEV
|
||||
|
||||
RH-Author: Vitaly Kuznetsov <vkuznets@redhat.com>
|
||||
Message-id: <20181119154706.26183-1-vkuznets@redhat.com>
|
||||
Patchwork-id: 83046
|
||||
O-Subject: [qemu-kvm RHEL8/virt212 PATCH] Re-enable CONFIG_HYPERV_TESTDEV
|
||||
Bugzilla: 1651195
|
||||
RH-Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
|
||||
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
||||
RH-Acked-by: Auger Eric <eric.auger@redhat.com>
|
||||
|
||||
BZ: 1651195
|
||||
BRANCH: rhel8/master-2.12.0
|
||||
UPSTREAM: downstream only
|
||||
BREW: 19214465
|
||||
|
||||
Recently we re-enabled 'hv_synic' and 'hv_stimer' enlightenments for
|
||||
Windows guests. Enable 'hyperv-testdev' device so kvm-unit-tests tests for
|
||||
synic and stimer can pass.
|
||||
|
||||
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
default-configs/x86_64-softmmu.mak | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/default-configs/x86_64-softmmu.mak b/default-configs/x86_64-softmmu.mak
|
||||
index 2675606..854eab1 100644
|
||||
--- a/default-configs/x86_64-softmmu.mak
|
||||
+++ b/default-configs/x86_64-softmmu.mak
|
||||
@@ -60,7 +60,7 @@ CONFIG_XIO3130=y
|
||||
CONFIG_IOH3420=y
|
||||
CONFIG_I82801B11=y
|
||||
CONFIG_SMBIOS=y
|
||||
-#CONFIG_HYPERV_TESTDEV=$(CONFIG_KVM)
|
||||
+CONFIG_HYPERV_TESTDEV=$(CONFIG_KVM)
|
||||
CONFIG_PXB=y
|
||||
CONFIG_ACPI_VMGENID=y
|
||||
CONFIG_FW_CFG_DMA=y
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,51 +0,0 @@
|
||||
From a2721f63de158e00dda6b043ae8465fb31b8a619 Mon Sep 17 00:00:00 2001
|
||||
From: Vitaly Kuznetsov <vkuznets@redhat.com>
|
||||
Date: Wed, 5 Sep 2018 09:41:52 +0100
|
||||
Subject: [PATCH 1/4] Re-enable disabled Hyper-V enlightenments
|
||||
|
||||
RH-Author: Vitaly Kuznetsov <vkuznets@redhat.com>
|
||||
Message-id: <20180905094152.31940-1-vkuznets@redhat.com>
|
||||
Patchwork-id: 82051
|
||||
O-Subject: [qemu-kvm RHEL8/virt212 PATCH] Re-enable disabled Hyper-V enlightenments
|
||||
Bugzilla: 1625185
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Acked-by: vrozenfe <vrozenfe@redhat.com>
|
||||
RH-Acked-by: Eduardo Otubo <otubo@redhat.com>
|
||||
|
||||
BZ: 1625185
|
||||
BRANCH:rhel8/master-2.12.0
|
||||
UPSTREAM: downstream only
|
||||
BREW: 18157023
|
||||
|
||||
Partially revert 0d70915c93d. With the latest Win10 update stimer/synic
|
||||
enlightenments are a must (see BZ#1610461), vpindex is needed for the
|
||||
upcoming PV TLB flush/IPI support, reset and runtime are enabled for
|
||||
consistency with upstream (there's no benefit in disabling them).
|
||||
|
||||
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
target/i386/cpu.c | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
|
||||
index e16dba7..0215b20 100644
|
||||
--- a/target/i386/cpu.c
|
||||
+++ b/target/i386/cpu.c
|
||||
@@ -5366,13 +5366,11 @@ static Property x86_cpu_properties[] = {
|
||||
DEFINE_PROP_BOOL("hv-vapic", X86CPU, hyperv_vapic, false),
|
||||
DEFINE_PROP_BOOL("hv-time", X86CPU, hyperv_time, false),
|
||||
DEFINE_PROP_BOOL("hv-crash", X86CPU, hyperv_crash, false),
|
||||
-#if 0 /* Disabled for Red Hat Enterprise Linux */
|
||||
DEFINE_PROP_BOOL("hv-reset", X86CPU, hyperv_reset, false),
|
||||
DEFINE_PROP_BOOL("hv-vpindex", X86CPU, hyperv_vpindex, false),
|
||||
DEFINE_PROP_BOOL("hv-runtime", X86CPU, hyperv_runtime, false),
|
||||
DEFINE_PROP_BOOL("hv-synic", X86CPU, hyperv_synic, false),
|
||||
DEFINE_PROP_BOOL("hv-stimer", X86CPU, hyperv_stimer, false),
|
||||
-#endif
|
||||
DEFINE_PROP_BOOL("hv-frequencies", X86CPU, hyperv_frequencies, false),
|
||||
DEFINE_PROP_BOOL("check", X86CPU, check_cpuid, true),
|
||||
DEFINE_PROP_BOOL("enforce", X86CPU, enforce_cpuid, false),
|
||||
--
|
||||
1.8.3.1
|
||||
|
115
SOURCES/kvm-Reallocate-dirty_bmap-when-we-change-a-slot.patch
Normal file
115
SOURCES/kvm-Reallocate-dirty_bmap-when-we-change-a-slot.patch
Normal file
@ -0,0 +1,115 @@
|
||||
From c477581ccc6962651d4d6c702a6c3e2fcc5e4205 Mon Sep 17 00:00:00 2001
|
||||
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
|
||||
Date: Thu, 2 Jan 2020 11:56:51 +0000
|
||||
Subject: [PATCH 2/2] kvm: Reallocate dirty_bmap when we change a slot
|
||||
|
||||
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
||||
Message-id: <20200102115651.140177-1-dgilbert@redhat.com>
|
||||
Patchwork-id: 93256
|
||||
O-Subject: [RHEL-AV-8.2.0 qemu-kvm PATCH 1/1] kvm: Reallocate dirty_bmap when we change a slot
|
||||
Bugzilla: 1772774
|
||||
RH-Acked-by: Peter Xu <peterx@redhat.com>
|
||||
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
|
||||
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
|
||||
|
||||
bz: https://bugzilla.redhat.com/show_bug.cgi?id=1772774
|
||||
brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=25575691
|
||||
branch: rhel-av-8.2.0
|
||||
|
||||
kvm_set_phys_mem can be called to reallocate a slot by something the
|
||||
guest does (e.g. writing to PAM and other chipset registers).
|
||||
This can happen in the middle of a migration, and if we're unlucky
|
||||
it can now happen between the split 'sync' and 'clear'; the clear
|
||||
asserts if there's no bmap to clear. Recreate the bmap whenever
|
||||
we change the slot, keeping the clear path happy.
|
||||
|
||||
Typically this is triggered by the guest rebooting during a migrate.
|
||||
|
||||
Corresponds to:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1772774
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1771032
|
||||
|
||||
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
||||
Reviewed-by: Peter Xu <peterx@redhat.com>
|
||||
(cherry picked from commit 9b3a31c745b61758aaa5466a3a9fc0526d409188)
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
accel/kvm/kvm-all.c | 44 +++++++++++++++++++++++++++++---------------
|
||||
1 file changed, 29 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
|
||||
index dc3ed7f..5007bda 100644
|
||||
--- a/accel/kvm/kvm-all.c
|
||||
+++ b/accel/kvm/kvm-all.c
|
||||
@@ -518,6 +518,27 @@ static int kvm_get_dirty_pages_log_range(MemoryRegionSection *section,
|
||||
|
||||
#define ALIGN(x, y) (((x)+(y)-1) & ~((y)-1))
|
||||
|
||||
+/* Allocate the dirty bitmap for a slot */
|
||||
+static void kvm_memslot_init_dirty_bitmap(KVMSlot *mem)
|
||||
+{
|
||||
+ /*
|
||||
+ * XXX bad kernel interface alert
|
||||
+ * For dirty bitmap, kernel allocates array of size aligned to
|
||||
+ * bits-per-long. But for case when the kernel is 64bits and
|
||||
+ * the userspace is 32bits, userspace can't align to the same
|
||||
+ * bits-per-long, since sizeof(long) is different between kernel
|
||||
+ * and user space. This way, userspace will provide buffer which
|
||||
+ * may be 4 bytes less than the kernel will use, resulting in
|
||||
+ * userspace memory corruption (which is not detectable by valgrind
|
||||
+ * too, in most cases).
|
||||
+ * So for now, let's align to 64 instead of HOST_LONG_BITS here, in
|
||||
+ * a hope that sizeof(long) won't become >8 any time soon.
|
||||
+ */
|
||||
+ hwaddr bitmap_size = ALIGN(((mem->memory_size) >> TARGET_PAGE_BITS),
|
||||
+ /*HOST_LONG_BITS*/ 64) / 8;
|
||||
+ mem->dirty_bmap = g_malloc0(bitmap_size);
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* kvm_physical_sync_dirty_bitmap - Sync dirty bitmap from kernel space
|
||||
*
|
||||
@@ -550,23 +571,9 @@ static int kvm_physical_sync_dirty_bitmap(KVMMemoryListener *kml,
|
||||
goto out;
|
||||
}
|
||||
|
||||
- /* XXX bad kernel interface alert
|
||||
- * For dirty bitmap, kernel allocates array of size aligned to
|
||||
- * bits-per-long. But for case when the kernel is 64bits and
|
||||
- * the userspace is 32bits, userspace can't align to the same
|
||||
- * bits-per-long, since sizeof(long) is different between kernel
|
||||
- * and user space. This way, userspace will provide buffer which
|
||||
- * may be 4 bytes less than the kernel will use, resulting in
|
||||
- * userspace memory corruption (which is not detectable by valgrind
|
||||
- * too, in most cases).
|
||||
- * So for now, let's align to 64 instead of HOST_LONG_BITS here, in
|
||||
- * a hope that sizeof(long) won't become >8 any time soon.
|
||||
- */
|
||||
if (!mem->dirty_bmap) {
|
||||
- hwaddr bitmap_size = ALIGN(((mem->memory_size) >> TARGET_PAGE_BITS),
|
||||
- /*HOST_LONG_BITS*/ 64) / 8;
|
||||
/* Allocate on the first log_sync, once and for all */
|
||||
- mem->dirty_bmap = g_malloc0(bitmap_size);
|
||||
+ kvm_memslot_init_dirty_bitmap(mem);
|
||||
}
|
||||
|
||||
d.dirty_bitmap = mem->dirty_bmap;
|
||||
@@ -1067,6 +1074,13 @@ static void kvm_set_phys_mem(KVMMemoryListener *kml,
|
||||
mem->ram = ram;
|
||||
mem->flags = kvm_mem_flags(mr);
|
||||
|
||||
+ if (mem->flags & KVM_MEM_LOG_DIRTY_PAGES) {
|
||||
+ /*
|
||||
+ * Reallocate the bmap; it means it doesn't disappear in
|
||||
+ * middle of a migrate.
|
||||
+ */
|
||||
+ kvm_memslot_init_dirty_bitmap(mem);
|
||||
+ }
|
||||
err = kvm_set_user_memory_region(kml, mem, true);
|
||||
if (err) {
|
||||
fprintf(stderr, "%s: error registering slot: %s\n", __func__,
|
||||
--
|
||||
1.8.3.1
|
||||
|
118
SOURCES/kvm-Replace-remaining-malloc-free-user-with-glib.patch
Normal file
118
SOURCES/kvm-Replace-remaining-malloc-free-user-with-glib.patch
Normal file
@ -0,0 +1,118 @@
|
||||
From c012dc9b501d96a2ff54a8a7a182726043b69aeb Mon Sep 17 00:00:00 2001
|
||||
From: jmaloy <jmaloy@redhat.com>
|
||||
Date: Tue, 12 May 2020 21:15:14 +0100
|
||||
Subject: [PATCH 3/7] Replace remaining malloc/free user with glib
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: jmaloy <jmaloy@redhat.com>
|
||||
Message-id: <20200512211514.1398384-3-jmaloy@redhat.com>
|
||||
Patchwork-id: 96413
|
||||
O-Subject: [RHEL-AV-8.2.1 qemu-kvm PATCH 2/2] Replace remaining malloc/free user with glib
|
||||
Bugzilla: 1749737
|
||||
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
|
||||
From: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
|
||||
glib mem functions are already used in various places. Let's not mix
|
||||
the two, and instead abort on OOM conditions.
|
||||
|
||||
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
(cherry picked from libslirp commit 3a494648526be4eb96cba739a816a60e933ffd14)
|
||||
Signed-off-by: Jon Maloy <jmaloy@redhat.com>
|
||||
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
slirp/src/sbuf.c | 21 ++++++---------------
|
||||
slirp/src/socket.c | 2 +-
|
||||
slirp/src/tcp_subr.c | 8 ++------
|
||||
3 files changed, 9 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/slirp/src/sbuf.c b/slirp/src/sbuf.c
|
||||
index 0569c34..eab87f3 100644
|
||||
--- a/slirp/src/sbuf.c
|
||||
+++ b/slirp/src/sbuf.c
|
||||
@@ -9,7 +9,7 @@ static void sbappendsb(struct sbuf *sb, struct mbuf *m);
|
||||
|
||||
void sbfree(struct sbuf *sb)
|
||||
{
|
||||
- free(sb->sb_data);
|
||||
+ g_free(sb->sb_data);
|
||||
}
|
||||
|
||||
bool sbdrop(struct sbuf *sb, int num)
|
||||
@@ -39,24 +39,15 @@ void sbreserve(struct sbuf *sb, int size)
|
||||
if (sb->sb_data) {
|
||||
/* Already alloced, realloc if necessary */
|
||||
if (sb->sb_datalen != size) {
|
||||
- char *new = realloc(sb->sb_data, size);
|
||||
+ char *new = g_realloc(sb->sb_data, size);
|
||||
sb->sb_cc = 0;
|
||||
- if (new) {
|
||||
- sb->sb_data = sb->sb_wptr = sb->sb_rptr = new;
|
||||
- sb->sb_datalen = size;
|
||||
- } else {
|
||||
- free(sb->sb_data);
|
||||
- sb->sb_data = sb->sb_wptr = sb->sb_rptr = NULL;
|
||||
- sb->sb_datalen = 0;
|
||||
- }
|
||||
+ sb->sb_data = sb->sb_wptr = sb->sb_rptr = new;
|
||||
+ sb->sb_datalen = size;
|
||||
}
|
||||
} else {
|
||||
- sb->sb_wptr = sb->sb_rptr = sb->sb_data = (char *)malloc(size);
|
||||
+ sb->sb_wptr = sb->sb_rptr = sb->sb_data = g_malloc(size);
|
||||
sb->sb_cc = 0;
|
||||
- if (sb->sb_wptr)
|
||||
- sb->sb_datalen = size;
|
||||
- else
|
||||
- sb->sb_datalen = 0;
|
||||
+ sb->sb_datalen = size;
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/slirp/src/socket.c b/slirp/src/socket.c
|
||||
index 34daffc..ace18bf 100644
|
||||
--- a/slirp/src/socket.c
|
||||
+++ b/slirp/src/socket.c
|
||||
@@ -95,7 +95,7 @@ void sofree(struct socket *so)
|
||||
remque(so); /* crashes if so is not in a queue */
|
||||
|
||||
if (so->so_tcpcb) {
|
||||
- free(so->so_tcpcb);
|
||||
+ g_free(so->so_tcpcb);
|
||||
}
|
||||
g_free(so);
|
||||
}
|
||||
diff --git a/slirp/src/tcp_subr.c b/slirp/src/tcp_subr.c
|
||||
index 26d4ead..4e5a801 100644
|
||||
--- a/slirp/src/tcp_subr.c
|
||||
+++ b/slirp/src/tcp_subr.c
|
||||
@@ -255,11 +255,7 @@ struct tcpcb *tcp_newtcpcb(struct socket *so)
|
||||
{
|
||||
register struct tcpcb *tp;
|
||||
|
||||
- tp = (struct tcpcb *)malloc(sizeof(*tp));
|
||||
- if (tp == NULL)
|
||||
- return ((struct tcpcb *)0);
|
||||
-
|
||||
- memset((char *)tp, 0, sizeof(struct tcpcb));
|
||||
+ tp = g_new0(struct tcpcb, 1);
|
||||
tp->seg_next = tp->seg_prev = (struct tcpiphdr *)tp;
|
||||
tp->t_maxseg = (so->so_ffamily == AF_INET) ? TCP_MSS : TCP6_MSS;
|
||||
|
||||
@@ -330,7 +326,7 @@ struct tcpcb *tcp_close(struct tcpcb *tp)
|
||||
remque(tcpiphdr2qlink(tcpiphdr_prev(t)));
|
||||
m_free(m);
|
||||
}
|
||||
- free(tp);
|
||||
+ g_free(tp);
|
||||
so->so_tcpcb = NULL;
|
||||
/* clobber input socket cache if we're closing the cached connection */
|
||||
if (so == slirp->tcp_last_so)
|
||||
--
|
||||
1.8.3.1
|
||||
|
58
SOURCES/kvm-Revert-RHEL-disable-hostmem-memfd.patch
Normal file
58
SOURCES/kvm-Revert-RHEL-disable-hostmem-memfd.patch
Normal file
@ -0,0 +1,58 @@
|
||||
From 559d5899473dea180ced39a32bfbfbf2310c6e04 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
|
||||
Date: Mon, 25 May 2020 15:33:06 +0100
|
||||
Subject: [PATCH 4/7] Revert "RHEL: disable hostmem-memfd"
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
Message-id: <20200525153306.15373-1-marcandre.lureau@redhat.com>
|
||||
Patchwork-id: 96747
|
||||
O-Subject: [RHEL-AV-8.2.1 qemu-kvm PATCH] Revert "RHEL: disable hostmem-memfd"
|
||||
Bugzilla: 1839030
|
||||
RH-Acked-by: Daniel P. Berrange <berrange@redhat.com>
|
||||
RH-Acked-by: Sergio Lopez Pascual <slp@redhat.com>
|
||||
RH-Acked-by: Stefano Garzarella <sgarzare@redhat.com>
|
||||
|
||||
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1839030
|
||||
BRANCH: rhel-av-8.2.1
|
||||
UPSTREAM: RHEL-only
|
||||
BREW: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=28817132
|
||||
|
||||
This reverts commit f7587ddb9a2731bf678a24156b6285dda79a4b2b.
|
||||
|
||||
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
backends/Makefile.objs | 3 +--
|
||||
util/memfd.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/backends/Makefile.objs b/backends/Makefile.objs
|
||||
index f328d40..f069111 100644
|
||||
--- a/backends/Makefile.objs
|
||||
+++ b/backends/Makefile.objs
|
||||
@@ -16,5 +16,4 @@ endif
|
||||
|
||||
common-obj-$(call land,$(CONFIG_VHOST_USER),$(CONFIG_VIRTIO)) += vhost-user.o
|
||||
|
||||
-# RHEL: disable memfd
|
||||
-# common-obj-$(CONFIG_LINUX) += hostmem-memfd.o
|
||||
+common-obj-$(CONFIG_LINUX) += hostmem-memfd.o
|
||||
diff --git a/util/memfd.c b/util/memfd.c
|
||||
index 3303ec9..4a3c07e 100644
|
||||
--- a/util/memfd.c
|
||||
+++ b/util/memfd.c
|
||||
@@ -193,7 +193,7 @@ bool qemu_memfd_alloc_check(void)
|
||||
*/
|
||||
bool qemu_memfd_check(unsigned int flags)
|
||||
{
|
||||
-#if 0 /* RHEL: memfd support disabled */
|
||||
+#ifdef CONFIG_LINUX
|
||||
int mfd = memfd_create("test", flags | MFD_CLOEXEC);
|
||||
|
||||
if (mfd >= 0) {
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,109 +0,0 @@
|
||||
From c07dfca3b340161294755691f416ab20f37fa7c3 Mon Sep 17 00:00:00 2001
|
||||
From: Igor Mammedov <imammedo@redhat.com>
|
||||
Date: Thu, 4 Oct 2018 10:31:31 +0100
|
||||
Subject: [PATCH 01/17] Revert "hw/acpi-build: build SRAT memory affinity
|
||||
structures for DIMM devices"
|
||||
|
||||
RH-Author: Igor Mammedov <imammedo@redhat.com>
|
||||
Message-id: <1538649091-70517-1-git-send-email-imammedo@redhat.com>
|
||||
Patchwork-id: 82373
|
||||
O-Subject: [RHEL8/virt-8.0.0 qemu-kvm PATCH] Revert "hw/acpi-build: build SRAT memory affinity structures for DIMM devices"
|
||||
Bugzilla: 1609235
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1609235
|
||||
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=18630981
|
||||
Upstream: RHEL only
|
||||
|
||||
Since upstream commits
|
||||
(0efd7e108 "pc: acpi: fix memory hotplug regression by reducing stub SRAT entry size")
|
||||
(dbb6da8ba7 "pc: acpi: revert back to 1 SRAT entry for hotpluggable area")
|
||||
hasn't been backported to RHEL8, it's sufficient to revert commit
|
||||
(848a1cc1e8 "hw/acpi-build: build SRAT memory affinity structures for DIMM devices")
|
||||
for the result to match the current upstream state and fix the bug.
|
||||
|
||||
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
hw/i386/acpi-build.c | 56 ++++------------------------------------------------
|
||||
1 file changed, 4 insertions(+), 52 deletions(-)
|
||||
|
||||
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
|
||||
index b309a97..a175a8a 100644
|
||||
--- a/hw/i386/acpi-build.c
|
||||
+++ b/hw/i386/acpi-build.c
|
||||
@@ -2253,55 +2253,6 @@ build_tpm2(GArray *table_data, BIOSLinker *linker, GArray *tcpalog)
|
||||
#define HOLE_640K_START (640 * 1024)
|
||||
#define HOLE_640K_END (1024 * 1024)
|
||||
|
||||
-static void build_srat_hotpluggable_memory(GArray *table_data, uint64_t base,
|
||||
- uint64_t len, int default_node)
|
||||
-{
|
||||
- MemoryDeviceInfoList *info_list = qmp_pc_dimm_device_list();
|
||||
- MemoryDeviceInfoList *info;
|
||||
- MemoryDeviceInfo *mi;
|
||||
- PCDIMMDeviceInfo *di;
|
||||
- uint64_t end = base + len, cur, size;
|
||||
- bool is_nvdimm;
|
||||
- AcpiSratMemoryAffinity *numamem;
|
||||
- MemoryAffinityFlags flags;
|
||||
-
|
||||
- for (cur = base, info = info_list;
|
||||
- cur < end;
|
||||
- cur += size, info = info->next) {
|
||||
- numamem = acpi_data_push(table_data, sizeof *numamem);
|
||||
-
|
||||
- if (!info) {
|
||||
- build_srat_memory(numamem, cur, end - cur, default_node,
|
||||
- MEM_AFFINITY_HOTPLUGGABLE | MEM_AFFINITY_ENABLED);
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- mi = info->value;
|
||||
- is_nvdimm = (mi->type == MEMORY_DEVICE_INFO_KIND_NVDIMM);
|
||||
- di = !is_nvdimm ? mi->u.dimm.data : mi->u.nvdimm.data;
|
||||
-
|
||||
- if (cur < di->addr) {
|
||||
- build_srat_memory(numamem, cur, di->addr - cur, default_node,
|
||||
- MEM_AFFINITY_HOTPLUGGABLE | MEM_AFFINITY_ENABLED);
|
||||
- numamem = acpi_data_push(table_data, sizeof *numamem);
|
||||
- }
|
||||
-
|
||||
- size = di->size;
|
||||
-
|
||||
- flags = MEM_AFFINITY_ENABLED;
|
||||
- if (di->hotpluggable) {
|
||||
- flags |= MEM_AFFINITY_HOTPLUGGABLE;
|
||||
- }
|
||||
- if (is_nvdimm) {
|
||||
- flags |= MEM_AFFINITY_NON_VOLATILE;
|
||||
- }
|
||||
-
|
||||
- build_srat_memory(numamem, di->addr, size, di->node, flags);
|
||||
- }
|
||||
-
|
||||
- qapi_free_MemoryDeviceInfoList(info_list);
|
||||
-}
|
||||
-
|
||||
static void
|
||||
build_srat(GArray *table_data, BIOSLinker *linker, MachineState *machine)
|
||||
{
|
||||
@@ -2413,9 +2364,10 @@ build_srat(GArray *table_data, BIOSLinker *linker, MachineState *machine)
|
||||
* providing _PXM method if necessary.
|
||||
*/
|
||||
if (hotplugabble_address_space_size) {
|
||||
- build_srat_hotpluggable_memory(table_data, pcms->hotplug_memory.base,
|
||||
- hotplugabble_address_space_size,
|
||||
- pcms->numa_nodes - 1);
|
||||
+ numamem = acpi_data_push(table_data, sizeof *numamem);
|
||||
+ build_srat_memory(numamem, pcms->hotplug_memory.base,
|
||||
+ hotplugabble_address_space_size, pcms->numa_nodes - 1,
|
||||
+ MEM_AFFINITY_HOTPLUGGABLE | MEM_AFFINITY_ENABLED);
|
||||
}
|
||||
|
||||
build_header(linker, table_data,
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,58 +0,0 @@
|
||||
From 6a1d536006d9b6f888bd56ba1ff03c6e66acb020 Mon Sep 17 00:00:00 2001
|
||||
From: "plai@redhat.com" <plai@redhat.com>
|
||||
Date: Wed, 3 Apr 2019 15:54:34 +0100
|
||||
Subject: [PATCH 10/10] Revert "i386: Add CPUID bit for PCONFIG"
|
||||
|
||||
RH-Author: plai@redhat.com
|
||||
Message-id: <1554306874-28796-11-git-send-email-plai@redhat.com>
|
||||
Patchwork-id: 85388
|
||||
O-Subject: [RHEL8.1 qemu-kvm PATCH resend 10/10] Revert "i386: Add CPUID bit for PCONFIG"
|
||||
Bugzilla: 1561761
|
||||
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
|
||||
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
||||
|
||||
From: Robert Hoo <robert.hu@linux.intel.com>
|
||||
|
||||
This reverts commit 5131dc433df54b37e8e918d8fba7fe10344e7a7b.
|
||||
For new instruction 'PCONFIG' will not be exposed to guest.
|
||||
|
||||
Signed-off-by: Robert Hoo <robert.hu@linux.intel.com>
|
||||
Message-Id: <1545227081-213696-3-git-send-email-robert.hu@linux.intel.com>
|
||||
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
||||
(cherry picked from commit 712f807e1965c8f1f1da5bbec2b92a8c540e6631)
|
||||
Signed-off-by: Paul Lai <plai@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
target/i386/cpu.c | 2 +-
|
||||
target/i386/cpu.h | 1 -
|
||||
2 files changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
|
||||
index ad369be..8e63db6 100644
|
||||
--- a/target/i386/cpu.c
|
||||
+++ b/target/i386/cpu.c
|
||||
@@ -1042,7 +1042,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
|
||||
NULL, NULL, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL,
|
||||
- NULL, NULL, "pconfig", NULL,
|
||||
+ NULL, NULL, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL,
|
||||
NULL, NULL, "spec-ctrl", "stibp",
|
||||
NULL, "arch-capabilities", NULL, "ssbd",
|
||||
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
|
||||
index 63f692f..3ae0e8c 100644
|
||||
--- a/target/i386/cpu.h
|
||||
+++ b/target/i386/cpu.h
|
||||
@@ -687,7 +687,6 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];
|
||||
|
||||
#define CPUID_7_0_EDX_AVX512_4VNNIW (1U << 2) /* AVX512 Neural Network Instructions */
|
||||
#define CPUID_7_0_EDX_AVX512_4FMAPS (1U << 3) /* AVX512 Multiply Accumulation Single Precision */
|
||||
-#define CPUID_7_0_EDX_PCONFIG (1U << 18) /* Platform Configuration */
|
||||
#define CPUID_7_0_EDX_SPEC_CTRL (1U << 26) /* Speculation Control */
|
||||
#define CPUID_7_0_EDX_ARCH_CAPABILITIES (1U << 29) /*Arch Capabilities*/
|
||||
#define CPUID_7_0_EDX_SPEC_CTRL_SSBD (1U << 31) /* Speculative Store Bypass Disable */
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,121 @@
|
||||
From 71b5267ed33f9e60bc98acbabcbed62f01a96ff4 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Wolf <kwolf@redhat.com>
|
||||
Date: Mon, 30 Mar 2020 11:19:23 +0100
|
||||
Subject: [PATCH 3/4] Revert "mirror: Don't let an operation wait for itself"
|
||||
|
||||
RH-Author: Kevin Wolf <kwolf@redhat.com>
|
||||
Message-id: <20200330111924.22938-2-kwolf@redhat.com>
|
||||
Patchwork-id: 94464
|
||||
O-Subject: [RHEL-AV-8.2.0 qemu-kvm PATCH 1/2] Revert "mirror: Don't let an operation wait for itself"
|
||||
Bugzilla: 1794692
|
||||
RH-Acked-by: Maxim Levitsky <mlevitsk@redhat.com>
|
||||
RH-Acked-by: Danilo de Paula <ddepaula@redhat.com>
|
||||
RH-Acked-by: Max Reitz <mreitz@redhat.com>
|
||||
|
||||
This reverts commit 7e6c4ff792734e196c8ca82564c56b5e7c6288ca.
|
||||
|
||||
The fix was incomplete as it only protected against requests waiting for
|
||||
themselves, but not against requests waiting for each other. We need a
|
||||
different solution.
|
||||
|
||||
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
||||
Message-Id: <20200326153628.4869-2-kwolf@redhat.com>
|
||||
Reviewed-by: Eric Blake <eblake@redhat.com>
|
||||
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
||||
(cherry picked from commit 9178f4fe5f083064f5c91f04d98c815ce5a5af1c)
|
||||
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
block/mirror.c | 21 +++++++++------------
|
||||
1 file changed, 9 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/block/mirror.c b/block/mirror.c
|
||||
index cacbc70..8959e42 100644
|
||||
--- a/block/mirror.c
|
||||
+++ b/block/mirror.c
|
||||
@@ -283,14 +283,11 @@ static int mirror_cow_align(MirrorBlockJob *s, int64_t *offset,
|
||||
}
|
||||
|
||||
static inline void coroutine_fn
|
||||
-mirror_wait_for_any_operation(MirrorBlockJob *s, MirrorOp *self, bool active)
|
||||
+mirror_wait_for_any_operation(MirrorBlockJob *s, bool active)
|
||||
{
|
||||
MirrorOp *op;
|
||||
|
||||
QTAILQ_FOREACH(op, &s->ops_in_flight, next) {
|
||||
- if (self == op) {
|
||||
- continue;
|
||||
- }
|
||||
/* Do not wait on pseudo ops, because it may in turn wait on
|
||||
* some other operation to start, which may in fact be the
|
||||
* caller of this function. Since there is only one pseudo op
|
||||
@@ -305,10 +302,10 @@ mirror_wait_for_any_operation(MirrorBlockJob *s, MirrorOp *self, bool active)
|
||||
}
|
||||
|
||||
static inline void coroutine_fn
|
||||
-mirror_wait_for_free_in_flight_slot(MirrorBlockJob *s, MirrorOp *self)
|
||||
+mirror_wait_for_free_in_flight_slot(MirrorBlockJob *s)
|
||||
{
|
||||
/* Only non-active operations use up in-flight slots */
|
||||
- mirror_wait_for_any_operation(s, self, false);
|
||||
+ mirror_wait_for_any_operation(s, false);
|
||||
}
|
||||
|
||||
/* Perform a mirror copy operation.
|
||||
@@ -351,7 +348,7 @@ static void coroutine_fn mirror_co_read(void *opaque)
|
||||
|
||||
while (s->buf_free_count < nb_chunks) {
|
||||
trace_mirror_yield_in_flight(s, op->offset, s->in_flight);
|
||||
- mirror_wait_for_free_in_flight_slot(s, op);
|
||||
+ mirror_wait_for_free_in_flight_slot(s);
|
||||
}
|
||||
|
||||
/* Now make a QEMUIOVector taking enough granularity-sized chunks
|
||||
@@ -558,7 +555,7 @@ static uint64_t coroutine_fn mirror_iteration(MirrorBlockJob *s)
|
||||
|
||||
while (s->in_flight >= MAX_IN_FLIGHT) {
|
||||
trace_mirror_yield_in_flight(s, offset, s->in_flight);
|
||||
- mirror_wait_for_free_in_flight_slot(s, pseudo_op);
|
||||
+ mirror_wait_for_free_in_flight_slot(s);
|
||||
}
|
||||
|
||||
if (s->ret < 0) {
|
||||
@@ -612,7 +609,7 @@ static void mirror_free_init(MirrorBlockJob *s)
|
||||
static void coroutine_fn mirror_wait_for_all_io(MirrorBlockJob *s)
|
||||
{
|
||||
while (s->in_flight > 0) {
|
||||
- mirror_wait_for_free_in_flight_slot(s, NULL);
|
||||
+ mirror_wait_for_free_in_flight_slot(s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -797,7 +794,7 @@ static int coroutine_fn mirror_dirty_init(MirrorBlockJob *s)
|
||||
if (s->in_flight >= MAX_IN_FLIGHT) {
|
||||
trace_mirror_yield(s, UINT64_MAX, s->buf_free_count,
|
||||
s->in_flight);
|
||||
- mirror_wait_for_free_in_flight_slot(s, NULL);
|
||||
+ mirror_wait_for_free_in_flight_slot(s);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -950,7 +947,7 @@ static int coroutine_fn mirror_run(Job *job, Error **errp)
|
||||
/* Do not start passive operations while there are active
|
||||
* writes in progress */
|
||||
while (s->in_active_write_counter) {
|
||||
- mirror_wait_for_any_operation(s, NULL, true);
|
||||
+ mirror_wait_for_any_operation(s, true);
|
||||
}
|
||||
|
||||
if (s->ret < 0) {
|
||||
@@ -976,7 +973,7 @@ static int coroutine_fn mirror_run(Job *job, Error **errp)
|
||||
if (s->in_flight >= MAX_IN_FLIGHT || s->buf_free_count == 0 ||
|
||||
(cnt == 0 && s->in_flight > 0)) {
|
||||
trace_mirror_yield(s, cnt, s->buf_free_count, s->in_flight);
|
||||
- mirror_wait_for_free_in_flight_slot(s, NULL);
|
||||
+ mirror_wait_for_free_in_flight_slot(s);
|
||||
continue;
|
||||
} else if (cnt != 0) {
|
||||
delay_ns = mirror_iteration(s);
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,69 +0,0 @@
|
||||
From c30a2c251e309eba40fd04e36b80016e4858c586 Mon Sep 17 00:00:00 2001
|
||||
From: Serhii Popovych <spopovyc@redhat.com>
|
||||
Date: Wed, 11 Jul 2018 17:11:45 +0100
|
||||
Subject: [PATCH 2/4] Revert "spapr: Don't allow memory hotplug to memory less
|
||||
nodes"
|
||||
|
||||
RH-Author: Serhii Popovych <spopovyc@redhat.com>
|
||||
Message-id: <1531329105-80927-3-git-send-email-spopovyc@redhat.com>
|
||||
Patchwork-id: 81313
|
||||
O-Subject: [RHEL-8.0 qemu-kvm PATCH 2/2] Revert "spapr: Don't allow memory hotplug to memory less nodes"
|
||||
Bugzilla: 1599593
|
||||
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
||||
RH-Acked-by: David Gibson <dgibson@redhat.com>
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
|
||||
This reverts commit b556854bd8524c26b8be98ab1bfdf0826831e793.
|
||||
|
||||
Leave change @node type from uint32_t to to int from reverted commit
|
||||
because node < 0 is always false.
|
||||
|
||||
Note that implementing capability or some trick to detect if guest
|
||||
kernel does not support hot-add to memory: this returns previous
|
||||
behavour where memory added to first non-empty node.
|
||||
|
||||
Signed-off-by: Serhii Popovych <spopovyc@redhat.com>
|
||||
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
|
||||
(cherry picked from commit e47f1d2786c3d01a7894a493aafe0efa6b64453c)
|
||||
Signed-off-by: Serhii Popovych <spopovyc@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
hw/ppc/spapr.c | 22 ----------------------
|
||||
1 file changed, 22 deletions(-)
|
||||
|
||||
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
|
||||
index f3da93f..ef00937 100644
|
||||
--- a/hw/ppc/spapr.c
|
||||
+++ b/hw/ppc/spapr.c
|
||||
@@ -3489,28 +3489,6 @@ static void spapr_machine_device_plug(HotplugHandler *hotplug_dev,
|
||||
return;
|
||||
}
|
||||
|
||||
- /*
|
||||
- * Currently PowerPC kernel doesn't allow hot-adding memory to
|
||||
- * memory-less node, but instead will silently add the memory
|
||||
- * to the first node that has some memory. This causes two
|
||||
- * unexpected behaviours for the user.
|
||||
- *
|
||||
- * - Memory gets hotplugged to a different node than what the user
|
||||
- * specified.
|
||||
- * - Since pc-dimm subsystem in QEMU still thinks that memory belongs
|
||||
- * to memory-less node, a reboot will set things accordingly
|
||||
- * and the previously hotplugged memory now ends in the right node.
|
||||
- * This appears as if some memory moved from one node to another.
|
||||
- *
|
||||
- * So until kernel starts supporting memory hotplug to memory-less
|
||||
- * nodes, just prevent such attempts upfront in QEMU.
|
||||
- */
|
||||
- if (nb_numa_nodes && !numa_info[node].node_mem) {
|
||||
- error_setg(errp, "Can't hotplug memory to memory-less node %d",
|
||||
- node);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
spapr_memory_plug(hotplug_dev, dev, node, errp);
|
||||
} else if (object_dynamic_cast(OBJECT(dev), TYPE_SPAPR_CPU_CORE)) {
|
||||
spapr_core_plug(hotplug_dev, dev, errp);
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,99 +0,0 @@
|
||||
From 432dce181a267465b10d3e4bca025314d85ff76f Mon Sep 17 00:00:00 2001
|
||||
From: Serhii Popovych <spopovyc@redhat.com>
|
||||
Date: Mon, 9 Jul 2018 11:31:18 +0200
|
||||
Subject: [PATCH 202/268] Revert "usb: release the created buses"
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: Serhii Popovych <spopovyc@redhat.com>
|
||||
Message-id: <1531135878-18813-4-git-send-email-spopovyc@redhat.com>
|
||||
Patchwork-id: 81266
|
||||
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH v2 3/3] Revert "usb: release the created buses"
|
||||
Bugzilla: 1556678
|
||||
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
||||
RH-Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
RH-Acked-by: David Gibson <dgibson@redhat.com>
|
||||
|
||||
From: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
|
||||
The USB device don't hold the bus. There is no ASAN related reports
|
||||
anymore.
|
||||
|
||||
This reverts commit cd7bc87868d534f95e928cad98e2a52df7695771.
|
||||
|
||||
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
Message-id: 20180613172815.32738-3-marcandre.lureau@redhat.com
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
(cherry picked from commit 9b5c2fd53feb574036747d0284fd7f73dfedc89c)
|
||||
Signed-off-by: Serhii Popovych <spopovyc@redhat.com>
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
hw/usb/dev-storage.c | 16 ----------------
|
||||
hw/usb/dev-uas.c | 2 --
|
||||
2 files changed, 18 deletions(-)
|
||||
|
||||
diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
|
||||
index 68e2062..9fb00a9 100644
|
||||
--- a/hw/usb/dev-storage.c
|
||||
+++ b/hw/usb/dev-storage.c
|
||||
@@ -589,13 +589,6 @@ static const struct SCSIBusInfo usb_msd_scsi_info_bot = {
|
||||
.load_request = usb_msd_load_request,
|
||||
};
|
||||
|
||||
-static void usb_msd_unrealize_storage(USBDevice *dev, Error **errp)
|
||||
-{
|
||||
- MSDState *s = USB_STORAGE_DEV(dev);
|
||||
-
|
||||
- object_unref(OBJECT(&s->bus));
|
||||
-}
|
||||
-
|
||||
static void usb_msd_storage_realize(USBDevice *dev, Error **errp)
|
||||
{
|
||||
MSDState *s = USB_STORAGE_DEV(dev);
|
||||
@@ -645,13 +638,6 @@ static void usb_msd_storage_realize(USBDevice *dev, Error **errp)
|
||||
s->scsi_dev = scsi_dev;
|
||||
}
|
||||
|
||||
-static void usb_msd_bot_unrealize(USBDevice *dev, Error **errp)
|
||||
-{
|
||||
- MSDState *s = USB_STORAGE_DEV(dev);
|
||||
-
|
||||
- object_unref(OBJECT(&s->bus));
|
||||
-}
|
||||
-
|
||||
static void usb_msd_bot_realize(USBDevice *dev, Error **errp)
|
||||
{
|
||||
MSDState *s = USB_STORAGE_DEV(dev);
|
||||
@@ -716,7 +702,6 @@ static void usb_msd_class_storage_initfn(ObjectClass *klass, void *data)
|
||||
USBDeviceClass *uc = USB_DEVICE_CLASS(klass);
|
||||
|
||||
uc->realize = usb_msd_storage_realize;
|
||||
- uc->unrealize = usb_msd_unrealize_storage;
|
||||
dc->props = msd_properties;
|
||||
}
|
||||
|
||||
@@ -779,7 +764,6 @@ static void usb_msd_class_bot_initfn(ObjectClass *klass, void *data)
|
||||
USBDeviceClass *uc = USB_DEVICE_CLASS(klass);
|
||||
|
||||
uc->realize = usb_msd_bot_realize;
|
||||
- uc->unrealize = usb_msd_bot_unrealize;
|
||||
uc->attached_settable = true;
|
||||
}
|
||||
|
||||
diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c
|
||||
index c218b53..eaf515d 100644
|
||||
--- a/hw/usb/dev-uas.c
|
||||
+++ b/hw/usb/dev-uas.c
|
||||
@@ -896,8 +896,6 @@ static void usb_uas_unrealize(USBDevice *dev, Error **errp)
|
||||
UASDevice *uas = USB_UAS(dev);
|
||||
|
||||
qemu_bh_delete(uas->status_bh);
|
||||
-
|
||||
- object_unref(OBJECT(&uas->bus));
|
||||
}
|
||||
|
||||
static void usb_uas_realize(USBDevice *dev, Error **errp)
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,63 +0,0 @@
|
||||
From e924798dc9091c09e4e6968b9357e89aac6a5c03 Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Wed, 13 Jun 2018 10:40:26 +0200
|
||||
Subject: [PATCH 007/268] Use 4 MB vram for cirrus.
|
||||
|
||||
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Message-id: <20180613104026.4395-3-kraxel@redhat.com>
|
||||
Patchwork-id: 80652
|
||||
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 2/2] Use 4 MB vram for cirrus.
|
||||
Bugzilla: 1542080
|
||||
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
||||
RH-Acked-by: Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
Follow upstream, which switched from 8 MB to 4 MB in release 2.9,
|
||||
see commit 73c148130b58709f0f2abfedbae92681d87eb404.
|
||||
|
||||
RHEL traditionally defaults to 16 MB video memory, so we had a patch
|
||||
changing 8 MB -> 16 MB downstream. The 2.9 rebase kept that patch, now
|
||||
changing 4 MB -> 16 MB.
|
||||
|
||||
This patch effectively reverts the downstream change and adds a compat
|
||||
property so the video memory will stay at 16 MB for 7.5 and older
|
||||
machine types.
|
||||
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
hw/display/cirrus_vga.c | 2 +-
|
||||
include/hw/compat.h | 4 ++++
|
||||
2 files changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
|
||||
index feacb45..014268a 100644
|
||||
--- a/hw/display/cirrus_vga.c
|
||||
+++ b/hw/display/cirrus_vga.c
|
||||
@@ -3133,7 +3133,7 @@ static void pci_cirrus_vga_realize(PCIDevice *dev, Error **errp)
|
||||
|
||||
static Property pci_vga_cirrus_properties[] = {
|
||||
DEFINE_PROP_UINT32("vgamem_mb", struct PCICirrusVGAState,
|
||||
- cirrus_vga.vga.vram_size_mb, 16),
|
||||
+ cirrus_vga.vga.vram_size_mb, 4),
|
||||
DEFINE_PROP_BOOL("blitter", struct PCICirrusVGAState,
|
||||
cirrus_vga.enable_blitter, true),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
diff --git a/include/hw/compat.h b/include/hw/compat.h
|
||||
index f7b39c5..f4cc6e0 100644
|
||||
--- a/include/hw/compat.h
|
||||
+++ b/include/hw/compat.h
|
||||
@@ -472,6 +472,10 @@
|
||||
.driver = "virtio-tablet-device",\
|
||||
.property = "wheel-axis",\
|
||||
.value = "false",\
|
||||
+ },{ /* HW_COMPAT_RHEL7_5 */ \
|
||||
+ .driver = "cirrus-vga",\
|
||||
+ .property = "vgamem_mb",\
|
||||
+ .value = "16",\
|
||||
},
|
||||
|
||||
#endif /* HW_COMPAT_H */
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,77 +0,0 @@
|
||||
From e6e62ad1e8a33076b67b19ce5f03ea6ca6571eef Mon Sep 17 00:00:00 2001
|
||||
From: Eduardo Habkost <ehabkost@redhat.com>
|
||||
Date: Thu, 9 May 2019 22:43:17 +0100
|
||||
Subject: [PATCH 1/2] kvm: Use KVM_GET_MSR_INDEX_LIST for
|
||||
MSR_IA32_ARCH_CAPABILITIES support
|
||||
|
||||
RH-Author: Eduardo Habkost <ehabkost@redhat.com>
|
||||
Message-id: <20190509224318.23376-2-ehabkost@redhat.com>
|
||||
Patchwork-id: 87251
|
||||
O-Subject: [RHEL-8.1.0 qemu-kvm PATCH 1/2] kvm: Use KVM_GET_MSR_INDEX_LIST for MSR_IA32_ARCH_CAPABILITIES support
|
||||
Bugzilla: 1707706
|
||||
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
||||
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
||||
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
|
||||
RH-Acked-by: Bandan Das <bsd@redhat.com>
|
||||
|
||||
From: Bandan Das <bsd@redhat.com>
|
||||
|
||||
When writing to guest's MSR_IA32_ARCH_CAPABILITIES, check whether it's
|
||||
supported in the guest using the KVM_GET_MSR_INDEX_LIST ioctl.
|
||||
|
||||
Fixes: d86f963694df27f11b3681ffd225c9362de1b634
|
||||
Suggested-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
Tested-by: balducci@units.it
|
||||
Signed-off-by: Bandan Das <bsd@redhat.com>
|
||||
Message-Id: <jpg4lc4iiav.fsf_-_@linux.bootlegged.copy>
|
||||
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
(cherry picked from commit aec5e9c3a94cf8b7920f59bef69a6f426092c4a0)
|
||||
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
target/i386/kvm.c | 15 +++++++--------
|
||||
1 file changed, 7 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
|
||||
index f1626a4..e3e8c78 100644
|
||||
--- a/target/i386/kvm.c
|
||||
+++ b/target/i386/kvm.c
|
||||
@@ -94,6 +94,7 @@ static bool has_msr_xss;
|
||||
static bool has_msr_spec_ctrl;
|
||||
static bool has_msr_virt_ssbd;
|
||||
static bool has_msr_smi_count;
|
||||
+static bool has_msr_arch_capabs;
|
||||
|
||||
static uint32_t has_architectural_pmu_version;
|
||||
static uint32_t num_architectural_pmu_gp_counters;
|
||||
@@ -1330,6 +1331,9 @@ static int kvm_get_supported_msrs(KVMState *s)
|
||||
case MSR_VIRT_SSBD:
|
||||
has_msr_virt_ssbd = true;
|
||||
break;
|
||||
+ case MSR_IA32_ARCH_CAPABILITIES:
|
||||
+ has_msr_arch_capabs = true;
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1834,14 +1838,9 @@ static int kvm_put_msrs(X86CPU *cpu, int level)
|
||||
#endif
|
||||
|
||||
/* If host supports feature MSR, write down. */
|
||||
- if (kvm_feature_msrs) {
|
||||
- int i;
|
||||
- for (i = 0; i < kvm_feature_msrs->nmsrs; i++)
|
||||
- if (kvm_feature_msrs->indices[i] == MSR_IA32_ARCH_CAPABILITIES) {
|
||||
- kvm_msr_entry_add(cpu, MSR_IA32_ARCH_CAPABILITIES,
|
||||
- env->features[FEAT_ARCH_CAPABILITIES]);
|
||||
- break;
|
||||
- }
|
||||
+ if (has_msr_arch_capabs) {
|
||||
+ kvm_msr_entry_add(cpu, MSR_IA32_ARCH_CAPABILITIES,
|
||||
+ env->features[FEAT_ARCH_CAPABILITIES]);
|
||||
}
|
||||
|
||||
/*
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,80 +0,0 @@
|
||||
From 486481ac5bddfab22b74bcebcbd27af1f7a604f5 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Williamson <alex.williamson@redhat.com>
|
||||
Date: Mon, 3 Dec 2018 22:01:34 +0000
|
||||
Subject: [PATCH 11/16] kvm: Use inhibit to prevent ballooning without
|
||||
synchronous mmu
|
||||
|
||||
RH-Author: Alex Williamson <alex.williamson@redhat.com>
|
||||
Message-id: <154387449407.27651.8902076548922742582.stgit@gimli.home>
|
||||
Patchwork-id: 83237
|
||||
O-Subject: [RHEL-8.0 qemu-kvm PATCH 2/7] kvm: Use inhibit to prevent ballooning without synchronous mmu
|
||||
Bugzilla: 1650272
|
||||
RH-Acked-by: Peter Xu <peterx@redhat.com>
|
||||
RH-Acked-by: Auger Eric <eric.auger@redhat.com>
|
||||
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
|
||||
RH-Acked-by: David Hildenbrand <david@redhat.com>
|
||||
|
||||
Bugzilla: 1650272
|
||||
|
||||
Remove KVM specific tests in balloon_page(), instead marking
|
||||
ballooning as inhibited without KVM_CAP_SYNC_MMU support.
|
||||
|
||||
Reviewed-by: David Hildenbrand <david@redhat.com>
|
||||
Reviewed-by: Peter Xu <peterx@redhat.com>
|
||||
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
|
||||
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
||||
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
|
||||
(cherry picked from commit f59489423ab79852e98d9b3025b7d99ba8da584f)
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
accel/kvm/kvm-all.c | 4 ++++
|
||||
hw/virtio/virtio-balloon.c | 4 +---
|
||||
2 files changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
|
||||
index 3f1c06e..3a7c8a3 100644
|
||||
--- a/accel/kvm/kvm-all.c
|
||||
+++ b/accel/kvm/kvm-all.c
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "trace.h"
|
||||
#include "hw/irq.h"
|
||||
#include "sysemu/sev.h"
|
||||
+#include "sysemu/balloon.h"
|
||||
|
||||
#include "hw/boards.h"
|
||||
|
||||
@@ -1711,6 +1712,9 @@ static int kvm_init(MachineState *ms)
|
||||
s->many_ioeventfds = kvm_check_many_ioeventfds();
|
||||
|
||||
s->sync_mmu = !!kvm_vm_check_extension(kvm_state, KVM_CAP_SYNC_MMU);
|
||||
+ if (!s->sync_mmu) {
|
||||
+ qemu_balloon_inhibit(true);
|
||||
+ }
|
||||
|
||||
return 0;
|
||||
|
||||
diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
|
||||
index f456cea..4aab291 100644
|
||||
--- a/hw/virtio/virtio-balloon.c
|
||||
+++ b/hw/virtio/virtio-balloon.c
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "hw/mem/pc-dimm.h"
|
||||
#include "sysemu/balloon.h"
|
||||
#include "hw/virtio/virtio-balloon.h"
|
||||
-#include "sysemu/kvm.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-events-misc.h"
|
||||
@@ -36,8 +35,7 @@
|
||||
|
||||
static void balloon_page(void *addr, int deflate)
|
||||
{
|
||||
- if (!qemu_balloon_is_inhibited() && (!kvm_enabled() ||
|
||||
- kvm_has_sync_mmu())) {
|
||||
+ if (!qemu_balloon_is_inhibited()) {
|
||||
qemu_madvise(addr, BALLOON_PAGE_SIZE,
|
||||
deflate ? QEMU_MADV_WILLNEED : QEMU_MADV_DONTNEED);
|
||||
}
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,61 +0,0 @@
|
||||
From a4c22009a465ebe5fd0c09699e61ad0423b8849d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@redhat.com>
|
||||
Date: Fri, 6 Sep 2019 14:00:34 +0100
|
||||
Subject: [PATCH 07/22] Using ip_deq after m_free might read pointers from an
|
||||
allocation reuse.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
Message-id: <20190906140034.19722-2-philmd@redhat.com>
|
||||
Patchwork-id: 90306
|
||||
O-Subject: [RHEL-7.7 qemu-kvm-ma + RHEL-7.7 qemu-kvm-rhev + RHEL-8.1.0 qemu-kvm PATCH 1/1] Using ip_deq after m_free might read pointers from an allocation reuse.
|
||||
Bugzilla: 1749724
|
||||
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
||||
RH-Acked-by: Stefano Garzarella <sgarzare@redhat.com>
|
||||
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
|
||||
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||
|
||||
This would be difficult to exploit, but that is still related with
|
||||
CVE-2019-14378 which generates fragmented IP packets that would trigger this
|
||||
issue and at least produce a DoS.
|
||||
|
||||
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||
(cherry picked from libslirp commit c59279437eda91841b9d26079c70b8a540d41204)
|
||||
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
slirp/ip_input.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/slirp/ip_input.c b/slirp/ip_input.c
|
||||
index 07d8808..7cf0133 100644
|
||||
--- a/slirp/ip_input.c
|
||||
+++ b/slirp/ip_input.c
|
||||
@@ -300,6 +300,7 @@ ip_reass(Slirp *slirp, struct ip *ip, struct ipq *fp)
|
||||
*/
|
||||
while (q != (struct ipasfrag*)&fp->frag_link &&
|
||||
ip->ip_off + ip->ip_len > q->ipf_off) {
|
||||
+ struct ipasfrag *prev;
|
||||
i = (ip->ip_off + ip->ip_len) - q->ipf_off;
|
||||
if (i < q->ipf_len) {
|
||||
q->ipf_len -= i;
|
||||
@@ -307,9 +308,10 @@ ip_reass(Slirp *slirp, struct ip *ip, struct ipq *fp)
|
||||
m_adj(dtom(slirp, q), i);
|
||||
break;
|
||||
}
|
||||
+ prev = q;
|
||||
q = q->ipf_next;
|
||||
- m_free(dtom(slirp, q->ipf_prev));
|
||||
- ip_deq(q->ipf_prev);
|
||||
+ ip_deq(prev);
|
||||
+ m_free(dtom(slirp, prev));
|
||||
}
|
||||
|
||||
insert:
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,63 @@
|
||||
From ceb6d97674b8bc9a072db1be4167411bc0ee48d7 Mon Sep 17 00:00:00 2001
|
||||
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
|
||||
Date: Mon, 27 Jan 2020 19:02:02 +0100
|
||||
Subject: [PATCH 091/116] Virtiofsd: fix memory leak on fuse queueinfo
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
||||
Message-id: <20200127190227.40942-88-dgilbert@redhat.com>
|
||||
Patchwork-id: 93542
|
||||
O-Subject: [RHEL-AV-8.2 qemu-kvm PATCH 087/112] Virtiofsd: fix memory leak on fuse queueinfo
|
||||
Bugzilla: 1694164
|
||||
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
RH-Acked-by: Sergio Lopez Pascual <slp@redhat.com>
|
||||
|
||||
From: Liu Bo <bo.liu@linux.alibaba.com>
|
||||
|
||||
For fuse's queueinfo, both queueinfo array and queueinfos are allocated in
|
||||
fv_queue_set_started() but not cleaned up when the daemon process quits.
|
||||
|
||||
This fixes the leak in proper places.
|
||||
|
||||
Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com>
|
||||
Signed-off-by: Eric Ren <renzhen@linux.alibaba.com>
|
||||
Reviewed-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
|
||||
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
||||
(cherry picked from commit 740b0b700a6338a1cf60c26229651ac5f6724944)
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
tools/virtiofsd/fuse_virtio.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c
|
||||
index b7948de..fb8d6d1 100644
|
||||
--- a/tools/virtiofsd/fuse_virtio.c
|
||||
+++ b/tools/virtiofsd/fuse_virtio.c
|
||||
@@ -625,6 +625,8 @@ static void fv_queue_cleanup_thread(struct fv_VuDev *vud, int qidx)
|
||||
}
|
||||
close(ourqi->kill_fd);
|
||||
ourqi->kick_fd = -1;
|
||||
+ free(vud->qi[qidx]);
|
||||
+ vud->qi[qidx] = NULL;
|
||||
}
|
||||
|
||||
/* Callback from libvhost-user on start or stop of a queue */
|
||||
@@ -884,6 +886,12 @@ int virtio_session_mount(struct fuse_session *se)
|
||||
void virtio_session_close(struct fuse_session *se)
|
||||
{
|
||||
close(se->vu_socketfd);
|
||||
+
|
||||
+ if (!se->virtio_dev) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ free(se->virtio_dev->qi);
|
||||
free(se->virtio_dev);
|
||||
se->virtio_dev = NULL;
|
||||
}
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,113 +0,0 @@
|
||||
From 28a766b8099f5e745dbfc18834277039643214a3 Mon Sep 17 00:00:00 2001
|
||||
From: Laszlo Ersek <lersek@redhat.com>
|
||||
Date: Thu, 12 Sep 2019 13:04:58 +0100
|
||||
Subject: [PATCH 01/22] accel: use g_strsplit for parsing accelerator names
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: Laszlo Ersek <lersek@redhat.com>
|
||||
Message-id: <20190912130503.14094-2-lersek@redhat.com>
|
||||
Patchwork-id: 90437
|
||||
O-Subject: [RHEL-8.2.0 qemu-kvm PATCH 1/6] accel: use g_strsplit for parsing accelerator names
|
||||
Bugzilla: 1749022
|
||||
RH-Acked-by: Stefano Garzarella <sgarzare@redhat.com>
|
||||
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
|
||||
From: Daniel P. Berrangé <berrange@redhat.com>
|
||||
|
||||
Instead of re-using the get_opt_name() method from QemuOpts to split a
|
||||
string on ':', just use g_strsplit().
|
||||
|
||||
RHEL8 notes:
|
||||
|
||||
- Fix up upstream's obviously garbled UTF8 sequences in Dan's name (Author
|
||||
meta-datum, Signed-off-by tags).
|
||||
|
||||
- Harmless context difference due to downstream-only commit 8b53513834e6
|
||||
("Use kvm by default", 2018-04-24).
|
||||
|
||||
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
Message-Id: <20180416111743.8473-2-berrange@redhat.com>
|
||||
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
||||
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
(cherry picked from commit 20efc49ed625585809401d8293ad9267927a6a4a)
|
||||
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
accel/accel.c | 16 +++++++---------
|
||||
include/qemu/option.h | 1 -
|
||||
util/qemu-option.c | 3 ++-
|
||||
3 files changed, 9 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/accel/accel.c b/accel/accel.c
|
||||
index 5f3d73f..57390e5 100644
|
||||
--- a/accel/accel.c
|
||||
+++ b/accel/accel.c
|
||||
@@ -70,8 +70,8 @@ static int accel_init_machine(AccelClass *acc, MachineState *ms)
|
||||
|
||||
void configure_accelerator(MachineState *ms)
|
||||
{
|
||||
- const char *accel, *p;
|
||||
- char buf[10];
|
||||
+ const char *accel;
|
||||
+ char **accel_list, **tmp;
|
||||
int ret;
|
||||
bool accel_initialised = false;
|
||||
bool init_failed = false;
|
||||
@@ -83,13 +83,10 @@ void configure_accelerator(MachineState *ms)
|
||||
accel = "kvm:tcg";
|
||||
}
|
||||
|
||||
- p = accel;
|
||||
- while (!accel_initialised && *p != '\0') {
|
||||
- if (*p == ':') {
|
||||
- p++;
|
||||
- }
|
||||
- p = get_opt_name(buf, sizeof(buf), p, ':');
|
||||
- acc = accel_find(buf);
|
||||
+ accel_list = g_strsplit(accel, ":", 0);
|
||||
+
|
||||
+ for (tmp = accel_list; !accel_initialised && tmp && *tmp; tmp++) {
|
||||
+ acc = accel_find(*tmp);
|
||||
if (!acc) {
|
||||
continue;
|
||||
}
|
||||
@@ -107,6 +104,7 @@ void configure_accelerator(MachineState *ms)
|
||||
accel_initialised = true;
|
||||
}
|
||||
}
|
||||
+ g_strfreev(accel_list);
|
||||
|
||||
if (!accel_initialised) {
|
||||
if (!init_failed) {
|
||||
diff --git a/include/qemu/option.h b/include/qemu/option.h
|
||||
index 306fdb5..1cfe5cb 100644
|
||||
--- a/include/qemu/option.h
|
||||
+++ b/include/qemu/option.h
|
||||
@@ -28,7 +28,6 @@
|
||||
|
||||
#include "qemu/queue.h"
|
||||
|
||||
-const char *get_opt_name(char *buf, int buf_size, const char *p, char delim);
|
||||
const char *get_opt_value(char *buf, int buf_size, const char *p);
|
||||
|
||||
void parse_option_size(const char *name, const char *value,
|
||||
diff --git a/util/qemu-option.c b/util/qemu-option.c
|
||||
index 95e6cf4..a8db173 100644
|
||||
--- a/util/qemu-option.c
|
||||
+++ b/util/qemu-option.c
|
||||
@@ -49,7 +49,8 @@
|
||||
* The return value is the position of the delimiter/zero byte after the option
|
||||
* name in p.
|
||||
*/
|
||||
-const char *get_opt_name(char *buf, int buf_size, const char *p, char delim)
|
||||
+static const char *get_opt_name(char *buf, int buf_size, const char *p,
|
||||
+ char delim)
|
||||
{
|
||||
char *q;
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,45 +0,0 @@
|
||||
From 490c0121b8cd1de62776c18a0843a256b7eed3e3 Mon Sep 17 00:00:00 2001
|
||||
From: "plai@redhat.com" <plai@redhat.com>
|
||||
Date: Tue, 26 Nov 2019 19:36:51 +0000
|
||||
Subject: [PATCH 07/11] kvm: add call to qemu_add_opts() for -overcommit option
|
||||
|
||||
RH-Author: plai@redhat.com
|
||||
Message-id: <1574797015-32564-4-git-send-email-plai@redhat.com>
|
||||
Patchwork-id: 92694
|
||||
O-Subject: [RHEL8.2 qemu-kvm PATCH 3/7] kvm: add call to qemu_add_opts() for -overcommit option
|
||||
Bugzilla: 1634827
|
||||
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
|
||||
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
||||
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
|
||||
|
||||
From: Prasad Singamsetty <prasad.singamsetty@oracle.com>
|
||||
|
||||
qemu command fails to process -overcommit option. Add the missing
|
||||
call to qemu_add_opts() in vl.c.
|
||||
|
||||
Signed-off-by: Prasad Singamsetty <prasad.singamsetty@oracle.com>
|
||||
Message-Id: <20180815175704.105902-1-prasad.singamsetty@oracle.com>
|
||||
Reviewed-by: Mark Kanda <mark.kanda@oracle.com>
|
||||
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
||||
(cherry picked from commit 1fdd4748711a62d863744f42b958472509a6f202)
|
||||
Signed-off-by: Paul Lai <plai@redhat.com>
|
||||
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
||||
---
|
||||
vl.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/vl.c b/vl.c
|
||||
index 3cee95f..932c1cf 100644
|
||||
--- a/vl.c
|
||||
+++ b/vl.c
|
||||
@@ -3145,6 +3145,7 @@ int main(int argc, char **argv, char **envp)
|
||||
qemu_add_opts(&qemu_object_opts);
|
||||
qemu_add_opts(&qemu_tpmdev_opts);
|
||||
qemu_add_opts(&qemu_realtime_opts);
|
||||
+ qemu_add_opts(&qemu_overcommit_opts);
|
||||
qemu_add_opts(&qemu_msg_opts);
|
||||
qemu_add_opts(&qemu_name_opts);
|
||||
qemu_add_opts(&qemu_numa_opts);
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,46 +0,0 @@
|
||||
From 16e7c9997d4e9682095206ef3c07d713d263143c Mon Sep 17 00:00:00 2001
|
||||
From: John Snow <jsnow@redhat.com>
|
||||
Date: Tue, 10 Jul 2018 23:06:16 +0200
|
||||
Subject: [PATCH 207/268] ahci: don't schedule unnecessary BH
|
||||
|
||||
RH-Author: John Snow <jsnow@redhat.com>
|
||||
Message-id: <20180710230616.11000-4-jsnow@redhat.com>
|
||||
Patchwork-id: 81292
|
||||
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 3/3] ahci: don't schedule unnecessary BH
|
||||
Bugzilla: 1584914
|
||||
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
|
||||
The comment gives us a hint. *Maybe* we still have something to
|
||||
process. Well, why not check?
|
||||
|
||||
Signed-off-by: John Snow <jsnow@redhat.com>
|
||||
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
Reviewed-by: Jeff Cody <jcody@redhat.com>
|
||||
Message-id: 20180531004323.4611-4-jsnow@redhat.com
|
||||
Signed-off-by: John Snow <jsnow@redhat.com>
|
||||
(cherry picked from commit 42af312adef8afdae11d5f83d12a404b178dbda4)
|
||||
Signed-off-by: John Snow <jsnow@redhat.com>
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
hw/ide/ahci.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
|
||||
index a9558e4..380366b 100644
|
||||
--- a/hw/ide/ahci.c
|
||||
+++ b/hw/ide/ahci.c
|
||||
@@ -1427,8 +1427,7 @@ static void ahci_cmd_done(IDEDMA *dma)
|
||||
/* update d2h status */
|
||||
ahci_write_fis_d2h(ad);
|
||||
|
||||
- if (!ad->check_bh) {
|
||||
- /* maybe we still have something to process, check later */
|
||||
+ if (ad->port_regs.cmd_issue && !ad->check_bh) {
|
||||
ad->check_bh = qemu_bh_new(ahci_check_cmd_bh, ad);
|
||||
qemu_bh_schedule(ad->check_bh);
|
||||
}
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,81 +0,0 @@
|
||||
From 93623a848fba7757a0840b78d7b3874bab4d7a1b Mon Sep 17 00:00:00 2001
|
||||
From: John Snow <jsnow@redhat.com>
|
||||
Date: Tue, 10 Jul 2018 23:06:15 +0200
|
||||
Subject: [PATCH 206/268] ahci: fix PxCI register race
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: John Snow <jsnow@redhat.com>
|
||||
Message-id: <20180710230616.11000-3-jsnow@redhat.com>
|
||||
Patchwork-id: 81293
|
||||
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 2/3] ahci: fix PxCI register race
|
||||
Bugzilla: 1584914
|
||||
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
|
||||
Fixes: https://bugs.launchpad.net/qemu/+bug/1769189
|
||||
|
||||
AHCI presently signals completion prior to the PxCI register being
|
||||
cleared to indicate completion. If a guest driver attempts to issue
|
||||
a new command in its IRQ handler, it might be surprised to learn there
|
||||
is still a command pending.
|
||||
|
||||
In the case of Windows 10's boot driver, it will actually poll the IRQ
|
||||
register hoping to find out when the command is done running -- which
|
||||
will never happen, as there isn't a command running.
|
||||
|
||||
Fix this: clear PxCI in ahci_cmd_done and not in the asynchronous BH.
|
||||
Because it now runs synchronously, we don't need to check if the command
|
||||
is actually done by spying on the ATA registers. We know it's done.
|
||||
|
||||
CC: qemu-stable <qemu-stable@nongnu.org>
|
||||
Reported-by: François Guerraz <kubrick@fgv6.net>
|
||||
Tested-by: Bruce Rogers <brogers@suse.com>
|
||||
Signed-off-by: John Snow <jsnow@redhat.com>
|
||||
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
Reviewed-by: Jeff Cody <jcody@redhat.com>
|
||||
Message-id: 20180531004323.4611-3-jsnow@redhat.com
|
||||
Signed-off-by: John Snow <jsnow@redhat.com>
|
||||
(cherry picked from commit 5694c7eacce6b263ad7497cc1bb76aad746cfd4e)
|
||||
Signed-off-by: John Snow <jsnow@redhat.com>
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
hw/ide/ahci.c | 13 ++++++-------
|
||||
1 file changed, 6 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
|
||||
index b7a6f68..a9558e4 100644
|
||||
--- a/hw/ide/ahci.c
|
||||
+++ b/hw/ide/ahci.c
|
||||
@@ -532,13 +532,6 @@ static void ahci_check_cmd_bh(void *opaque)
|
||||
qemu_bh_delete(ad->check_bh);
|
||||
ad->check_bh = NULL;
|
||||
|
||||
- if ((ad->busy_slot != -1) &&
|
||||
- !(ad->port.ifs[0].status & (BUSY_STAT|DRQ_STAT))) {
|
||||
- /* no longer busy */
|
||||
- ad->port_regs.cmd_issue &= ~(1 << ad->busy_slot);
|
||||
- ad->busy_slot = -1;
|
||||
- }
|
||||
-
|
||||
check_cmd(ad->hba, ad->port_no);
|
||||
}
|
||||
|
||||
@@ -1425,6 +1418,12 @@ static void ahci_cmd_done(IDEDMA *dma)
|
||||
|
||||
trace_ahci_cmd_done(ad->hba, ad->port_no);
|
||||
|
||||
+ /* no longer busy */
|
||||
+ if (ad->busy_slot != -1) {
|
||||
+ ad->port_regs.cmd_issue &= ~(1 << ad->busy_slot);
|
||||
+ ad->busy_slot = -1;
|
||||
+ }
|
||||
+
|
||||
/* update d2h status */
|
||||
ahci_write_fis_d2h(ad);
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user