Go to file
Eric Auger 8595b993fb KVM: Don't enable hardware after a restart/shutdown is initiated
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2203922

Reject hardware enabling, i.e. VM creation, if a restart/shutdown has
been initiated to avoid re-enabling hardware between kvm_reboot() and
machine_{halt,power_off,restart}().  The restart case is especially
problematic (for x86) as enabling VMX (or clearing GIF in KVM_RUN on
SVM) blocks INIT, which results in the restart/reboot hanging as BIOS
is unable to wake and rendezvous with APs.

Note, this bug, and the original issue that motivated the addition of
kvm_reboot(), is effectively limited to a forced reboot, e.g. `reboot -f`.
In a "normal" reboot, userspace will gracefully teardown userspace before
triggering the kernel reboot (modulo bugs, errors, etc), i.e. any process
that might do ioctl(KVM_CREATE_VM) is long gone.

Fixes: 8e1c18157d ("KVM: VMX: Disable VMX when system shutdown")
Signed-off-by: Sean Christopherson <seanjc@google.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Message-Id: <20230512233127.804012-3-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit e0ceec221f62deb5d6c32c0327030028d3db5f27)
Signed-off-by: Eric Auger <eric.auger@redhat.com>
2023-07-04 11:32:53 -04:00
Documentation KVM: arm64: Expose SMC/HVC width to userspace 2023-07-04 09:14:28 -04:00
LICENSES
arch arm64/sysreg: clean up some inconsistent indenting 2023-07-04 09:19:41 -04:00
block Merge: block: two block layer core fixes and one null_blk fix 2023-06-21 03:41:26 -04:00
certs
crypto crypto: jitter - correct health test during initialization 2023-06-12 15:31:37 +02:00
drivers KVM: arm64: PMU: Don't overwrite PMUSERENR with vcpu loaded 2023-07-04 09:14:29 -04:00
fs Merge: nfsd: move init of percpu reply_cache_stats counters back to nfsd_init_net 2023-06-30 14:03:01 +02:00
include perf/core: Drop __weak attribute from arch_perf_update_userpage() prototype 2023-07-04 09:14:30 -04:00
init Merge: mm/demotion: Memory tiers and demotion 2023-05-16 11:49:50 +02:00
io_uring RHEL: io_uring: mark tech preview 2023-05-05 15:26:34 -04:00
ipc ipc/shm: call underlying open/close vm_ops 2023-06-14 15:11:04 -06:00
kernel Merge: bpf, xdp: update to 6.3 2023-06-28 07:52:45 +02:00
lib kunit: Introduce KUNIT_EXPECT_MEMEQ and KUNIT_EXPECT_MEMNEQ macros 2023-06-19 13:48:41 +03:00
mm Merge: KVM: Rebase KVM common and x86 to upstream 6.3 2023-06-30 14:03:00 +02:00
net Merge: NFS/NFSD/SUNRPC fixes rollup for RHEL 9.3 2023-06-30 14:02:58 +02:00
redhat [redhat] kernel-5.14.0-334.el9 2023-06-30 14:03:13 +02:00
samples samples/bpf: Use bpf_{btf,link,map,prog}_get_info_by_fd() 2023-06-13 22:45:39 +02:00
scripts Merge: KVM: Rebase KVM common and x86 to upstream 6.3 2023-06-30 14:03:00 +02:00
security Merge: selinux: Implement mptcp_add_subflow hook 2023-06-12 14:37:09 +02:00
sound Merge: Update RHEL9.3's USB/Thunderbolt to linux_v6.2 2023-05-23 20:57:06 +02:00
tools KVM: selftests: arm64: Fix ttbr0_el1 encoding for PA bits > 48 2023-07-04 09:18:18 -04:00
usr
virt KVM: Don't enable hardware after a restart/shutdown is initiated 2023-07-04 11:32:53 -04:00
.clang-format
.cocciconfig
.get_maintainer.conf
.get_maintainer.ignore
.gitattributes
.gitignore
.gitlab-ci.yml
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
Kconfig.redhat
MAINTAINERS Merge: arm64: Update nvidia tegra-related devicetree files 2023-06-28 07:52:44 +02:00
Makefile Merge: DRM backport 9.3 from v6.3 2023-06-28 07:52:43 +02:00
Makefile.rhelver [redhat] kernel-5.14.0-334.el9 2023-06-30 14:03:13 +02:00
README
makefile

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.