public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Takahiro Itazuri <itazur@amazon.com>
To: <seanjc@google.com>
Cc: <david@kernel.org>, <dwmw2@infradead.org>, <itazur@amazon.com>,
	<jackmanb@google.com>, <kalyazin@amazon.com>,
	<kvm@vger.kernel.org>, <patrick.roy@campus.lmu.de>,
	<pbonzini@redhat.com>, <pdurrant@amazon.com>, <tabba@google.com>,
	<vkuznets@redhat.com>, <zulinx86@gmail.com>
Subject: Re: Re: [RFC PATCH v2 1/7] KVM: x86: Avoid silent kvm-clock activation failures
Date: Tue, 10 Mar 2026 05:58:09 +0000	[thread overview]
Message-ID: <20260310055809.2690-1-itazur@amazon.com> (raw)
In-Reply-To: <aanCZqjXd0YiSmjR@google.com>

On Thu, 5 Mar 2026 09:50:30 -0800, Sean Christopherson wrote:
> On Thu, Feb 26, 2026, Takahiro Itazuri wrote:
> > kvm_write_system_time() previously ignored the return value of
> > kvm_gpc_activate().  As a result, kvm-clock activation could fail
> > silently, making debugging harder.
> > 
> > Propagate the return value so that the MSR write fail properly instead
> > of continuing silently.
> 
> Hrm.  For better or worse, KVM's ABI when it comes to PV stuff is to silently
> ignore failures.  I 100% agree it makes debugging painful, but it's unfortunately
> also "safer" in many cases, e.g. often results in degraded behavior versus flat
> out crashing the guest.
> 
> The other wrinkle is that success isn't actually guaranteed, because the actual
> writes don't happen until KVM_RUN via kvm_guest_time_update(), i.e. only failing
> in _some_ cases creates a weird ABI.
> 
> And most importantly, this would be a breaking change in guest- and user-visible
> behavior.  So while I agree silently failing is ugly, all things considered I
> think it's the least awful choice here :-/

Fair point.  I'll drop this change in the next version since I spotted a
compile error in another patch and I need to resend anyway.


  reply	other threads:[~2026-03-10  5:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-26 13:53 [RFC PATCH v2 0/7] KVM: pfncache: Add guest_memfd support to pfncache Takahiro Itazuri
2026-02-26 13:53 ` [RFC PATCH v2 1/7] KVM: x86: Avoid silent kvm-clock activation failures Takahiro Itazuri
2026-03-05 17:50   ` Sean Christopherson
2026-03-10  5:58     ` Takahiro Itazuri [this message]
2026-02-26 13:53 ` [RFC PATCH v2 2/7] KVM: pfncache: Resolve PFNs via kvm_gmem_get_pfn() for gmem-backed GPAs Takahiro Itazuri
2026-02-26 13:53 ` [RFC PATCH v2 3/7] KVM: pfncache: Obtain KHVA via vmap() for gmem with NO_DIRECT_MAP Takahiro Itazuri
2026-02-26 13:53 ` [RFC PATCH v2 4/7] KVM: Rename invalidate_begin to invalidate_start for consistency Takahiro Itazuri
2026-02-26 13:53 ` [RFC PATCH v2 5/7] KVM: pfncache: Rename invalidate_start() helper Takahiro Itazuri
2026-02-26 13:53 ` [RFC PATCH v2 6/7] KVM: Rename mn_* invalidate-related fields to generic ones Takahiro Itazuri
2026-02-26 13:53 ` [RFC PATCH v2 7/7] KVM: pfncache: Invalidate on gmem invalidation and memattr updates Takahiro Itazuri

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=20260310055809.2690-1-itazur@amazon.com \
    --to=itazur@amazon.com \
    --cc=david@kernel.org \
    --cc=dwmw2@infradead.org \
    --cc=jackmanb@google.com \
    --cc=kalyazin@amazon.com \
    --cc=kvm@vger.kernel.org \
    --cc=patrick.roy@campus.lmu.de \
    --cc=pbonzini@redhat.com \
    --cc=pdurrant@amazon.com \
    --cc=seanjc@google.com \
    --cc=tabba@google.com \
    --cc=vkuznets@redhat.com \
    --cc=zulinx86@gmail.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