All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wl@xen.org>
To: Paul Durrant <paul.durrant@citrix.com>
Cc: "Petre Pircalabu" <ppircalabu@bitdefender.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Wei Liu" <wl@xen.org>,
	"Razvan Cojocaru" <rcojocaru@bitdefender.com>,
	"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>,
	"Alexandru Isaila" <aisaila@bitdefender.com>,
	xen-devel@lists.xenproject.org,
	"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [PATCH v13 1/4] remove late (on-demand) construction of IOMMU page tables
Date: Wed, 25 Sep 2019 10:16:50 +0100	[thread overview]
Message-ID: <20190925091650.qgnfkabob6zrfebd@debian> (raw)
In-Reply-To: <20190918104113.3294-2-paul.durrant@citrix.com>

On Wed, Sep 18, 2019 at 11:41:10AM +0100, Paul Durrant wrote:
> Now that there is a per-domain IOMMU-enable flag, which should be set 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-coded 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 removed from the hypervisor (at
> the expense of some additions in the toolstack).
> 
> 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-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.
>       To account for the extra resource, 'iommu_memkb' has been added to
>       domain_build_info. This patch sets it to a value calculated based
>       on the domain's maximum memory when the P2M sharing is either not
>       supported or globally disabled, or zero otherwise. However, when
>       the toolstack option mentioned above is added, it will also be zero
>       if the per-domain IOMMU-enable flag is turned off.
> 
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> Reviewed-by: Alexandru Isaila <aisaila@bitdefender.com>
> Acked-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
> Acked-by: Julien Grall <julien.grall@arm.com>

Acked-by: Wei Liu <wl@xen.org>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2019-09-25  9:17 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-18 10:41 [Xen-devel] [PATCH v13 0/4] add per-domain IOMMU control Paul Durrant
2019-09-18 10:41 ` [Xen-devel] [PATCH v13 1/4] remove late (on-demand) construction of IOMMU page tables Paul Durrant
2019-09-25  9:00   ` Paul Durrant
2019-09-25  9:16   ` Wei Liu [this message]
2019-09-18 10:41 ` [Xen-devel] [PATCH v13 2/4] iommu: tidy up iommu_use_hap_pt() and need_iommu_pt_sync() macros Paul Durrant
2019-09-18 10:41 ` [Xen-devel] [PATCH v13 3/4] tools/ocaml: abi check: Cope with consecutive relevant enums Paul Durrant
2019-09-18 10:41 ` [Xen-devel] [PATCH v13 4/4] introduce a 'passthrough' configuration option to xl.cfg Paul Durrant
2019-09-18 15:20   ` Anthony PERARD
2019-09-25  8:40 ` [Xen-devel] [PATCH v13 0/4] add per-domain IOMMU control Paul Durrant
2019-09-25  8:50   ` Jan Beulich
2019-09-25  8:56     ` Paul Durrant
2019-09-25 15:49       ` Oleksandr
2019-09-25 15:55         ` Paul Durrant
2019-09-25 16:03         ` Paul Durrant
2019-09-25 16:04           ` Paul Durrant
2019-09-25 16:14           ` Oleksandr
2019-09-25 16:10         ` Paul Durrant
2019-09-25 16:24           ` Oleksandr
2019-09-25 18:07             ` Oleksandr
2019-09-26  8:32               ` Paul Durrant
2019-09-25 21:34           ` Julien Grall
2019-09-26  8:39             ` Paul Durrant
2019-09-26  9:13               ` Julien Grall
2019-09-26  9:17                 ` Paul Durrant
2019-09-26  9:26                   ` Julien Grall
2019-09-26  9:22               ` Oleksandr

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=20190925091650.qgnfkabob6zrfebd@debian \
    --to=wl@xen.org \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=aisaila@bitdefender.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=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 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.