diff options
-rw-r--r-- | drivers/kvm/kvm.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index df0711ce9baa..e8a21e8cb2ad 100644 --- a/drivers/kvm/kvm.h +++ b/drivers/kvm/kvm.h @@ -7,6 +7,7 @@ */ #include <linux/types.h> +#include <linux/hardirq.h> #include <linux/list.h> #include <linux/mutex.h> #include <linux/spinlock.h> @@ -671,11 +672,13 @@ __init void kvm_arch_init(void); static inline void kvm_guest_enter(void) { + account_system_vtime(current); current->flags |= PF_VCPU; } static inline void kvm_guest_exit(void) { + account_system_vtime(current); current->flags &= ~PF_VCPU; } |