diff options
Diffstat (limited to 'drivers/kvm/kvm.h')
| -rw-r--r-- | drivers/kvm/kvm.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index ad0813843adc..3b0bc4bda5f2 100644 --- a/drivers/kvm/kvm.h +++ b/drivers/kvm/kvm.h | |||
| @@ -624,6 +624,16 @@ void kvm_mmu_unload(struct kvm_vcpu *vcpu); | |||
| 624 | 624 | ||
| 625 | int kvm_hypercall(struct kvm_vcpu *vcpu, struct kvm_run *run); | 625 | int kvm_hypercall(struct kvm_vcpu *vcpu, struct kvm_run *run); |
| 626 | 626 | ||
| 627 | static inline void kvm_guest_enter(void) | ||
| 628 | { | ||
| 629 | current->flags |= PF_VCPU; | ||
| 630 | } | ||
| 631 | |||
| 632 | static inline void kvm_guest_exit(void) | ||
| 633 | { | ||
| 634 | current->flags &= ~PF_VCPU; | ||
| 635 | } | ||
| 636 | |||
| 627 | static inline int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t gva, | 637 | static inline int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t gva, |
| 628 | u32 error_code) | 638 | u32 error_code) |
| 629 | { | 639 | { |
