This patch set moves vtd and amd iommu code to xen/drivers/passthrough. It''s a suitable place for iommu code for sharing code between different platforms in future. The three patches are as follows: Patch 1: create Makefile for xen/drivers/passthrough directroy, put shared pci-direct.h and pci_regs.h there. Patch 2: move vtd code from xen/arch/x86/hvm/vmx/vtd to xen/drivers/passthrough/vtd. Patch 3: move amd iommu code from xen/arch/x86/hvm/svm/amd_iommu to xen/drivers/passthrough/passthrough/amd_iommu. Signed-off-by: Weidong Han <weidong.han@intel.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 20/2/08 05:40, "Han, Weidong" <weidong.han@intel.com> wrote:> This patch set moves vtd and amd iommu code to xen/drivers/passthrough. > It''s a suitable place for iommu code for sharing code between different > platforms in future.Yes, but the code is currently a mix of architecture-specific and plausibly-generic. I don''t think a wholesale copying of the code into drivers/passthrough/ is the way to go -- you''ll ending up needing to ifdef in a bunch of places, or move fragments of code back again to arch/x86/. Do you actually have a demonstrable merge of vt-d for ia64 yet? -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Han, Weidong
2008-Feb-21 00:57 UTC
RE: [Xen-devel] [Patch 0/3] Move vtd and amd iommu code
Keir Fraser wrote:> On 20/2/08 05:40, "Han, Weidong" <weidong.han@intel.com> wrote: > >> This patch set moves vtd and amd iommu code to >> xen/drivers/passthrough. It''s a suitable place for iommu code for >> sharing code between different platforms in future. > > Yes, but the code is currently a mix of architecture-specific and > plausibly-generic. I don''t think a wholesale copying of the code into > drivers/passthrough/ is the way to go -- you''ll ending up needing to > ifdef in a bunch of places, or move fragments of code back again to > arch/x86/. > > Do you actually have a demonstrable merge of vt-d for ia64 yet? >Yes, we have had a initial patch for sharing vt-d between x86 and ia64, and will rebase it to latest unstable after this code move. The idea is put architectural specific code in passthrough/vtd/x86 and passthrough/vtd/ia64. directories. Originally, we didn''t move the amd iommu to drivers/passthrough/. But now there is a generic interface between vtd and amd iommu, I think it''s better to move amd iommu to drivers/passthrough/amd_iommu as well, and put iommu generic stuffs under drivers/passthrough/. Moreover, current vtd and amd iommu code are under hvm/, if want to support pv domain in future, new place may be suitable. Randy (Weidong) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel