Go to file
hanliyang 2fb5abf978 KVM: SVM: Force flush caches before reboot CSV guest
Upstream: no

For memory encrypted guest, its pages' encrypt status will changed at
runtime. When user reboot the guest, the pages' encrypt status during
last boot were ignored. So during the boot flow of reboot, there may
be 2 versions of memory data lies in cache as follows:

                  +--------+        |              |
                  |        |        +--------------+  --+
                  |        |        |              |     \
                  |________|        |              |      \
cacheline for  -> |________| <-+    |              |       \
 pa1(c=0)         |        |    \   |______________|        \
                  |        |     \_ 64 bytes aligned <- pa1  \
                  |        |      _ |______________|           4K
                  |        |     /  |              |           page
cacheline for     |________|    /   |              |         /
 pa1(c=1)      -> |________| <-+    |              |        /
                  |        |        |              |       /
                  |        |        |              |      /
                  |        |        |              |     /
                  |        |        +--------------+  --+
                  |        |        |              |

If the older version cache was flushed after that of newer version, and
guest read the memory again, then it will get corrupted data and may
lead to crash.

In this change, for any memory encrypted guest, the cache is forcibly
flushed to memory before the next boot flow, which ensures that memory
access is up-to-date.

Signed-off-by: hanliyang <hanliyang@hygon.cn>
2024-05-06 11:39:20 +08:00
Documentation driver/virt/coco: Add HYGON CSV Guest dirver. 2024-04-29 15:34:50 +08:00
LICENSES LICENSES: Add the copyleft-next-0.3.1 license 2022-11-08 15:44:01 +01:00
arch KVM: SVM: Force flush caches before reboot CSV guest 2024-05-06 11:39:20 +08:00
block Merge linux 6.6.24 2024-04-13 14:08:38 +08:00
certs certs: Reference revocation list for all keyrings 2023-08-17 20:12:41 +00:00
crypto crypto: jitter - fix CRYPTO_JITTERENTROPY help text 2024-03-26 18:19:52 -04:00
dist dist: release 6.6.26-1 2024-04-17 11:35:28 +08:00
drivers crypto: ccp: Add another mailbox interrupt support for PSP sending command to X86 2024-04-29 20:40:17 +08:00
fs SUNRPC: discard sv_refcnt, and svc_get/svc_put 2024-04-15 11:15:11 +08:00
include KVM: x86: Introduce control_{pre,post}_system_reset ioctl interfaces 2024-05-06 11:39:12 +08:00
init Merge linux 6.6.24 2024-04-13 14:08:38 +08:00
io_uring io_uring/kbuf: hold io_buffer_list reference over mmap 2024-04-10 16:36:03 +02:00
ipc Add x86 shadow stack support 2023-08-31 12:20:12 -07:00
kernel sched/eevdf: fix soft lockup while __pick_eevdf failed 2024-04-13 14:17:21 +00:00
lib Merge linux 6.6.24 2024-04-13 14:08:38 +08:00
mm Merge linux 6.6.26 2024-04-13 17:34:05 +08:00
net SUNRPC: discard sv_refcnt, and svc_get/svc_put 2024-04-15 11:15:11 +08:00
rust rust: upgrade to Rust 1.73.0 2024-02-16 19:10:43 +01:00
samples work around gcc bugs with 'asm goto' with outputs 2024-02-23 09:24:47 +01:00
scripts Merge linux 6.6.26 2024-04-13 17:34:05 +08:00
security Merge linux 6.6.26 2024-04-13 17:34:05 +08:00
sound Merge linux 6.6.26 2024-04-13 17:34:05 +08:00
tools Merge linux 6.6.26 2024-04-13 17:34:05 +08:00
usr initramfs: Encode dependency on KBUILD_BUILD_TIMESTAMP 2023-06-06 17:54:49 +09:00
virt KVM: Always flush async #PF workqueue when vCPU is being destroyed 2024-04-03 15:28:18 +02:00
.clang-format iommu: Add for_each_group_device() 2023-05-23 08:15:51 +02:00
.cocciconfig
.get_maintainer.ignore get_maintainer: add Alan to .get_maintainer.ignore 2022-08-20 15:17:44 -07:00
.gitattributes dist: initial support 2023-12-12 15:56:34 +08:00
.gitignore dist: initial support 2023-12-12 15:56:34 +08:00
.mailmap 20 hotfixes. 12 are cc:stable and the remainder address post-6.5 issues 2023-10-24 09:52:16 -10:00
.rustfmt.toml rust: add `.rustfmt.toml` 2022-09-28 09:02:20 +02:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS USB: Remove Wireless USB and UWB documentation 2023-08-09 14:17:32 +02:00
Kbuild Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00
Kconfig tkernel: netatop: add netatop module in kernel/tkernel/ 2023-12-12 15:56:47 +08:00
MAINTAINERS Loongarch: support loongarch and add kvm support for loongarch 2024-04-12 20:51:12 +08:00
Makefile Merge linux 6.6.26 2024-04-13 17:34:05 +08:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00
config-readme Makefile, dist: add "make tencentconfig" support 2024-03-04 13:25:26 +08:00

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.