mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Ankit Agrawal <ankita@nvidia.com>
Cc: Jason Gunthorpe <jgg@nvidia.com>,
	Yishai Hadas <yishaih@nvidia.com>,
	"shameerali.kolothum.thodi@huawei.com" 
	<shameerali.kolothum.thodi@huawei.com>,
	"kevin.tian@intel.com" <kevin.tian@intel.com>,
	Aniket Agashe <aniketa@nvidia.com>, Neo Jia <cjia@nvidia.com>,
	Kirti Wankhede <kwankhede@nvidia.com>,
	"Tarun Gupta (SW-GPU)" <targupta@nvidia.com>,
	Vikram Sethi <vsethi@nvidia.com>,
	Andy Currid <acurrid@nvidia.com>,
	Alistair Popple <apopple@nvidia.com>,
	John Hubbard <jhubbard@nvidia.com>,
	Dan Williams <danw@nvidia.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v7 1/1] vfio/nvgpu: Add vfio pci variant module for grace hopper
Date: Wed, 23 Aug 2023 08:26:08 -0600	[thread overview]
Message-ID: <20230823082608.2867b73e.alex.williamson@redhat.com> (raw)
In-Reply-To: <BY5PR12MB37635FB280AECC6A4CF59431B01CA@BY5PR12MB3763.namprd12.prod.outlook.com>

On Wed, 23 Aug 2023 14:18:52 +0000
Ankit Agrawal <ankita@nvidia.com> wrote:

> >> +
> >> +     /*
> >> +      * Handle read on the BAR2 region. Map to the target device memory
> >> +      * physical address and copy to the request read buffer.
> >> +      */
> >> +     if (copy_to_user(buf, (u8 *)addr + offset, read_count))
> >> +             return -EFAULT;  
> >
> > Just to verify, does this memory allow access of arbitrary alignment
> > and size?  
> 
> Please correct me if I'm wrong, but based on following gdb dump data on
> the corresponding MemoryRegion->ops, unaligned access isn't supported, and
> a read of size upto 8 may be done. 
> 
> (gdb) p/x *(mr->ops)
> $7 = {read = 0xaaab5e0b1c50, write = 0xaaab5e0b1a50, read_with_attrs = 0x0, write_with_attrs = 0x0,
>   endianness = 0x2, valid = {min_access_size = 0x1, max_access_size = 0x8, unaligned = 0x0, accepts = 0x0},
>   impl = {min_access_size = 0x1, max_access_size = 0x8, unaligned = 0x0}}

This is QEMU policy relative to this region, the kernel interface is
not exclusive to QEMU usage.  Thanks,

Alex


  parent reply	other threads:[~2023-08-23 14:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-22 20:23 ankita
2023-08-22 22:29 ` Alex Williamson
2023-08-23 13:56 ` Jason Gunthorpe
2023-08-23 14:18   ` Ankit Agrawal
2023-08-23 14:25     ` Jason Gunthorpe
2023-08-23 14:26     ` Alex Williamson [this message]
2023-08-23 14:50   ` Ankit Agrawal
2023-08-23 15:14     ` Alex Williamson
2023-08-23 15:16       ` Jason Gunthorpe
2023-08-23 15:24         ` Alex Williamson
2023-08-30 13:50 ` Christoph Hellwig
2023-08-30 15:39   ` Jason Gunthorpe
2023-08-31 12:26     ` Christoph Hellwig
2023-08-31 13:51       ` Ankit Agrawal
2023-08-31 14:04         ` Christoph Hellwig
2023-08-31 18:21           ` Alex Williamson
2023-09-01  0:44             ` Jason Gunthorpe
2023-09-01  5:48               ` Christoph Hellwig
2023-09-01  5:47             ` Christoph Hellwig

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=20230823082608.2867b73e.alex.williamson@redhat.com \
    --to=alex.williamson@redhat.com \
    --cc=acurrid@nvidia.com \
    --cc=aniketa@nvidia.com \
    --cc=ankita@nvidia.com \
    --cc=apopple@nvidia.com \
    --cc=cjia@nvidia.com \
    --cc=danw@nvidia.com \
    --cc=jgg@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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome