All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Sumit Saxena <sumit.saxena@broadcom.com>, linux-scsi@vger.kernel.org
Cc: martin.petersen@oracle.com, sathya.prakash@broadcom.com,
	kashyap.desai@broadcom.com, chandrakanth.patil@broadcom.com,
	sreekanth.reddy@broadcom.com, prayas.patel@broadcom.com,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v2 2/7] mpi3mr: add support for driver commands
Date: Mon, 4 Apr 2022 07:25:41 -0700	[thread overview]
Message-ID: <8a3dfb77-9c42-871a-0d16-1ddf84516c8e@acm.org> (raw)
In-Reply-To: <20220329180616.22547-3-sumit.saxena@broadcom.com>

On 3/29/22 11:06, Sumit Saxena wrote:
> +/**
> + * struct mpi3mr_nvme_pt_sge -  Structure to store SGEs for NVMe
> + * Encapsulated commands.
> + *
> + * @base_addr: Physical address
> + * @length: SGE length
> + * @rsvd: Reserved
> + * @rsvd1: Reserved
> + * @sgl_type: sgl type
> + */
> +struct mpi3mr_nvme_pt_sge {
> +	u64 base_addr;
> +	u32 length;
> +	u16 rsvd;
> +	u8 rsvd1;
> +	u8 sgl_type;
> +};

Does the above data structure force user space software to pass a 
physical address to the kernel? A kernel driver should not do this 
unless there is a very good reason to do so. Passing a physical address 
from user space to the kernel requires freezing the virtual-to-physical 
mapping. Some user space developers erroneously use mlock() for this 
purpose. Is there any other way than the VFIO_IOMMU_MAP_DMA ioctl to 
prevent that the kernel modifies the virtual-to-physical mapping?

Thanks,

Bart.

  reply	other threads:[~2022-04-04 14:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-29 18:06 [PATCH v2 0/7] mpi3mr: add BSG interface support for controller management Sumit Saxena
2022-03-29 18:06 ` [PATCH v2 1/7] mpi3mr: add BSG device support Sumit Saxena
2022-03-29 18:06 ` [PATCH v2 2/7] mpi3mr: add support for driver commands Sumit Saxena
2022-04-04 14:25   ` Bart Van Assche [this message]
2022-04-04 15:07     ` Sumit Saxena
2022-04-04 16:31       ` Bart Van Assche
2022-04-05 18:22         ` Sumit Saxena
2022-03-29 18:06 ` [PATCH v2 3/7] mpi3mr: add support for MPT commands Sumit Saxena
2022-03-29 18:06 ` [PATCH v2 4/7] mpi3mr: add support for PEL commands Sumit Saxena
2022-03-29 18:06 ` [PATCH v2 5/7] mpi3mr: expose adapter state to sysfs Sumit Saxena
2022-03-29 18:06 ` [PATCH v2 6/7] mpi3mr: add support for nvme pass-through Sumit Saxena
2022-03-29 18:06 ` [PATCH v2 7/7] mpi3mr: update driver version to 8.0.0.69.0 Sumit Saxena

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=8a3dfb77-9c42-871a-0d16-1ddf84516c8e@acm.org \
    --to=bvanassche@acm.org \
    --cc=chandrakanth.patil@broadcom.com \
    --cc=hch@lst.de \
    --cc=kashyap.desai@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=prayas.patel@broadcom.com \
    --cc=sathya.prakash@broadcom.com \
    --cc=sreekanth.reddy@broadcom.com \
    --cc=sumit.saxena@broadcom.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.