summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);