summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2011-06-08 16:21:26 -0700
committerRobert Mustacchi <rm@joyent.com>2011-06-08 16:21:26 -0700
commitdf2190c032a8edd78d9b1f16ecb2b39a61e9f5f6 (patch)
tree6545e76f5c7efa4d2fd30ca8df732b1f42faf7b5
parentbcf59b66b69ad704be45d8c4415cb346f5e9ac87 (diff)
downloadillumos-kvm-df2190c032a8edd78d9b1f16ecb2b39a61e9f5f6.tar.gz
HVM-339 Remove CONFIG_X86_64 ifdefs from header files
-rw-r--r--kvm_emulate.h4
-rw-r--r--kvm_paging_tmpl.h5
-rw-r--r--kvm_x86host.h2
-rw-r--r--msr.h7
4 files changed, 0 insertions, 18 deletions
diff --git a/kvm_emulate.h b/kvm_emulate.h
index 4026eea..19ccd99 100644
--- a/kvm_emulate.h
+++ b/kvm_emulate.h
@@ -185,11 +185,7 @@ typedef struct x86_emulate_ctxt {
#define X86EMUL_MODE_PROT64 8 /* 64-bit (long) mode. */
/* Host execution mode. */
-#if defined(CONFIG_X86_32)
-#define X86EMUL_MODE_HOST X86EMUL_MODE_PROT32
-#elif defined(CONFIG_X86_64)
#define X86EMUL_MODE_HOST X86EMUL_MODE_PROT64
-#endif
#ifdef _KERNEL
int x86_decode_insn(struct x86_emulate_ctxt *ctxt,
diff --git a/kvm_paging_tmpl.h b/kvm_paging_tmpl.h
index 982bd3d..09d774c 100644
--- a/kvm_paging_tmpl.h
+++ b/kvm_paging_tmpl.h
@@ -33,13 +33,8 @@
#define PT_INDEX(addr, level) PT64_INDEX(addr, level)
#define PT_LEVEL_MASK(level) PT64_LEVEL_MASK(level)
#define PT_LEVEL_BITS PT64_LEVEL_BITS
- #ifdef CONFIG_X86_64
#define PT_MAX_FULL_LEVELS 4
#define CMPXCHG cmpxchg
- #else
- #define CMPXCHG cmpxchg64
- #define PT_MAX_FULL_LEVELS 2
- #endif
#elif PTTYPE == 32
#define pt_element_t uint32_t
#define guest_walker guest_walker32
diff --git a/kvm_x86host.h b/kvm_x86host.h
index d84002d..09e1cdd 100644
--- a/kvm_x86host.h
+++ b/kvm_x86host.h
@@ -93,7 +93,6 @@ enum kvm_reg {
VCPU_REGS_RBP = 5,
VCPU_REGS_RSI = 6,
VCPU_REGS_RDI = 7,
-#ifdef CONFIG_X86_64
VCPU_REGS_R8 = 8,
VCPU_REGS_R9 = 9,
VCPU_REGS_R10 = 10,
@@ -102,7 +101,6 @@ enum kvm_reg {
VCPU_REGS_R13 = 13,
VCPU_REGS_R14 = 14,
VCPU_REGS_R15 = 15,
-#endif
VCPU_REGS_RIP,
NR_VCPU_REGS
};
diff --git a/msr.h b/msr.h
index ad29331..7e80788 100644
--- a/msr.h
+++ b/msr.h
@@ -49,17 +49,10 @@ extern unsigned long long native_read_tscp(unsigned int *aux);
* edx:eax, while for x86_64 it doesn't mean rdx:rax or edx:eax. Instead,
* it means rax *or* rdx.
*/
-#ifdef CONFIG_X86_64
#define DECLARE_ARGS(val, low, high) unsigned low, high
#define EAX_EDX_VAL(val, low, high) ((low) | ((uint64_t)(high) << 32))
#define EAX_EDX_ARGS(val, low, high) "a" (low), "d" (high)
#define EAX_EDX_RET(val, low, high) "=a" (low), "=d" (high)
-#else
-#define DECLARE_ARGS(val, low, high) unsigned long long val
-#define EAX_EDX_VAL(val, low, high) (val)
-#define EAX_EDX_ARGS(val, low, high) "A" (val)
-#define EAX_EDX_RET(val, low, high) "=A" (val)
-#endif
extern unsigned long long native_read_msr(unsigned int msr);
extern uint64_t native_read_msr_safe(unsigned int msr, int *err);