Re: [PATCH 5/5] KVM: paravirt time source

Avi Kivity
2007-06-18T09:24:13Z

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