KVM: Allocate userspace memory for older userspace
[safe/jmp/linux-2.6] / drivers / kvm / kvm.h
index df0711c..eb006ed 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <linux/types.h>
+#include <linux/hardirq.h>
 #include <linux/list.h>
 #include <linux/mutex.h>
 #include <linux/spinlock.h>
@@ -405,10 +406,8 @@ struct kvm_memory_slot {
        gfn_t base_gfn;
        unsigned long npages;
        unsigned long flags;
-       struct page **phys_mem;
        unsigned long *rmap;
        unsigned long *dirty_bitmap;
-       int user_alloc; /* user allocated memory */
        unsigned long userspace_addr;
 };
 
@@ -671,11 +670,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;
 }