Langsdorf, Mark
2007-Feb-15 22:59 UTC
[Xen-devel] [PATCH] Use lib/swiotlb code for x86_64 SWIOTLB
As part of my efforts to enable GART/IOMMU on x86_64, I switch from using arch/i386/swiotlb-xen.c for the SWIOTLB implementation to lib/swiotlb-xen.c for x86_64 processors. After this patch is accepted, I''ll submit the patch to enable the GART/IOMMU. Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2007-Feb-16 00:00 UTC
Re: [Xen-devel] [PATCH] Use lib/swiotlb code for x86_64 SWIOTLB
On 15/2/07 22:59, "Langsdorf, Mark" <mark.langsdorf@amd.com> wrote:> As part of my efforts to enable GART/IOMMU on x86_64, > I switch from using arch/i386/swiotlb-xen.c for the > SWIOTLB implementation to lib/swiotlb-xen.c for x86_64 > processors. > > After this patch is accepted, I''ll submit the patch to > enable the GART/IOMMU. > > Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>Jan has been through the swiotlb code recently so may have an opinion on this patch. Using the common swiotlb code (as far as possible) for x86/64 may make sense -- many of the nasty differences in our own swiotlb implementation are to deal with CONFIG_HIGHMEM which does not exist on x86/64. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2007-Feb-16 08:39 UTC
Re: [Xen-devel] [PATCH] Use lib/swiotlb code for x86_64 SWIOTLB
>>> Keir Fraser <Keir.Fraser@cl.cam.ac.uk> 16.02.07 01:00 >>> >On 15/2/07 22:59, "Langsdorf, Mark" <mark.langsdorf@amd.com> wrote: > >> As part of my efforts to enable GART/IOMMU on x86_64, >> I switch from using arch/i386/swiotlb-xen.c for the >> SWIOTLB implementation to lib/swiotlb-xen.c for x86_64 >> processors. >> >> After this patch is accepted, I''ll submit the patch to >> enable the GART/IOMMU. >> >> Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com> > >Jan has been through the swiotlb code recently so may have an opinion on >this patch. Using the common swiotlb code (as far as possible) for x86/64 >may make sense -- many of the nasty differences in our own swiotlb >implementation are to deal with CONFIG_HIGHMEM which does not exist on >x86/64.I can''t see how this can work: First, the way the change is done i386 will also use that file (and then arch/i386/kernel/swiotlb.c should also be deleted by the patch). Second, there''s nothing Xen specific anymore in that file, not even the contiguous region creation (the sole difference to plain 2.6.20 is the use of virt_to_bus/bus_to_virt). I think the first patch should be really just a move of arch/i386/kernel/swiotlb.c to lib/swiotlb-xen.c, nothing else. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Langsdorf, Mark
2007-Feb-22 00:09 UTC
RE: [Xen-devel] [PATCH] Use lib/swiotlb code for x86_64 SWIOTLB
> I can''t see how this can work: First, the way the change is > done i386 will also use that file (and then > arch/i386/kernel/swiotlb.c should also be deleted by > the patch).That wasn''t intentional. i386 can still use the arch/i386 code.> Second, there''s nothing Xen specific anymore in that file, not > even the contiguous region creation (the sole difference to > plain 2.6.20 is the use of virt_to_bus/bus_to_virt). I think > the first patch should be really just a move of > arch/i386/kernel/swiotlb.c to lib/swiotlb-xen.c, nothing else.This should be an improved version of lib/swiotlb.c as lib/swiotlb-xen.c, with correct code to make the mappings contiguous. -Mark Langsdorf AMD, Inc. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2007-Feb-22 10:24 UTC
RE: [Xen-devel] [PATCH] Use lib/swiotlb code for x86_64 SWIOTLB
>>> "Langsdorf, Mark" <mark.langsdorf@amd.com> 22.02.07 01:09 >>> >> I can''t see how this can work: First, the way the change is >> done i386 will also use that file (and then >> arch/i386/kernel/swiotlb.c should also be deleted by >> the patch). > >That wasn''t intentional. i386 can still use the >arch/i386 code.I still don''t understand this - both x86 architectures should be able to use the same file.>> Second, there''s nothing Xen specific anymore in that file, not >> even the contiguous region creation (the sole difference to >> plain 2.6.20 is the use of virt_to_bus/bus_to_virt). I think >> the first patch should be really just a move of >> arch/i386/kernel/swiotlb.c to lib/swiotlb-xen.c, nothing else. > >This should be an improved version of lib/swiotlb.c as >lib/swiotlb-xen.c, with correct code to make the mappings >contiguous.I still don''t understand why this differs more than necessary from arch/i386/swiotlb.c, and I continue to find it more desirable to move arch/i386/swiotlb.c to lib/swiotlb-xen.c first (without any changes) and then have a patch that changes what you really think needs to be changed for your purpose. I''m specifically asking this because I posted changes to lib/swiotlb.c to lkml so that (if all of them get pushed into the kernel.org tree) Xen wouldn''t even need its own version anymore, but would just need a header providing certain hooks. Jan Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel