aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/x86.h
diff options
context:
space:
mode:
authorZhang Xiantao <xiantao.zhang@intel.com>2007-11-19 01:56:05 -0500
committerAvi Kivity <avi@qumranet.com>2008-01-30 10:53:05 -0500
commit2b3ccfa0c5c7738a08f473b5d00b78f87935de72 (patch)
treee59967b178e4da9b27c168fffd92b5bb86dba6ab /drivers/kvm/x86.h
parentea4a5ff80c24a25034a0c0468f6d1f47d1782076 (diff)
KVM: Portability: Move vcpu regs enumeration definition to x86.h
Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/x86.h')
-rw-r--r--drivers/kvm/x86.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/kvm/x86.h b/drivers/kvm/x86.h
index 77b4092c0542..77a4a4ab9391 100644
--- a/drivers/kvm/x86.h
+++ b/drivers/kvm/x86.h
@@ -55,6 +55,41 @@
55extern spinlock_t kvm_lock; 55extern spinlock_t kvm_lock;
56extern struct list_head vm_list; 56extern struct list_head vm_list;
57 57
58enum {
59 VCPU_REGS_RAX = 0,
60 VCPU_REGS_RCX = 1,
61 VCPU_REGS_RDX = 2,
62 VCPU_REGS_RBX = 3,
63 VCPU_REGS_RSP = 4,
64 VCPU_REGS_RBP = 5,
65 VCPU_REGS_RSI = 6,
66 VCPU_REGS_RDI = 7,
67#ifdef CONFIG_X86_64
68 VCPU_REGS_R8 = 8,
69 VCPU_REGS_R9 = 9,
70 VCPU_REGS_R10 = 10,
71 VCPU_REGS_R11 = 11,
72 VCPU_REGS_R12 = 12,
73 VCPU_REGS_R13 = 13,
74 VCPU_REGS_R14 = 14,
75 VCPU_REGS_R15 = 15,
76#endif
77 NR_VCPU_REGS
78};
79
80enum {
81 VCPU_SREG_CS,
82 VCPU_SREG_DS,
83 VCPU_SREG_ES,
84 VCPU_SREG_FS,
85 VCPU_SREG_GS,
86 VCPU_SREG_SS,
87 VCPU_SREG_TR,
88 VCPU_SREG_LDTR,
89};
90
91#include "x86_emulate.h"
92
58struct kvm_vcpu { 93struct kvm_vcpu {
59 KVM_VCPU_COMM; 94 KVM_VCPU_COMM;
60 u64 host_tsc; 95 u64 host_tsc;