Re: PCI passthrough resource remapping

2010-04-06 Thread Avi Kivity
On 03/31/2010 06:18 PM, Chris Wright wrote: Hrm, I'm not sure these would be related to the small BAR region patch. It looks more like a timing issue. small BAR == slow path == timing issue? Would be interesting to verify using perf with the 'kvm:kvm_mmio' software event, see how

Re: PCI passthrough resource remapping

2010-03-31 Thread Kenni Lund
2010/3/31 Chris Wright chr...@redhat.com: * Kenni Lund (ke...@kelu.dk) wrote: 2010/3/31 Chris Wright chr...@redhat.com: So I suppose I'll need to get rid of this shared IRQ before I can conclude anything on the patch in git. Hmm, is there some cleaver way of fixing this in Linux, or do I

Re: PCI passthrough resource remapping

2010-03-31 Thread Kenni Lund
2010/3/31 Kenni Lund ke...@kelu.dk: Booting the guest and tuning to a DVB-T channel _works_ !!! :-D Thanks a lot for your help...I have one more question, though: If I have two devices (like the ivtv tuner and the USB card) and they share an IRQ, if I then assign BOTH of them to the same

Re: PCI passthrough resource remapping

2010-03-31 Thread Alexander Graf
Kenni Lund wrote: 2010/3/31 Kenni Lund ke...@kelu.dk: Booting the guest and tuning to a DVB-T channel _works_ !!! :-D Thanks a lot for your help...I have one more question, though: If I have two devices (like the ivtv tuner and the USB card) and they share an IRQ, if I then assign BOTH of

Re: PCI passthrough resource remapping

2010-03-31 Thread Kenni Lund
2010/3/31 Alexander Graf ag...@suse.de: Kenni Lund wrote: 2010/3/31 Kenni Lund ke...@kelu.dk: Booting the guest and tuning to a DVB-T channel _works_ !!! :-D Thanks a lot for your help...I have one more question, though: If I have two devices (like the ivtv tuner and the USB card) and they

Re: PCI passthrough resource remapping

2010-03-31 Thread Chris Wright
* Kenni Lund (ke...@kelu.dk) wrote: 2010/3/31 Chris Wright chr...@redhat.com: * Kenni Lund (ke...@kelu.dk) wrote: 2010/3/31 Chris Wright chr...@redhat.com: So I suppose I'll need to get rid of this shared IRQ before I can conclude anything on the patch in git. Hmm, is there some cleaver

Re: PCI passthrough resource remapping

2010-03-31 Thread Chris Wright
* Alexander Graf (ag...@suse.de) wrote: Kenni Lund wrote: 2010/3/31 Kenni Lund ke...@kelu.dk: Booting the guest and tuning to a DVB-T channel _works_ !!! :-D Thanks a lot for your help...I have one more question, though: If I have two devices (like the ivtv tuner and the USB card)

Re: PCI passthrough resource remapping

2010-03-31 Thread Alexander Graf
Chris Wright wrote: * Alexander Graf (ag...@suse.de) wrote: Kenni Lund wrote: 2010/3/31 Kenni Lund ke...@kelu.dk: Booting the guest and tuning to a DVB-T channel _works_ !!! :-D Thanks a lot for your help...I have one more question, though: If I have two devices (like

Re: PCI passthrough resource remapping

2010-03-30 Thread Kenni Lund
2010/3/30 Chris Wright chr...@redhat.com: * Kenni Lund (ke...@kelu.dk) wrote: Client dmesg: http://pastebin.com/uNG4QK5j Host dmesg: http://pastebin.com/jZu3WKZW I just verified it and I do get the call trace in the host (which disables IRQ 19, used by the PCI USB card), exactly at the same

Re: PCI passthrough resource remapping

2010-03-30 Thread Alexander Graf
On 31.03.2010, at 00:27, Kenni Lund wrote: 2010/3/30 Chris Wright chr...@redhat.com: * Kenni Lund (ke...@kelu.dk) wrote: Client dmesg: http://pastebin.com/uNG4QK5j Host dmesg: http://pastebin.com/jZu3WKZW I just verified it and I do get the call trace in the host (which disables IRQ 19,

Re: PCI passthrough resource remapping

2010-03-30 Thread Kenni Lund
2010/3/31 Alexander Graf ag...@suse.de: On 31.03.2010, at 00:27, Kenni Lund wrote: 2010/3/30 Chris Wright chr...@redhat.com: * Kenni Lund (ke...@kelu.dk) wrote: Client dmesg: http://pastebin.com/uNG4QK5j Host dmesg: http://pastebin.com/jZu3WKZW I just verified it and I do get the call

Re: PCI passthrough resource remapping

2010-03-30 Thread Chris Wright
* Kenni Lund (ke...@kelu.dk) wrote: 2010/3/30 Chris Wright chr...@redhat.com: * Kenni Lund (ke...@kelu.dk) wrote: Client dmesg: http://pastebin.com/uNG4QK5j Host dmesg: http://pastebin.com/jZu3WKZW I just verified it and I do get the call trace in the host (which disables IRQ 19, used

Re: PCI passthrough resource remapping

2010-03-30 Thread Kenni Lund
2010/3/31 Chris Wright chr...@redhat.com: So I suppose I'll need to get rid of this shared IRQ before I can conclude anything on the patch in git. Hmm, is there some cleaver way of fixing this in Linux, or do I have to fix it by changing BIOS IRQ settings, disabling hardware and/or moving the

Re: PCI passthrough resource remapping

2010-03-30 Thread Chris Wright
* Kenni Lund (ke...@kelu.dk) wrote: 2010/3/31 Alexander Graf ag...@suse.de: The easiest thing coming to mind is to unplug the ivtv card for now. It's really only to verify that the patch does something useful :-). This was not sufficient. Same issue with the ivtv card unplugged...if I

Re: PCI passthrough resource remapping

2010-03-30 Thread Chris Wright
* Kenni Lund (ke...@kelu.dk) wrote: 2010/3/31 Chris Wright chr...@redhat.com: So I suppose I'll need to get rid of this shared IRQ before I can conclude anything on the patch in git. Hmm, is there some cleaver way of fixing this in Linux, or do I have to fix it by changing BIOS IRQ

Re: PCI passthrough resource remapping

2010-03-29 Thread Kenni Lund
2010/1/9 Alexander Graf ag...@suse.de: On 09.01.2010, at 03:45, Ryan C. Underwood wrote: I have a multifunction PCI device that I'd like to pass through to KVM. In order to do that, I'm reading that the PCI memory region must be 4K-page aligned and the PCI memory resources itself must

Re: PCI passthrough resource remapping

2010-03-29 Thread Alexander Graf
On 29.03.2010, at 19:23, Kenni Lund wrote: 2010/1/9 Alexander Graf ag...@suse.de: On 09.01.2010, at 03:45, Ryan C. Underwood wrote: I have a multifunction PCI device that I'd like to pass through to KVM. In order to do that, I'm reading that the PCI memory region must be 4K-page

Re: PCI passthrough resource remapping

2010-03-29 Thread Kenni Lund
2010/3/29 Alexander Graf ag...@suse.de: On 29.03.2010, at 19:23, Kenni Lund wrote: 2010/1/9 Alexander Graf ag...@suse.de: On 09.01.2010, at 03:45, Ryan C. Underwood wrote: I have a multifunction PCI device that I'd like to pass through to KVM. In order to do that, I'm reading that the

Re: PCI passthrough resource remapping

2010-03-29 Thread Alexander Graf
On 30.03.2010, at 01:00, Kenni Lund wrote: 2010/3/29 Alexander Graf ag...@suse.de: On 29.03.2010, at 19:23, Kenni Lund wrote: 2010/1/9 Alexander Graf ag...@suse.de: On 09.01.2010, at 03:45, Ryan C. Underwood wrote: I have a multifunction PCI device that I'd like to pass through to

Re: PCI passthrough resource remapping

2010-03-29 Thread Chris Wright
* Alexander Graf (ag...@suse.de) wrote: On 30.03.2010, at 01:00, Kenni Lund wrote: 2010/3/29 Alexander Graf ag...@suse.de: On 29.03.2010, at 19:23, Kenni Lund wrote: 2010/1/9 Alexander Graf ag...@suse.de: On 09.01.2010, at 03:45, Ryan C. Underwood wrote: I have a

Re: PCI passthrough resource remapping

2010-03-29 Thread Kenni Lund
2010/3/30 Chris Wright chr...@redhat.com: * Alexander Graf (ag...@suse.de) wrote: On 30.03.2010, at 01:00, Kenni Lund wrote: 2010/3/29 Alexander Graf ag...@suse.de: On 29.03.2010, at 19:23, Kenni Lund wrote: 2010/1/9 Alexander Graf ag...@suse.de: On 09.01.2010, at 03:45, Ryan C.

Re: PCI passthrough resource remapping

2010-03-29 Thread Chris Wright
* Kenni Lund (ke...@kelu.dk) wrote: Client dmesg: http://pastebin.com/uNG4QK5j Host dmesg: http://pastebin.com/jZu3WKZW I just verified it and I do get the call trace in the host (which disables IRQ 19, used by the PCI USB card), exactly at the same second It looks like IRQ 19 is shared

Re: PCI passthrough resource remapping

2010-03-25 Thread Kenni Lund
2010/1/9 Alexander Graf ag...@suse.de: On 09.01.2010, at 03:45, Ryan C. Underwood wrote: I have a multifunction PCI device that I'd like to pass through to KVM. In order to do that, I'm reading that the PCI memory region must be 4K-page aligned and the PCI memory resources itself must also

Re: PCI passthrough resource remapping

2010-03-25 Thread Brian Jackson
It's only in qemu-kvm.git. Maybe it should go into qemu-kvm-0.12.4 if there is one Sent from my iPhone On Mar 25, 2010, at 9:37 PM, Kenni Lund ke...@kelu.dk wrote: 2010/1/9 Alexander Graf ag...@suse.de: On 09.01.2010, at 03:45, Ryan C. Underwood wrote: I have a multifunction PCI device

Re: PCI passthrough resource remapping

2010-01-16 Thread Avi Kivity
On 01/14/2010 09:34 PM, Ryan C. Underwood wrote: On Thu, Jan 14, 2010 at 09:09:32PM +0200, Avi Kivity wrote: PCI cards can access system memory directly. If you assign a card to a guest, the guest will program the card to transfer data to system memory using guest addresses; since guest

Re: PCI passthrough resource remapping

2010-01-15 Thread Pasi Kärkkäinen
On Thu, Jan 14, 2010 at 12:31:32PM -0600, Ryan C. Underwood wrote: On Thu, Jan 14, 2010 at 05:54:51PM +0200, Avi Kivity wrote: On 01/14/2010 05:47 PM, Michael S. Tsirkin wrote: Michael, I think 'DisINTx-' means the device is not PCI 2.3 compliant? No it doesn't, just that interrupt

Re: PCI passthrough resource remapping

2010-01-15 Thread Alexander Graf
On 15.01.2010, at 14:11, Pasi Kärkkäinen wrote: On Thu, Jan 14, 2010 at 12:31:32PM -0600, Ryan C. Underwood wrote: On Thu, Jan 14, 2010 at 05:54:51PM +0200, Avi Kivity wrote: On 01/14/2010 05:47 PM, Michael S. Tsirkin wrote: Michael, I think 'DisINTx-' means the device is not PCI 2.3

Re: PCI passthrough resource remapping

2010-01-14 Thread Avi Kivity
On 01/11/2010 12:15 AM, Ryan C. Underwood wrote: I guess I'll run the things I've found by the list to see if I'm off track or not. There is this patch: http://marc.info/?l=xen-develm=124748015304566w=4 which would seem to be related to what I'm doing, trying to pass through a multifunction

Re: PCI passthrough resource remapping

2010-01-14 Thread Ryan C. Underwood
On Thu, Jan 14, 2010 at 03:59:53PM +0200, Avi Kivity wrote: Also, just for further complication, the Ricoh chip does not support MSI and shares an IRQ on the system board with the USB host controller. I have rebound the USB host controller to pci-stub, but I'm not sure if that totally takes

Re: PCI passthrough resource remapping

2010-01-14 Thread Avi Kivity
On 01/14/2010 05:26 PM, Ryan C. Underwood wrote: On Thu, Jan 14, 2010 at 03:59:53PM +0200, Avi Kivity wrote: Also, just for further complication, the Ricoh chip does not support MSI and shares an IRQ on the system board with the USB host controller. I have rebound the USB

Re: PCI passthrough resource remapping

2010-01-14 Thread Michael S. Tsirkin
On Thu, Jan 14, 2010 at 05:34:42PM +0200, Avi Kivity wrote: On 01/14/2010 05:26 PM, Ryan C. Underwood wrote: On Thu, Jan 14, 2010 at 03:59:53PM +0200, Avi Kivity wrote: Also, just for further complication, the Ricoh chip does not support MSI and shares an IRQ on the system

Re: PCI passthrough resource remapping

2010-01-14 Thread Avi Kivity
On 01/14/2010 05:47 PM, Michael S. Tsirkin wrote: Michael, I think 'DisINTx-' means the device is not PCI 2.3 compliant? No it doesn't, just that interrupt disable bit is not set. Thanks. Ryan, while kvm doesn't support assigning a device with shared interrupts now, in the

Re: PCI passthrough resource remapping

2010-01-14 Thread Ryan C. Underwood
On Thu, Jan 14, 2010 at 05:54:51PM +0200, Avi Kivity wrote: On 01/14/2010 05:47 PM, Michael S. Tsirkin wrote: Michael, I think 'DisINTx-' means the device is not PCI 2.3 compliant? No it doesn't, just that interrupt disable bit is not set. Thanks. Ryan, while kvm doesn't support

Re: PCI passthrough resource remapping

2010-01-14 Thread Avi Kivity
On 01/14/2010 08:31 PM, Ryan C. Underwood wrote: On Thu, Jan 14, 2010 at 05:54:51PM +0200, Avi Kivity wrote: On 01/14/2010 05:47 PM, Michael S. Tsirkin wrote: Michael, I think 'DisINTx-' means the device is not PCI 2.3 compliant? No it doesn't, just that interrupt

Re: PCI passthrough resource remapping

2010-01-14 Thread Ryan C. Underwood
On Thu, Jan 14, 2010 at 09:09:32PM +0200, Avi Kivity wrote: PCI cards can access system memory directly. If you assign a card to a guest, the guest will program the card to transfer data to system memory using guest addresses; since guest addresses don't correspond to host addresses,

Re: PCI passthrough resource remapping

2010-01-10 Thread Ryan C. Underwood
I have a multifunction PCI device that I'd like to pass through to KVM. In order to do that, I'm reading that the PCI memory region must be 4K-page aligned and the PCI memory resources itself must also be exact multiples of 4K pages. I have added the following on my kernel command

Re: PCI passthrough resource remapping

2010-01-10 Thread Ryan C. Underwood
I guess I'll run the things I've found by the list to see if I'm off track or not. There is this patch: http://marc.info/?l=xen-develm=124748015304566w=4 which would seem to be related to what I'm doing, trying to pass through a multifunction device (a Ricoh firewire controller which has

PCI passthrough resource remapping

2010-01-08 Thread Ryan C. Underwood
I have a multifunction PCI device that I'd like to pass through to KVM. In order to do that, I'm reading that the PCI memory region must be 4K-page aligned and the PCI memory resources itself must also be exact multiples of 4K pages. I have added the following on my kernel command line:

Re: PCI passthrough resource remapping

2010-01-08 Thread Alexander Graf
On 09.01.2010, at 03:45, Ryan C. Underwood wrote: I have a multifunction PCI device that I'd like to pass through to KVM. In order to do that, I'm reading that the PCI memory region must be 4K-page aligned and the PCI memory resources itself must also be exact multiples of 4K pages. I