lkml.org 
[lkml]   [2018]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 03/12] X86/nVMX: Update the PML table without mapping and unmapping the page
From
Date
On 15/04/2018 23:53, KarimAllah Ahmed wrote:
> + dst = vmcs12->pml_address + sizeof(u64) * vmcs12->guest_pml_index;
>
> - page = kvm_vcpu_gpa_to_page(vcpu, vmcs12->pml_address);
> - if (is_error_page(page))
> + if (kvm_write_guest_page(vcpu->kvm, gpa_to_gfn(dst), &gpa,
> + offset_in_page(dst), sizeof(gpa)))

If you want to use kvm_write_guest_page, this can also be

if (kvm_write_guest_page(vcpu->kvm,
gpa_to_gfn(vmcs12->pml_address), &gpa,
sizeof(gpa) * vmcs12->guest_pml_index,
sizeof(gpa)))

(I should have been more verbose on _why_ I suggested that function; my bad).

Paolo

\
 
 \ /
  Last update: 2018-04-16 13:11    [W:0.124 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site