diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2012-08-03 10:43:24 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2012-08-03 10:43:24 +0100 |
commit | d88e5d451b9bcf8da3cec31f94ecaa06d62fcc5d (patch) | |
tree | 0fe0231798e63caa3291213f6f69d4cbdea4a43f | |
parent | 7680b3d48118e74ad3c9f8c66e5c5867d47ff6c8 (diff) | |
download | xen-d88e5d451b9bcf8da3cec31f94ecaa06d62fcc5d.tar.gz xen-d88e5d451b9bcf8da3cec31f94ecaa06d62fcc5d.tar.bz2 xen-d88e5d451b9bcf8da3cec31f94ecaa06d62fcc5d.zip |
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-unstable changeset: 25724:612898732e66
xen-unstable date: Fri Aug 03 09:54:17 2012 +0100
Backported-by: Keir Fraser <keir@xen.org>
-rw-r--r-- | xen/arch/x86/hvm/hvm.c | 2 | ||||
-rw-r--r-- | xen/arch/x86/mm/p2m.c | 2 | ||||
-rw-r--r-- | xen/include/asm-x86/hvm/hvm.h | 2 | ||||
-rw-r--r-- | xen/include/asm-x86/p2m.h | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 70a131f4e2..f1a847bf7d 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -1109,7 +1109,7 @@ void hvm_triple_fault(void) domain_shutdown(v->domain, SHUTDOWN_reboot); } -bool_t hvm_hap_nested_page_fault(unsigned long gpa, +bool_t hvm_hap_nested_page_fault(paddr_t gpa, bool_t gla_valid, unsigned long gla, bool_t access_valid, diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index 7ff70a69c7..fdbe766242 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -3032,7 +3032,7 @@ void p2m_mem_paging_resume(struct p2m_domain *p2m) mem_event_unpause_vcpus(d); } -void p2m_mem_access_check(unsigned long gpa, bool_t gla_valid, unsigned long gla, +void p2m_mem_access_check(paddr_t gpa, bool_t gla_valid, unsigned long gla, bool_t access_r, bool_t access_w, bool_t access_x) { struct vcpu *v = current; diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-x86/hvm/hvm.h index 1b3938945f..38ae24f43e 100644 --- a/xen/include/asm-x86/hvm/hvm.h +++ b/xen/include/asm-x86/hvm/hvm.h @@ -368,7 +368,7 @@ static inline void hvm_set_info_guest(struct vcpu *v) int hvm_debug_op(struct vcpu *v, int32_t op); -bool_t hvm_hap_nested_page_fault(unsigned long gpa, +bool_t hvm_hap_nested_page_fault(paddr_t gpa, bool_t gla_valid, unsigned long gla, bool_t access_valid, bool_t access_r, diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h index 4dbe6def10..e2982b0803 100644 --- a/xen/include/asm-x86/p2m.h +++ b/xen/include/asm-x86/p2m.h @@ -539,12 +539,12 @@ static inline void p2m_mem_paging_populate(struct p2m_domain *p2m, unsigned long #ifdef __x86_64__ /* Send mem event based on the access (gla is -1ull if not available). Handles * the rw2rx conversion */ -void p2m_mem_access_check(unsigned long gpa, bool_t gla_valid, unsigned long gla, +void p2m_mem_access_check(paddr_t gpa, bool_t gla_valid, unsigned long gla, bool_t access_r, bool_t access_w, bool_t access_x); /* Resumes the running of the VCPU, restarting the last instruction */ void p2m_mem_access_resume(struct p2m_domain *p2m); #else -static inline void p2m_mem_access_check(unsigned long gpa, bool_t gla_valid, +static inline void p2m_mem_access_check(paddr_t gpa, bool_t gla_valid, unsigned long gla, bool_t access_r, bool_t access_w, bool_t access_x) { } |