linux-mips
[Top] [All Lists]

[PATCH] KVM/MIPS32: Sync up with latest KVM API changes

To: kvm@vger.kernel.org
Subject: [PATCH] KVM/MIPS32: Sync up with latest KVM API changes
From: Sanjay Lal <sanjayl@kymasys.com>
Date: Thu, 14 Mar 2013 19:09:16 -0700
Cc: linux-mips@linux-mips.org, Gleb Natapov <gleb@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>, Ralf Baechle <ralf@linux-mips.org>, Sanjay Lal <sanjayl@kymasys.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Sender: linux-mips-bounce@linux-mips.org
- Rename KVM_MEMORY_SLOTS -> KVM_USER_MEM_SLOTS
- Fix kvm_arch_{prepare,commit}_memory_region()
- Also remove kvm_arch_set_memory_region which was unused.

Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
---
 arch/mips/include/asm/kvm_host.h |  2 +-
 arch/mips/kvm/kvm_mips.c         | 12 ++----------
 2 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/arch/mips/include/asm/kvm_host.h b/arch/mips/include/asm/kvm_host.h
index c8cddd1..143875c 100644
--- a/arch/mips/include/asm/kvm_host.h
+++ b/arch/mips/include/asm/kvm_host.h
@@ -21,7 +21,7 @@
 
 
 #define KVM_MAX_VCPUS          1
-#define KVM_MEMORY_SLOTS       8
+#define KVM_USER_MEM_SLOTS     8
 /* memory slots that does not exposed to userspace */
 #define KVM_PRIVATE_MEM_SLOTS  0
 
diff --git a/arch/mips/kvm/kvm_mips.c b/arch/mips/kvm/kvm_mips.c
index 15ee558..2e60b1c 100644
--- a/arch/mips/kvm/kvm_mips.c
+++ b/arch/mips/kvm/kvm_mips.c
@@ -198,14 +198,6 @@ kvm_arch_dev_ioctl(struct file *filp, unsigned int ioctl, 
unsigned long arg)
        return -EINVAL;
 }
 
-int
-kvm_arch_set_memory_region(struct kvm *kvm,
-                          struct kvm_userspace_memory_region *mem,
-                          struct kvm_memory_slot old, int user_alloc)
-{
-       return 0;
-}
-
 void kvm_arch_free_memslot(struct kvm_memory_slot *free,
                           struct kvm_memory_slot *dont)
 {
@@ -220,14 +212,14 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,
                                   struct kvm_memory_slot *memslot,
                                   struct kvm_memory_slot old,
                                   struct kvm_userspace_memory_region *mem,
-                                  int user_alloc)
+                                  bool user_alloc)
 {
        return 0;
 }
 
 void kvm_arch_commit_memory_region(struct kvm *kvm,
                                   struct kvm_userspace_memory_region *mem,
-                                  struct kvm_memory_slot old, int user_alloc)
+                                  struct kvm_memory_slot old, bool user_alloc)
 {
        unsigned long npages = 0;
        int i, err = 0;
-- 
1.7.11.3


<Prev in Thread] Current Thread [Next in Thread>