Re: [PATCH v7 1/1] vfio/nvgpu: Add vfio pci variant module for grace hopper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 23, 2023 at 02:18:52PM +0000, Ankit Agrawal 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.

Regardless, you used MEMREMAP_WB which is equivalent to normal system
memory. It supports all accesses, including atomics, and doesn't
require __iomem accessors.

Jason



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux