From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
To: Roger Pau Monne <roger.pau@citrix.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: Jan Beulich <jbeulich@suse.com>, Xiantao Zhang <xiantao.zhang@intel.com>
Subject: Re: [PATCH v4 3/4] amd-iommu: disable iommu_hap_pt_share with AMD IOMMUs
Date: Tue, 22 Jul 2014 12:30:20 -0500 [thread overview]
Message-ID: <53CE9FAC.8070008@amd.com> (raw)
In-Reply-To: <1401876381-42977-4-git-send-email-roger.pau@citrix.com>
Roger,
I am not quite sure why you would disable "iommu_hap_pt_share" for AMD
IOMMU. The current implementation assumes that the p2m can be shared.
Also, I feel that simply just set iommu_hap_pt_share = 0 (while still
having several places in the AMD iommu drivers and p2m-pt.c assuming
that it can be shared) seems a bit messy.
Thanks,
Suravee
On 06/04/2014 05:06 AM, Roger Pau Monne wrote:
> This message has been archived. View the original item
> <http://ausev2.amd.com/EnterpriseVault/ViewMessage.asp?VaultId=1EBD12133601C6E47868220A36CFE2B201110000amdvault.amd.com&SavesetId=201407064668470~201406041006380000~Z~B0E2C95E06CD0962996EB51CFC709411>
> According to the comment in p2m.h, AMD IOMMUs don't work correctly
> with page types different than p2m_ram_rw when the p2m is shared
> between HAP and IOMMU, so disable this sharing when using AMD IOMMUs.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> Cc: Xiantao Zhang <xiantao.zhang@intel.com>
> Cc: Jan Beulich <jbeulich@suse.com>
> ---
> I have not tested this patch on AMD hardware, so I would like some
> confirmation that this actually works.
> ---
> Changes since v1:
> - Add a debug message when disabling iommu_hap_pt_share.
> ---
> xen/drivers/passthrough/amd/iommu_init.c | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/xen/drivers/passthrough/amd/iommu_init.c
> b/xen/drivers/passthrough/amd/iommu_init.c
> index b2f74ef..56bda00 100644
> --- a/xen/drivers/passthrough/amd/iommu_init.c
> +++ b/xen/drivers/passthrough/amd/iommu_init.c
> @@ -1255,6 +1255,14 @@ int __init amd_iommu_init(void)
> if ( iterate_ivrs_mappings(amd_iommu_setup_device_table) != 0 )
> goto error_out;
>
> + /*
> + * Disable sharing HAP page tables with AMD IOMMU,
> + * since it only supports p2m_ram_rw, and this would
> + * prevent doing IO to/from mapped grant frames.
> + */
> + iommu_hap_pt_share = 0;
> + printk(XENLOG_DEBUG "AMD-Vi: Disabled HAP memory map sharing with
> IOMMU");
> +
> /* per iommu initialization */
> for_each_amd_iommu ( iommu )
> if ( amd_iommu_init_one(iommu) != 0 )
> --
> 1.7.7.5 (Apple Git-26)
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2014-07-22 17:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-04 10:06 [PATCH v4 0/4] Fix grant/foreign mappings with auto-translated guests Roger Pau Monne
2014-06-04 10:06 ` [PATCH v4 1/4] xen: make logdirty and iommu mutually exclusive Roger Pau Monne
2014-06-05 11:33 ` Tim Deegan
2014-06-04 10:06 ` [PATCH v4 2/4] iommu: set correct IOMMU entries when iommu_hap_pt_share == 0 Roger Pau Monne
2014-06-04 10:06 ` [PATCH v4 3/4] amd-iommu: disable iommu_hap_pt_share with AMD IOMMUs Roger Pau Monne
2014-06-04 12:52 ` Jan Beulich
2014-07-04 9:44 ` Jan Beulich
2014-07-22 17:30 ` Suravee Suthikulpanit [this message]
2014-07-22 17:39 ` Roger Pau Monné
2014-08-08 15:36 ` Suravee Suthikulanit
2014-08-18 9:22 ` Roger Pau Monné
2014-08-07 8:12 ` Ping: " Jan Beulich
2014-06-04 10:06 ` [PATCH v4 4/4] xen: expose that grant table mappings update the IOMMU Roger Pau Monne
2014-06-04 13:07 ` 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=53CE9FAC.8070008@amd.com \
--to=suravee.suthikulpanit@amd.com \
--cc=jbeulich@suse.com \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xenproject.org \
--cc=xiantao.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 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).