aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-05-04 20:07:28 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-05-04 20:07:28 -0400
commit8dcf5782848600ecfd0df3a45c521b5ad0fcb42e (patch)
tree72821491c1ca5b0660599b4c06a27770d6800cd3 /include
parente73b65f1db7e3baa3db43951476b7d2d2381ba35 (diff)
parentb8ba5f10c5956d2b297766fda8f4f5ab8ad1e2cc (diff)
Merge branch 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm
* 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: x86: KVM geust: make setup_secondary_clock definition dependent on local apic KVM: MMU: Allow more than PAGES_PER_HPAGE write protections per large page KVM: avoid fx_init() schedule in atomic KVM: Avoid spurious execeptions after setting registers KVM: PIT: support mode 4 KVM: x86 emulator: disable writeback on lmsw KVM: ppc: deliver INTERRUPT_FP_UNAVAIL to the guest KVM: ppc: Handle guest idle by emulating MSR[WE] writes KVM: x86: task switch: fix wrong bit setting for the busy flag KVM: VMX: Enable EPT feature for KVM KVM: VMX: Prepare an identity page table for EPT in real mode KVM: Export necessary function for EPT KVM: MMU: Remove #ifdef CONFIG_X86_64 to support 4 level EPT KVM: MMU: Add EPT support KVM: Add kvm_x86_ops get_tdp_level() KVM: MMU: Move some definitions to a header file KVM: VMX: EPT Feature Detection
Diffstat (limited to 'include')
-rw-r--r--include/asm-powerpc/kvm_host.h1
-rw-r--r--include/asm-powerpc/kvm_ppc.h5
-rw-r--r--include/asm-x86/kvm_host.h10
3 files changed, 15 insertions, 1 deletions
diff --git a/include/asm-powerpc/kvm_host.h b/include/asm-powerpc/kvm_host.h
index 04ffbb8e0a35..81a69d711017 100644
--- a/include/asm-powerpc/kvm_host.h
+++ b/include/asm-powerpc/kvm_host.h
@@ -59,6 +59,7 @@ struct kvm_vcpu_stat {
59 u32 emulated_inst_exits; 59 u32 emulated_inst_exits;
60 u32 dec_exits; 60 u32 dec_exits;
61 u32 ext_intr_exits; 61 u32 ext_intr_exits;
62 u32 halt_wakeup;
62}; 63};
63 64
64struct tlbe { 65struct tlbe {
diff --git a/include/asm-powerpc/kvm_ppc.h b/include/asm-powerpc/kvm_ppc.h
index 7ac820308a7e..b35a7e3ef978 100644
--- a/include/asm-powerpc/kvm_ppc.h
+++ b/include/asm-powerpc/kvm_ppc.h
@@ -77,12 +77,17 @@ static inline void kvmppc_clear_exception(struct kvm_vcpu *vcpu, int exception)
77 clear_bit(priority, &vcpu->arch.pending_exceptions); 77 clear_bit(priority, &vcpu->arch.pending_exceptions);
78} 78}
79 79
80/* Helper function for "full" MSR writes. No need to call this if only EE is
81 * changing. */
80static inline void kvmppc_set_msr(struct kvm_vcpu *vcpu, u32 new_msr) 82static inline void kvmppc_set_msr(struct kvm_vcpu *vcpu, u32 new_msr)
81{ 83{
82 if ((new_msr & MSR_PR) != (vcpu->arch.msr & MSR_PR)) 84 if ((new_msr & MSR_PR) != (vcpu->arch.msr & MSR_PR))
83 kvmppc_mmu_priv_switch(vcpu, new_msr & MSR_PR); 85 kvmppc_mmu_priv_switch(vcpu, new_msr & MSR_PR);
84 86
85 vcpu->arch.msr = new_msr; 87 vcpu->arch.msr = new_msr;
88
89 if (vcpu->arch.msr & MSR_WE)
90 kvm_vcpu_block(vcpu);
86} 91}
87 92
88#endif /* __POWERPC_KVM_PPC_H__ */ 93#endif /* __POWERPC_KVM_PPC_H__ */
diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h
index 9d963cd6533c..1d8cd01fa514 100644
--- a/include/asm-x86/kvm_host.h
+++ b/include/asm-x86/kvm_host.h
@@ -314,6 +314,9 @@ struct kvm_arch{
314 struct page *apic_access_page; 314 struct page *apic_access_page;
315 315
316 gpa_t wall_clock; 316 gpa_t wall_clock;
317
318 struct page *ept_identity_pagetable;
319 bool ept_identity_pagetable_done;
317}; 320};
318 321
319struct kvm_vm_stat { 322struct kvm_vm_stat {
@@ -422,6 +425,7 @@ struct kvm_x86_ops {
422 struct kvm_run *run); 425 struct kvm_run *run);
423 426
424 int (*set_tss_addr)(struct kvm *kvm, unsigned int addr); 427 int (*set_tss_addr)(struct kvm *kvm, unsigned int addr);
428 int (*get_tdp_level)(void);
425}; 429};
426 430
427extern struct kvm_x86_ops *kvm_x86_ops; 431extern struct kvm_x86_ops *kvm_x86_ops;
@@ -433,6 +437,9 @@ void kvm_mmu_destroy(struct kvm_vcpu *vcpu);
433int kvm_mmu_create(struct kvm_vcpu *vcpu); 437int kvm_mmu_create(struct kvm_vcpu *vcpu);
434int kvm_mmu_setup(struct kvm_vcpu *vcpu); 438int kvm_mmu_setup(struct kvm_vcpu *vcpu);
435void kvm_mmu_set_nonpresent_ptes(u64 trap_pte, u64 notrap_pte); 439void kvm_mmu_set_nonpresent_ptes(u64 trap_pte, u64 notrap_pte);
440void kvm_mmu_set_base_ptes(u64 base_pte);
441void kvm_mmu_set_mask_ptes(u64 user_mask, u64 accessed_mask,
442 u64 dirty_mask, u64 nx_mask, u64 x_mask);
436 443
437int kvm_mmu_reset_context(struct kvm_vcpu *vcpu); 444int kvm_mmu_reset_context(struct kvm_vcpu *vcpu);
438void kvm_mmu_slot_remove_write_access(struct kvm *kvm, int slot); 445void kvm_mmu_slot_remove_write_access(struct kvm *kvm, int slot);
@@ -620,7 +627,7 @@ static inline void fx_restore(struct i387_fxsave_struct *image)
620 asm("fxrstor (%0)":: "r" (image)); 627 asm("fxrstor (%0)":: "r" (image));
621} 628}
622 629
623static inline void fpu_init(void) 630static inline void fx_finit(void)
624{ 631{
625 asm("finit"); 632 asm("finit");
626} 633}
@@ -644,6 +651,7 @@ static inline void kvm_inject_gp(struct kvm_vcpu *vcpu, u32 error_code)
644#define ASM_VMX_VMWRITE_RSP_RDX ".byte 0x0f, 0x79, 0xd4" 651#define ASM_VMX_VMWRITE_RSP_RDX ".byte 0x0f, 0x79, 0xd4"
645#define ASM_VMX_VMXOFF ".byte 0x0f, 0x01, 0xc4" 652#define ASM_VMX_VMXOFF ".byte 0x0f, 0x01, 0xc4"
646#define ASM_VMX_VMXON_RAX ".byte 0xf3, 0x0f, 0xc7, 0x30" 653#define ASM_VMX_VMXON_RAX ".byte 0xf3, 0x0f, 0xc7, 0x30"
654#define ASM_VMX_INVEPT ".byte 0x66, 0x0f, 0x38, 0x80, 0x08"
647#define ASM_VMX_INVVPID ".byte 0x66, 0x0f, 0x38, 0x81, 0x08" 655#define ASM_VMX_INVVPID ".byte 0x66, 0x0f, 0x38, 0x81, 0x08"
648 656
649#define MSR_IA32_TIME_STAMP_COUNTER 0x010 657#define MSR_IA32_TIME_STAMP_COUNTER 0x010