From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>
Cc: Sean Christopherson <seanjc@google.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>,
Marcelo Tosatti <mtosatti@redhat.com>
Subject: [PATCH v2 5/4] KVM: x86: hyper-v: Briefly document enum hv_tsc_page_status
Date: Wed, 17 Mar 2021 12:19:34 +0100 [thread overview]
Message-ID: <20210317111934.993523-1-vkuznets@redhat.com> (raw)
In-Reply-To: <71484ff3-491a-e8a2-3ef4-e21adb4259ee@redhat.com>
Add comments to enum hv_tsc_page_status documenting what each state means.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
arch/x86/include/asm/kvm_host.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 71b14e51fdc0..e1b6e2edc828 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -884,12 +884,19 @@ struct kvm_hv_syndbg {
u64 options;
};
+/* Current state of Hyper-V TSC page clocksource */
enum hv_tsc_page_status {
+ /* TSC page was not set up or disabled */
HV_TSC_PAGE_UNSET = 0,
+ /* TSC page MSR was written by the guest, update pending */
HV_TSC_PAGE_GUEST_CHANGED,
+ /* TSC page MSR was written by KVM userspace, update pending */
HV_TSC_PAGE_HOST_CHANGED,
+ /* TSC page was properly set up and is currently active */
HV_TSC_PAGE_SET,
+ /* TSC page is currently being updated and therefore is inactive */
HV_TSC_PAGE_UPDATING,
+ /* TSC page was set up with an inaccessible GPA */
HV_TSC_PAGE_BROKEN,
};
--
2.30.2
next prev parent reply other threads:[~2021-03-17 11:20 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-16 14:37 [PATCH v2 0/4] KVM: x86: hyper-v: TSC page fixes Vitaly Kuznetsov
2021-03-16 14:37 ` [PATCH v2 1/4] KVM: x86: hyper-v: Limit guest to writing zero to HV_X64_MSR_TSC_EMULATION_STATUS Vitaly Kuznetsov
2021-03-16 14:37 ` [PATCH v2 2/4] KVM: x86: hyper-v: Prevent using not-yet-updated TSC page by secondary CPUs Vitaly Kuznetsov
2021-03-18 17:02 ` Marcelo Tosatti
2021-03-18 18:04 ` Marcelo Tosatti
2021-03-18 18:05 ` Paolo Bonzini
2021-03-18 18:30 ` Marcelo Tosatti
2021-03-19 9:29 ` Vitaly Kuznetsov
2021-03-16 14:37 ` [PATCH v2 3/4] KVM: x86: hyper-v: Track Hyper-V TSC page status Vitaly Kuznetsov
2021-03-17 8:07 ` Paolo Bonzini
2021-03-17 11:19 ` Vitaly Kuznetsov [this message]
2021-03-16 14:37 ` [PATCH v2 4/4] KVM: x86: hyper-v: Don't touch TSC page values when guest opted for re-enlightenment Vitaly Kuznetsov
2021-03-18 14:09 ` [PATCH v2 6/4] selftests: kvm: Add basic Hyper-V clocksources tests Vitaly Kuznetsov
2021-03-18 14:26 ` Paolo Bonzini
2021-03-18 14:52 ` Vitaly Kuznetsov
2021-03-18 15:01 ` Paolo Bonzini
2021-03-18 15:23 ` Vitaly Kuznetsov
2021-03-18 15:27 ` Paolo Bonzini
2021-03-18 16:57 ` Marcelo Tosatti
2021-03-18 17:50 ` Paolo Bonzini
2021-03-18 17:55 ` Marcelo Tosatti
2021-03-19 9:35 ` Vitaly Kuznetsov
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=20210317111934.993523-1-vkuznets@redhat.com \
--to=vkuznets@redhat.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=wanpengli@tencent.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).