]> xenbits.xensource.com Git - xen.git/commitdiff
x86/vvmx: Remove enum vmx_regs_enc
authorEuan Harris <euan.harris@citrix.com>
Thu, 26 Oct 2017 17:03:11 +0000 (18:03 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 1 Dec 2017 19:03:27 +0000 (19:03 +0000)
This is the standard register encoding, is not VVMX-specific and is only
used in a couple of places.

Signed-off-by: Euan Harris <euan.harris@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/vmx/vvmx.c
xen/include/asm-x86/hvm/vmx/vvmx.h

index 013d049f8ad256e5eccfd915cb28a433d312947a..0a25aa2f33c180cea270fd6d792be41fb1833725 100644 (file)
@@ -201,10 +201,10 @@ struct vmx_inst_decoded {
             unsigned long mem;
             unsigned int  len;
         };
-        enum vmx_regs_enc reg1;
+        unsigned int reg1;
     };
 
-    enum vmx_regs_enc reg2;
+    unsigned int reg2;
 };
 
 enum vmx_ops_result {
@@ -345,7 +345,7 @@ enum vmx_insn_errno set_vvmcs_real_safe(const struct vcpu *v, u32 encoding,
 }
 
 static unsigned long reg_read(struct cpu_user_regs *regs,
-                              enum vmx_regs_enc index)
+                              unsigned int index)
 {
     unsigned long *pval = decode_register(index, regs, 0);
 
@@ -353,7 +353,7 @@ static unsigned long reg_read(struct cpu_user_regs *regs,
 }
 
 static void reg_write(struct cpu_user_regs *regs,
-                      enum vmx_regs_enc index,
+                      unsigned int index,
                       unsigned long value)
 {
     unsigned long *pval = decode_register(index, regs, 0);
index 3285b03bbb4288337e9ec04438ac769f5a4012ff..9ea35eb79585c0bcb8a2a82acc3297b5062eb225 100644 (file)
@@ -64,28 +64,6 @@ struct nestedvmx {
 /* bit 0-8, and 12 must be 1 */
 #define VMX_ENTRY_CTLS_DEFAULT1                0x11ff
 
-/*
- * Encode of VMX instructions base on Table 24-11 & 24-12 of SDM 3B
- */
-
-enum vmx_regs_enc {
-    VMX_REG_RAX,
-    VMX_REG_RCX,
-    VMX_REG_RDX,
-    VMX_REG_RBX,
-    VMX_REG_RSP,
-    VMX_REG_RBP,
-    VMX_REG_RSI,
-    VMX_REG_RDI,
-    VMX_REG_R8,
-    VMX_REG_R9,
-    VMX_REG_R10,
-    VMX_REG_R11,
-    VMX_REG_R12,
-    VMX_REG_R13,
-    VMX_REG_R14,
-    VMX_REG_R15,
-};
 
 union vmx_inst_info {
     struct {