diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-23 00:40:43 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-23 00:40:43 -0500 |
commit | 7ebd3faa9b5b42caf2d5aa1352a93dcfa0098011 (patch) | |
tree | c45acf88b7976dcec117b6a3dbe31a7fe710ef33 /arch/x86/include | |
parent | bb1281f2aae08e5ef23eb0692c8833e95579cdf2 (diff) | |
parent | 7650b6870930055426abb32cc47d164ccdea49db (diff) |
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull KVM updates from Paolo Bonzini:
"First round of KVM updates for 3.14; PPC parts will come next week.
Nothing major here, just bugfixes all over the place. The most
interesting part is the ARM guys' virtualized interrupt controller
overhaul, which lets userspace get/set the state and thus enables
migration of ARM VMs"
* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (67 commits)
kvm: make KVM_MMU_AUDIT help text more readable
KVM: s390: Fix memory access error detection
KVM: nVMX: Update guest activity state field on L2 exits
KVM: nVMX: Fix nested_run_pending on activity state HLT
KVM: nVMX: Clean up handling of VMX-related MSRs
KVM: nVMX: Add tracepoints for nested_vmexit and nested_vmexit_inject
KVM: nVMX: Pass vmexit parameters to nested_vmx_vmexit
KVM: nVMX: Leave VMX mode on clearing of feature control MSR
KVM: VMX: Fix DR6 update on #DB exception
KVM: SVM: Fix reading of DR6
KVM: x86: Sync DR7 on KVM_SET_DEBUGREGS
add support for Hyper-V reference time counter
KVM: remove useless write to vcpu->hv_clock.tsc_timestamp
KVM: x86: fix tsc catchup issue with tsc scaling
KVM: x86: limit PIT timer frequency
KVM: x86: handle invalid root_hpa everywhere
kvm: Provide kvm_vcpu_eligible_for_directed_yield() stub
kvm: vfio: silence GCC warning
KVM: ARM: Remove duplicate include
arm/arm64: KVM: relax the requirements of VMA alignment for THP
...
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 3 | ||||
-rw-r--r-- | arch/x86/include/asm/vmx.h | 1 | ||||
-rw-r--r-- | arch/x86/include/uapi/asm/hyperv.h | 13 | ||||
-rw-r--r-- | arch/x86/include/uapi/asm/msr-index.h | 1 |
4 files changed, 18 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index ae5d7830855c..fdf83afbb7d9 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h | |||
@@ -605,6 +605,7 @@ struct kvm_arch { | |||
605 | /* fields used by HYPER-V emulation */ | 605 | /* fields used by HYPER-V emulation */ |
606 | u64 hv_guest_os_id; | 606 | u64 hv_guest_os_id; |
607 | u64 hv_hypercall; | 607 | u64 hv_hypercall; |
608 | u64 hv_tsc_page; | ||
608 | 609 | ||
609 | #ifdef CONFIG_KVM_MMU_AUDIT | 610 | #ifdef CONFIG_KVM_MMU_AUDIT |
610 | int audit_point; | 611 | int audit_point; |
@@ -699,6 +700,8 @@ struct kvm_x86_ops { | |||
699 | void (*set_idt)(struct kvm_vcpu *vcpu, struct desc_ptr *dt); | 700 | void (*set_idt)(struct kvm_vcpu *vcpu, struct desc_ptr *dt); |
700 | void (*get_gdt)(struct kvm_vcpu *vcpu, struct desc_ptr *dt); | 701 | void (*get_gdt)(struct kvm_vcpu *vcpu, struct desc_ptr *dt); |
701 | void (*set_gdt)(struct kvm_vcpu *vcpu, struct desc_ptr *dt); | 702 | void (*set_gdt)(struct kvm_vcpu *vcpu, struct desc_ptr *dt); |
703 | u64 (*get_dr6)(struct kvm_vcpu *vcpu); | ||
704 | void (*set_dr6)(struct kvm_vcpu *vcpu, unsigned long value); | ||
702 | void (*set_dr7)(struct kvm_vcpu *vcpu, unsigned long value); | 705 | void (*set_dr7)(struct kvm_vcpu *vcpu, unsigned long value); |
703 | void (*cache_reg)(struct kvm_vcpu *vcpu, enum kvm_reg reg); | 706 | void (*cache_reg)(struct kvm_vcpu *vcpu, enum kvm_reg reg); |
704 | unsigned long (*get_rflags)(struct kvm_vcpu *vcpu); | 707 | unsigned long (*get_rflags)(struct kvm_vcpu *vcpu); |
diff --git a/arch/x86/include/asm/vmx.h b/arch/x86/include/asm/vmx.h index 966502d4682e..2067264fb7f5 100644 --- a/arch/x86/include/asm/vmx.h +++ b/arch/x86/include/asm/vmx.h | |||
@@ -100,6 +100,7 @@ | |||
100 | 100 | ||
101 | #define VMX_MISC_PREEMPTION_TIMER_RATE_MASK 0x0000001f | 101 | #define VMX_MISC_PREEMPTION_TIMER_RATE_MASK 0x0000001f |
102 | #define VMX_MISC_SAVE_EFER_LMA 0x00000020 | 102 | #define VMX_MISC_SAVE_EFER_LMA 0x00000020 |
103 | #define VMX_MISC_ACTIVITY_HLT 0x00000040 | ||
103 | 104 | ||
104 | /* VMCS Encodings */ | 105 | /* VMCS Encodings */ |
105 | enum vmcs_field { | 106 | enum vmcs_field { |
diff --git a/arch/x86/include/uapi/asm/hyperv.h b/arch/x86/include/uapi/asm/hyperv.h index b8f1c0176cbc..462efe746d77 100644 --- a/arch/x86/include/uapi/asm/hyperv.h +++ b/arch/x86/include/uapi/asm/hyperv.h | |||
@@ -28,6 +28,9 @@ | |||
28 | /* Partition Reference Counter (HV_X64_MSR_TIME_REF_COUNT) available*/ | 28 | /* Partition Reference Counter (HV_X64_MSR_TIME_REF_COUNT) available*/ |
29 | #define HV_X64_MSR_TIME_REF_COUNT_AVAILABLE (1 << 1) | 29 | #define HV_X64_MSR_TIME_REF_COUNT_AVAILABLE (1 << 1) |
30 | 30 | ||
31 | /* A partition's reference time stamp counter (TSC) page */ | ||
32 | #define HV_X64_MSR_REFERENCE_TSC 0x40000021 | ||
33 | |||
31 | /* | 34 | /* |
32 | * There is a single feature flag that signifies the presence of the MSR | 35 | * There is a single feature flag that signifies the presence of the MSR |
33 | * that can be used to retrieve both the local APIC Timer frequency as | 36 | * that can be used to retrieve both the local APIC Timer frequency as |
@@ -198,6 +201,9 @@ | |||
198 | #define HV_X64_MSR_APIC_ASSIST_PAGE_ADDRESS_MASK \ | 201 | #define HV_X64_MSR_APIC_ASSIST_PAGE_ADDRESS_MASK \ |
199 | (~((1ull << HV_X64_MSR_APIC_ASSIST_PAGE_ADDRESS_SHIFT) - 1)) | 202 | (~((1ull << HV_X64_MSR_APIC_ASSIST_PAGE_ADDRESS_SHIFT) - 1)) |
200 | 203 | ||
204 | #define HV_X64_MSR_TSC_REFERENCE_ENABLE 0x00000001 | ||
205 | #define HV_X64_MSR_TSC_REFERENCE_ADDRESS_SHIFT 12 | ||
206 | |||
201 | #define HV_PROCESSOR_POWER_STATE_C0 0 | 207 | #define HV_PROCESSOR_POWER_STATE_C0 0 |
202 | #define HV_PROCESSOR_POWER_STATE_C1 1 | 208 | #define HV_PROCESSOR_POWER_STATE_C1 1 |
203 | #define HV_PROCESSOR_POWER_STATE_C2 2 | 209 | #define HV_PROCESSOR_POWER_STATE_C2 2 |
@@ -210,4 +216,11 @@ | |||
210 | #define HV_STATUS_INVALID_ALIGNMENT 4 | 216 | #define HV_STATUS_INVALID_ALIGNMENT 4 |
211 | #define HV_STATUS_INSUFFICIENT_BUFFERS 19 | 217 | #define HV_STATUS_INSUFFICIENT_BUFFERS 19 |
212 | 218 | ||
219 | typedef struct _HV_REFERENCE_TSC_PAGE { | ||
220 | __u32 tsc_sequence; | ||
221 | __u32 res1; | ||
222 | __u64 tsc_scale; | ||
223 | __s64 tsc_offset; | ||
224 | } HV_REFERENCE_TSC_PAGE, *PHV_REFERENCE_TSC_PAGE; | ||
225 | |||
213 | #endif | 226 | #endif |
diff --git a/arch/x86/include/uapi/asm/msr-index.h b/arch/x86/include/uapi/asm/msr-index.h index 59cea185ad1d..c19fc60ff062 100644 --- a/arch/x86/include/uapi/asm/msr-index.h +++ b/arch/x86/include/uapi/asm/msr-index.h | |||
@@ -528,6 +528,7 @@ | |||
528 | #define MSR_IA32_VMX_TRUE_PROCBASED_CTLS 0x0000048e | 528 | #define MSR_IA32_VMX_TRUE_PROCBASED_CTLS 0x0000048e |
529 | #define MSR_IA32_VMX_TRUE_EXIT_CTLS 0x0000048f | 529 | #define MSR_IA32_VMX_TRUE_EXIT_CTLS 0x0000048f |
530 | #define MSR_IA32_VMX_TRUE_ENTRY_CTLS 0x00000490 | 530 | #define MSR_IA32_VMX_TRUE_ENTRY_CTLS 0x00000490 |
531 | #define MSR_IA32_VMX_VMFUNC 0x00000491 | ||
531 | 532 | ||
532 | /* VMX_BASIC bits and bitmasks */ | 533 | /* VMX_BASIC bits and bitmasks */ |
533 | #define VMX_BASIC_VMCS_SIZE_SHIFT 32 | 534 | #define VMX_BASIC_VMCS_SIZE_SHIFT 32 |