From: Paul Durrant <Paul.Durrant@citrix.com>
To: Kevin Tian <kevin.tian@intel.com>,
Roger Pau Monne <roger.pau@citrix.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Wei Liu <wei.liu2@citrix.com>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Andrew Cooper <Andrew.Cooper3@citrix.com>,
"Tim (Xen.org)" <tim@xen.org>,
George Dunlap <George.Dunlap@citrix.com>,
Julien Grall <julien.grall@arm.com>,
Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>,
Ian Jackson <Ian.Jackson@citrix.com>,
Brian Woods <brian.woods@amd.com>
Subject: Re: [PATCH v2 2/5] iommu: introduce dom0-iommu option
Date: Mon, 6 Aug 2018 07:51:55 +0000 [thread overview]
Message-ID: <fc73ad5861ec4b6ba8127ae07c792464@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <AADFC41AFE54684AB9EE6CBC0274A5D19129BA3A@SHSMSX101.ccr.corp.intel.com>
> -----Original Message-----
> From: Tian, Kevin [mailto:kevin.tian@intel.com]
> Sent: 06 August 2018 04:19
> To: Roger Pau Monne <roger.pau@citrix.com>; Paul Durrant
> <Paul.Durrant@citrix.com>
> Cc: Jan Beulich <JBeulich@suse.com>; Stefano Stabellini
> <sstabellini@kernel.org>; Wei Liu <wei.liu2@citrix.com>; George Dunlap
> <George.Dunlap@citrix.com>; Andrew Cooper
> <Andrew.Cooper3@citrix.com>; Ian Jackson <Ian.Jackson@citrix.com>; Tim
> (Xen.org) <tim@xen.org>; Julien Grall <julien.grall@arm.com>; Suravee
> Suthikulpanit <suravee.suthikulpanit@amd.com>; xen-devel <xen-
> devel@lists.xenproject.org>; Brian Woods <brian.woods@amd.com>
> Subject: RE: [Xen-devel] [PATCH v2 2/5] iommu: introduce dom0-iommu
> option
>
> > From: Roger Pau Monné [mailto:roger.pau@citrix.com]
> > Sent: Friday, August 3, 2018 5:33 PM
> >
> > On Fri, Aug 03, 2018 at 10:14:49AM +0100, Paul Durrant wrote:
> > > > -----Original Message-----
> > > > From: Roger Pau Monne
> > > > Sent: 03 August 2018 10:09
> > > > To: Paul Durrant <Paul.Durrant@citrix.com>
> > > > Cc: Jan Beulich <JBeulich@suse.com>; Kevin Tian
> > <kevin.tian@intel.com>;
> > > > Stefano Stabellini <sstabellini@kernel.org>; Wei Liu
> > <wei.liu2@citrix.com>;
> > > > George Dunlap <George.Dunlap@citrix.com>; Andrew Cooper
> > > > <Andrew.Cooper3@citrix.com>; Ian Jackson <Ian.Jackson@citrix.com>;
> > Tim
> > > > (Xen.org) <tim@xen.org>; Julien Grall <julien.grall@arm.com>; Suravee
> > > > Suthikulpanit <suravee.suthikulpanit@amd.com>; xen-devel <xen-
> > > > devel@lists.xenproject.org>; Brian Woods <brian.woods@amd.com>
> > > > Subject: Re: [Xen-devel] [PATCH v2 2/5] iommu: introduce dom0-
> iommu
> > > > option
> > > >
> > > > On Fri, Aug 03, 2018 at 10:05:19AM +0100, Paul Durrant wrote:
> > > > > Actually I wonder whether we should rename 'inclusive' to 'reserved'.
> > > > Essentially 'none', 'strict' or 'relaxed' are all about mappings of RAM,
> > and then
> > > > we need to decide whether to map the E820 reserved regions. So I
> think
> > the
> > > > inclusive map as it stands today is equivalent to 'relaxed' + 'reserved'.
> > > >
> > > > Hm, not exactly. inclusive (iommu_inclusive_mapping) right now maps
> > > > everything except unusable regions. That's way more than just
> mapping
> > > > reserved regions. If we want to keep this behaviour while introducing
> > > > an option to map only reserved regions we need both an inclusive and a
> > > > reserved option.
> > > >
> > >
> > > Ok, how about:
> > >
> > > inclusive -> all E820 ranges except unusable or ram
> >
> > inclusive ATM also maps holes. So it would be all memory ranges except
> > those marked as unusable or in use by Xen.
> >
> > > reserved -> all E820 reserved ranges
> > >
> > > then
> > >
> > > strict -> all ram ranges belonging to dom0
> > > relaxed -> all ram ranges
> > > none -> no ram ranges
> > >
> > > The problem then is what does, say, reserved + no-inclusive mean? I
> > guess we could have a flag for each non ram E820 range type?
> >
> > reserved + no-inclusive would make sense for a PV Dom0 running on
> > Intel hardware in order to map only the reserved regions instead of
> > mapping almost everything below 4GB by default.
> >
> > What about the following description of the options, do you think it's
> > clear enough?
> >
> > > `= List of [ none | strict | relaxed | inclusive | reserved ]`
> >
> > * `none`: disables DMA remapping for Dom0.
> >
> > The following two options control how RAM regions are mapped in the
> > iommu for
> > Dom0:
> >
> > * `strict`: sets up DMA remapping only for the memory Dom0 actually got
> > assigned.
> >
> > * `relaxed`: sets DMA remapping for all the host RAM except regions in use
> > by
> > Xen. This is the default iommu behaviour.
> >
> > Note that all the above options are mutually exclusive. Specifying more
> > than
> > one on the `dom0-iommu` command line will result in undefined behavior.
> >
> > The following options control whether non-RAM regions are added to the
> > Dom0
> > iommu tables. Note that they can be prefixed with `no-` to effect the
> > inverse
> > meaning:
> >
> > * `inclusive`: sets up DMA remapping for all the non-RAM memory below
> > 4GB
> > except for unusable ranges. Use this to work around firmware issues
> > providing
> > incorrect RMRR/IVMD entries. Rather than only mapping RAM pages for
> > IOMMU
> > accesses for Dom0, with this option all pages up to 4GB, not marked as
> > unusable in the E820 table, will get a mapping established. Note that this
> > option is only applicable to a PV Dom0 and is enabled by default on Intel
> > hardware.
> >
> > * `reserved`: sets up DMA remapping for all the reserved regions in the
> > memory
> > map for Dom0. Use this to work around firmware issues providing
> > incorrect
> > RMRR or IVMD entries. Rather than only mapping RAM pages for IOMMU
> > accesses
> > for Dom0, all memory regions marked as reserved in the memory map
> > that don't
> > overlap with any MMIO region from emulated devices will be identity
> > mapped.
> > This option maps a subset of the memory that would be mapped when
> > using the
> > `inclusive` option. This option is available to a PVH Dom0 and is enabled
> > by
> > default on Intel hardware.
> >
>
> above makes it clear now. Just a side question. Is there also value of applying
> 'reserved' option to PV Dom0?
Absolutely. I don't think the text implies it's not available for PV dom0, just that (unlike 'inclusive') it is also available to PVH dom0.
Paul
>
> Thanks,
> Kevin
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-08-06 7:52 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-01 11:03 [PATCH v2 0/5] x86/iommu: PVH Dom0 workarounds for missing RMRR entries Roger Pau Monne
2018-08-01 11:03 ` [PATCH v2 1/5] iommu/vtd: cleanup vtd_set_hwdom_mapping after ia64 removal Roger Pau Monne
2018-08-01 11:16 ` Paul Durrant
2018-08-02 7:36 ` Tian, Kevin
2018-08-01 11:03 ` [PATCH v2 2/5] iommu: introduce dom0-iommu option Roger Pau Monne
2018-08-01 11:15 ` Paul Durrant
2018-08-01 11:16 ` Andrew Cooper
2018-08-02 7:46 ` Tian, Kevin
2018-08-02 8:23 ` Jan Beulich
2018-08-03 8:14 ` Roger Pau Monné
2018-08-03 8:35 ` Paul Durrant
2018-08-03 8:52 ` Roger Pau Monné
2018-08-03 9:05 ` Paul Durrant
2018-08-03 9:08 ` Roger Pau Monné
2018-08-03 9:14 ` Paul Durrant
2018-08-03 9:32 ` Roger Pau Monné
2018-08-03 9:37 ` Paul Durrant
2018-08-06 3:19 ` Tian, Kevin
2018-08-06 7:51 ` Paul Durrant [this message]
2018-08-06 9:09 ` Roger Pau Monné
2018-08-01 11:03 ` [PATCH v2 3/5] iommu: make iommu_inclusive_mapping a suboption of dom0-iommu Roger Pau Monne
2018-08-01 11:21 ` Paul Durrant
2018-08-02 7:58 ` Tian, Kevin
2018-08-03 10:39 ` Roger Pau Monné
2018-08-03 9:09 ` Julien Grall
2018-08-01 11:03 ` [PATCH v2 4/5] dom0/pvh: change the order of the MMCFG initialization Roger Pau Monne
2018-08-01 11:03 ` [PATCH v2 5/5] x86/iommu: add PVH support to the inclusive options Roger Pau Monne
2018-08-01 11:27 ` Paul Durrant
2018-08-02 8:03 ` Tian, Kevin
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=fc73ad5861ec4b6ba8127ae07c792464@AMSPEX02CL03.citrite.net \
--to=paul.durrant@citrix.com \
--cc=Andrew.Cooper3@citrix.com \
--cc=George.Dunlap@citrix.com \
--cc=Ian.Jackson@citrix.com \
--cc=JBeulich@suse.com \
--cc=brian.woods@amd.com \
--cc=julien.grall@arm.com \
--cc=kevin.tian@intel.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=suravee.suthikulpanit@amd.com \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.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;
as well as URLs for NNTP newsgroup(s).