From: Jason Gunthorpe <jgg@nvidia.com>
To: Matthew Rosato <mjrosato@linux.ibm.com>
Cc: "Tian, Kevin" <kevin.tian@intel.com>,
"Liu, Yi L" <yi.l.liu@intel.com>,
"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
"chao.p.peng@linux.intel.com" <chao.p.peng@linux.intel.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"yi.y.sun@linux.intel.com" <yi.y.sun@linux.intel.com>,
Tony Krowiak <akrowiak@linux.ibm.com>,
Halil Pasic <pasic@linux.ibm.com>,
Jason Herne <jjherne@linux.ibm.com>
Subject: Re: [iommufd 2/2] vfio/ap: validate iova during dma_unmap and trigger irq disable
Date: Mon, 28 Nov 2022 16:28:26 -0400 [thread overview]
Message-ID: <Y4UZ6rlEIHGzP6pB@nvidia.com> (raw)
In-Reply-To: <eb75c2bc-8142-116d-6b03-7a79bf7aef77@linux.ibm.com>
On Mon, Nov 28, 2022 at 10:40:48AM -0500, Matthew Rosato wrote:
> On 11/24/22 7:59 AM, Jason Gunthorpe wrote:
> > The iova and length are the range being invalidated, the driver has no
> > control over them and length is probably multiple pages.
> >
> > But this test doesn't look right?
> >
> > if (iova > q->saved_iova && q->saved_iova < iova + length)>
> > Since the page was pinned we can assume iova and length are already
> > PAGE_SIZE aligned.
>
> Yeah, I think that would be fine with a minor tweak to pick up q->saved_iova at the very start of the iova range:
>
> if (iova >= q->saved_iova && q->saved_iova < iova + length)
>
Yi can you update and repost this please?
I don't know if we will get a rc8, but we must be prepared with a
final branch by Friday in case not.
Thanks,
Jason
next prev parent reply other threads:[~2022-11-28 20:28 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-23 13:48 [iommufd 0/2] Make mdev driver dma_unmap callback tolerant to unmaps come before device open Yi Liu
2022-11-23 13:48 ` [iommufd 1/2] i915/gvt: Move kvmgt_protect_table_init() and gvt_cache_init() into init Yi Liu
2022-11-24 7:07 ` Tian, Kevin
2022-11-24 9:15 ` Yi Liu
2022-11-25 6:04 ` Zhenyu Wang
2022-11-25 9:06 ` Yi Liu
2022-11-28 6:28 ` Tian, Kevin
2022-11-28 10:22 ` Wang, Zhi A
2022-11-28 13:10 ` Yi Liu
2022-11-23 13:48 ` [iommufd 2/2] vfio/ap: validate iova during dma_unmap and trigger irq disable Yi Liu
2022-11-24 7:08 ` Tian, Kevin
2022-11-24 12:59 ` Jason Gunthorpe
2022-11-28 6:31 ` Tian, Kevin
2022-11-28 15:32 ` Matthew Rosato
2022-11-28 15:40 ` Matthew Rosato
2022-11-28 20:28 ` Jason Gunthorpe [this message]
2022-11-29 2:43 ` Tian, Kevin
2022-11-29 9:42 ` Yi Liu
2022-11-24 6:50 ` [iommufd 0/2] Make mdev driver dma_unmap callback tolerant to unmaps come before device open Tian, Kevin
2022-11-24 9:44 ` Yi Liu
2022-11-25 6:06 ` Zhenyu Wang
2022-11-25 8:58 ` Yi Liu
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=Y4UZ6rlEIHGzP6pB@nvidia.com \
--to=jgg@nvidia.com \
--cc=akrowiak@linux.ibm.com \
--cc=alex.williamson@redhat.com \
--cc=chao.p.peng@linux.intel.com \
--cc=jjherne@linux.ibm.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=mjrosato@linux.ibm.com \
--cc=pasic@linux.ibm.com \
--cc=yi.l.liu@intel.com \
--cc=yi.y.sun@linux.intel.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.