From: "Chen, Tiejun" <tiejun.chen@intel.com>
To: Malcolm Crossley <malcolm.crossley@citrix.com>,
xen-devel@lists.xenproject.org
Cc: yang.z.zhang@intel.com, kevin.tian@intel.com, JBeulich@suse.com
Subject: Re: [PATCH for 4.6] VT-d: Create IOMMU mappings for RMRR regions if shared EPT is not being used
Date: Thu, 27 Aug 2015 10:59:59 +0800 [thread overview]
Message-ID: <55DE7D2F.90105@intel.com> (raw)
In-Reply-To: <1440604165-23738-1-git-send-email-malcolm.crossley@citrix.com>
This kind of issue is already gone.
https://www.mail-archive.com/xen-devel@lists.xen.org/msg32464.html
Thanks
Tiejun
On 8/26/2015 11:49 PM, Malcolm Crossley wrote:
> Add RMRR 1:1 IOMMU mappings to IOMMU page tables if EPT page table are not being
> shared with the IOMMU.
>
> This is a regression in behaviour versus Xen 4.5.
>
> Signed-off-by: Malcolm Crossley <malcolm.crossley@citrix.com>
> ---
> xen/drivers/passthrough/vtd/iommu.c | 23 ++++++++++++++++++++---
> 1 file changed, 20 insertions(+), 3 deletions(-)
>
> diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
> index 836aed5..89de741 100644
> --- a/xen/drivers/passthrough/vtd/iommu.c
> +++ b/xen/drivers/passthrough/vtd/iommu.c
> @@ -1839,8 +1839,16 @@ static int rmrr_identity_mapping(struct domain *d, bool_t map,
>
> while ( base_pfn < end_pfn )
> {
> - if ( clear_identity_p2m_entry(d, base_pfn) )
> - ret = -ENXIO;
> + if ( iommu_use_hap_pt(d) )
> + {
> + if ( clear_identity_p2m_entry(d, base_pfn) )
> + ret = -ENXIO;
> + }
> + else
> + {
> + if ( intel_iommu_unmap_page(d, base_pfn) )
> + ret = -ENXIO;
> + }
> base_pfn++;
> }
>
> @@ -1855,7 +1863,16 @@ static int rmrr_identity_mapping(struct domain *d, bool_t map,
>
> while ( base_pfn < end_pfn )
> {
> - int err = set_identity_p2m_entry(d, base_pfn, p2m_access_rw, flag);
> + int err;
> + if ( iommu_use_hap_pt(d) )
> + {
> + err = set_identity_p2m_entry(d, base_pfn, p2m_access_rw, flag);
> + }
> + else
> + {
> + err = intel_iommu_map_page(d, base_pfn, base_pfn,
> + IOMMUF_readable|IOMMUF_writable);
> + }
>
> if ( err )
> return err;
>
next prev parent reply other threads:[~2015-08-27 3:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-26 15:49 [PATCH for 4.6] VT-d: Create IOMMU mappings for RMRR regions if shared EPT is not being used Malcolm Crossley
2015-08-27 2:59 ` Chen, Tiejun [this message]
2015-08-27 8:40 ` Malcolm Crossley
2015-08-27 9:05 ` Chen, Tiejun
2015-08-27 9:14 ` Jan Beulich
2015-08-28 2:03 ` Tian, Kevin
2015-08-27 9:13 ` Jan Beulich
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=55DE7D2F.90105@intel.com \
--to=tiejun.chen@intel.com \
--cc=JBeulich@suse.com \
--cc=kevin.tian@intel.com \
--cc=malcolm.crossley@citrix.com \
--cc=xen-devel@lists.xenproject.org \
--cc=yang.z.zhang@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.