Commit f705de1
committed
KVM: x86: Initialize allow_smaller_maxphyaddr earlier in setup
Initialize allow_smaller_maxphyaddr during hardware setup as soon as KVM
knows whether or not TDP will be utilized. To avoid having to teach KVM's
emulator all about CET, KVM's upcoming CET virtualization support will be
mutually exclusive with allow_smaller_maxphyaddr, i.e. will disable SHSTK
and IBT if allow_smaller_maxphyaddr is enabled.
In general, allow_smaller_maxphyaddr should be initialized as soon as
possible since it's globally visible while its only input is whether or
not EPT/NPT is enabled. I.e. there's effectively zero risk of setting
allow_smaller_maxphyaddr too early, and substantial risk of setting it
too late.
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20250922184743.1745778-1-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent 1f6f68f commit f705de1
2 files changed
Lines changed: 23 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5370 | 5370 | | |
5371 | 5371 | | |
5372 | 5372 | | |
| 5373 | + | |
| 5374 | + | |
| 5375 | + | |
| 5376 | + | |
| 5377 | + | |
| 5378 | + | |
| 5379 | + | |
| 5380 | + | |
| 5381 | + | |
| 5382 | + | |
| 5383 | + | |
| 5384 | + | |
| 5385 | + | |
| 5386 | + | |
| 5387 | + | |
5373 | 5388 | | |
5374 | 5389 | | |
5375 | 5390 | | |
| |||
5449 | 5464 | | |
5450 | 5465 | | |
5451 | 5466 | | |
5452 | | - | |
5453 | | - | |
5454 | | - | |
5455 | | - | |
5456 | | - | |
5457 | | - | |
5458 | | - | |
5459 | | - | |
5460 | | - | |
5461 | | - | |
5462 | | - | |
5463 | | - | |
5464 | | - | |
5465 | | - | |
5466 | | - | |
5467 | 5467 | | |
5468 | 5468 | | |
5469 | 5469 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8436 | 8436 | | |
8437 | 8437 | | |
8438 | 8438 | | |
| 8439 | + | |
| 8440 | + | |
| 8441 | + | |
| 8442 | + | |
| 8443 | + | |
| 8444 | + | |
| 8445 | + | |
| 8446 | + | |
8439 | 8447 | | |
8440 | 8448 | | |
8441 | 8449 | | |
| |||
8665 | 8673 | | |
8666 | 8674 | | |
8667 | 8675 | | |
8668 | | - | |
8669 | | - | |
8670 | | - | |
8671 | | - | |
8672 | | - | |
8673 | | - | |
8674 | | - | |
8675 | | - | |
8676 | 8676 | | |
8677 | 8677 | | |
8678 | 8678 | | |
| |||
0 commit comments