debuggers.hg
changeset 22720:14ee2ec6ad5a
Fix 32-bit build after the latest mem-event series
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
author | Tim Deegan <Tim.Deegan@citrix.com> |
---|---|
date | Fri Jan 07 11:55:35 2011 +0000 (2011-01-07) |
parents | 6ec9d1491f2a |
children | 0ab058a55c24 |
files | xen/arch/x86/hvm/hvm.c xen/arch/x86/hvm/svm/svm.c xen/arch/x86/mm/p2m.c xen/include/asm-x86/hvm/hvm.h xen/include/asm-x86/p2m.h |
line diff
1.1 --- a/xen/arch/x86/hvm/hvm.c Fri Jan 07 11:54:52 2011 +0000 1.2 +++ b/xen/arch/x86/hvm/hvm.c Fri Jan 07 11:55:35 2011 +0000 1.3 @@ -3781,6 +3781,7 @@ int hvm_debug_op(struct vcpu *v, int32_t 1.4 return rc; 1.5 } 1.6 1.7 +#ifdef __x86_64__ 1.8 static int hvm_memory_event_traps(long p, uint32_t reason, 1.9 unsigned long value, unsigned long old, 1.10 bool_t gla_valid, unsigned long gla) 1.11 @@ -3859,6 +3860,7 @@ int hvm_memory_event_int3(unsigned long 1.12 MEM_EVENT_REASON_INT3, 1.13 gfn, 0, 1, gla); 1.14 } 1.15 +#endif /* __x86_64__ */ 1.16 1.17 /* 1.18 * Local variables:
2.1 --- a/xen/arch/x86/hvm/svm/svm.c Fri Jan 07 11:54:52 2011 +0000 2.2 +++ b/xen/arch/x86/hvm/svm/svm.c Fri Jan 07 11:55:35 2011 +0000 2.3 @@ -979,7 +979,7 @@ static void svm_do_nested_pgfault(paddr_ 2.4 __trace_var(TRC_HVM_NPF, 0, sizeof(_d), &_d); 2.5 } 2.6 2.7 - if ( hvm_hap_nested_page_fault(gpa, 0, ~0ull, 0, 0, 0, 0) ) 2.8 + if ( hvm_hap_nested_page_fault(gpa, 0, ~0ul, 0, 0, 0, 0) ) 2.9 return; 2.10 2.11 /* Everything else is an error. */
3.1 --- a/xen/arch/x86/mm/p2m.c Fri Jan 07 11:54:52 2011 +0000 3.2 +++ b/xen/arch/x86/mm/p2m.c Fri Jan 07 11:55:35 2011 +0000 3.3 @@ -2857,7 +2857,6 @@ void p2m_mem_paging_resume(struct p2m_do 3.4 /* Unpause any domains that were paused because the ring was full */ 3.5 mem_event_unpause_vcpus(d); 3.6 } 3.7 -#endif /* __x86_64__ */ 3.8 3.9 void p2m_mem_access_check(unsigned long gpa, bool_t gla_valid, unsigned long gla, 3.10 bool_t access_r, bool_t access_w, bool_t access_x) 3.11 @@ -2949,6 +2948,7 @@ void p2m_mem_access_resume(struct p2m_do 3.12 * was available */ 3.13 mem_event_unpause_vcpus(d); 3.14 } 3.15 +#endif /* __x86_64__ */ 3.16 3.17 /* 3.18 * Local variables:
4.1 --- a/xen/include/asm-x86/hvm/hvm.h Fri Jan 07 11:54:52 2011 +0000 4.2 +++ b/xen/include/asm-x86/hvm/hvm.h Fri Jan 07 11:55:35 2011 +0000 4.3 @@ -372,6 +372,7 @@ bool_t hvm_hap_nested_page_fault(unsigne 4.4 int hvm_x2apic_msr_read(struct vcpu *v, unsigned int msr, uint64_t *msr_content); 4.5 int hvm_x2apic_msr_write(struct vcpu *v, unsigned int msr, uint64_t msr_content); 4.6 4.7 +#ifdef __x86_64__ 4.8 /* Called for current VCPU on crX changes by guest */ 4.9 void hvm_memory_event_cr0(unsigned long value, unsigned long old); 4.10 void hvm_memory_event_cr3(unsigned long value, unsigned long old); 4.11 @@ -379,5 +380,15 @@ void hvm_memory_event_cr4(unsigned long 4.12 4.13 /* Called for current VCPU on int3: returns -1 if no listener */ 4.14 int hvm_memory_event_int3(unsigned long gla); 4.15 +#else 4.16 +static inline void hvm_memory_event_cr0(unsigned long value, unsigned long old) 4.17 +{ } 4.18 +static inline void hvm_memory_event_cr3(unsigned long value, unsigned long old) 4.19 +{ } 4.20 +static inline void hvm_memory_event_cr4(unsigned long value, unsigned long old) 4.21 +{ } 4.22 +static inline int hvm_memory_event_int3(unsigned long gla) 4.23 +{ return 0; } 4.24 +#endif 4.25 4.26 #endif /* __ASM_X86_HVM_HVM_H__ */
5.1 --- a/xen/include/asm-x86/p2m.h Fri Jan 07 11:54:52 2011 +0000 5.2 +++ b/xen/include/asm-x86/p2m.h Fri Jan 07 11:55:35 2011 +0000 5.3 @@ -522,12 +522,19 @@ static inline void p2m_mem_paging_popula 5.4 { } 5.5 #endif 5.6 5.7 +#ifdef __x86_64__ 5.8 /* Send mem event based on the access (gla is -1ull if not available). Handles 5.9 * the rw2rx conversion */ 5.10 void p2m_mem_access_check(unsigned long gpa, bool_t gla_valid, unsigned long gla, 5.11 bool_t access_r, bool_t access_w, bool_t access_x); 5.12 /* Resumes the running of the VCPU, restarting the last instruction */ 5.13 void p2m_mem_access_resume(struct p2m_domain *p2m); 5.14 +#else 5.15 +static inline void p2m_mem_access_check(unsigned long gpa, bool_t gla_valid, 5.16 + unsigned long gla, bool_t access_r, 5.17 + bool_t access_w, bool_t access_x) 5.18 +{ } 5.19 +#endif 5.20 5.21 struct page_info *p2m_alloc_ptp(struct p2m_domain *p2m, unsigned long type); 5.22