From: "Tian, Kevin" <kevin.tian@intel.com>
To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>,
"Alex Williamson" <alex.williamson@redhat.com>,
Pierre Morel <pmorel@linux.ibm.com>,
"Raj, Ashok" <ashok.raj@intel.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"walling@linux.ibm.com" <walling@linux.ibm.com>,
"cohuck@redhat.com" <cohuck@redhat.com>,
"david@redhat.com" <david@redhat.com>,
"pasic@linux.ibm.com" <pasic@linux.ibm.com>,
"thuth@redhat.com" <thuth@redhat.com>,
"Pan, Jacob jun" <jacob.jun.pan@intel.com>
Subject: RE: [PATCH v1 1/2] vfio:iommu: Use capabilities do report IOMMU informations
Date: Thu, 10 Jan 2019 00:55:07 +0000 [thread overview]
Message-ID: <AADFC41AFE54684AB9EE6CBC0274A5D19BEE5E6B@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <5FC3163CFD30C246ABAA99954A238FA8388B1270@FRAEML521-MBS.china.huawei.com>
> From: Shameerali Kolothum Thodi
> [mailto:shameerali.kolothum.thodi@huawei.com]
>
> > -----Original Message-----
> > From: Alex Williamson [mailto:alex.williamson@redhat.com]
> > Sent: 09 January 2019 15:37
> > To: Pierre Morel <pmorel@linux.ibm.com>
> > Cc: kvm@vger.kernel.org; linux-kernel@vger.kernel.org;
> > walling@linux.ibm.com; cohuck@redhat.com; david@redhat.com;
> > pasic@linux.ibm.com; thuth@redhat.com; Shameerali Kolothum Thodi
> > <shameerali.kolothum.thodi@huawei.com>
> > Subject: Re: [PATCH v1 1/2] vfio:iommu: Use capabilities do report
> IOMMU
> > informations
> >
> > On Wed, 9 Jan 2019 13:41:53 +0100
> > Pierre Morel <pmorel@linux.ibm.com> wrote:
> >
> > > We add a new flag, VFIO_IOMMU_INFO_CAPABILITIES, inside the
> > > vfio_iommu_type1_info to specify the support for capabilities.
> > >
> > > We add a new capability, with id VFIO_IOMMU_INFO_CAP_DMA
> > > in the capability list of the VFIO_IOMMU_GET_INFO ioctl.
> > >
> > > Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
> > > ---
> > > include/uapi/linux/vfio.h | 9 +++++++++
> > > 1 file changed, 9 insertions(+)
> > >
> > > diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h
> > > index 8131028..54c4fcb 100644
> > > --- a/include/uapi/linux/vfio.h
> > > +++ b/include/uapi/linux/vfio.h
> > > @@ -669,6 +669,15 @@ struct vfio_iommu_type1_info {
> > > __u32 flags;
> > > #define VFIO_IOMMU_INFO_PGSIZES (1 << 0) /* supported page
> sizes
> > info */
> > > __u64 iova_pgsizes; /* Bitmap of supported page sizes
> */
> > > +#define VFIO_IOMMU_INFO_CAPABILITIES (1 << 1) /* support
> capabilities
> > info */
> > > + __u64 cap_offset; /* Offset within info struct of first cap */
> > > +};
> > > +
> > > +#define VFIO_IOMMU_INFO_CAP_DMA 1
> > > +struct vfio_iommu_cap_dma {
> > > + struct vfio_info_cap_header header;
> > > + __u64 dma_start;
> > > + __u64 dma_end;
> > > };
> > >
> > > #define VFIO_IOMMU_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12)
> >
> > Unfortunately for most systems, a simple start and end is not really
> > sufficient to describe the available IOVA space, there are often
> > reserved regions intermixed, so this is not really a complete
> > solution. Shameer tried to solve this last year[1] but we ran into a
> > road block that Intel IGD devices impose a reserved range of IOVA
> > spaces reported to the user that conflict with existing assignment of
> > this device and we haven't figured out yet how to be more selective of
> > the enforcement of those reserved ranges. Thanks,
>
> Right. I had further discussions to unblock this at KVM forum/off-list with
> Intel folks and was promised some help.
>
> IIRC the discussion was at, Kevin/Ashok will take another look on your
> proposed approach to exclude the RMRR[1] and see whether that is good
> enough or not.
>
> Kevin/Ashok,
>
> Please update if you had a chance to look into it.
+Jacob.
My recent check seems to indicate [1] possibly fine with IGD, but I'll let
Ashok/Jacob to double confirm and ack since they are the owner of
intel-iommu driver.
>
> Thanks,
> Shameer
>
> [1]. https://lkml.org/lkml/2018/6/5/897
>
> > Alex
> >
> > [1] https://lkml.org/lkml/2018/4/18/293
next prev parent reply other threads:[~2019-01-10 0:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-09 12:41 [PATCH v1 0/2] Get DMA information from real IOMMU Pierre Morel
2019-01-09 12:41 ` [PATCH v1 1/2] vfio:iommu: Use capabilities do report IOMMU informations Pierre Morel
2019-01-09 15:37 ` Alex Williamson
2019-01-09 15:37 ` Alex Williamson
2019-01-09 17:07 ` Pierre Morel
2019-01-09 17:07 ` Pierre Morel
2019-01-09 19:43 ` Alex Williamson
2019-01-09 19:43 ` Alex Williamson
2019-01-10 12:47 ` Pierre Morel
2019-01-10 12:47 ` Pierre Morel
2019-01-09 17:08 ` Shameerali Kolothum Thodi
2019-01-10 0:55 ` Tian, Kevin [this message]
2019-01-09 12:41 ` [PATCH v1 2/2] vfio:iommu: Get DMA information from real IOMMU Pierre Morel
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=AADFC41AFE54684AB9EE6CBC0274A5D19BEE5E6B@SHSMSX101.ccr.corp.intel.com \
--to=kevin.tian@intel.com \
--cc=alex.williamson@redhat.com \
--cc=ashok.raj@intel.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=jacob.jun.pan@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pasic@linux.ibm.com \
--cc=pmorel@linux.ibm.com \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=thuth@redhat.com \
--cc=walling@linux.ibm.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.