lkml.org 
[lkml]   [2019]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 05/10] KVM: arm64: Support stolen time reporting via shared structure
On Wed, Oct 02, 2019 at 03:50:32PM +0100, Steven Price wrote:
> +int kvm_update_stolen_time(struct kvm_vcpu *vcpu, bool init)
> +{
> + struct kvm *kvm = vcpu->kvm;
> + u64 steal;
> + u64 steal_le;
> + u64 offset;
> + int idx;
> + u64 base = vcpu->arch.steal.base;
> +
> + if (base == GPA_INVALID)
> + return -ENOTSUPP;
> +
> + /* Let's do the local bookkeeping */
> + steal = vcpu->arch.steal.steal;
> + steal += current->sched_info.run_delay - vcpu->arch.steal.last_steal;
> + vcpu->arch.steal.last_steal = current->sched_info.run_delay;
> + vcpu->arch.steal.steal = steal;
> +
> + steal_le = cpu_to_le64(steal);

Agreeing on a byte order for this interface makes sense, but I don't see
it documented anywhere. Is this an SMCCC thing? Because I skimmed some
of those specs and other users too but didn't see anything obvious. Anyway
even if everybody but me knows that all data returned from SMCCC calls
should be LE, it might be nice to document that in the pvtime doc.

Thanks,
drew

\
 
 \ /
  Last update: 2019-10-03 15:23    [W:0.104 / U:1.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site