[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 4/9] x86/hvm: provide stubs for HVM guest accessors



Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 xen/include/asm-x86/hvm/guest_access.h | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/xen/include/asm-x86/hvm/guest_access.h 
b/xen/include/asm-x86/hvm/guest_access.h
index b92dbe9..c7e83dc 100644
--- a/xen/include/asm-x86/hvm/guest_access.h
+++ b/xen/include/asm-x86/hvm/guest_access.h
@@ -1,8 +1,32 @@
 #ifndef __ASM_X86_HVM_GUEST_ACCESS_H__
 #define __ASM_X86_HVM_GUEST_ACCESS_H__
 
+#if CONFIG_HVM
+
 unsigned long copy_to_user_hvm(void *to, const void *from, unsigned len);
 unsigned long clear_user_hvm(void *to, unsigned int len);
 unsigned long copy_from_user_hvm(void *to, const void *from, unsigned len);
 
+#else
+
+static inline
+unsigned long copy_to_user_hvm(void *to, const void *from, unsigned len)
+{
+    return len;
+}
+
+static inline
+unsigned long clear_user_hvm(void *to, unsigned int len)
+{
+    return len;
+}
+
+static inline
+unsigned long copy_from_user_hvm(void *to, const void *from, unsigned len)
+{
+    return len;
+}
+
+#endif
+
 #endif /* __ASM_X86_HVM_GUEST_ACCESS_H__ */
-- 
git-series 0.9.1

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.