[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABCjUKD__KOtOPH4amue2O4MkBbaQ-5O2v=55kyqVp_X53cqzQ@mail.gmail.com>
Date: Wed, 21 Aug 2024 15:01:05 +0900
From: Suleiman Souhlal <suleiman@...gle.com>
To: Chao Gao <chao.gao@...el.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>, Sean Christopherson <seanjc@...gle.com>,
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>, kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
ssouhlal@...ebsd.org
Subject: Re: [PATCH v2 1/3] KVM: Introduce kvm_total_suspend_ns().
On Wed, Aug 21, 2024 at 2:40 PM Chao Gao <chao.gao@...el.com> wrote:
>
> On Tue, Aug 20, 2024 at 01:35:41PM +0900, Suleiman Souhlal wrote:
> >It returns the cumulative nanoseconds that the host has been suspended.
> >It is intended to be used for reporting host suspend time to the guest.
> >
> >Signed-off-by: Suleiman Souhlal <suleiman@...gle.com>
>
> Reviewed-by: Chao Gao <chao.gao@...el.com>
>
> one nit below
>
> >---
> > include/linux/kvm_host.h | 2 ++
> > virt/kvm/kvm_main.c | 13 +++++++++++++
> > 2 files changed, 15 insertions(+)
> >
> >diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> >index b23c6d48392f7c..8fec37b372d8c0 100644
> >--- a/include/linux/kvm_host.h
> >+++ b/include/linux/kvm_host.h
> >@@ -2494,4 +2494,6 @@ long kvm_arch_vcpu_pre_fault_memory(struct kvm_vcpu *vcpu,
> > struct kvm_pre_fault_memory *range);
> > #endif
> >
> >+u64 kvm_total_suspend_ns(void);
> >+
> > #endif
> >diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> >index cb2b78e92910fb..2235933d9247bc 100644
> >--- a/virt/kvm/kvm_main.c
> >+++ b/virt/kvm/kvm_main.c
> >@@ -5720,6 +5720,15 @@ static void kvm_shutdown(void)
> > on_each_cpu(hardware_disable_nolock, NULL, 1);
> > }
> >
> >+static u64 last_suspend;
> >+static u64 total_suspend_ns;
> >+
> >+u64
> >+kvm_total_suspend_ns(void)
>
> nit: don't wrap before the function name.
Sorry, I completely missed that, even after Sean told me.
Force of habit (FreeBSD style(9) says you have to do it).
If I send another version I will fix that.
-- Suleiman
Powered by blists - more mailing lists