summaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>2011-03-09 15:41:59 +0800
committerAvi Kivity <avi@redhat.com>2011-05-11 07:56:53 -0400
commit0ee8dcb87e403397e575674d0e79272b06dea12e (patch)
tree64fe3a441b259105ae4f38cbf4e7e3c9e204b9bd /virt
parent9f381a61f58bb6487c93ce2233bb9992f8ea9211 (diff)
downloadop-kernel-dev-0ee8dcb87e403397e575674d0e79272b06dea12e.zip
op-kernel-dev-0ee8dcb87e403397e575674d0e79272b06dea12e.tar.gz
KVM: cleanup memslot_id function
We can get memslot id from memslot->id directly Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/kvm_main.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 6330653..5814645 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -996,23 +996,6 @@ out:
return size;
}
-int memslot_id(struct kvm *kvm, gfn_t gfn)
-{
- int i;
- struct kvm_memslots *slots = kvm_memslots(kvm);
- struct kvm_memory_slot *memslot = NULL;
-
- for (i = 0; i < slots->nmemslots; ++i) {
- memslot = &slots->memslots[i];
-
- if (gfn >= memslot->base_gfn
- && gfn < memslot->base_gfn + memslot->npages)
- break;
- }
-
- return memslot - slots->memslots;
-}
-
static unsigned long gfn_to_hva_many(struct kvm_memory_slot *slot, gfn_t gfn,
gfn_t *nr_pages)
{
OpenPOWER on IntegriCloud