diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-powerpc/kvm_host.h | 1 | ||||
-rw-r--r-- | include/asm-powerpc/kvm_ppc.h | 5 | ||||
-rw-r--r-- | include/asm-x86/kvm_host.h | 10 | ||||
-rw-r--r-- | include/linux/sysfs.h | 6 |
4 files changed, 15 insertions, 7 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 | ||
64 | struct tlbe { | 65 | struct 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. */ | ||
80 | static inline void kvmppc_set_msr(struct kvm_vcpu *vcpu, u32 new_msr) | 82 | static 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 | ||
319 | struct kvm_vm_stat { | 322 | struct 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 | ||
427 | extern struct kvm_x86_ops *kvm_x86_ops; | 431 | extern struct kvm_x86_ops *kvm_x86_ops; |
@@ -433,6 +437,9 @@ void kvm_mmu_destroy(struct kvm_vcpu *vcpu); | |||
433 | int kvm_mmu_create(struct kvm_vcpu *vcpu); | 437 | int kvm_mmu_create(struct kvm_vcpu *vcpu); |
434 | int kvm_mmu_setup(struct kvm_vcpu *vcpu); | 438 | int kvm_mmu_setup(struct kvm_vcpu *vcpu); |
435 | void kvm_mmu_set_nonpresent_ptes(u64 trap_pte, u64 notrap_pte); | 439 | void kvm_mmu_set_nonpresent_ptes(u64 trap_pte, u64 notrap_pte); |
440 | void kvm_mmu_set_base_ptes(u64 base_pte); | ||
441 | void kvm_mmu_set_mask_ptes(u64 user_mask, u64 accessed_mask, | ||
442 | u64 dirty_mask, u64 nx_mask, u64 x_mask); | ||
436 | 443 | ||
437 | int kvm_mmu_reset_context(struct kvm_vcpu *vcpu); | 444 | int kvm_mmu_reset_context(struct kvm_vcpu *vcpu); |
438 | void kvm_mmu_slot_remove_write_access(struct kvm *kvm, int slot); | 445 | void 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 | ||
623 | static inline void fpu_init(void) | 630 | static 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 |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 27bad59dae79..7858eac40aa7 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -196,12 +196,6 @@ static inline int sysfs_update_group(struct kobject *kobj, | |||
196 | return 0; | 196 | return 0; |
197 | } | 197 | } |
198 | 198 | ||
199 | static inline int sysfs_update_group(struct kobject *kobj, | ||
200 | const struct attribute_group *grp) | ||
201 | { | ||
202 | return 0; | ||
203 | } | ||
204 | |||
205 | static inline void sysfs_remove_group(struct kobject *kobj, | 199 | static inline void sysfs_remove_group(struct kobject *kobj, |
206 | const struct attribute_group *grp) | 200 | const struct attribute_group *grp) |
207 | { | 201 | { |