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

[Xen-devel] [PATCH 9/9] x86: move declaration of arch_set_info_hvm_guest and provide stub



While at it, remove declaration of vcpu_hvm_context and use the proper
header.

Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 xen/include/asm-x86/domain.h     |  3 ---
 xen/include/asm-x86/hvm/domain.h | 17 +++++++++++++++++
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/xen/include/asm-x86/domain.h b/xen/include/asm-x86/domain.h
index e2442f4..d3bc5dc 100644
--- a/xen/include/asm-x86/domain.h
+++ b/xen/include/asm-x86/domain.h
@@ -631,9 +631,6 @@ static inline void free_vcpu_guest_context(struct 
vcpu_guest_context *vgc)
     vfree(vgc);
 }
 
-struct vcpu_hvm_context;
-int arch_set_info_hvm_guest(struct vcpu *v, const struct vcpu_hvm_context 
*ctx);
-
 void pv_inject_event(const struct x86_event *event);
 
 static inline void pv_inject_hw_exception(unsigned int vector, int errcode)
diff --git a/xen/include/asm-x86/hvm/domain.h b/xen/include/asm-x86/hvm/domain.h
index 5885950..231b424 100644
--- a/xen/include/asm-x86/hvm/domain.h
+++ b/xen/include/asm-x86/hvm/domain.h
@@ -34,6 +34,7 @@
 #include <public/hvm/save.h>
 #include <public/hvm/hvm_op.h>
 #include <public/hvm/dm_op.h>
+#include <public/hvm/hvm_vcpu.h>
 
 struct hvm_ioreq_page {
     gfn_t gfn;
@@ -204,6 +205,22 @@ struct hvm_domain {
 
 #define hap_enabled(d)  ((d)->arch.hvm_domain.hap_enabled)
 
+#if CONFIG_HVM
+
+int arch_set_info_hvm_guest(struct vcpu *v, const struct vcpu_hvm_context 
*ctx);
+
+#else
+
+#include <xen/errno.h>
+
+static inline
+int arch_set_info_hvm_guest(struct vcpu *v, const struct vcpu_hvm_context *ctx)
+{
+    return -EINVAL;
+}
+
+#endif
+
 #endif /* __ASM_X86_HVM_DOMAIN_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®.