From: Marc Zyngier <maz@kernel.org>
To: Hao Zhang <hao_zhang_kdev@163.com>
Cc: Oliver Upton <oupton@kernel.org>,
Fuad Tabba <fuad.tabba@linux.dev>,
Joey Gouly <joey.gouly@arm.com>,
Steffen Eiden <seiden@linux.ibm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Zenghui Yu <yuzenghui@huawei.com>,
kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] KVM: arm64: pvtime: Don't lose stolen time on failed updates
Date: Thu, 24 Sep 2026 19:23:09 +0100 [thread overview]
Message-ID: <86ld8q4igi.wl-maz@kernel.org> (raw)
In-Reply-To: <arD24ru13owcE1Ms@192.168.1.215>
On Mon, 21 Sep 2026 10:20:34 +0100,
Hao Zhang <hao_zhang_kdev@163.com> wrote:
>
> From: Hao Zhang <zhanghao1@kylinos.cn>
>
> kvm_update_stolen_time() advances last_steal before checking whether
> kvm_put_guest() successfully writes the updated value to guest memory.
>
> If the write fails, the updated stolen time is not visible to the guest,
> but the corresponding run delay has already been consumed from KVM's
> accounting state. A later successful update therefore starts from the
> advanced last_steal value and permanently loses that interval.
I'm sceptical.
A "transient" write failure means that userspace has unmapped the page
this should have been stored to. Userspace is in charge of the VM --
it literally is the owner.
Why should we prevent it from shooting itself in the foot? Userspace
can equally stop the vcpu from running, and this is "stolen time"
that is not accounted for.
M.
--
Without deviation from the norm, progress is not possible.
prev parent reply other threads:[~2026-09-24 18:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 9:20 Hao Zhang
2026-09-21 9:27 ` [PATCH 2/2] KVM: selftests: Test arm64 stolen time after " Hao Zhang
2026-09-24 18:23 ` Marc Zyngier [this message]
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=86ld8q4igi.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=fuad.tabba@linux.dev \
--cc=hao_zhang_kdev@163.com \
--cc=joey.gouly@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oupton@kernel.org \
--cc=seiden@linux.ibm.com \
--cc=suzuki.poulose@arm.com \
--cc=yuzenghui@huawei.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
all inboxes | Powered by JetHome®