|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/2] x86/domctl: cleanup
>>> On 01.04.15 at 17:31, <andrew.cooper3@xxxxxxxxxx> wrote:
> case XEN_DOMCTL_gettscinfo:
> - {
> - xen_guest_tsc_info_t info;
> -
> - ret = -EINVAL;
> - if ( d == current->domain ) /* no domain_pause() */
> - break;
> -
> - domain_pause(d);
> - tsc_get_info(d, &info.tsc_mode,
> - &info.elapsed_nsec,
> - &info.gtsc_khz,
> - &info.incarnation);
> - if ( copy_to_guest(domctl->u.tsc_info.out_info, &info, 1) )
> - ret = -EFAULT;
> + if ( d == currd ) /* no domain_pause() */
> + ret = -EINVAL;
> else
> - ret = 0;
> - domain_unpause(d);
> - }
> - break;
> + {
> + xen_guest_tsc_info_t info;
> +
> + domain_pause(d);
> + tsc_get_info(d, &info.tsc_mode,
> + &info.elapsed_nsec,
> + &info.gtsc_khz,
> + &info.incarnation);
> + domain_unpause(d);
> + copyback = 1;
If you want to use "copyback" here, you need to pass pointers into
domctl->u.tsc_info.out_info to tsc_get_info().
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |