nestedhvm: fix nested page fault build error on 32-bit
authorIan Campbell <Ian.Campbell@citrix.com>
Fri, 3 Aug 2012 08:54:17 +0000 (09:54 +0100)
committerIan Campbell <Ian.Campbell@citrix.com>
Fri, 3 Aug 2012 08:54:17 +0000 (09:54 +0100)
commit815b55b7942ae77d7002f45f268e1081b37e5d00
tree408e541bf3cc0d4c364fe39c5511c74771e186ca
parent662d2991eb798c73f29b89f00aede66602254264
nestedhvm: fix nested page fault build error on 32-bit

    cc1: warnings being treated as errors
    hvm.c: In function ‘hvm_hap_nested_page_fault’:
    hvm.c:1282: error: passing argument 2 of ‘nestedhvm_hap_nested_page_fault’ from incompatible pointer type /local/scratch/ianc/devel/xen-unstable.hg/xen/include/asm/hvm/nestedhvm.h:55: note: expected ‘paddr_t *’ but argument is of type ‘long unsigned int *’

hvm_hap_nested_page_fault takes an unsigned long gpa and passes &gpa
to nestedhvm_hap_nested_page_fault which takes a paddr_t *. Since both
of the callers of hvm_hap_nested_page_fault (svm_do_nested_pgfault and
ept_handle_violation) actually have the gpa which they pass to
hvm_hap_nested_page_fault as a paddr_t I think it makes sense to
change the argument to hvm_hap_nested_page_fault.

The other user of gpa in hvm_hap_nested_page_fault is a call to
p2m_mem_access_check, which currently also takes a paddr_t gpa but I
think a paddr_t is appropriate there too.

Jan points out that this is also an issue for >4GB guests on the 32
bit hypervisor.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/x86/hvm/hvm.c
xen/arch/x86/mm/p2m.c
xen/include/asm-x86/hvm/hvm.h
xen/include/asm-x86/p2m.h