From: Sean Christopherson <seanjc@google.com>
To: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>,
Naresh Kamboju <naresh.kamboju@linaro.org>,
Maxim Levitsky <mlevitsk@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: x86: hyper-v: Avoid writing to TSC page without an active vCPU
Date: Thu, 7 Apr 2022 16:15:35 +0000 [thread overview]
Message-ID: <Yk8OJ5Y1IKky9cnz@google.com> (raw)
In-Reply-To: <20220407154754.939923-1-vkuznets@redhat.com>
On Thu, Apr 07, 2022, Vitaly Kuznetsov wrote:
> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> index 676705ad1e23..3460bcd75bf2 100644
> --- a/arch/x86/include/asm/kvm_host.h
> +++ b/arch/x86/include/asm/kvm_host.h
> @@ -979,10 +979,10 @@ enum hv_tsc_page_status {
> HV_TSC_PAGE_GUEST_CHANGED,
> /* TSC page MSR was written by KVM userspace, update pending */
> HV_TSC_PAGE_HOST_CHANGED,
> + /* TSC page needs to be updated due to internal KVM changes */
> + HV_TSC_PAGE_KVM_CHANGED,
Why add KVM_CHANGED? I don't see any reason to differentiate between userspace
and KVM, and using KVM_CHANGED for the kvm_vm_ioctl_set_clock() case is wrong as
that is very much a userspace initiated update, not a KVM update.
> /* 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,
> };
next prev parent reply other threads:[~2022-04-07 16:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-07 15:47 [PATCH] KVM: x86: hyper-v: Avoid writing to TSC page without an active vCPU Vitaly Kuznetsov
2022-04-07 16:15 ` Sean Christopherson [this message]
2022-04-07 19:10 ` 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=Yk8OJ5Y1IKky9cnz@google.com \
--to=seanjc@google.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mlevitsk@redhat.com \
--cc=naresh.kamboju@linaro.org \
--cc=pbonzini@redhat.com \
--cc=vkuznets@redhat.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 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.