summaryrefslogtreecommitdiff
path: root/libkvm
diff options
context:
space:
mode:
authorUri Lublin <uril@qumranet.com>2007-12-03 02:02:19 +0200
committerAvi Kivity <avi@qumranet.com>2007-12-11 16:41:23 +0200
commitc0500f5755a7755731c6bc45eff65c5672a42ab5 (patch)
treef06d97799c1846911bfde6c75910b2807e2d5d26 /libkvm
parenta5b56148ad52ac5d975a57cd40377b3a534c4556 (diff)
kvm: libkvm: deleted old mem_regions[] from kvm_context
Replaced mem_regions[] usage with newer slots[]. Signed-off-by: Uri Lublin <uril@qumranet.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'libkvm')
-rw-r--r--libkvm/kvm-common.h2
-rw-r--r--libkvm/libkvm.c4
2 files changed, 1 insertions, 5 deletions
diff --git a/libkvm/kvm-common.h b/libkvm/kvm-common.h
index 4ea902bb..f4040be6 100644
--- a/libkvm/kvm-common.h
+++ b/libkvm/kvm-common.h
@@ -43,8 +43,6 @@ struct kvm_context {
void *physical_memory;
/// is dirty pages logging enabled for all regions or not
int dirty_pages_log_all;
- /// memory regions parameters
- struct kvm_memory_region mem_regions[KVM_MAX_NUM_MEM_REGIONS];
/// do not create in-kernel irqchip if set
int no_irqchip_creation;
/// in-kernel irqchip status
diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c
index 8844074b..cf0c2496 100644
--- a/libkvm/libkvm.c
+++ b/libkvm/libkvm.c
@@ -245,7 +245,6 @@ kvm_context_t kvm_init(struct kvm_callbacks *callbacks,
kvm->opaque = opaque;
kvm->dirty_pages_log_all = 0;
kvm->no_irqchip_creation = 0;
- memset(&kvm->mem_regions, 0, sizeof(kvm->mem_regions));
return kvm;
out_close:
@@ -577,8 +576,7 @@ void kvm_destroy_phys_mem(kvm_context_t kvm, unsigned long phys_start,
__FUNCTION__, slot);
return;
}
- mem = &kvm->mem_regions[slot];
- if (phys_start != mem->guest_phys_addr) {
+ if (phys_start != slots[slot].phys_addr) {
fprintf(stderr,
"WARNING: %s: phys_start is 0x%lx expecting 0x%llx\n",
__FUNCTION__, phys_start, mem->guest_phys_addr);