[PATCH 13/22] KVM: X86: Add kvm_read_guest_page_tdp function

2010-04-27 Thread Joerg Roedel
This patch adds a function which can read from the guests physical memory or from the guest's guest physical memory. This will be used in the two-dimensional page table walker. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/kvm_host.h |3 +++ arch/x86/kvm/x86.c

Re: [PATCH 13/22] KVM: X86: Add kvm_read_guest_page_tdp function

2010-04-27 Thread Avi Kivity
On 04/27/2010 01:38 PM, Joerg Roedel wrote: This patch adds a function which can read from the guests physical memory or from the guest's guest physical memory. This will be used in the two-dimensional page table walker. Signed-off-by: Joerg Roedeljoerg.roe...@amd.com ---

Re: [PATCH 13/22] KVM: X86: Add kvm_read_guest_page_tdp function

2010-04-27 Thread Joerg Roedel
On Tue, Apr 27, 2010 at 03:42:27PM +0300, Avi Kivity wrote: On 04/27/2010 01:38 PM, Joerg Roedel wrote: This patch adds a function which can read from the guests physical memory or from the guest's guest physical memory. This will be used in the two-dimensional page table walker.

Re: [PATCH 13/22] KVM: X86: Add kvm_read_guest_page_tdp function

2010-04-27 Thread Avi Kivity
On 04/27/2010 03:42 PM, Avi Kivity wrote: +{ +gfn_t real_gfn; +gpa_t gpa; + +*error = 0; +gpa = gfn PAGE_SHIFT; This overflows too :) Use gfn_to_gpa(). +real_gfn = mmu-translate_gpa(vcpu, gpa, error); Overflow: sizeof(gpa) sizeof(gfn). -- error compiling