diff options
| author | Brijesh Singh <brijesh.singh@amd.com> | 2022-06-08 19:10:07 +0000 |
|---|---|---|
| committer | Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> | 2022-07-13 17:27:28 -0500 |
| commit | 773f7a3d05b8a28da20c52164a6af58fe5d18fde (patch) | |
| tree | 816c0d14d2a7bd6a584b4c8596e0c887ce626b71 /scripts/objdiff | |
| parent | 84517f3a166667ec554ff8e7ccdb3c7a95abac07 (diff) | |
| download | cachepc-linux-773f7a3d05b8a28da20c52164a6af58fe5d18fde.tar.gz cachepc-linux-773f7a3d05b8a28da20c52164a6af58fe5d18fde.zip | |
KVM: x86: Introduce kvm_mmu_get_tdp_walk() for SEV-SNP use
The SEV-SNP VMs may call the page state change VMGEXIT to add the GPA
as private or shared in the RMP table. The page state change VMGEXIT
will contain the RMP page level to be used in the RMP entry. If the
page level between the TDP and RMP does not match then, it will result
in nested-page-fault (RMP violation).
The SEV-SNP VMGEXIT handler will use the kvm_mmu_get_tdp_walk() to get
the current page-level in the TDP for the given GPA and calculate a
workable page level. If a GPA is mapped as a 4K-page in the TDP, but
the guest requested to add the GPA as a 2M in the RMP entry then the
2M request will be broken into 4K-pages to keep the RMP and TDP
page-levels in sync.
TDP SPTEs are RCU protected so need to put kvm_mmu_get_tdp_walk() in RCU
read-side critical section by using walk_shadow_page_lockless_begin() and
walk_lockless_shadow_page_lockless_end(). This fixes the
"suspicious RCU usage" message seen with lockdep kernel build.
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off by: Ashish Kalra <ashish.kalra@amd.com>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions
