提交 0af2593b 编写于 作者: D David Matlack 提交者: Paolo Bonzini

kvm: x86: fix comment about {mmu,nested_mmu}.gva_to_gpa

The comment had the meaning of mmu.gva_to_gpa and nested_mmu.gva_to_gpa
swapped. Fix that, and also add some details describing how each translation
works.
Signed-off-by: NDavid Matlack <dmatlack@google.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 def840ed
...@@ -4024,10 +4024,12 @@ static void init_kvm_nested_mmu(struct kvm_vcpu *vcpu) ...@@ -4024,10 +4024,12 @@ static void init_kvm_nested_mmu(struct kvm_vcpu *vcpu)
g_context->inject_page_fault = kvm_inject_page_fault; g_context->inject_page_fault = kvm_inject_page_fault;
/* /*
* Note that arch.mmu.gva_to_gpa translates l2_gva to l1_gpa. The * Note that arch.mmu.gva_to_gpa translates l2_gpa to l1_gpa using
* translation of l2_gpa to l1_gpa addresses is done using the * L1's nested page tables (e.g. EPT12). The nested translation
* arch.nested_mmu.gva_to_gpa function. Basically the gva_to_gpa * of l2_gva to l1_gpa is done by arch.nested_mmu.gva_to_gpa using
* functions between mmu and nested_mmu are swapped. * L2's page tables as the first level of translation and L1's
* nested page tables as the second level of translation. Basically
* the gva_to_gpa functions between mmu and nested_mmu are swapped.
*/ */
if (!is_paging(vcpu)) { if (!is_paging(vcpu)) {
g_context->nx = false; g_context->nx = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册