Sorry, I have found some useful APIs in kvm_host.h, but I am still unable to get the correct result. Here are my tests. First I allocate a page in Guest OS, with API "u64 gva=__get_free_pages()". I also get the PA of the page by using the instruction "AT S1E1R"(maybe it is called "gpa"). Next, I generate an exception, which will be caught by KVM, I also pass the PA as a parameter. Then I use pfn_to_hpa(gfn_to_pfn(vcpu->kvm,gpa>>PAGE_SHIFT)) to get the hpa, but I only get 0. Is there something wrong? Sincerely, Wang Chenxu Chenxu Wang <irakatz51@xxxxxxxxx> 于2021年11月9日周二 上午12:42写道: > > Hi all, > I am trying to translate a Virtual Address in Guest OS to the Physical > Address in Host OS. Currently, I enable the VHE extension, so the Host > is in EL2. I also enable EL2 Stage-1 translation and EL1 Stage-2 > translation. > > In my experiment, I first get the VA in Guest OS. Then, I generate an > exception that will be caught by Host KVM, and send the value as a > parameter to the Host. > In KVM, I want to use the "AT S12E1R" for this value, but it failed. > > So, does KVM implement some API of it? > > Sincerely, > Wang Chenxu _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm