From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: [PATCH] Allow guest to register a secondary vcpu_time_info structure Date: Tue, 06 Oct 2009 09:50:51 -0700 Message-ID: <4ACB756B.1030301@goop.org> References: <4ACA8AE6.3000602@goop.org> <4ACB295002000078000182B7@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4ACB295002000078000182B7@vpn.id2.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: Dan Magenheimer , Xen-devel , Keir Fraser List-Id: xen-devel@lists.xenproject.org On 10/06/09 02:26, Jan Beulich wrote: >>>> Jeremy Fitzhardinge 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