From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 5/5] KVM: paravirt time source Date: Mon, 18 Jun 2007 12:24:13 +0300 Message-ID: <46764F3D.7000207@qumranet.com> References: <4675F462.1010708@codemonkey.ws> <4675F601.3090706@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4675F601.3090706-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Anthony Liguori Cc: kvm-devel , virtualization List-Id: virtualization@lists.linuxfoundation.org Anthony Liguori wrote: > +static int kvm_hypercall_get_ktime(struct kvm_vcpu *vcpu, gva_t va) > +{ > + struct timespec now; > + int ret; > + > + ktime_get_ts(&now); > + > + ret = kvm_write_guest(vcpu, va, sizeof(now), &now); > + if (unlikely(ret)) > + return -EFAULT; > + > + return 0; > +} Please use physical addresses (much faster, less possibility of confusion). struct kvm_timespec instead of timespec. KVM_EFAULT instead of EFAULT. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/