public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@nvidia.com>
To: David Matlack <dmatlack@google.com>
Cc: <alex@shazbot.org>, <shuah@kernel.org>,
	Rubin Du <rubind@nvidia.com>, <kvm@vger.kernel.org>,
	<linux-kselftest@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v13 4/4] vfio: selftests: Add NVIDIA Falcon driver for DMA testing
Date: Mon, 13 Apr 2026 12:04:00 -0600	[thread overview]
Message-ID: <20260413120400.534fb287@nvidia.com> (raw)
In-Reply-To: <adl3j0piontmOQZS@google.com>

On Fri, 10 Apr 2026 22:19:59 +0000
David Matlack <dmatlack@google.com> wrote:
> On 2026-04-08 04:54 PM, Alex Williamson wrote:
> > From: Rubin Du <rubind@nvidia.com>
> > +static int fsp_init(struct vfio_pci_device *device)
> > +{
> > +	int ret;
> > +
> > +	ret = gpu_poll_register(device, "fsp_boot_complete",
> > +				NV_FSP_BOOT_COMPLETE_OFFSET,
> > +				NV_FSP_BOOT_COMPLETE_MASK, 0xffffffff, 5000);  
> 
> Sashiko is wondering if the mask should be something other than
> 0xffffffff:
> 
>   https://sashiko.dev/#/patchset/20260408225459.3088623-1-alex.williamson%40nvidia.com?part=4

I consulted the gpu-admin-tools and it performs the same test.  I think
the hangup here is that we're labeling the expected value field with a
macro named _MASK, when the mask is actually provided in the next
field.  I'll rename this to _SUCCESS for consistency with the reference
implementation.

> [...]
> > +	if (!falcon->no_outside_reset) {
> > +		ret = falcon_reset(device);
> > +		if (ret)
> > +			return ret;
> > +	}  
> 
> falcon_enable() is called right before nv_falcon_dma_init(). Calling
> falcon_reset() here will do falcon_disable() and then falcon_enable()
> again. So it seems unnecessary?

Yes, I think that initial falcon_enable() is unnecessary, and it's a
bit subtle, but a no_outside_reset device doesn't do anything for
enable or disable.  I think the solution is to pull that test to the
top of the enable function, at which point we can more clearly call
falcon_reset() unconditionally here and remove the earlier
falcon_enable() call.

I've incorporated all your other comments, aside from the optional
refactoring, thanks!  Testing to make sure the above change doesn't
regress on any devices will take some time, so I'll expect this to miss
the merge window and hopefully get queued for 7.2.  Thanks,

Alex

      reply	other threads:[~2026-04-13 18:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-08 22:54 [PATCH v13 0/4] vfio: selftest: Add NVIDIA GPU Falcon DMA test driver Alex Williamson
2026-04-08 22:54 ` [PATCH v13 1/4] vfio: selftests: Add memcpy chunking to vfio_pci_driver_memcpy() Alex Williamson
2026-04-08 22:54 ` [PATCH v13 2/4] vfio: selftests: Add generic PCI command register helpers Alex Williamson
2026-04-10 21:27   ` David Matlack
2026-04-08 22:54 ` [PATCH v13 3/4] vfio: selftests: Allow drivers without send_msi() support Alex Williamson
2026-04-08 22:54 ` [PATCH v13 4/4] vfio: selftests: Add NVIDIA Falcon driver for DMA testing Alex Williamson
2026-04-10 22:19   ` David Matlack
2026-04-13 18:04     ` Alex Williamson [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=20260413120400.534fb287@nvidia.com \
    --to=alex.williamson@nvidia.com \
    --cc=alex@shazbot.org \
    --cc=dmatlack@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=rubind@nvidia.com \
    --cc=shuah@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