[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <da39d483-d6cc-2469-dc4e-93f0c87fc026@redhat.com>
Date: Thu, 12 Apr 2018 17:03:48 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: KarimAllah Ahmed <karahmed@...zon.de>, x86@...nel.org,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Cc: hpa@...or.com, jmattson@...gle.com, mingo@...hat.com,
rkrcmar@...hat.com, tglx@...utronix.de
Subject: Re: [PATCH 03/10] X86/nVMX: Update the PML table without mapping and
unmapping the page
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;
Powered by blists - more mailing lists