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

RE: [Xen-devel] [PATCH 1/9] Add cpu idle pwr mgmt to xen

To: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH 1/9] Add cpu idle pwr mgmt to xen
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Mon, 5 May 2008 14:34:17 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, "Wei, Gang" <gang.wei@xxxxxxxxx>
Delivery-date: Sun, 04 May 2008 23:34:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <48186522.76E4.0078.0@xxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <48183A3F.76E4.0078.0@xxxxxxxxxx> <C43DF247.20177%keir.fraser@xxxxxxxxxxxxx> <D470B4E54465E3469E2ABBC5AFAC390F024D9217@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4818597B.76E4.0078.0@xxxxxxxxxx> <D470B4E54465E3469E2ABBC5AFAC390F024D9219@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <48186522.76E4.0078.0@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AciqrGv2tSyrXnBmR/aj4VoDV+cqVQDxkf8A
Thread-topic: [Xen-devel] [PATCH 1/9] Add cpu idle pwr mgmt to xen
>From: Jan Beulich [mailto:jbeulich@xxxxxxxxxx] 
>Sent: 2008年4月30日 18:25
>
>>>> "Tian, Kevin" <kevin.tian@xxxxxxxxx> 30.04.08 11:42 >>>
>>What do you mean by partly copying things? For a 32-on-64 guest,
>>all pointers from guest are 32-bit and compat_handler_okay already
>>ensures compat pointers validity. Only native structure may have 
>>64-bit pointer field, which is checked by common guest_handle_okay
>>if from a 64bit guest, or is trusted by increasing addr limitation if
>>from compat layer...
>
>VCPUOP_register_runstate_memory_area is an example of this.
>

Thanks for pointing out. However I still didn't understand why this 
becomes the benefit of the existing approach. For a normal parameter
conversion, the steps can be:

a) check pointer validity upon compat address limitation
b) allocate native structure with content translated from compat version
c) gear to native handler which checks native address limitation
d) back update compat structure if possible

Existing approach allocates native structure in guest address space
at step b) to bypass address check in step c), while my suggestion
is to allocate native version in Xen space by temporarily improving
address limitation at step b). You can see in either approach where
all necessary checks at step a) have to be done correctly before steping
next. For example, where partly copy applies can always be achieved
even when rest part is copied into Xen space (mixed with guest handle
but validated at step a)). Also 64bit pointer has to be checked at step a)
before improving address limitation.

Well, I'm not against existing approach since I didn't find obvious cons
to not use it. :-) As I said earlier, the intent is to get more backgrounds
and make this compat slim clearer to me. BTW, is it possible to let
guest register such compat page within its own address space? This
can release Xen overhead from managing this extra range...

Thanks,
Kevin

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

<Prev in Thread] Current Thread [Next in Thread>