tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH] pcictl: simplify its usage



On Wed, Jun 03, 2009 at 11:28:22PM +0200, Christoph Egger wrote:
> 
> Hi,
> 
> A (shell,perl,python,whatever) script that wants
> a list of all pci devices has something to do like
> this:
> 
>   for i in 0 1 2 3 4 5 6 7 8 9
>   do
>      pcictl pci$i list
>   done
> 
> And that still doesn't even get all devices if
> there's another pci controller starting with
> 128 (found on 4-way Opteron machines).
> 
> Attached patch makes pcictl to really enlist all devices
> with:
> 
>   pcictl list
> 
> if you want to have back old functionality, you can (still) do
> 
>   for i in 0 1 2 3 4 5 6 7 8 9
>   do
>      pcictl list -b $i
>   done
> 
> 
> 
> If you want to dump a PCI device the current way is:
> 
>    pcictl pci$i dump -d $j -f $k
> 
> New way with this patch is:
> 
>    pcictl dump -b $i -d $j -f $k
> 
> 
> The main motivation for this work is to have an easy way
> for xen to get the pci-passthrough feature for Xen 3.3 and newer.

Why not just add a command to list the PCI busses, instead of changing
the interface in a non-backward-compatible way ?

-- 
Manuel Bouyer, LIP6, Universite Paris VI.           
Manuel.Bouyer%lip6.fr@localhost
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index