From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Sander Eikelenboom <linux@eikelenboom.it>
Cc: Anthony PERARD <anthony.perard@citrix.com>,
xen-devel@lists.xenproject.org, stefano.stabellini@citrix.com,
donald.d.dugger@intel.com
Subject: Re: qemu-xen-dir + PCI passthrough = BOOM
Date: Fri, 10 Jan 2014 11:35:44 -0500 [thread overview]
Message-ID: <20140110163544.GA21692@phenom.dumpdata.com> (raw)
In-Reply-To: <24225189.20140110170544@eikelenboom.it>
> >> (d1) [2014-01-10 03:20:29] Running option rom at ca00:0003
> >>
> >> (d1) [2014-01-10 03:20:47] Booting from DVD/CD...
> >> (d1) [2014-01-10 03:20:47] Booting from 0000:7c00
> >> ..
> >> and I did see the PXE boot menu in my guest - so even
> >> better!
>
> > Perfect, look like it is the fix for PCI passthrough.
>
> Hi Konrad,
>
> Are you sure it's the rom of the NIC, and not the iPXE rom from the emulated device that
> gets run ?
Yes. I double checked that the MAC address that was given an DHCP
address was indeed for the physical hardware. And it was.
>
> With this patch and VGA devices it still points to another rom for me.
> (it looks like it is pointing to the rom of the device with a BDF just one lower than the passed through one)
That all sounds to me like a bug in QEMU which constructs
the 'world'. Then 'hvmloader' and the kernel ingest this to
create their view of what the PCI configuration/slots/etc should look like.
They use 'inb' and 'outb' instructions on the 0xcf8/0xcfc port.
Perhaps the 'vga=none' is having an hard time dealing with 'no-VGA-but-wait-there
is-and-PT-VGA'?
Just to make sure I am not forgetting a crucial fact - if you don't
have vga=none, does the lspci output look sane?
>
> Do you by any chance know if there is a difference in how lspci and the linux kernel scan / list pci devices ?
> (for example one by reading acpi tables .. the other one by real probing .. ?)
The kernel and hvmloader all use the 'inb' and 'outb' to figure out
what the PCI space looks like.
'lspci' uses /sysfs. Thought if you use '-xxxx' I think it also does
'inb' and 'outb'.
So it all seems to point to QEMU.
>
> --
> Sander
>
>
> >> I have not yet done the GPU - this issue was preventing me from using
> >> qemu-xen as it would always blow up before SeaBIOS was in the picture.
> >>
> >> If you would like to put 'Reported-and-Tested-by: Konrad Rzeszutek Wilk
> >> <konrad.wilk@oracle.com>' please do.
>
> > Will do.
>
> >> Thank you!
> >> >
> >> >
> >> > diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
> >> > index 6dd7a68..2bbdb6d 100644
> >> > --- a/hw/xen/xen_pt.c
> >> > +++ b/hw/xen/xen_pt.c
> >> > @@ -440,8 +440,8 @@ static int xen_pt_register_regions(XenPCIPassthroughState *s)
> >> >
> >> > s->bases[PCI_ROM_SLOT].access.maddr = d->rom.base_addr;
> >> >
> >> > - memory_region_init_rom_device(&s->rom, OBJECT(s), NULL, NULL,
> >> > - "xen-pci-pt-rom", d->rom.size);
> >> > + memory_region_init_io(&s->rom, OBJECT(s), &ops, &s->dev,
> >> > + "xen-pci-pt-rom", d->rom.size);
> >> > pci_register_bar(&s->dev, PCI_ROM_SLOT, PCI_BASE_ADDRESS_MEM_PREFETCH,
> >> > &s->rom);
> >> >
> >> >
> >> > --
> >> > Anthony PERARD
>
>
next prev parent reply other threads:[~2014-01-10 16:35 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-04 19:51 qemu-xen-dir + PCI passthrough = BOOM Konrad Rzeszutek Wilk
2013-12-05 12:16 ` Anthony PERARD
2013-12-06 14:49 ` Konrad Rzeszutek Wilk
2013-12-06 15:35 ` Anthony PERARD
2013-12-06 16:00 ` Wei Liu
2013-12-06 16:03 ` Wei Liu
2013-12-16 15:08 ` Konrad Rzeszutek Wilk
2013-12-18 14:48 ` Anthony PERARD
2013-12-18 14:57 ` Ian Campbell
2013-12-18 15:22 ` Konrad Rzeszutek Wilk
2013-12-18 16:13 ` Ian Campbell
2013-12-18 16:18 ` Konrad Rzeszutek Wilk
2013-12-22 11:25 ` Wu, Feng
2013-12-31 15:30 ` Konrad Rzeszutek Wilk
2014-01-06 9:54 ` Ian Campbell
2014-01-07 0:27 ` Wu, Feng
2014-01-08 19:44 ` Konrad Rzeszutek Wilk
2014-01-09 14:56 ` Anthony PERARD
2014-01-09 15:36 ` Pasi Kärkkäinen
2014-01-09 15:43 ` Pasi Kärkkäinen
2014-01-09 23:54 ` Sander Eikelenboom
2014-01-10 0:17 ` Sander Eikelenboom
2014-01-10 0:22 ` Sander Eikelenboom
2014-01-10 3:28 ` Konrad Rzeszutek Wilk
2014-01-10 15:19 ` Anthony PERARD
2014-01-10 16:05 ` Sander Eikelenboom
2014-01-10 16:25 ` Anthony PERARD
2014-01-10 16:38 ` Sander Eikelenboom
2014-01-10 16:35 ` Konrad Rzeszutek Wilk [this message]
2014-01-10 17:38 ` Sander Eikelenboom
2014-01-10 18:01 ` Konrad Rzeszutek Wilk
2014-01-26 0:05 ` Zhang, Yang Z
2014-01-27 12:12 ` Stefano Stabellini
2014-01-27 15:34 ` Zhang, Yang Z
2014-01-27 15:37 ` Stefano Stabellini
2014-01-31 15:23 ` Stefano Stabellini
2014-01-26 2:15 ` Zhang, Yang Z
2014-01-16 6:40 ` Zhang, Yang Z
2014-01-16 11:36 ` Konrad Rzeszutek Wilk
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=20140110163544.GA21692@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=anthony.perard@citrix.com \
--cc=donald.d.dugger@intel.com \
--cc=linux@eikelenboom.it \
--cc=stefano.stabellini@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).