From: Jason Gunthorpe <jgg@ziepe.ca>
To: Michal Kalderon <michal.kalderon@marvell.com>
Cc: mkalderon@marvell.com, aelior@marvell.com, dledford@redhat.com,
bmt@zurich.ibm.com, galpress@amazon.com, sleybo@amazon.com,
leon@kernel.org, linux-rdma@vger.kernel.org,
Ariel Elior <ariel.elior@marvell.com>
Subject: Re: [PATCH v7 rdma-next 1/7] RDMA/core: Move core content from ib_uverbs to ib_core
Date: Tue, 20 Aug 2019 09:58:03 -0300 [thread overview]
Message-ID: <20190820125803.GB29246@ziepe.ca> (raw)
In-Reply-To: <20190820121847.25871-2-michal.kalderon@marvell.com>
On Tue, Aug 20, 2019 at 03:18:41PM +0300, Michal Kalderon wrote:
> Move functionality that is called by the driver, which is
> related to umap, to a new file that will be linked in ib_core.
> This is a first step in later enabling ib_uverbs to be optional.
> vm_ops is now initialized in ib_uverbs_mmap instead of
> priv_init to avoid having to move all the rdma_umap functions
> as well.
Sneaky, lets please have a comment though
> +/*
> + * Each time we map IO memory into user space this keeps track of the mapping.
> + * When the device is hot-unplugged we 'zap' the mmaps in user space to point
> + * to the zero page and allow the hot unplug to proceed.
> + *
> + * This is necessary for cases like PCI physical hot unplug as the actual BAR
> + * memory may vanish after this and access to it from userspace could MCE.
> + *
> + * RDMA drivers supporting disassociation must have their user space designed
> + * to cope in some way with their IO pages going to the zero page.
> + */
> +void rdma_umap_priv_init(struct rdma_umap_priv *priv,
> + struct vm_area_struct *vma)
> +{
> + struct ib_uverbs_file *ufile = vma->vm_file->private_data;
> +
> + priv->vma = vma;
> + vma->vm_private_data = priv;
/* vm_ops is setup in ib_uverbs_mmap() to avoid module dependencies */
> +
> + mutex_lock(&ufile->umap_lock);
> + list_add(&priv->list, &ufile->umaps);
> + mutex_unlock(&ufile->umap_lock);
> +}
> +EXPORT_SYMBOL(rdma_umap_priv_init);
Does rdma_umap_open need to set ops too, or does the VM initialize it
already?
Jason
next prev parent reply other threads:[~2019-08-20 12:58 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-20 12:18 [PATCH v7 rdma-next 0/7] RDMA/qedr: Use the doorbell overflow recovery mechanism for RDMA Michal Kalderon
2019-08-20 12:18 ` [PATCH v7 rdma-next 1/7] RDMA/core: Move core content from ib_uverbs to ib_core Michal Kalderon
2019-08-20 12:58 ` Jason Gunthorpe [this message]
2019-08-20 21:30 ` Michal Kalderon
2019-08-21 16:30 ` Michal Kalderon
2019-08-20 14:08 ` Gal Pressman
2019-08-20 21:32 ` Michal Kalderon
2019-08-21 6:06 ` Gal Pressman
2019-08-21 7:56 ` Michal Kalderon
2019-08-20 12:18 ` [PATCH v7 rdma-next 2/7] RDMA/core: Create mmap database and cookie helper functions Michal Kalderon
2019-08-20 13:21 ` Jason Gunthorpe
2019-08-20 21:23 ` [EXT] " Michal Kalderon
2019-08-21 16:47 ` Michal Kalderon
2019-08-21 16:51 ` Jason Gunthorpe
2019-08-21 17:14 ` Michal Kalderon
2019-08-21 17:37 ` Jason Gunthorpe
2019-08-26 11:53 ` Michal Kalderon
2019-08-26 12:01 ` Gal Pressman
2019-08-22 8:35 ` Gal Pressman
2019-08-25 8:36 ` Michal Kalderon
2019-08-25 10:39 ` Gal Pressman
2019-08-26 8:41 ` Michal Kalderon
2019-08-26 15:30 ` Michal Kalderon
2019-08-20 12:18 ` [PATCH v7 rdma-next 3/7] RDMA/efa: Use the common mmap_xa helpers Michal Kalderon
2019-08-22 13:18 ` Gal Pressman
2019-08-25 8:41 ` Michal Kalderon
2019-08-25 10:45 ` Gal Pressman
2019-08-26 8:42 ` Michal Kalderon
2019-08-20 12:18 ` [PATCH v7 rdma-next 4/7] RDMA/siw: " Michal Kalderon
2019-08-20 12:18 ` [PATCH v7 rdma-next 5/7] RDMA/qedr: Use the common mmap API Michal Kalderon
2019-08-20 12:18 ` [PATCH v7 rdma-next 6/7] RDMA/qedr: Add doorbell overflow recovery support Michal Kalderon
2019-08-20 12:18 ` [PATCH v7 rdma-next 7/7] RDMA/qedr: Add iWARP doorbell " Michal Kalderon
2019-08-20 18:31 ` [PATCH v7 rdma-next 0/7] RDMA/qedr: Use the doorbell overflow recovery mechanism for RDMA Gal Pressman
2019-08-21 8:03 ` Michal Kalderon
2019-08-21 10:15 ` Gal Pressman
2019-08-21 10:32 ` Michal Kalderon
2019-08-21 10:41 ` Gal Pressman
2019-08-21 12:25 ` Gal Pressman
2019-08-21 16:23 ` Gal Pressman
2019-08-21 16:27 ` Michal Kalderon
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=20190820125803.GB29246@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=aelior@marvell.com \
--cc=ariel.elior@marvell.com \
--cc=bmt@zurich.ibm.com \
--cc=dledford@redhat.com \
--cc=galpress@amazon.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=michal.kalderon@marvell.com \
--cc=mkalderon@marvell.com \
--cc=sleybo@amazon.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox