Linux IOMMU Development
 help / color / mirror / Atom feed
From: Manoj Vishwanathan <manojvishy@google.com>
To: Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	 Joerg Roedel <joro@8bytes.org>,
	Alex Williamson <alex.williamson@redhat.com>,
	 linux-arm-kernel@lists.infradead.org
Cc: kvm@vger.kernel.org, iommu@lists.linux.dev,
	linux-kernel@vger.kernel.org,  David Dillow <dillow@google.com>,
	Manoj Vishwanathan <manojvishy@google.com>
Subject: [PATCH v1 3/4] vfio: Add VFIO_DMA_MAP_FLAG_SYS_CACHE to control device access to system cache
Date: Mon, 26 Aug 2024 07:16:40 +0000	[thread overview]
Message-ID: <20240826071641.2691374-4-manojvishy@google.com> (raw)
In-Reply-To: <20240826071641.2691374-1-manojvishy@google.com>

This new flag allows controlling whether a device buffers should be mapped to
sys cache for mapped DMA regions.

Signed-off-by: Manoj Vishwanathan <manojvishy@google.com>
---
 include/uapi/linux/vfio.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h
index 2b68e6cdf190..494611a046d3 100644
--- a/include/uapi/linux/vfio.h
+++ b/include/uapi/linux/vfio.h
@@ -1560,6 +1560,7 @@ struct vfio_iommu_type1_dma_map {
 #define VFIO_DMA_MAP_FLAG_READ (1 << 0)		/* readable from device */
 #define VFIO_DMA_MAP_FLAG_WRITE (1 << 1)	/* writable from device */
 #define VFIO_DMA_MAP_FLAG_VADDR (1 << 2)
+#define VFIO_DMA_MAP_FLAG_SYS_CACHE (1 << 6)	/* Sys Cache able from device */
 	__u64	vaddr;				/* Process virtual address */
 	__u64	iova;				/* IO virtual address */
 	__u64	size;				/* Size of mapping (bytes) */
-- 
2.46.0.295.g3b9ea8a38a-goog


  parent reply	other threads:[~2024-08-26  7:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-26  7:16 [PATCH v1 0/4] vfio/iommu: Flag to allow userspace to set DMA buffers system cacheable Manoj Vishwanathan
2024-08-26  7:16 ` [PATCH v1 1/4] iommu: Add IOMMU_SYS_CACHE flag for system cache control Manoj Vishwanathan
2024-08-26  7:16 ` [PATCH v1 2/4] iommu/io-pgtable-arm: Force outer cache for page-level MAIR via user flag Manoj Vishwanathan
2024-08-26  7:16 ` Manoj Vishwanathan [this message]
2024-08-26  7:16 ` [PATCH v1 4/4] vfio/type1: Add support for VFIO_DMA_MAP_FLAG_SYS_CACHE Manoj Vishwanathan
2024-08-26 17:04 ` [PATCH v1 0/4] vfio/iommu: Flag to allow userspace to set DMA buffers system cacheable Alex Williamson
2024-08-26 17:36   ` Manoj Vishwanathan
2024-08-26 23:17   ` Jason Gunthorpe
2024-08-27 17:31     ` Robin Murphy
2024-08-28  2:55       ` Manoj Vishwanathan

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=20240826071641.2691374-4-manojvishy@google.com \
    --to=manojvishy@google.com \
    --cc=alex.williamson@redhat.com \
    --cc=dillow@google.com \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=will@kernel.org \
    /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