x86: TSC deadline definitions
authorLiu, Jinsong <jinsong.liu@intel.com>
Thu, 22 Sep 2011 08:53:58 +0000 (16:53 +0800)
committerAvi Kivity <avi@redhat.com>
Sun, 25 Sep 2011 16:53:00 +0000 (19:53 +0300)
This pre-defination is preparing for KVM tsc deadline timer emulation, but
theirself are not kvm specific.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/include/asm/apicdef.h
arch/x86/include/asm/cpufeature.h
arch/x86/include/asm/msr-index.h

index 34595d5e1038615eeac0ac943a15e9bcf9f4e0d9..3925d80078642d76f1890202d55037e9442b3f03 100644 (file)
 #define                APIC_TIMER_BASE_CLKIN           0x0
 #define                APIC_TIMER_BASE_TMBASE          0x1
 #define                APIC_TIMER_BASE_DIV             0x2
+#define                APIC_LVT_TIMER_ONESHOT          (0 << 17)
 #define                APIC_LVT_TIMER_PERIODIC         (1 << 17)
+#define                APIC_LVT_TIMER_TSCDEADLINE      (2 << 17)
 #define                APIC_LVT_MASKED                 (1 << 16)
 #define                APIC_LVT_LEVEL_TRIGGER          (1 << 15)
 #define                APIC_LVT_REMOTE_IRR             (1 << 14)
index 88b23a43f34037ac840e1e44acf6a29cb7dc5861..94dfb0a3e544bd45e39a1fc66ce1435c0ae5bf42 100644 (file)
 #define X86_FEATURE_X2APIC     (4*32+21) /* x2APIC */
 #define X86_FEATURE_MOVBE      (4*32+22) /* MOVBE instruction */
 #define X86_FEATURE_POPCNT      (4*32+23) /* POPCNT instruction */
+#define X86_FEATURE_TSC_DEADLINE_TIMER (4*32+24) /* Tsc deadline timer */
 #define X86_FEATURE_AES                (4*32+25) /* AES instructions */
 #define X86_FEATURE_XSAVE      (4*32+26) /* XSAVE/XRSTOR/XSETBV/XGETBV */
 #define X86_FEATURE_OSXSAVE    (4*32+27) /* "" XSAVE enabled in the OS */
index d52609aeeab8d7f5bba8711c3043f22e937a9d54..a6962d9161a0f23dcd2759cc30f0290305cc144c 100644 (file)
 #define MSR_IA32_APICBASE_ENABLE       (1<<11)
 #define MSR_IA32_APICBASE_BASE         (0xfffff<<12)
 
+#define MSR_IA32_TSCDEADLINE           0x000006e0
+
 #define MSR_IA32_UCODE_WRITE           0x00000079
 #define MSR_IA32_UCODE_REV             0x0000008b