[PATCH RFC 2/6] x86/hyper-v: add a function to read both TSC and TSC page value simulateneously
Paolo Bonzini
pbonzini at redhat.com
Fri Dec 1 17:52:48 UTC 2017
On 01/12/2017 18:29, Stephen Hemminger wrote:
>> +static inline u64 hv_read_tsc_page_tsc(const struct ms_hyperv_tsc_page *tsc_pg,
>> + u64 *cur_tsc)
>> +{
>> + *cur_tsc = rdtsc();
>> +
>> + return cur_tsc;
> Why do return and setting by reference. Looks like an ugly API.
This is the fallback implementation for !CONFIG_HYPERV_TSCPAGE, which
explains why it's ugly, but why is it needed at all (or it could just
BUG())?
Thanks,
Paolo
More information about the devel
mailing list