From: David Matlack <dmatlack@google.com>
To: Alex Williamson <alex@shazbot.org>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, stable@vger.kernel.org,
Abhishek Sahu <abhsahu@nvidia.com>,
Raghavendra Rao Ananta <rananta@google.com>,
Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH 5/5] vfio: selftests: Add test for device power state transitions
Date: Wed, 4 Nov 2026 18:15:54 +0000 [thread overview]
Message-ID: <aut2WmTGY9M8BM4U@google.com> (raw)
In-Reply-To: <20261103153553.6caa7d7d@shazbot.org>
On 2026-11-03 03:35 PM, Alex Williamson wrote:
> On Thu, 29 Oct 2026 20:33:24 +0000
> David Matlack <dmatlack@google.com> wrote:
> > +/*
> > + * Put the device into D3hot via config space and then close it. VFIO must
> > + * return the device to D0 when it is closed.
> > + */
>
> But we're only testing that it's re-opened into D0, there are multiple
> ways that could have happened. It's pretty common that a guest
> shutdown might put devices into a low power state and it's brought back
> to D0 on close, on reset, on the next open, or even on the reset in
> open. So I don't think we're testing what we claim to test here. I'm
> not sure this specific D0 transition is observable, even if we were to
> resort to pci-sysfs.
You are right, this comment is not accurate. The goal of this test is
to exercise closing a device while it is in D3hot. The close should
succeed and the device should be in D0 after it is next opened. The
transition from D3hot to D0 could happen during close, open, or anywhere
in the middle, without changing the uAPI.
I'll fixup the comment, changelog, and test name in v2.
prev parent reply other threads:[~2026-11-04 18:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-29 20:33 [PATCH 0/5] vfio/pci: Fix power state race with SR-IOV enablement David Matlack
2026-10-29 20:33 ` [PATCH 1/5] vfio/pci: Hold memory_lock for all calls to vfio_pci_set_power_state() David Matlack
2026-10-29 20:33 ` [PATCH 2/5] vfio/pci: Annotate lockless accesses to vdev->sriov_active David Matlack
2026-10-29 20:33 ` [PATCH 3/5] vfio: selftests: Add vfio_pci_find_capability() David Matlack
2026-10-29 20:33 ` [PATCH 4/5] vfio: selftests: Add sysfs_kernel_warn_count_get() David Matlack
2026-10-29 20:33 ` [PATCH 5/5] vfio: selftests: Add test for device power state transitions David Matlack
2026-11-03 22:35 ` Alex Williamson
2026-11-04 18:15 ` David Matlack [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=aut2WmTGY9M8BM4U@google.com \
--to=dmatlack@google.com \
--cc=abhsahu@nvidia.com \
--cc=alex@shazbot.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=rananta@google.com \
--cc=shuah@kernel.org \
--cc=stable@vger.kernel.org \
/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®