Jan Beulich
2006-Apr-20 12:11 UTC
[Xen-devel] [PATCH] linux: xenbus_be currently doesn''t build properly as a module
It depends on the non-exported symbols vmlist and vmlist_lock. As exporting these doesn''t seem reasonable, the patch disables the ability to build this as a module for now. Signed-off-by: Jan Beulich <jbeulich@novell.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Apr-20 13:08 UTC
Re: [Xen-devel] [PATCH] linux: xenbus_be currently doesn''t build properly as a module
On 20 Apr 2006, at 13:11, Jan Beulich wrote:> It depends on the non-exported symbols vmlist and vmlist_lock. As > exporting these doesn''t seem reasonable, the patch > disables the ability to build this as a module for now. > > Signed-off-by: Jan Beulich <jbeulich@novell.com>A better fix is for xenbus_map_ring_valloc() to have the prototype: struct vm_struct *xenbus_map_ring_valloc(struct xenbus_device *, int); It then returns the vmarea that is allocated, or ERR_PTR() on error. Then xenbus_unmap_ring_vfree() takes the vmarea rather than vaddr and we avoid the nasty vmlist scan that cannot be modularised. There''s only one user of these functions right now, so the patch for this proper fix won''t be very big. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2006-Apr-20 13:33 UTC
Re: [Xen-devel] [PATCH] linux: xenbus_be currently doesn''t build properly as a module
>>> Keir Fraser <Keir.Fraser@cl.cam.ac.uk> 20.04.06 15:08:28 >>> > >On 20 Apr 2006, at 13:11, Jan Beulich wrote: > >> It depends on the non-exported symbols vmlist and vmlist_lock. As >> exporting these doesn''t seem reasonable, the patch >> disables the ability to build this as a module for now. >> >> Signed-off-by: Jan Beulich <jbeulich@novell.com> > >A better fix is for xenbus_map_ring_valloc() to have the prototype: >struct vm_struct *xenbus_map_ring_valloc(struct xenbus_device *, int); > >It then returns the vmarea that is allocated, or ERR_PTR() on error. > >Then xenbus_unmap_ring_vfree() takes the vmarea rather than vaddr and >we avoid the nasty vmlist scan that cannot be modularised. > >There''s only one user of these functions right now, so the patch for >this proper fix won''t be very big.I specifically didn''t do it this proper way because of the comment in the function saying doing it the raw way would be so much simpler - but if that in fact doesn''t apply... Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Apr-20 13:46 UTC
Re: [Xen-devel] [PATCH] linux: xenbus_be currently doesn''t build properly as a module
On 20 Apr 2006, at 14:33, Jan Beulich wrote:>> There''s only one user of these functions right now, so the patch for >> this proper fix won''t be very big. > > I specifically didn''t do it this proper way because of the comment in > the function > saying doing it the raw way would be so much simpler - but if that in > fact doesn''t > apply...The disadvantage of exposing the vmarea at the interface is outweighed by the advantage of being able to build as a module imo. Unless there is ever going to be a find_vm_area() call, this has to be considered the proper long-term fix to make it buildable as a module. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2006-Apr-25 13:00 UTC
Re: [Xen-devel] [PATCH] linux: xenbus_be currently doesn''t build properly as a module
So here''s the adjusted patch. Jan>>> Keir Fraser <Keir.Fraser@cl.cam.ac.uk> 20.04.06 15:08:28 >>>On 20 Apr 2006, at 13:11, Jan Beulich wrote:> It depends on the non-exported symbols vmlist and vmlist_lock. As > exporting these doesn''t seem reasonable, the patch > disables the ability to build this as a module for now. > > Signed-off-by: Jan Beulich <jbeulich@novell.com>A better fix is for xenbus_map_ring_valloc() to have the prototype: struct vm_struct *xenbus_map_ring_valloc(struct xenbus_device *, int); It then returns the vmarea that is allocated, or ERR_PTR() on error. Then xenbus_unmap_ring_vfree() takes the vmarea rather than vaddr and we avoid the nasty vmlist scan that cannot be modularised. There''s only one user of these functions right now, so the patch for this proper fix won''t be very big. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Apr-25 13:05 UTC
Re: [Xen-devel] [PATCH] linux: xenbus_be currently doesn''t build properly as a module
On 25 Apr 2006, at 14:00, Jan Beulich wrote:> So here''s the adjusted patch. JanLooks good, I''ll check it in. Thanks, Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel