)]}'
{
  "commit": "a93d153ada5bdd479e08a9a6c196b988e70eb55e",
  "tree": "f378db9c4fe8f4b1e8334ba85745f9eb63284773",
  "parents": [
    "ee835f1ccedd216b8ee4433d91215e86f5a3cd9d"
  ],
  "author": {
    "name": "Leon Romanovsky",
    "email": "leonro@nvidia.com",
    "time": "Wed Mar 11 06:17:01 2026 -0400"
  },
  "committer": {
    "name": "Leon Romanovsky",
    "email": "leon@kernel.org",
    "time": "Mon Mar 16 15:02:39 2026 -0400"
  },
  "message": "mm/hmm: Indicate that HMM requires DMA coherency\n\nHMM is fundamentally about allowing a sophisticated device to perform DMA\ndirectly to a process’s memory while the CPU accesses that same memory at\nthe same time. It is similar to SVA but does not rely on IOMMU support.\nBecause the entire model depends on concurrent access to shared memory, it\nfails as a uAPI if SWIOTLB substitutes the memory or if the CPU caches are\nnot coherent with DMA.\n\nUntil now, there has been no reliable way to report this, and various\napproximations have been used:\n\nint hmm_dma_map_alloc(struct device *dev, struct hmm_dma_map *map,\n                      size_t nr_entries, size_t dma_entry_size)\n{\n\u003c...\u003e\n        /*\n         * The HMM API violates our normal DMA buffer ownership rules and can\u0027t\n         * transfer buffer ownership.  The dma_addressing_limited() check is a\n         * best approximation to ensure no swiotlb buffering happens.\n         */\n        dma_need_sync \u003d !dev-\u003edma_skip_sync;\n        if (dma_need_sync || dma_addressing_limited(dev))\n                return -EOPNOTSUPP;\n\nSo let\u0027s mark mapped buffers with DMA_ATTR_REQUIRE_COHERENT attribute\nto prevent silent data corruption if someone tries to use hmm in a system\nwith swiotlb or incoherent DMA\n\nReviewed-by: Jason Gunthorpe \u003cjgg@nvidia.com\u003e\nSigned-off-by: Leon Romanovsky \u003cleonro@nvidia.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f6c4ddff4bd611d86bab90eecce7fd0cbbc0a16f",
      "old_mode": 33188,
      "old_path": "mm/hmm.c",
      "new_id": "5955f2f0c83db180cd9ae781214ccde2a8eeaed6",
      "new_mode": 33188,
      "new_path": "mm/hmm.c"
    }
  ]
}
