All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: "ankita@nvidia.com" <ankita@nvidia.com>,
	"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
	"yishaih@nvidia.com" <yishaih@nvidia.com>,
	"shameerali.kolothum.thodi@huawei.com" 
	<shameerali.kolothum.thodi@huawei.com>,
	"aniketa@nvidia.com" <aniketa@nvidia.com>,
	"cjia@nvidia.com" <cjia@nvidia.com>,
	"kwankhede@nvidia.com" <kwankhede@nvidia.com>,
	"targupta@nvidia.com" <targupta@nvidia.com>,
	"vsethi@nvidia.com" <vsethi@nvidia.com>,
	"Currid, Andy" <acurrid@nvidia.com>,
	"apopple@nvidia.com" <apopple@nvidia.com>,
	"jhubbard@nvidia.com" <jhubbard@nvidia.com>,
	"danw@nvidia.com" <danw@nvidia.com>,
	"anuaggarwal@nvidia.com" <anuaggarwal@nvidia.com>,
	"dnigam@nvidia.com" <dnigam@nvidia.com>,
	"udhoke@nvidia.com" <udhoke@nvidia.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v11 1/1] vfio/nvgpu: Add vfio pci variant module for grace hopper
Date: Wed, 11 Oct 2023 09:00:26 -0300	[thread overview]
Message-ID: <20231011120026.GU3952@nvidia.com> (raw)
In-Reply-To: <BN9PR11MB5276ECF96BAC7F59C93B5E4A8CCCA@BN9PR11MB5276.namprd11.prod.outlook.com>

On Wed, Oct 11, 2023 at 02:00:30AM +0000, Tian, Kevin wrote:
> > From: Jason Gunthorpe <jgg@nvidia.com>
> > Sent: Tuesday, October 10, 2023 7:34 PM
> > 
> > On Tue, Oct 10, 2023 at 08:42:13AM +0000, Tian, Kevin wrote:
> > > > From: ankita@nvidia.com <ankita@nvidia.com>
> > > > Sent: Sunday, October 8, 2023 4:23 AM
> > > >
> > > > PCI BAR are aligned to the power-of-2, but the actual memory on the
> > > > device may not. A read or write access to the physical address from the
> > > > last device PFN up to the next power-of-2 aligned physical address
> > > > results in reading ~0 and dropped writes.
> > > >
> > >
> > > my question to v10 was not answered. posted again:
> > 
> > The device FW knows and tells the VM.
> > 
> 
> This driver reads the size info from ACPI and records it as
> nvdev->memlength.

Yes, the ACPI tables have a copy of the size.

> But nvdev->memlength is not exposed to the userspace. How does the virtual
> FW acquires this knowledge and then report it to the VM?

It isn't virtual FW, I said device FW. The device itself knows how it
is configured and it can report details about the the memory
space. The VM just DMA's a RPC and asks it.

Jason

  reply	other threads:[~2023-10-11 12:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-07 20:22 [PATCH v11 1/1] vfio/nvgpu: Add vfio pci variant module for grace hopper ankita
2023-10-08  0:06 ` Bagas Sanjaya
2023-10-09 19:36   ` Alex Williamson
2023-10-11  5:45     ` Bagas Sanjaya
2023-10-10  8:42 ` Tian, Kevin
2023-10-10 11:33   ` Jason Gunthorpe
2023-10-11  2:00     ` Tian, Kevin
2023-10-11 12:00       ` Jason Gunthorpe [this message]
2023-10-13  3:43         ` Tian, Kevin
2023-10-13  4:35           ` Ankit Agrawal

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=20231011120026.GU3952@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=acurrid@nvidia.com \
    --cc=alex.williamson@redhat.com \
    --cc=aniketa@nvidia.com \
    --cc=ankita@nvidia.com \
    --cc=anuaggarwal@nvidia.com \
    --cc=apopple@nvidia.com \
    --cc=cjia@nvidia.com \
    --cc=danw@nvidia.com \
    --cc=dnigam@nvidia.com \
    --cc=jhubbard@nvidia.com \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=kwankhede@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=targupta@nvidia.com \
    --cc=udhoke@nvidia.com \
    --cc=vsethi@nvidia.com \
    --cc=yishaih@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.