WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH 4/5] exec.c: refactor cpu_physical_memory_map

To: stefano.stabellini@xxxxxxxxxxxxx
Subject: [Xen-devel] Re: [PATCH 4/5] exec.c: refactor cpu_physical_memory_map
From: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Date: Wed, 18 May 2011 23:56:56 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, qemu-devel@xxxxxxxxxx, agraf@xxxxxxx
Delivery-date: Wed, 18 May 2011 14:58:43 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:newsgroups:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=c3I0azcDUWCQRJqUp4BaHQ2spBZ/qbBKhJOYYvzwtWM=; b=M30dyOGt40N0erF/pUNha9zQAsV2tVpQrgVECi55DJI4MAltmS1CuB1GeAA7Yj60pn /h+QpNp3yec2nmAi4Nca11treYxj8PhrjDBRMugegJF086KMTIo+WY9Sv+2ygJBqmGbn 80lI6lpIw95bZLmf7JNxgJnViv9o3erZNNWoM=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:newsgroups:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; b=tLBcE5XJFADlGwv9FYQ+C/BwPpihoB+OnfnHDifcazFXVywhhO69Zoxqiknh69I8xy nW+phm6dDz9tYPz6PMmJ0BpAYtcDpdGJOjXMvdCGLEdmVkMUUlNZWyIFFxieMzCmIKZv 8CMOdKUuJUq0u+uEN6qEGFr6vsUgvp/GYvOuw=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1305741151-4793-4-git-send-email-stefano.stabellini@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Newsgroups: gmane.comp.emulators.qemu, gmane.comp.emulators.xen.devel
References: <alpine.DEB.2.00.1105131801470.8972@kaball-desktop> <1305741151-4793-4-git-send-email-stefano.stabellini@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.10
On 05/18/2011 07:52 PM, stefano.stabellini@xxxxxxxxxxxxx wrote:
From: Stefano Stabellini<stefano.stabellini@xxxxxxxxxxxxx>

Introduce qemu_ram_ptr_length that takes an address and a size as
parameters rather than just an address.

Refactor cpu_physical_memory_map so that we call qemu_ram_ptr_length only
once rather than calling qemu_get_ram_ptr one time per page.
This is not only more efficient but also tries to simplify the logic of
the function.
Currently we are relying on the fact that all the pages are mapped
contiguously in qemu's address space: we have a check to make sure that
the virtual address returned by qemu_get_ram_ptr from the second call on
is consecutive. Now we are making this more explicit replacing all the
calls to qemu_get_ram_ptr with a single call to qemu_ram_ptr_length
passing a size argument.

Would the interface at http://permalink.gmane.org/gmane.comp.emulators.qemu/101475 work for you alternatively?

Paolo

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel