diff options
Diffstat (limited to 'arch/x86/include/asm/kvm_host.h')
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index b23682900f41..dd439f13df84 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h | |||
@@ -646,7 +646,7 @@ struct kvm_x86_ops { | |||
646 | u64 (*get_mt_mask)(struct kvm_vcpu *vcpu, gfn_t gfn, bool is_mmio); | 646 | u64 (*get_mt_mask)(struct kvm_vcpu *vcpu, gfn_t gfn, bool is_mmio); |
647 | int (*get_lpage_level)(void); | 647 | int (*get_lpage_level)(void); |
648 | bool (*rdtscp_supported)(void); | 648 | bool (*rdtscp_supported)(void); |
649 | void (*adjust_tsc_offset)(struct kvm_vcpu *vcpu, s64 adjustment); | 649 | void (*adjust_tsc_offset)(struct kvm_vcpu *vcpu, s64 adjustment, bool host); |
650 | 650 | ||
651 | void (*set_tdp_cr3)(struct kvm_vcpu *vcpu, unsigned long cr3); | 651 | void (*set_tdp_cr3)(struct kvm_vcpu *vcpu, unsigned long cr3); |
652 | 652 | ||
@@ -676,6 +676,17 @@ struct kvm_arch_async_pf { | |||
676 | 676 | ||
677 | extern struct kvm_x86_ops *kvm_x86_ops; | 677 | extern struct kvm_x86_ops *kvm_x86_ops; |
678 | 678 | ||
679 | static inline void adjust_tsc_offset_guest(struct kvm_vcpu *vcpu, | ||
680 | s64 adjustment) | ||
681 | { | ||
682 | kvm_x86_ops->adjust_tsc_offset(vcpu, adjustment, false); | ||
683 | } | ||
684 | |||
685 | static inline void adjust_tsc_offset_host(struct kvm_vcpu *vcpu, s64 adjustment) | ||
686 | { | ||
687 | kvm_x86_ops->adjust_tsc_offset(vcpu, adjustment, true); | ||
688 | } | ||
689 | |||
679 | int kvm_mmu_module_init(void); | 690 | int kvm_mmu_module_init(void); |
680 | void kvm_mmu_module_exit(void); | 691 | void kvm_mmu_module_exit(void); |
681 | 692 | ||