[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABCjUKAx7Q6BYqffVC=vUteeNEdjdtX7a45OP4FSGH7p5h23oA@mail.gmail.com>
Date: Wed, 28 Aug 2024 18:56:54 +0900
From: Suleiman Souhlal <suleiman@...gle.com>
To: Paolo Bonzini <pbonzini@...hat.com>, Sean Christopherson <seanjc@...gle.com>
Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>, Chao Gao <chao.gao@...el.com>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, ssouhlal@...ebsd.org
Subject: Re: [PATCH v2 2/3] KVM: x86: Include host suspended time in steal time.
On Tue, Aug 20, 2024 at 1:38 PM Suleiman Souhlal <suleiman@...gle.com> wrote:
> @@ -3735,6 +3735,14 @@ static void record_steal_time(struct kvm_vcpu *vcpu)
> steal += current->sched_info.run_delay -
> vcpu->arch.st.last_steal;
> vcpu->arch.st.last_steal = current->sched_info.run_delay;
> + /*
> + * Include the time that the host was suspended in steal time.
> + * Note that the case of a suspend happening during a VM migration
> + * might not be accounted.
> + */
> + suspend_ns = kvm_total_suspend_ns();
> + steal += suspend_ns - vcpu->arch.st.last_suspend_ns;
> + vcpu->arch.st.last_suspend_ns = suspend_ns;
> unsafe_put_user(steal, &st->steal, out);
>
> version += 1;
There is an issue here: We are calling a function under UACCESS, which
raises an objtool warning.
I'll be sending a v3 with that addressed (and the function return
value wrapping in patch 1/3).
-- Suleiman
Powered by blists - more mailing lists