From: Alexandru Stefan ISAILA <aisaila@bitdefender.com>
To: Paul Durrant <paul.durrant@citrix.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "Petre Ovidiu PIRCALABU" <ppircalabu@bitdefender.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Razvan Cojocaru" <rcojocaru@bitdefender.com>,
"Wei Liu" <wl@xen.org>,
"Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
"George Dunlap" <George.Dunlap@eu.citrix.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Ian Jackson" <ian.jackson@eu.citrix.com>,
"Tim Deegan" <tim@xen.org>, "Julien Grall" <julien.grall@arm.com>,
"Tamas K Lengyel" <tamas@tklengyel.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [PATCH 3/6] remove late (on-demand) construction of IOMMU page tables
Date: Thu, 1 Aug 2019 08:05:10 +0000 [thread overview]
Message-ID: <f169e87d-676d-1a30-e813-001460364142@bitdefender.com> (raw)
In-Reply-To: <20190730134419.2739-4-paul.durrant@citrix.com>
On 30.07.2019 16:44, Paul Durrant wrote:
> Now that there is a per-domain IOMMU enable flag, which should be enabled if
> any device is going to be passed through, stop deferring page table
> construction until the assignment is done. Also don't tear down the tables
> again when the last device is de-assigned; defer that task until domain
> destruction.
>
> This allows the has_iommu_pt() helper and iommu_status enumeration to be
> removed. Calls to has_iommu_pt() are simply replaced by calls to
> is_iommu_enabled(). Remaining open-code tests of iommu_hap_pt_share can also
> be replaced by calls to iommu_use_hap_pt().
> The arch_iommu_populate_page_table() and iommu_construct() functions become
> redundant, as does the 'strict mode' dom0 page_list mapping code in
> iommu_hwdom_init(), and iommu_teardown() can be made static is its only
> remaining caller, iommu_domain_destroy(), is within the same source
> module.
>
> All in all, about 220 lines of code are rmeoved.
>
> NOTE: This patch will cause a small amount of extra resource to be used
> to accommodate IOMMU page tables that may never be used, since the
> per-domain IOMMU flag enable flag is currently set to the value
> of the global iommu_enable flag. A subsequent patch will add an
> option to the toolstack to allow it to be turned off if there is
> no intention to assign passthrough hardware to the domain.
>
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
For the vm_event part.
Reviewed-by: Alexandru Isaila <aisaila@bitdefender.com>
> ---
> Cc: Stefano Stabellini <sstabellini@kernel.org>
> Cc: Julien Grall <julien.grall@arm.com>
> Cc: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> Cc: George Dunlap <George.Dunlap@eu.citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Jan Beulich <jbeulich@suse.com>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Cc: Tim Deegan <tim@xen.org>
> Cc: Wei Liu <wl@xen.org>
> Cc: "Roger Pau Monné" <roger.pau@citrix.com>
> Cc: Tamas K Lengyel <tamas@tklengyel.com>
> Cc: George Dunlap <george.dunlap@eu.citrix.com>
> Cc: Razvan Cojocaru <rcojocaru@bitdefender.com>
> Cc: Alexandru Isaila <aisaila@bitdefender.com>
> Cc: Petre Pircalabu <ppircalabu@bitdefender.com>
> ---
> xen/arch/arm/p2m.c | 2 +-
> xen/arch/x86/dom0_build.c | 2 +-
> xen/arch/x86/hvm/mtrr.c | 5 +-
> xen/arch/x86/mm/mem_sharing.c | 2 +-
> xen/arch/x86/mm/paging.c | 2 +-
> xen/arch/x86/x86_64/mm.c | 2 +-
> xen/common/memory.c | 4 +-
> xen/common/vm_event.c | 2 +-
> xen/drivers/passthrough/device_tree.c | 11 ---
> xen/drivers/passthrough/iommu.c | 134 ++++++--------------------
> xen/drivers/passthrough/pci.c | 12 ---
> xen/drivers/passthrough/vtd/iommu.c | 10 +-
> xen/drivers/passthrough/x86/iommu.c | 95 ------------------
> xen/include/asm-arm/iommu.h | 2 +-
> xen/include/asm-x86/iommu.h | 2 +-
> xen/include/xen/iommu.h | 16 ---
> xen/include/xen/sched.h | 2 -
> 17 files changed, 42 insertions(+), 263 deletions(-)
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-08-01 8:05 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-30 13:44 [Xen-devel] [PATCH 0/6] per-domain IOMMU control Paul Durrant
2019-07-30 13:44 ` [Xen-devel] [PATCH 1/6] domain: introduce XEN_DOMCTL_CDF_iommu Paul Durrant
2019-08-07 9:21 ` Jan Beulich
2019-08-12 12:22 ` Paul Durrant
2019-07-30 13:44 ` [Xen-devel] [PATCH 2/6] use is_iommu_enabled() where appropriate Paul Durrant
2019-08-07 9:55 ` Jan Beulich
2019-08-07 10:22 ` Julien Grall
2019-08-12 14:53 ` Paul Durrant
2019-07-30 13:44 ` [Xen-devel] [PATCH 3/6] remove late (on-demand) construction of IOMMU page tables Paul Durrant
2019-08-01 8:05 ` Alexandru Stefan ISAILA [this message]
2019-08-07 10:31 ` Jan Beulich
2019-08-12 15:41 ` Paul Durrant
2019-08-12 16:26 ` Paul Durrant
2019-08-14 9:39 ` Paul Durrant
2019-08-27 7:48 ` Jan Beulich
2019-08-29 9:33 ` Paul Durrant
2019-08-29 9:52 ` Jan Beulich
2019-08-29 10:20 ` Paul Durrant
2019-08-29 10:33 ` Jan Beulich
2019-08-27 7:47 ` Jan Beulich
2019-08-27 7:45 ` Jan Beulich
2019-08-29 9:28 ` Paul Durrant
2019-07-30 13:44 ` [Xen-devel] [PATCH 4/6] make passthrough/pci.c:deassign_device() static Paul Durrant
2019-08-06 15:54 ` Jan Beulich
2019-08-14 9:42 ` Paul Durrant
2019-07-30 13:44 ` [Xen-devel] [PATCH 5/6] iommu: tidy up iommu_us_hap_pt() and need_iommu_pt_sync() macros Paul Durrant
2019-08-07 10:41 ` Jan Beulich
2019-08-14 10:13 ` Paul Durrant
2019-08-14 10:20 ` Julien Grall
2019-08-14 10:27 ` Paul Durrant
2019-08-14 10:44 ` Julien Grall
2019-08-14 11:11 ` Paul Durrant
2019-08-14 12:28 ` Julien Grall
2019-08-14 12:35 ` Paul Durrant
2019-08-27 7:53 ` Jan Beulich
2019-07-30 13:44 ` [Xen-devel] [PATCH 6/6] introduce a 'passthrough' configuration option to xl.cfg Paul Durrant
2019-08-07 12:12 ` Jan Beulich
2019-08-14 10:40 ` Paul Durrant
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=f169e87d-676d-1a30-e813-001460364142@bitdefender.com \
--to=aisaila@bitdefender.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=julien.grall@arm.com \
--cc=konrad.wilk@oracle.com \
--cc=paul.durrant@citrix.com \
--cc=ppircalabu@bitdefender.com \
--cc=rcojocaru@bitdefender.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=tamas@tklengyel.com \
--cc=tim@xen.org \
--cc=wl@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).