Commit 725d410
committed
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull kvm updates from Paolo Bonzini:
"The bulk of the changes here is a largish change to guest_memfd,
delaying the clearing and encryption of guest-private pages until they
are actually added to guest page tables. This started as "let's make
it impossible to misuse the API" for SEV-SNP; but then it ballooned a
bit.
The new logic is generally simpler and more ready for hugepage support
in guest_memfd.
Summary:
- fix latent bug in how usage of large pages is determined for
confidential VMs
- fix "underline too short" in docs
- eliminate log spam from limited APIC timer periods
- disallow pre-faulting of memory before SEV-SNP VMs are initialized
- delay clearing and encrypting private memory until it is added to
guest page tables
- this change also enables another small cleanup: the checks in
SNP_LAUNCH_UPDATE that limit it to non-populated, private pages can
now be moved in the common kvm_gmem_populate() function
- fix compilation error that the RISC-V merge introduced in selftests"
* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
KVM: x86/mmu: fix determination of max NPT mapping level for private pages
KVM: riscv: selftests: Fix compile error
KVM: guest_memfd: abstract how prepared folios are recorded
KVM: guest_memfd: let kvm_gmem_populate() operate only on private gfns
KVM: extend kvm_range_has_memory_attributes() to check subset of attributes
KVM: cleanup and add shortcuts to kvm_range_has_memory_attributes()
KVM: guest_memfd: move check for already-populated page to common code
KVM: remove kvm_arch_gmem_prepare_needed()
KVM: guest_memfd: make kvm_gmem_prepare_folio() operate on a single struct kvm
KVM: guest_memfd: delay kvm_gmem_prepare_folio() until the memory is passed to the guest
KVM: guest_memfd: return locked folio from __kvm_gmem_get_pfn
KVM: rename CONFIG_HAVE_KVM_GMEM_* to CONFIG_HAVE_KVM_ARCH_GMEM_*
KVM: guest_memfd: do not go through struct page
KVM: guest_memfd: delay folio_mark_uptodate() until after successful preparation
KVM: guest_memfd: return folio from __kvm_gmem_get_pfn()
KVM: x86: disallow pre-fault for SNP VMs before initialization
KVM: Documentation: Fix title underline too short warning
KVM: x86: Eliminate log spam from limited APIC timer periodsFile tree
13 files changed
+202
-147
lines changed- Documentation/virt/kvm
- arch/x86
- include/asm
- kvm
- mmu
- svm
- include/linux
- tools/testing/selftests/kvm/riscv
- virt/kvm
13 files changed
+202
-147
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6368 | 6368 | | |
6369 | 6369 | | |
6370 | 6370 | | |
6371 | | - | |
| 6371 | + | |
6372 | 6372 | | |
6373 | 6373 | | |
6374 | 6374 | | |
| |||
6405 | 6405 | | |
6406 | 6406 | | |
6407 | 6407 | | |
| 6408 | + | |
| 6409 | + | |
| 6410 | + | |
| 6411 | + | |
| 6412 | + | |
| 6413 | + | |
6408 | 6414 | | |
6409 | 6415 | | |
6410 | 6416 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1305 | 1305 | | |
1306 | 1306 | | |
1307 | 1307 | | |
| 1308 | + | |
1308 | 1309 | | |
1309 | 1310 | | |
1310 | 1311 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
145 | | - | |
| 144 | + | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1743 | 1743 | | |
1744 | 1744 | | |
1745 | 1745 | | |
1746 | | - | |
| 1746 | + | |
1747 | 1747 | | |
1748 | 1748 | | |
1749 | 1749 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4335 | 4335 | | |
4336 | 4336 | | |
4337 | 4337 | | |
4338 | | - | |
| 4338 | + | |
4339 | 4339 | | |
4340 | 4340 | | |
4341 | 4341 | | |
| |||
4743 | 4743 | | |
4744 | 4744 | | |
4745 | 4745 | | |
| 4746 | + | |
| 4747 | + | |
| 4748 | + | |
4746 | 4749 | | |
4747 | 4750 | | |
4748 | 4751 | | |
| |||
7510 | 7513 | | |
7511 | 7514 | | |
7512 | 7515 | | |
7513 | | - | |
| 7516 | + | |
7514 | 7517 | | |
7515 | 7518 | | |
7516 | 7519 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2279 | 2279 | | |
2280 | 2280 | | |
2281 | 2281 | | |
2282 | | - | |
2283 | | - | |
2284 | | - | |
2285 | | - | |
2286 | | - | |
2287 | | - | |
2288 | | - | |
2289 | 2282 | | |
2290 | 2283 | | |
2291 | 2284 | | |
2292 | 2285 | | |
2293 | | - | |
| 2286 | + | |
2294 | 2287 | | |
2295 | 2288 | | |
2296 | 2289 | | |
| |||
2549 | 2542 | | |
2550 | 2543 | | |
2551 | 2544 | | |
| 2545 | + | |
| 2546 | + | |
| 2547 | + | |
| 2548 | + | |
| 2549 | + | |
| 2550 | + | |
| 2551 | + | |
| 2552 | + | |
2552 | 2553 | | |
2553 | 2554 | | |
2554 | 2555 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4949 | 4949 | | |
4950 | 4950 | | |
4951 | 4951 | | |
| 4952 | + | |
4952 | 4953 | | |
4953 | 4954 | | |
4954 | 4955 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12646 | 12646 | | |
12647 | 12647 | | |
12648 | 12648 | | |
| 12649 | + | |
| 12650 | + | |
| 12651 | + | |
12649 | 12652 | | |
12650 | 12653 | | |
12651 | 12654 | | |
| |||
13641 | 13644 | | |
13642 | 13645 | | |
13643 | 13646 | | |
13644 | | - | |
13645 | | - | |
13646 | | - | |
13647 | | - | |
13648 | | - | |
13649 | | - | |
| 13647 | + | |
13650 | 13648 | | |
13651 | 13649 | | |
13652 | 13650 | | |
13653 | 13651 | | |
13654 | 13652 | | |
13655 | 13653 | | |
13656 | | - | |
| 13654 | + | |
13657 | 13655 | | |
13658 | 13656 | | |
13659 | 13657 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2414 | 2414 | | |
2415 | 2415 | | |
2416 | 2416 | | |
2417 | | - | |
| 2417 | + | |
2418 | 2418 | | |
2419 | 2419 | | |
2420 | 2420 | | |
| |||
2445 | 2445 | | |
2446 | 2446 | | |
2447 | 2447 | | |
2448 | | - | |
| 2448 | + | |
2449 | 2449 | | |
2450 | | - | |
2451 | 2450 | | |
2452 | 2451 | | |
| 2452 | + | |
2453 | 2453 | | |
2454 | 2454 | | |
2455 | 2455 | | |
| |||
2476 | 2476 | | |
2477 | 2477 | | |
2478 | 2478 | | |
| 2479 | + | |
2479 | 2480 | | |
2480 | | - | |
| 2481 | + | |
2481 | 2482 | | |
2482 | 2483 | | |
2483 | 2484 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
961 | 961 | | |
962 | 962 | | |
963 | 963 | | |
964 | | - | |
965 | | - | |
966 | | - | |
967 | | - | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
968 | 968 | | |
969 | 969 | | |
970 | 970 | | |
| |||
0 commit comments