From: Wei Liu <wei.liu2@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
xen-devel <xen-devel@lists.xenproject.org>,
Keir Fraser <keir@xen.org>,
wei.liu2@citrix.com, Andrew Cooper <andrew.cooper3@citrix.com>
Subject: Re: [PATCH 2/3] x86/p2m‑pt: use pre‑calculated IOMMU flags
Date: Thu, 1 Oct 2015 17:31:16 +0100 [thread overview]
Message-ID: <20151001163116.GH1492@zion.uk.xensource.com> (raw)
In-Reply-To: <56002A4A02000078000A40BD@prv-mh.provo.novell.com>
Andrew pointed me to this one and suggested it go into 4.6 because it's
prerequisite for a bug fix patch.
On Mon, Sep 21, 2015 at 08:03:22AM -0600, Jan Beulich wrote:
> ... instead of recalculating them.
>
> At once clean up formatting of the touched code and drop a stray loop
> local variable shadowing a function scope one.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
> --- a/xen/arch/x86/mm/p2m-pt.c
> +++ b/xen/arch/x86/mm/p2m-pt.c
> @@ -655,17 +655,13 @@ p2m_pt_set_entry(struct p2m_domain *p2m,
> if ( old_flags & _PAGE_PRESENT )
> amd_iommu_flush_pages(p2m->domain, gfn, page_order);
> }
> + else if ( iommu_pte_flags )
> + for ( i = 0; i < (1UL << page_order); i++ )
> + iommu_map_page(p2m->domain, gfn + i, mfn_x(mfn) + i,
> + iommu_pte_flags);
> else
> - {
> - unsigned int flags = p2m_get_iommu_flags(p2mt);
> -
> - if ( flags != 0 )
> - for ( i = 0; i < (1UL << page_order); i++ )
> - iommu_map_page(p2m->domain, gfn+i, mfn_x(mfn)+i, flags);
> - else
> - for ( int i = 0; i < (1UL << page_order); i++ )
> - iommu_unmap_page(p2m->domain, gfn+i);
> - }
> + for ( i = 0; i < (1UL << page_order); i++ )
> + iommu_unmap_page(p2m->domain, gfn + i);
> }
>
> /*
>
>
>
next prev parent reply other threads:[~2015-10-01 16:31 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-21 13:57 [PATCH 0/3] x86: further P2M adjustments Jan Beulich
2015-09-21 14:02 ` [PATCH 1/3] x86/p2m: tighten conditions of IOMMU mapping updates Jan Beulich
2015-09-22 14:15 ` Jan Beulich
2015-09-23 14:00 ` Wei Liu
2015-09-29 10:47 ` Jan Beulich
2015-09-29 11:28 ` Wei Liu
2015-09-28 8:55 ` Tian, Kevin
2015-09-28 9:06 ` Jan Beulich
2015-09-28 15:12 ` Jan Beulich
2015-09-28 16:32 ` George Dunlap
2015-09-28 16:40 ` George Dunlap
2015-09-29 7:34 ` Jan Beulich
2015-09-29 7:58 ` Jan Beulich
2015-09-30 0:02 ` Jiang, Yunhong
2015-09-30 9:58 ` Jan Beulich
2015-10-02 16:37 ` Jiang, Yunhong
2015-09-21 14:03 ` [PATCH 2/3] x86/p2m‑pt: use pre‑calculated IOMMU flags Jan Beulich
2015-09-28 16:42 ` George Dunlap
2015-10-01 16:31 ` Wei Liu [this message]
2015-09-21 14:03 ` [PATCH 3/3] x86/p2m‑ept: adjust some types in ept_set_entry() Jan Beulich
2015-09-28 8:56 ` Tian, Kevin
2015-09-28 16:44 ` George Dunlap
2015-09-25 6:58 ` [PATCH 1/3] x86/p2m: tighten conditions of IOMMU mapping updates Jan Beulich
2015-09-28 11:33 ` [PATCH 0/3] x86: further P2M adjustments 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=20151001163116.GH1492@zion.uk.xensource.com \
--to=wei.liu2@citrix.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=keir@xen.org \
--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).