[PATCH v11 04/10] iommu/vt-d: functions to copy data from old mem

David Woodhouse dwmw2 at infradead.org
Mon Jun 8 07:15:35 PDT 2015

On Mon, 2015-05-11 at 17:52 +0800, Li, Zhen-Hua wrote:
> Add some functions to copy the data from old kernel.
> These functions are used to copy context tables and page tables.
> To avoid calling iounmap between spin_lock_irqsave and 
> spin_unlock_irqrestore,
> use a link here, store the pointers , and then use iounmap to free 
> them in
> another place.
> Li, Zhen-hua:
>     The functions and logics.

Surely this isn't specific to the Intel IOMMU? Shouldn't it live
elsewhere — either in generic IOMMU code or perhaps in generic kexec
support code?

Don't we need to solve the same kexec problem on *all* platforms with
an IOMMU, and won't they all need something like this?

And I think you're misusing VTD_PAGE_{SHIFT,MASK} when you should be
using the normal PAGE_{SHIFT,MASK}. And shouldn't physical addresses be

David Woodhouse                            Open Source Technology Centre
David.Woodhouse at intel.com                              Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5691 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/kexec/attachments/20150608/b09e92e4/attachment-0001.bin>

More information about the kexec mailing list