Messages in this thread | | | Subject | Re: [PATCH 03/10] X86/nVMX: Update the PML table without mapping and unmapping the page | From | Paolo Bonzini <> | Date | Thu, 12 Apr 2018 17:03:48 +0200 |
| |
On 21/02/2018 18:47, KarimAllah Ahmed wrote: > + dst = (gpa_t)(((u64 *)vmcs12->pml_address) + vmcs12->guest_pml_index);
This is not a pointer, since it's in the guest. Please use
dst = vmcs12->pml_address + sizeof(u64) * vmcs12->guest_pml_index;
(It may also make sense to use kvm_write_guest_page if you prefer).
Thanks,
Paolo
> - page = kvm_vcpu_gpa_to_page(vcpu, vmcs12->pml_address); > - if (is_error_page(page)) > + if (kvm_write_guest(vcpu->kvm, dst, &gpa, sizeof(gpa))) > return 0;
| |