Ralph Campbell
2019-Aug-12 19:42 UTC
[Nouveau] [PATCH] nouveau/hmm: map pages after migration
On 8/10/19 4:13 AM, Christoph Hellwig wrote:> On something vaguely related to this patch: > > You use the NVIF_VMM_PFNMAP_V0_V* defines from nvif/if000c.h, which are > a little odd as we only ever set these bits, but they also don't seem > to appear to be in values that are directly fed to the hardware. > > On the other hand mmu/vmm.h defines a set of NVIF_VMM_PFNMAP_V0_*Yes, I see NVKM_VMM_PFN_*> constants with similar names and identical values, and those are used > in mmu/vmmgp100.c and what appears to finally do the low-level dma > mapping and talking to the hardware. Are these two sets of constants > supposed to be the same? Are the actual hardware values or just a > driver internal interface?It looks a bit odd to me too. I don't really know the structure/history of nouveau. Perhaps Ben Skeggs can shed more light on your question.
Christoph Hellwig
2019-Aug-16 07:11 UTC
[Nouveau] [PATCH] nouveau/hmm: map pages after migration
On Mon, Aug 12, 2019 at 12:42:30PM -0700, Ralph Campbell wrote:> > On 8/10/19 4:13 AM, Christoph Hellwig wrote: >> On something vaguely related to this patch: >> >> You use the NVIF_VMM_PFNMAP_V0_V* defines from nvif/if000c.h, which are >> a little odd as we only ever set these bits, but they also don't seem >> to appear to be in values that are directly fed to the hardware. >> >> On the other hand mmu/vmm.h defines a set of NVIF_VMM_PFNMAP_V0_* > > Yes, I see NVKM_VMM_PFN_* > >> constants with similar names and identical values, and those are used >> in mmu/vmmgp100.c and what appears to finally do the low-level dma >> mapping and talking to the hardware. Are these two sets of constants >> supposed to be the same? Are the actual hardware values or just a >> driver internal interface? > > It looks a bit odd to me too. > I don't really know the structure/history of nouveau. > Perhaps Ben Skeggs can shed more light on your question.Ben, do you have any insights on these constants?
On Fri, Aug 16, 2019 at 5:11 PM Christoph Hellwig <hch at lst.de> wrote:> > On Mon, Aug 12, 2019 at 12:42:30PM -0700, Ralph Campbell wrote: > > > > On 8/10/19 4:13 AM, Christoph Hellwig wrote: > >> On something vaguely related to this patch: > >> > >> You use the NVIF_VMM_PFNMAP_V0_V* defines from nvif/if000c.h, which are > >> a little odd as we only ever set these bits, but they also don't seem > >> to appear to be in values that are directly fed to the hardware. > >> > >> On the other hand mmu/vmm.h defines a set of NVIF_VMM_PFNMAP_V0_* > > > > Yes, I see NVKM_VMM_PFN_* > > > >> constants with similar names and identical values, and those are used > >> in mmu/vmmgp100.c and what appears to finally do the low-level dma > >> mapping and talking to the hardware. Are these two sets of constants > >> supposed to be the same? Are the actual hardware values or just a > >> driver internal interface? > > > > It looks a bit odd to me too. > > I don't really know the structure/history of nouveau. > > Perhaps Ben Skeggs can shed more light on your question. > > Ben, do you have any insights on these constants?Those sets of constants are (currently) supposed to be the same value. They don't necessarily map to the HW directly at this stage, and something different will likely be done in the future as HW changes. Ben.
Reasonably Related Threads
- [PATCH] nouveau/hmm: map pages after migration
- [PATCH] nouveau/hmm: map pages after migration
- [PATCH] nouveau/hmm: map pages after migration
- [PATCH] nouveau/hmm: map pages after migration
- [PATCH hmm 5/5] mm/hmm: remove the customizable pfn format from hmm_range_fault