question about nested ntp
Hi Joerg,
I have a question about nested ntp code. Comment in init_kvm_nested_mmu() function says "arch.mmu.gva_to_gpa translates l2_gva to l1_gpa". If I read the code correctly at the time of nested guest execution arch.mmu.gva_to_gpa() points to one of paging*_gva_to_gpa() variants. The function calls walk_addr() with provided address which should be l2_gva according to the comment. Now when NPF happens while nested guest runs arch.mmu.page_fault() is called which translates to call to one of paging*_page_fault() variants. paging*_page_fault() calls walk_addr() too, but now it gets l2_gpa as a parameter since during NPF svm->vmcb->control.exit_info_2 will not point to l2_gva, but l2_gpa instead. Do I miss something here?
--
Gleb.
Hi Gleb,
Quoted 11 lines · Gleb Natapov
I have a question about nested ntp code. Comment in
init_kvm_nested_mmu()function says "arch.mmu.gva_to_gpa translatesl2_gvatol1_gpa". If I read the code correctly at the time of nested guest executionarch.mmu.gva_to_gpa()points to one of paging*_gva_to_gpa() variants. The function callswalk_addr()with provided address which should bel2_gvaaccording to the comment. Now when NPF happens while nested guest runsarch.mmu.page_fault()is called which translates to call to one of paging*_page_fault() variants. paging*_page_fault() callswalk_addr()too, but now it getsl2_gpaas a parameter since during NPFsvm->vmcb->control.exit_info_2will not point tol2_gva, butl2_gpainstead. Do I miss something here?
No, the comment is wrong. The comment actually was right in -v1 of the patch-series. But I changed that in -v2 and forgot the update/remove the comment. Thanks for mentioning that :-)
Joerg
Signature · 5 lines
AMD Operating System Research Center Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach General Managers: Alberto Bozzo, Andrew Bowd Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632
Quoted 15 lines · Joerg
Hi Gleb,
Quoted 11 lines · Gleb Natapov
I have a question about nested ntp code. Comment in
init_kvm_nested_mmu()function says "arch.mmu.gva_to_gpa translatesl2_gvatol1_gpa". If I read the code correctly at the time of nested guest executionarch.mmu.gva_to_gpa()points to one of paging*_gva_to_gpa() variants. The function callswalk_addr()with provided address which should bel2_gvaaccording to the comment. Now when NPF happens while nested guest runsarch.mmu.page_fault()is called which translates to call to one of paging*_page_fault() variants. paging*_page_fault() callswalk_addr()too, but now it getsl2_gpaas a parameter since during NPFsvm->vmcb->control.exit_info_2will not point tol2_gva, butl2_gpainstead. Do I miss something here?
Quoted 4 lines
No, the comment is wrong. The comment actually was right in -v1 of the patch-series. But I changed that in -v2 and forgot the update/remove the comment. Thanks for mentioning that :-)
Ah, good. I thought I am going crazy.
--
Gleb.