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] virtio_pci_modern: skip unused trailing driver feature words
Date: Sun, 20 Sep 2026 07:02:56 +0000 [thread overview]
Message-ID: <20260920070256.894BA1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260920065746.86415-1-flyingpeng@tencent.com>
> Since commit 69b9461512246 ("virtio_pci_modern: allow configuring
> extended features"), vp_modern_set_extended_features() writes all 128
> feature bits on every device. Each 32-bit word requires one write to
> guest_feature_select and another to guest_feature, even when the upper
> 64 feature bits are all zero.
>
> Feature negotiation starts after a device reset, which clears the
> device-side driver features. There is therefore no need to write
> trailing zero 64-bit words on the first feature finalization.
>
> finalize_features() can, however, be called again without an intervening
> reset when a driver's validate callback changes the negotiated features.
> Remember how many words were written since the last reset and include
> that range in the next write, so that a repeated finalization can clear
> features which were previously enabled.
>
> This avoids four MMIO writes for devices which negotiate no feature
> above bit 63, while preserving the full-overwrite behavior when the
> negotiated feature range shrinks.
>
> 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/20260920065746.86415-1-flyingpeng@tencent.com?part=1
next prev parent reply other threads:[~2026-09-20 7:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-20 6:57 [PATCH] virtio_pci_modern: skip unused trailing driver feature words Peng Hao
2026-09-20 7:02 ` sashiko-bot [this message]
2026-09-20 8:40 ` Michael S. Tsirkin
2026-09-24 7:08 ` Hao Peng
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=20260920070256.894BA1F000FF@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