Commit 41f6710
committed
KVM: x86: Manually clear MPX state only on INIT
Don't manually clear/zero MPX state on RESET, as the guest FPU state is
zero allocated and KVM only does RESET during vCPU creation, i.e. the
relevant state is guaranteed to be all zeroes.
Opportunistically move the relevant code into a helper in anticipation of
adding support for CET shadow stacks, which also has state that is zeroed
on INIT.
Signed-off-by: Yang Weijiang <weijiang.yang@intel.com>
Tested-by: Mathias Krause <minipli@grsecurity.net>
Tested-by: John Allen <john.allen@amd.com>
Signed-off-by: Chao Gao <chao.gao@intel.com>
Tested-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
Link: https://lore.kernel.org/r/20250812025606.74625-5-chao.gao@intel.com
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent c2aa58b commit 41f6710
1 file changed
Lines changed: 30 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12398 | 12398 | | |
12399 | 12399 | | |
12400 | 12400 | | |
| 12401 | + | |
| 12402 | + | |
| 12403 | + | |
| 12404 | + | |
| 12405 | + | |
| 12406 | + | |
| 12407 | + | |
| 12408 | + | |
| 12409 | + | |
| 12410 | + | |
| 12411 | + | |
| 12412 | + | |
| 12413 | + | |
| 12414 | + | |
| 12415 | + | |
| 12416 | + | |
| 12417 | + | |
| 12418 | + | |
| 12419 | + | |
| 12420 | + | |
| 12421 | + | |
| 12422 | + | |
| 12423 | + | |
| 12424 | + | |
| 12425 | + | |
| 12426 | + | |
| 12427 | + | |
| 12428 | + | |
| 12429 | + | |
12401 | 12430 | | |
12402 | 12431 | | |
12403 | 12432 | | |
| |||
12455 | 12484 | | |
12456 | 12485 | | |
12457 | 12486 | | |
12458 | | - | |
12459 | | - | |
12460 | | - | |
12461 | | - | |
12462 | | - | |
12463 | | - | |
12464 | | - | |
12465 | | - | |
12466 | | - | |
12467 | | - | |
12468 | | - | |
12469 | | - | |
12470 | | - | |
12471 | | - | |
12472 | | - | |
12473 | | - | |
| 12487 | + | |
12474 | 12488 | | |
12475 | 12489 | | |
12476 | 12490 | | |
| |||
0 commit comments