From: sashiko-bot@kernel.org
To: "Peng Hao" <flyingpenghao@gmail.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
virtualization@lists.linux.dev,
"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH v3] virtio_pci_modern: skip unused driver feature registers
Date: Mon, 28 Sep 2026 12:43:33 +0000 [thread overview]
Message-ID: <20260928124334.67DE51F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260928123455.49982-1-flyingpeng@tencent.com>
> vp_modern_set_extended_features() currently writes all four 32-bit
> driver feature registers. Selecting and writing each register requires
> two MMIO accesses, and each access may cause a VM exit when Linux runs as
> a guest.
>
> The virtio core resets a device before feature negotiation. Resetting
> clears all driver feature registers, so the initial finalization only
> needs to write through the highest nonzero register. A typical modern
> device uses bits 0..63 and therefore saves four MMIO accesses, or up to
> four VM exits, during each feature negotiation. Devices using a feature
> in bits 64..95 save two.
>
> A driver's validate callback may remove features and cause a second
> finalization without another reset. Track how many registers the
> previous finalization wrote and cover at least that range on the next
> call, writing zero where needed to clear a removed feature.
>
> Signed-off-by: Peng Hao <flyingpeng@tencent.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260928123455.49982-1-flyingpeng@tencent.com?part=1
next prev parent reply other threads:[~2026-09-28 12:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 12:34 [PATCH v3] virtio_pci_modern: skip unused driver feature registers Peng Hao
2026-09-28 12:43 ` sashiko-bot [this message]
2026-09-29 9:41 ` Michael S. Tsirkin
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=20260928124334.67DE51F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=eperezma@redhat.com \
--cc=flyingpenghao@gmail.com \
--cc=mst@redhat.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=virtualization@lists.linux.dev \
/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