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] Allow guest to register a secondary vcpu_time_i

To: Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Allow guest to register a secondary vcpu_time_info structure
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Tue, 06 Oct 2009 09:50:51 -0700
Cc: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Tue, 06 Oct 2009 09:51:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4ACB295002000078000182B7@xxxxxxxxxxxxxxxxxx>
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>
References: <4ACA8AE6.3000602@xxxxxxxx> <4ACB295002000078000182B7@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3
On 10/06/09 02:26, Jan Beulich wrote:
>>>> Jeremy Fitzhardinge <jeremy@xxxxxxxx> 06.10.09 02:10 >>>
>>>>         
>> -void update_vcpu_system_time(struct vcpu *v)
>> +static void update_guest_time_info(struct vcpu *v, struct vcpu_time_info *u)
>> +{
>> +    struct vcpu_time_info info;
>> +    u32 version;
>> +
>> +    if ( guest_handle_is_null(v->time_info_guest) )
>> +        return;
>> +
>> +    if ( __copy_from_guest(&info, v->time_info_guest, 1) )
>> +        return;
>>     
> I'd suggest using __copy_field_from_guest() here to get just the
> version member, after copying *u into info.
>   

Good idea.  I'll update the patch.

    J

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