|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v2 5/9] x86/vmx: reduce scope of GAS_VMX_OP definition
Since GAS_VMX_OP is used only by vm{read,write}_safe, move its definition
just above those functions and undefine it after use.
Signed-off-by: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>
---
Changes in v2:
- none
xen/arch/x86/include/asm/hvm/vmx/vmx.h | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/xen/arch/x86/include/asm/hvm/vmx/vmx.h
b/xen/arch/x86/include/asm/hvm/vmx/vmx.h
index c0ca6d10e3..1ba2937c23 100644
--- a/xen/arch/x86/include/asm/hvm/vmx/vmx.h
+++ b/xen/arch/x86/include/asm/hvm/vmx/vmx.h
@@ -319,12 +319,6 @@ extern uint8_t posted_intr_vector;
#define INVVPID_ALL_CONTEXT 2
#define INVVPID_SINGLE_CONTEXT_RETAINING_GLOBAL 3
-#ifdef HAVE_AS_VMX
-# define GAS_VMX_OP(yes, no) yes
-#else
-# define GAS_VMX_OP(yes, no) no
-#endif
-
static always_inline void __vmptrld(u64 addr)
{
asm volatile (
@@ -414,6 +408,12 @@ static always_inline void __vmwrite(unsigned long field,
unsigned long value)
);
}
+#ifdef HAVE_AS_VMX
+# define GAS_VMX_OP(yes, no) yes
+#else
+# define GAS_VMX_OP(yes, no) no
+#endif
+
static inline enum vmx_insn_errno vmread_safe(unsigned long field,
unsigned long *value)
{
@@ -460,6 +460,8 @@ static inline enum vmx_insn_errno vmwrite_safe(unsigned
long field,
return ret;
}
+#undef GAS_VMX_OP
+
static always_inline void __invept(unsigned long type, uint64_t eptp)
{
struct {
--
2.37.2
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |