All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@XenSource.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: "You, Yongkang" <yongkang.you@intel.com>,
	"Han, Weidong" <weidong.han@intel.com>,
	xen-devel@lists.xensource.com, "Kay,
	Allen M" <allen.m.kay@intel.com>
Subject: Re: Hiding pci devices from dom0 drivers
Date: Mon, 24 Sep 2007 09:13:17 +0100	[thread overview]
Message-ID: <1190621597.22768.1.camel@localhost.localdomain> (raw)
In-Reply-To: <C31D255F.DEFE%Keir.Fraser@cl.cam.ac.uk>

On Mon, 2007-09-24 at 08:27 +0100, Keir Fraser wrote:
> On 24/9/07 08:10, "Kay, Allen M" <allen.m.kay@intel.com> wrote:
> 
> > Currently we had to manually make the following change in linux config
> > before building dom0 kernel to enable pciback.hide functionality in
> > dom0.
> > 
> > -CONFIG_XEN_PCIDEV_BACKEND=m
> > +CONFIG_XEN_PCIDEV_BACKEND=y
> > 
> > What do you think about having this change check into your tree so that
> > we can get rid of this manual step?  If you are ok with it, we can send
> > you a patch for it.
> 
> It's already '=y' in the -xen0 kernel. -xen is a modular kernel config to
> keep the base kernel a reasonable size. PCI device hiding is still an
> esoteric option that most users will not use.

You can also get the same effect as pciback.hide entirely from
userspace:

        # cat pciback 
        
        #!/bin/sh
        
        if [ $# -eq 0 ] ; then
           echo "Require a PCI device as parameter"
           exit 1
        fi
        
        for pcidev in $@ ; do
            if [ -h /sys/bus/pci/devices/"$pcidev"/driver ] ; then
        
                echo "Unbinding $pcidev from" $(basename $(readlink /sys/bus/pci/devices/"$pcidev"/driver))
                echo -n "$pcidev" > /sys/bus/pci/devices/"$pcidev"/driver/unbind
            fi
            echo "Binding $pcidev to pciback"
            echo -n "$pcidev" > /sys/bus/pci/drivers/pciback/new_slot
            echo -n "$pcidev" > /sys/bus/pci/drivers/pciback/bind
        done

  reply	other threads:[~2007-09-24  8:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-24  7:10 Hiding pci devices from dom0 drivers Kay, Allen M
2007-09-24  7:27 ` Keir Fraser
2007-09-24  8:13   ` Ian Campbell [this message]
2007-10-04 18:53     ` Kay, Allen M
2007-10-05  8:31       ` Ian Campbell
2007-10-08  6:05         ` You, Yongkang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1190621597.22768.1.camel@localhost.localdomain \
    --to=ian.campbell@xensource.com \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=allen.m.kay@intel.com \
    --cc=weidong.han@intel.com \
    --cc=xen-devel@lists.xensource.com \
    --cc=yongkang.you@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.