Fix 32-bit build after the latest mem-event series
authorTim Deegan <Tim.Deegan@citrix.com>
Fri, 7 Jan 2011 11:55:35 +0000 (11:55 +0000)
committerTim Deegan <Tim.Deegan@citrix.com>
Fri, 7 Jan 2011 11:55:35 +0000 (11:55 +0000)
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
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

index 7ae6f9a2b06e26ab5176f83fbb65b5d05b5cc0b2..62c018fa4462fa63deefd27f822cd6aaa91656ec 100644 (file)
@@ -3781,6 +3781,7 @@ int hvm_debug_op(struct vcpu *v, int32_t op)
     return rc;
 }
 
+#ifdef __x86_64__
 static int hvm_memory_event_traps(long p, uint32_t reason,
                                   unsigned long value, unsigned long old, 
                                   bool_t gla_valid, unsigned long gla) 
@@ -3859,6 +3860,7 @@ int hvm_memory_event_int3(unsigned long gla)
                                   MEM_EVENT_REASON_INT3,
                                   gfn, 0, 1, gla);
 }
+#endif /* __x86_64__ */
 
 /*
  * Local variables:
index ec7f8f282abd2ed81083c1ae75ae3e25c6e2f481..9e10a431097c4786211c1933bb4395c51e0b4402 100644 (file)
@@ -979,7 +979,7 @@ static void svm_do_nested_pgfault(paddr_t gpa)
         __trace_var(TRC_HVM_NPF, 0, sizeof(_d), &_d);
     }
 
-    if ( hvm_hap_nested_page_fault(gpa, 0, ~0ull, 0, 0, 0, 0) )
+    if ( hvm_hap_nested_page_fault(gpa, 0, ~0ul, 0, 0, 0, 0) )
         return;
 
     /* Everything else is an error. */
index 849c0b87eb65f8362db1c47cf0c8a7e6e3f510da..bfe2842817a9bf0d6166d0f76a6c8190736e2d84 100644 (file)
@@ -2857,7 +2857,6 @@ void p2m_mem_paging_resume(struct p2m_domain *p2m)
     /* Unpause any domains that were paused because the ring was full */
     mem_event_unpause_vcpus(d);
 }
-#endif /* __x86_64__ */
 
 void p2m_mem_access_check(unsigned long gpa, bool_t gla_valid, unsigned long gla, 
                           bool_t access_r, bool_t access_w, bool_t access_x)
@@ -2949,6 +2948,7 @@ void p2m_mem_access_resume(struct p2m_domain *p2m)
      * was available */
     mem_event_unpause_vcpus(d);
 }
+#endif /* __x86_64__ */
 
 /*
  * Local variables:
index dc8e238a9596e1e982557f657c545392902374e5..ca122c1ab6bc67c98ca6235f8e2d04e9e2ee6508 100644 (file)
@@ -372,6 +372,7 @@ bool_t hvm_hap_nested_page_fault(unsigned long gpa,
 int hvm_x2apic_msr_read(struct vcpu *v, unsigned int msr, uint64_t *msr_content);
 int hvm_x2apic_msr_write(struct vcpu *v, unsigned int msr, uint64_t msr_content);
 
+#ifdef __x86_64__
 /* Called for current VCPU on crX changes by guest */
 void hvm_memory_event_cr0(unsigned long value, unsigned long old);
 void hvm_memory_event_cr3(unsigned long value, unsigned long old);
@@ -379,5 +380,15 @@ void hvm_memory_event_cr4(unsigned long value, unsigned long old);
 
 /* Called for current VCPU on int3: returns -1 if no listener */
 int hvm_memory_event_int3(unsigned long gla);
+#else
+static inline void hvm_memory_event_cr0(unsigned long value, unsigned long old)
+{ }
+static inline void hvm_memory_event_cr3(unsigned long value, unsigned long old)
+{ }
+static inline void hvm_memory_event_cr4(unsigned long value, unsigned long old)
+{ }
+static inline int hvm_memory_event_int3(unsigned long gla)
+{ return 0; }
+#endif
 
 #endif /* __ASM_X86_HVM_HVM_H__ */
index 8272ec79ede2e9806b20bf6fd802617e4229440d..4c4ce0fe05bf4f2d4e818ad224e85fc62c263cdd 100644 (file)
@@ -522,12 +522,19 @@ static inline void p2m_mem_paging_populate(struct p2m_domain *p2m, unsigned long
 { }
 #endif
 
+#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, 
                           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, 
+                                        unsigned long gla, bool_t access_r, 
+                                        bool_t access_w, bool_t access_x)
+{ }
+#endif
 
 struct page_info *p2m_alloc_ptp(struct p2m_domain *p2m, unsigned long type);