From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Subject: Re: [PATCH] libxl: blktap2 portiblity fixes Date: Mon, 26 Jul 2010 18:01:21 +0200 Message-ID: <201007261801.21902.Christoph.Egger@amd.com> References: <201007201831.21416.Christoph.Egger@amd.com> <1280156440.5872.7085.camel@zakaz.uk.xensource.com> <19533.42466.407049.3678@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <19533.42466.407049.3678@mariner.uk.xensource.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: Ian Campbell , "xen-devel@lists.xensource.com" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Monday 26 July 2010 17:12:34 Ian Jackson wrote: > Ian Campbell writes ("Re: [Xen-devel] [PATCH] libxl: blktap2 portiblity fixes"): > > On Mon, 2010-07-26 at 15:53 +0100, Ian Jackson wrote: > > > * Code motion between files, and creation of libxl_linux.c; > > > * Provide libxl_netbsd.c and associated Makefile changes to > > > disable blktap2 on netbsd > > > > I wonder if this might be better as libxl_blk_blktap.c and > > libxl_blk_none.c or something to correspond to the presence of the > > specific feature rather than an OS which happens to implement the > > feature? > > Good point. > > > (I guess in this specific instance the chances of blktap > > cropping up on another OS is pretty slim). > > Well, but there's no harm to naming the feature rather than the > platform. It's good practice. It's bad practise to have OS specific code in common code. There's a lot of sysfs code in libxl.c - currently only used for pci passthrough. In June/July I discussed three other API functions with Stephano (which are not part of this series): - libxl_pciback_flr performs FLR on the device specified by BFD - libxl_pciback_bind unhooks pci device from dom0 and bind to pciback - libxl_pciback_unbind unbind pci device from pciback and give back to dom0 These should allow to move all sysfs code in libxl.c into a linux specific file. -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632