From: Zhang Xiantao <[EMAIL PROTECTED]>
Date: Tue, 11 Dec 2007 21:03:55 +0800
Subject: [PATCH] kvm: Moving some macros to x86.h

Moving macros wrt mmu to x86.h.
Signed-off-by: Zhang Xiantao <[EMAIL PROTECTED]>
---
 drivers/kvm/kvm.h |   20 --------------------
 drivers/kvm/x86.h |   21 +++++++++++++++++++++
 2 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index 198f5e1..cc748cf 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -23,16 +23,8 @@
 #include "types.h"
 
 #define KVM_MAX_VCPUS 4
-#define KVM_ALIAS_SLOTS 4
 #define KVM_MEMORY_SLOTS 8
 /* memory slots that does not exposed to userspace */
-#define KVM_PRIVATE_MEM_SLOTS 4
-#define KVM_PERMILLE_MMU_PAGES 20
-#define KVM_MIN_ALLOC_MMU_PAGES 64
-#define KVM_NUM_MMU_PAGES 1024
-#define KVM_MIN_FREE_MMU_PAGES 5
-#define KVM_REFILL_PAGES 25
-#define KVM_MAX_CPUID_ENTRIES 40
 
 #define KVM_PIO_PAGE_OFFSET 1
 
@@ -46,18 +38,6 @@
 struct kvm_vcpu;
 extern struct kmem_cache *kvm_vcpu_cache;
 
-
-#define KVM_NR_MEM_OBJS 40
-
-/*
- * We don't want allocation failures within the mmu code, so we
preallocate
- * enough memory for a single page fault in a cache.
- */
-struct kvm_mmu_memory_cache {
-       int nobjs;
-       void *objects[KVM_NR_MEM_OBJS];
-};
-
 struct kvm_guest_debug {
        int enabled;
        unsigned long bp[4];
diff --git a/drivers/kvm/x86.h b/drivers/kvm/x86.h
index 55eb430..be75d2d 100644
--- a/drivers/kvm/x86.h
+++ b/drivers/kvm/x86.h
@@ -54,6 +54,27 @@
 
 #define IOPL_SHIFT 12
 
+#define KVM_ALIAS_SLOTS 4
+
+#define KVM_PRIVATE_MEM_SLOTS 4
+#define KVM_PERMILLE_MMU_PAGES 20
+#define KVM_MIN_ALLOC_MMU_PAGES 64
+#define KVM_NUM_MMU_PAGES 1024
+#define KVM_MIN_FREE_MMU_PAGES 5
+#define KVM_REFILL_PAGES 25
+#define KVM_MAX_CPUID_ENTRIES 40
+
+#define KVM_NR_MEM_OBJS 40
+
+/*
+ * We don't want allocation failures within the mmu code, so we
preallocate
+ * enough memory for a single page fault in a cache.
+ */
+struct kvm_mmu_memory_cache {
+       int nobjs;
+       void *objects[KVM_NR_MEM_OBJS];
+};
+
 extern spinlock_t kvm_lock;
 extern struct list_head vm_list;
 
-- 
1.5.1.2

Attachment: 0006-kvm-Moving-some-macros-to-x86.h.patch
Description: 0006-kvm-Moving-some-macros-to-x86.h.patch

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to