|
| From: | Richard Henderson |
| Subject: | Re: [Qemu-devel] [PATCH v2 for-2.12 08/10] s390x/tcg: implement extract-CPU-time facility |
| Date: | Fri, 8 Dec 2017 07:12:23 -0800 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
On 12/08/2017 07:02 AM, David Hildenbrand wrote:
> +/* Store CPU Timer (also used for EXTRACT CPU TIME) */
> +uint64_t HELPER(stpt)(CPUS390XState *env)
> +{
> +#if defined(CONFIG_USER_ONLY)
> + /*
> + * Fake a descending CPU timer. We could get negative values here,
> + * but we don't care as it is up to the OS when to process that
> + * interrupt and reset to > 0.
> + */
> + return UINT64_MAX - (uint64_t)cpu_get_host_ticks();
> +#else
> + return time2tod(env->cputm - qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL));
> +#endif
> +}
> +
>
Looks good to me.
r~
| [Prev in Thread] | Current Thread | [Next in Thread] |