@@ -25,6 +25,9 @@
#include <asm/mtrr.h>
#include <asm/msr-index.h>
+/* Select x86 specific features in <linux/kvm_host.h> */
+#define __KVM_HAVE_USER_DIRTYBITMAP
+
#define KVM_MAX_VCPUS 64
#define KVM_MEMORY_SLOTS 32
/* memory slots that does not exposed to userspace */
@@ -110,7 +110,13 @@ struct kvm_memory_slot {
unsigned long npages;
unsigned long flags;
unsigned long *rmap;
+#ifndef __KVM_HAVE_USER_DIRTYBITMAP
unsigned long *dirty_bitmap;
+#else
+ unsigned long __user *dirty_bitmap;
+ unsigned long __user *dirty_bitmap_old;
+ bool is_dirty;
+#endif
struct {
unsigned long rmap_pde;
int write_count;