Commit c5f2d56
KVM: x86/mmu: Add helper to convert root hpa to shadow page
Add a dedicated helper for converting a root hpa to a shadow page in
anticipation of using a "dummy" root to handle the scenario where KVM
needs to load a valid shadow root (from hardware's perspective), but
the guest doesn't have a visible root to shadow. Similar to PAE roots,
the dummy root won't have an associated kvm_mmu_page and will need special
handling when finding a shadow page given a root.
Opportunistically retrieve the root shadow page in kvm_mmu_sync_roots()
*after* verifying the root is unsync (the dummy root can never be unsync).
Link: https://lore.kernel.org/r/20230729005200.1057358-2-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>1 parent 09c8726 commit c5f2d56
3 files changed
Lines changed: 23 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3543 | 3543 | | |
3544 | 3544 | | |
3545 | 3545 | | |
3546 | | - | |
3547 | | - | |
3548 | | - | |
3549 | | - | |
3550 | | - | |
| 3546 | + | |
3551 | 3547 | | |
3552 | 3548 | | |
3553 | 3549 | | |
| |||
3593 | 3589 | | |
3594 | 3590 | | |
3595 | 3591 | | |
3596 | | - | |
| 3592 | + | |
3597 | 3593 | | |
3598 | 3594 | | |
3599 | 3595 | | |
| |||
3617 | 3613 | | |
3618 | 3614 | | |
3619 | 3615 | | |
| 3616 | + | |
3620 | 3617 | | |
3621 | 3618 | | |
3622 | 3619 | | |
| |||
3631 | 3628 | | |
3632 | 3629 | | |
3633 | 3630 | | |
3634 | | - | |
3635 | | - | |
| 3631 | + | |
| 3632 | + | |
3636 | 3633 | | |
3637 | 3634 | | |
3638 | 3635 | | |
| |||
3987 | 3984 | | |
3988 | 3985 | | |
3989 | 3986 | | |
3990 | | - | |
| 3987 | + | |
3991 | 3988 | | |
3992 | 3989 | | |
3993 | 3990 | | |
| |||
4017 | 4014 | | |
4018 | 4015 | | |
4019 | 4016 | | |
4020 | | - | |
4021 | 4017 | | |
4022 | 4018 | | |
4023 | 4019 | | |
4024 | 4020 | | |
| 4021 | + | |
| 4022 | + | |
4025 | 4023 | | |
4026 | 4024 | | |
4027 | 4025 | | |
| |||
4351 | 4349 | | |
4352 | 4350 | | |
4353 | 4351 | | |
4354 | | - | |
| 4352 | + | |
4355 | 4353 | | |
4356 | 4354 | | |
4357 | 4355 | | |
| |||
4531 | 4529 | | |
4532 | 4530 | | |
4533 | 4531 | | |
4534 | | - | |
| 4532 | + | |
4535 | 4533 | | |
4536 | 4534 | | |
4537 | 4535 | | |
| |||
4605 | 4603 | | |
4606 | 4604 | | |
4607 | 4605 | | |
4608 | | - | |
| 4606 | + | |
4609 | 4607 | | |
4610 | 4608 | | |
4611 | 4609 | | |
| |||
4653 | 4651 | | |
4654 | 4652 | | |
4655 | 4653 | | |
4656 | | - | |
| 4654 | + | |
4657 | 4655 | | |
4658 | 4656 | | |
4659 | 4657 | | |
| |||
5508 | 5506 | | |
5509 | 5507 | | |
5510 | 5508 | | |
5511 | | - | |
| 5509 | + | |
5512 | 5510 | | |
5513 | 5511 | | |
5514 | 5512 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
239 | 248 | | |
240 | 249 | | |
241 | 250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
689 | 689 | | |
690 | 690 | | |
691 | 691 | | |
692 | | - | |
| 692 | + | |
693 | 693 | | |
694 | 694 | | |
695 | 695 | | |
| |||
0 commit comments