From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Sander Eikelenboom <linux@eikelenboom.it>,
barak@neocleus.com, u.zhao@intel.com, jbarnes@virtuousgeek.org,
shimada-yxb@necst.nec.co.jp
Cc: Jeremy Fitzhardinge <jeremy@goop.org>, xen-devel@lists.xensource.com
Subject: Re: [PATCH PV_OPS] pciback support
Date: Thu, 15 Oct 2009 14:38:35 -0400 [thread overview]
Message-ID: <20091015183835.GA11348@phenom.dumpdata.com> (raw)
In-Reply-To: <1407611321.20091014211953@eikelenboom.it>
On Wed, Oct 14, 2009 at 09:19:53PM +0200, Sander Eikelenboom wrote:
> Hello Konrad,
>
Hey Sander,
> With the 2.6.18.8 kernel and 2.6.29.6 port of the xen kernel (on xen 3.4.1 hypervisor)
> I had to use an additional guestdev= and reassign_resources to make things work.
I digged a bit more in this. What was the result of not passing those
arguments? Did the kernel notice a spurious interrupt? Or would the device not work?
Can you attach the output of 'lspci -vvv' with and without the "guestdev=.. reassign_resources"
parameters with your 2.6.18.8 (or 2.6.29.6 port) kernel.
Yuji, Yu, Jesse, and Barak:
The 'guestdev.c' and its parameter 'guestdev' look to be doing the same thing
as the the 'pciback.hide=' argument? The extra functionality is with the
'reassign_resources' which does two major things:
1) in quirk_release_resources disables the PCI card from latching on the
bus addresses that fall within its BARs - which is done during the
chain of invocations when 'pci_enable_device' was called.
Thought I am curious - who then re-enables the card to latch on the bus addresses?
Presumarily the guest OS?
2) in pci_assign_resources, pbus_size_mem, and in pdev_sort_resources aligns
the BARs to page size. Past checkins in the 2.6.18.hg suggest this is b/c in the past
mmio resources were translated from PFNs->MFNs and there were no checks whether
it was page-aligned.
So, I was wondering whether both of these things were neccessary in the Xen 3.5 and PV-OPS kernel?
Is the mapping of the MMIO resources done b/c xm/xc/qemu can't deal with resources
which are not page-aligned? Would it not be easier to fix xm/xc/qemu to map page-aligned
addresses to the MMIO for the guest? I thought I saw a patch couple of days that
just did that...
Any response would be appreciated - I was thinking to see how Sander fares and if
it fails for him, look at xm/xc and qemu to see if something can be done there.
>
> Are these also ported/available on the 2.6.31.1/pv_ops kernel or not needed anymore ?
>
> Complete lines in grub dom0:
>
> kernel /xen-3.4.1.gz dom0_mem=768M xencons=hvc
> module /vmlinuz-2.6.29.6 root=/dev/mapper/serveerstertje-root ro pci=nomsi pciback.hide=(00:07.0)(06:01.0)(06:01.1)(06:01.2)(01:08.0)(01:08.1)(01:08.2)(01:0a.0) guestdev=00:07.0,06:01.0,06:01.1,06:01.2,01:08.0,01:08.1,01:08.2,01:0a.0 reassign_resources swiotlb=256,force console=tty0
> module /initrd.img-2.6.29.6
>
> making this work for me by passing through 2 USB cards (one pci one pci-e) and a integrated intel hda sound card) to domU's
>
>
> Regards,
>
> Sander Eikelenboom
>
>
>
>
> Tuesday, October 13, 2009, 11:22:19 PM, you wrote:
>
> > This is back-port (up-port?) of the pci-back driver from the 2.6.18.hg tree.
> > The driver is quite similar to the pci-stub, excep that is intended for
> > paravirtualized guests. This driver works in conjunction with the pci-front
> > (frontend driver) to exchange PCI write/read to the configuration space and
> > to have the BARs mapped properly for the guest.
>
> > The usage of this is, as said, is similar to pci-stub:
> > lspci | grep SCSI
> > 01:14.0 SCSI storage controller: Adaptec AHA-2940U/UW/D / AIC-7881U
> > echo "0000:01:14.0" > /sys/bus/pci/drivers/aic94xx/unbind
> > echo "0000:01:14.0" > /sys/bus/pci/drivers/pciback/new-slot
> > echo "0000:01:14.0" > /sys/bus/pci/drivers/aic94xx/bind
>
> > and add this entry:
>
> > pci = [ '0000:01.14.0' ]
>
> > in your .xm file.
>
> > The PV guest, if it has the PCI frontend, should now see the PCI device.
> > I've tested this succesfully with a SLES10 PV guest with a couple of devices.
>
> > But please be beware of this warning if it shows up:
> > (XEN) irq.c:1113:d1 Cannot bind IRQ 17 to guest. Others do not share.
>
> > On my machine it lead to Dom0 deciding that a spurrious interrupt kicked off
> > and it disabled the IRQ. The end result was that other devices on the same
> > interrupt line stopped working. I am not yet certain how to make this work
> > properly (whether to check if the PCI device in question interrupt line is
> > being shared beforehand by xm?, or do something in Xen?).
>
>
>
>
>
>
>
> --
> Best regards,
> Sander mailto:linux@eikelenboom.it
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2009-10-15 18:38 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-13 21:22 [PATCH PV_OPS] pciback support Konrad Rzeszutek Wilk
2009-10-13 21:22 ` [PATCH 01/13] Initial copy from linux-2.6.18.hg off pciback driver Konrad Rzeszutek Wilk
2009-10-13 21:22 ` [PATCH 02/13] Including the pciif.h header file Konrad Rzeszutek Wilk
2009-10-13 21:22 ` [PATCH 03/13] Fix include header name change (evtchn.h is now events.h) Konrad Rzeszutek Wilk
2009-10-13 21:22 ` [PATCH 04/13] Removed MSI capability in the pci-back driver Konrad Rzeszutek Wilk
2009-10-13 21:22 ` [PATCH 05/13] Use pci_is_enabled() instead of is_enabled Konrad Rzeszutek Wilk
2009-10-13 21:22 ` [PATCH 06/13] Fix usage of INIT_WORK Konrad Rzeszutek Wilk
2009-10-13 21:22 ` [PATCH 07/13] Update the calling mechanism for xenbus_[map|unmap]_ring_valloc functions Konrad Rzeszutek Wilk
2009-10-13 21:22 ` [PATCH 08/13] Xen paravirtualised PCI hotplug Konrad Rzeszutek Wilk
2009-10-13 21:22 ` [PATCH 09/13] xenbus: Add new states to xenbus_strstate() Konrad Rzeszutek Wilk
2009-10-13 21:22 ` [PATCH 10/13] xenbus: prevent warnings on unhandled enumeration values Konrad Rzeszutek Wilk
2009-10-13 21:22 ` [PATCH 11/13] pciback: Add check to load only under priviliged domain Konrad Rzeszutek Wilk
2009-10-13 21:22 ` [PATCH 12/13] Remove usage of pci_restore_bars() as Linux handles the power-up states correctly now Konrad Rzeszutek Wilk
2009-10-13 21:22 ` [PATCH 13/13] pciback: Enable Xen-PCI-back to be compiled Konrad Rzeszutek Wilk
2009-10-16 10:59 ` [PATCH 08/13] Xen paravirtualised PCI hotplug Vincent Hanquez
2009-10-19 14:50 ` Konrad Rzeszutek Wilk
2009-10-20 8:15 ` Yosuke Iwamatsu
2009-10-13 22:02 ` [PATCH 04/13] Removed MSI capability in the pci-back driver Jeremy Fitzhardinge
2009-10-19 15:04 ` Konrad Rzeszutek Wilk
2009-10-13 22:38 ` [PATCH PV_OPS] pciback support Jeremy Fitzhardinge
2009-10-14 15:16 ` Konrad Rzeszutek Wilk
2009-10-14 16:17 ` Jeremy Fitzhardinge
2009-10-14 19:19 ` Sander Eikelenboom
2009-10-15 18:38 ` Konrad Rzeszutek Wilk [this message]
2009-10-15 19:49 ` Sander Eikelenboom
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=20091015183835.GA11348@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=barak@neocleus.com \
--cc=jbarnes@virtuousgeek.org \
--cc=jeremy@goop.org \
--cc=linux@eikelenboom.it \
--cc=shimada-yxb@necst.nec.co.jp \
--cc=u.zhao@intel.com \
--cc=xen-devel@lists.xensource.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.