All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Edmondson <dme@dme.org>
To: Hikaru Nishida <hikalium@chromium.org>, kvm@vger.kernel.org
Cc: suleiman@google.com, Hikaru Nishida <hikalium@chromium.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Paolo Bonzini <pbonzini@redhat.com>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 1/6] x86/kvm: Reserve KVM_FEATURE_HOST_SUSPEND_TIME and MSR_KVM_HOST_SUSPEND_TIME
Date: Tue, 27 Apr 2021 16:12:50 +0100	[thread overview]
Message-ID: <cunk0onkbgt.fsf@dme.org> (raw)
In-Reply-To: <20210426090644.2218834-2-hikalium@chromium.org>

On Monday, 2021-04-26 at 18:06:40 +09, Hikaru Nishida wrote:

> No functional change; just add documentation for
> KVM_FEATURE_HOST_SUSPEND_TIME and its corresponding
> MSR_KVM_HOST_SUSPEND_TIME to support virtual suspend timing injection in
> later patches.
>
> Signed-off-by: Hikaru Nishida <hikalium@chromium.org>
> ---
>
>  Documentation/virt/kvm/cpuid.rst |  3 +++
>  Documentation/virt/kvm/msr.rst   | 29 +++++++++++++++++++++++++++++
>  2 files changed, 32 insertions(+)
>
> diff --git a/Documentation/virt/kvm/cpuid.rst b/Documentation/virt/kvm/cpuid.rst
> index cf62162d4be2..c7cb581b9a9b 100644
> --- a/Documentation/virt/kvm/cpuid.rst
> +++ b/Documentation/virt/kvm/cpuid.rst
> @@ -96,6 +96,9 @@ KVM_FEATURE_MSI_EXT_DEST_ID        15          guest checks this feature bit
>                                                 before using extended destination
>                                                 ID bits in MSI address bits 11-5.
>  
> +KVM_FEATURE_HOST_SUSPEND_TIME      16          host suspend time information
> +                                               is available at msr 0x4b564d08.
> +
>  KVM_FEATURE_CLOCKSOURCE_STABLE_BIT 24          host will warn if no guest-side
>                                                 per-cpu warps are expected in
>                                                 kvmclock
> diff --git a/Documentation/virt/kvm/msr.rst b/Documentation/virt/kvm/msr.rst
> index e37a14c323d2..de96743245c9 100644
> --- a/Documentation/virt/kvm/msr.rst
> +++ b/Documentation/virt/kvm/msr.rst
> @@ -376,3 +376,32 @@ data:
>  	write '1' to bit 0 of the MSR, this causes the host to re-scan its queue
>  	and check if there are more notifications pending. The MSR is available
>  	if KVM_FEATURE_ASYNC_PF_INT is present in CPUID.
> +
> +MSR_KVM_HOST_SUSPEND_TIME:
> +	0x4b564d08
> +
> +data:
> +	8-byte alignment physical address of a memory area which must be
> +	in guest RAM, plus an enable bit in bit 0. This memory is expected to
> +	hold a copy of the following structure::
> +
> +	 struct kvm_host_suspend_time {
> +		__u64   suspend_time_ns;
> +	 };
> +
> +	whose data will be filled in by the hypervisor.
> +	If the guest register this structure through the MSR write, the host
> +	will stop all the clocks including TSCs observed by the guest during
> +	the host's suspension and report the duration of suspend through this
> +	structure. Fields have the following meanings:
> +
> +	host_suspend_time_ns:

s/host_suspend_time_ns/suspend_time_ns/

> +		Total number of nanoseconds passed during the host's suspend
> +		while the VM is running. This value will be increasing
> +		monotonically.
> +
> +	Note that although MSRs are per-CPU entities, the effect of this
> +	particular MSR is global.
> +
> +	Availability of this MSR must be checked via bit 16 in 0x4000001 cpuid
> +	leaf prior to usage.
> -- 
> 2.31.1.498.g6c1eba8ee3d-goog

dme.
-- 
I do believe it's Madame Joy.

  reply	other threads:[~2021-04-27 15:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-26  9:06 [RFC PATCH 0/6] x86/kvm: Virtual suspend time injection support Hikaru Nishida
2021-04-26  9:06 ` [RFC PATCH 1/6] x86/kvm: Reserve KVM_FEATURE_HOST_SUSPEND_TIME and MSR_KVM_HOST_SUSPEND_TIME Hikaru Nishida
2021-04-27 15:12   ` David Edmondson [this message]
2021-04-26  9:06 ` [RFC PATCH 2/6] x86/kvm: Add a struct and constants for virtual suspend time injection Hikaru Nishida
2021-04-27 15:14   ` David Edmondson
2021-04-26  9:06 ` [RFC PATCH 3/6] x86/kvm: Add CONFIG_KVM_VIRT_SUSPEND_TIMING Hikaru Nishida
2021-04-26  9:06 ` [RFC PATCH 4/6] x86/kvm: Add a host side support for virtual suspend time injection Hikaru Nishida
2021-04-27 15:20   ` David Edmondson
2021-04-26  9:06 ` [RFC PATCH 5/6] x86/kvm: Add CONFIG_KVM_VIRT_SUSPEND_TIMING_GUEST Hikaru Nishida
2021-04-26  9:06 ` [RFC PATCH 6/6] x86/kvm: Add a guest side support for virtual suspend time injection Hikaru Nishida
2021-04-26 14:21   ` Thomas Gleixner
2021-04-26 13:15 ` [RFC PATCH 0/6] x86/kvm: Virtual suspend time injection support Maxim Levitsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cunk0onkbgt.fsf@dme.org \
    --to=dme@dme.org \
    --cc=corbet@lwn.net \
    --cc=hikalium@chromium.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=suleiman@google.com \
    --subject='Re: [RFC PATCH 1/6] x86/kvm: Reserve KVM_FEATURE_HOST_SUSPEND_TIME and MSR_KVM_HOST_SUSPEND_TIME' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.