From: Uri Lublin <[EMAIL PROTECTED]> Replaced mem_regions[] usage with newer slots[].
Signed-off-by: Uri Lublin <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> diff --git a/libkvm/kvm-common.h b/libkvm/kvm-common.h index 4ea902b..f4040be 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 8844074..cf0c249 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); ------------------------------------------------------------------------- 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-commits mailing list kvm-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-commits