All of lore.kernel.org
 help / color / mirror / Atom feed
* pci-assign can not work
@ 2012-03-15 10:21 ` Wen Congyang
  0 siblings, 0 replies; 7+ messages in thread
From: Wen Congyang @ 2012-03-15 10:21 UTC (permalink / raw)
  To: qemu-devel, kvm list, Avi Kivity

Hi all

When I use pci-assign, I meet the following error:

Failed to assign irq for "hostdev0": Input/output error
Perhaps you are assigning a device that shares an IRQ with another device?

Is it a bug or I miss something?

I use libvirt to start the guest, and the user/group is root/root(not qemu/qemu).

If I use the default qemu(provided in RHEL6.2), the guest can be started.

Thanks
Wen Congyang

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Qemu-devel] pci-assign can not work
@ 2012-03-15 10:21 ` Wen Congyang
  0 siblings, 0 replies; 7+ messages in thread
From: Wen Congyang @ 2012-03-15 10:21 UTC (permalink / raw)
  To: qemu-devel, kvm list, Avi Kivity

Hi all

When I use pci-assign, I meet the following error:

Failed to assign irq for "hostdev0": Input/output error
Perhaps you are assigning a device that shares an IRQ with another device?

Is it a bug or I miss something?

I use libvirt to start the guest, and the user/group is root/root(not qemu/qemu).

If I use the default qemu(provided in RHEL6.2), the guest can be started.

Thanks
Wen Congyang

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pci-assign can not work
  2012-03-15 10:21 ` [Qemu-devel] " Wen Congyang
@ 2012-03-16  2:38   ` Wen Congyang
  -1 siblings, 0 replies; 7+ messages in thread
From: Wen Congyang @ 2012-03-16  2:38 UTC (permalink / raw)
  To: qemu-devel, kvm list, Jan Kiszka

At 03/15/2012 06:21 PM, Wen Congyang Wrote:
> Hi all
> 
> When I use pci-assign, I meet the following error:
> 
> Failed to assign irq for "hostdev0": Input/output error
> Perhaps you are assigning a device that shares an IRQ with another device?
> 
> Is it a bug or I miss something?

Hi, Jan

This problem is caused by your patch:
commit 6919115a8715c34cd80baa08422d90496f11f5d7
Author: Jan Kiszka <jan.kiszka@siemens.com>
Date:   Thu Mar 8 11:10:27 2012 +0100

    pci_assign: Flip defaults of prefer_msi and share_intx
    
    INTx sharing is a bit more expensive than exclusive host interrupts, but
    this channel is not supposed to be used for high-performance scenarios
    anyway. Modern devices support MSI/MSI-X and do not depend on using INTx
    under critical workload, real old devices do not support INTx sharing
    anyway.
    
    For those in the middle, the user experience is much better if they just
    work even when IRQ sharing is required. If there is nothing to share,
    share_intx=off can still be applied as tuning parameter.
    
    With INTx sharing as default, the primary reason for prefer_msi=on is
    gone. Make it default off, specifically as it is known to cause troubles
    with devices that have incomplete/broken MSI support or otherwise
    stumble if host IRQ configuration does not match guest driver
    expectation.
    
    Acked-by: Alex Williamson <alex.williamson@redhat.com>
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

If I revert this commit. qemu can work.

Thanks
Wen Congyang

> 
> I use libvirt to start the guest, and the user/group is root/root(not qemu/qemu).
> 
> If I use the default qemu(provided in RHEL6.2), the guest can be started.
> 
> Thanks
> Wen Congyang
> 
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] pci-assign can not work
@ 2012-03-16  2:38   ` Wen Congyang
  0 siblings, 0 replies; 7+ messages in thread
From: Wen Congyang @ 2012-03-16  2:38 UTC (permalink / raw)
  To: qemu-devel, kvm list, Jan Kiszka

At 03/15/2012 06:21 PM, Wen Congyang Wrote:
> Hi all
> 
> When I use pci-assign, I meet the following error:
> 
> Failed to assign irq for "hostdev0": Input/output error
> Perhaps you are assigning a device that shares an IRQ with another device?
> 
> Is it a bug or I miss something?

Hi, Jan

This problem is caused by your patch:
commit 6919115a8715c34cd80baa08422d90496f11f5d7
Author: Jan Kiszka <jan.kiszka@siemens.com>
Date:   Thu Mar 8 11:10:27 2012 +0100

    pci_assign: Flip defaults of prefer_msi and share_intx
    
    INTx sharing is a bit more expensive than exclusive host interrupts, but
    this channel is not supposed to be used for high-performance scenarios
    anyway. Modern devices support MSI/MSI-X and do not depend on using INTx
    under critical workload, real old devices do not support INTx sharing
    anyway.
    
    For those in the middle, the user experience is much better if they just
    work even when IRQ sharing is required. If there is nothing to share,
    share_intx=off can still be applied as tuning parameter.
    
    With INTx sharing as default, the primary reason for prefer_msi=on is
    gone. Make it default off, specifically as it is known to cause troubles
    with devices that have incomplete/broken MSI support or otherwise
    stumble if host IRQ configuration does not match guest driver
    expectation.
    
    Acked-by: Alex Williamson <alex.williamson@redhat.com>
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

If I revert this commit. qemu can work.

Thanks
Wen Congyang

> 
> I use libvirt to start the guest, and the user/group is root/root(not qemu/qemu).
> 
> If I use the default qemu(provided in RHEL6.2), the guest can be started.
> 
> Thanks
> Wen Congyang
> 
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] pci-assign can not work
  2012-03-16  2:38   ` [Qemu-devel] " Wen Congyang
  (?)
@ 2012-03-16  8:27   ` Jan Kiszka
  2012-03-16  8:38     ` Wen Congyang
  -1 siblings, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2012-03-16  8:27 UTC (permalink / raw)
  To: Wen Congyang; +Cc: qemu-devel, kvm list, Markus Armbruster

On 2012-03-16 03:38, Wen Congyang wrote:
> At 03/15/2012 06:21 PM, Wen Congyang Wrote:
>> Hi all
>>
>> When I use pci-assign, I meet the following error:
>>
>> Failed to assign irq for "hostdev0": Input/output error
>> Perhaps you are assigning a device that shares an IRQ with another device?
>>
>> Is it a bug or I miss something?
> 
> Hi, Jan
> 
> This problem is caused by your patch:
> commit 6919115a8715c34cd80baa08422d90496f11f5d7
> Author: Jan Kiszka <jan.kiszka@siemens.com>
> Date:   Thu Mar 8 11:10:27 2012 +0100
> 
>     pci_assign: Flip defaults of prefer_msi and share_intx
>     
>     INTx sharing is a bit more expensive than exclusive host interrupts, but
>     this channel is not supposed to be used for high-performance scenarios
>     anyway. Modern devices support MSI/MSI-X and do not depend on using INTx
>     under critical workload, real old devices do not support INTx sharing
>     anyway.
>     
>     For those in the middle, the user experience is much better if they just
>     work even when IRQ sharing is required. If there is nothing to share,
>     share_intx=off can still be applied as tuning parameter.
>     
>     With INTx sharing as default, the primary reason for prefer_msi=on is
>     gone. Make it default off, specifically as it is known to cause troubles
>     with devices that have incomplete/broken MSI support or otherwise
>     stumble if host IRQ configuration does not match guest driver
>     expectation.
>     
>     Acked-by: Alex Williamson <alex.williamson@redhat.com>
>     Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>     Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
> 
> If I revert this commit. qemu can work.
> 

This should be "solvable" by passing prefer_msi=on to the pci-assign
device, or likely by updating your host kernel to latest kvm.git (to
enable INTx sharing).

Hmm, unfortunate. We needed a conditional default for the prefer_msi
property here. If INTx sharing doesn't work for some reason AND the user
did not ask for disabling the host-side MSI usage, we should fall back
to it again.

Markus, is there some easy way to find out if a specific qdev property
was set due to a command line switch or was defined by the default value?

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] pci-assign can not work
  2012-03-16  8:27   ` Jan Kiszka
@ 2012-03-16  8:38     ` Wen Congyang
  2012-03-16 10:13       ` Jan Kiszka
  0 siblings, 1 reply; 7+ messages in thread
From: Wen Congyang @ 2012-03-16  8:38 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-devel, kvm list, Markus Armbruster

At 03/16/2012 04:27 PM, Jan Kiszka Wrote:
> On 2012-03-16 03:38, Wen Congyang wrote:
>> At 03/15/2012 06:21 PM, Wen Congyang Wrote:
>>> Hi all
>>>
>>> When I use pci-assign, I meet the following error:
>>>
>>> Failed to assign irq for "hostdev0": Input/output error
>>> Perhaps you are assigning a device that shares an IRQ with another device?
>>>
>>> Is it a bug or I miss something?
>>
>> Hi, Jan
>>
>> This problem is caused by your patch:
>> commit 6919115a8715c34cd80baa08422d90496f11f5d7
>> Author: Jan Kiszka <jan.kiszka@siemens.com>
>> Date:   Thu Mar 8 11:10:27 2012 +0100
>>
>>     pci_assign: Flip defaults of prefer_msi and share_intx
>>     
>>     INTx sharing is a bit more expensive than exclusive host interrupts, but
>>     this channel is not supposed to be used for high-performance scenarios
>>     anyway. Modern devices support MSI/MSI-X and do not depend on using INTx
>>     under critical workload, real old devices do not support INTx sharing
>>     anyway.
>>     
>>     For those in the middle, the user experience is much better if they just
>>     work even when IRQ sharing is required. If there is nothing to share,
>>     share_intx=off can still be applied as tuning parameter.
>>     
>>     With INTx sharing as default, the primary reason for prefer_msi=on is
>>     gone. Make it default off, specifically as it is known to cause troubles
>>     with devices that have incomplete/broken MSI support or otherwise
>>     stumble if host IRQ configuration does not match guest driver
>>     expectation.
>>     
>>     Acked-by: Alex Williamson <alex.williamson@redhat.com>
>>     Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>     Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
>>
>> If I revert this commit. qemu can work.
>>
> 
> This should be "solvable" by passing prefer_msi=on to the pci-assign
> device, or likely by updating your host kernel to latest kvm.git (to
> enable INTx sharing).

Is there some way to find out if the kernel supports to enable INTx
sharing?

Thanks
Wen Congyang

> 
> Hmm, unfortunate. We needed a conditional default for the prefer_msi
> property here. If INTx sharing doesn't work for some reason AND the user
> did not ask for disabling the host-side MSI usage, we should fall back
> to it again.
> 
> Markus, is there some easy way to find out if a specific qdev property
> was set due to a command line switch or was defined by the default value?
> 
> Jan
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] pci-assign can not work
  2012-03-16  8:38     ` Wen Congyang
@ 2012-03-16 10:13       ` Jan Kiszka
  0 siblings, 0 replies; 7+ messages in thread
From: Jan Kiszka @ 2012-03-16 10:13 UTC (permalink / raw)
  To: Wen Congyang; +Cc: qemu-devel, kvm list, Markus Armbruster

On 2012-03-16 09:38, Wen Congyang wrote:
> At 03/16/2012 04:27 PM, Jan Kiszka Wrote:
>> On 2012-03-16 03:38, Wen Congyang wrote:
>>> At 03/15/2012 06:21 PM, Wen Congyang Wrote:
>>>> Hi all
>>>>
>>>> When I use pci-assign, I meet the following error:
>>>>
>>>> Failed to assign irq for "hostdev0": Input/output error
>>>> Perhaps you are assigning a device that shares an IRQ with another device?
>>>>
>>>> Is it a bug or I miss something?
>>>
>>> Hi, Jan
>>>
>>> This problem is caused by your patch:
>>> commit 6919115a8715c34cd80baa08422d90496f11f5d7
>>> Author: Jan Kiszka <jan.kiszka@siemens.com>
>>> Date:   Thu Mar 8 11:10:27 2012 +0100
>>>
>>>     pci_assign: Flip defaults of prefer_msi and share_intx
>>>     
>>>     INTx sharing is a bit more expensive than exclusive host interrupts, but
>>>     this channel is not supposed to be used for high-performance scenarios
>>>     anyway. Modern devices support MSI/MSI-X and do not depend on using INTx
>>>     under critical workload, real old devices do not support INTx sharing
>>>     anyway.
>>>     
>>>     For those in the middle, the user experience is much better if they just
>>>     work even when IRQ sharing is required. If there is nothing to share,
>>>     share_intx=off can still be applied as tuning parameter.
>>>     
>>>     With INTx sharing as default, the primary reason for prefer_msi=on is
>>>     gone. Make it default off, specifically as it is known to cause troubles
>>>     with devices that have incomplete/broken MSI support or otherwise
>>>     stumble if host IRQ configuration does not match guest driver
>>>     expectation.
>>>     
>>>     Acked-by: Alex Williamson <alex.williamson@redhat.com>
>>>     Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>     Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
>>>
>>> If I revert this commit. qemu can work.
>>>
>>
>> This should be "solvable" by passing prefer_msi=on to the pci-assign
>> device, or likely by updating your host kernel to latest kvm.git (to
>> enable INTx sharing).
> 
> Is there some way to find out if the kernel supports to enable INTx
> sharing?

QEMU does a feature check, but as a user you simply have to know which
kernel version includes it (will be 3.4 or 3.5). Of course, that's not
really handy.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-03-16 10:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-15 10:21 pci-assign can not work Wen Congyang
2012-03-15 10:21 ` [Qemu-devel] " Wen Congyang
2012-03-16  2:38 ` Wen Congyang
2012-03-16  2:38   ` [Qemu-devel] " Wen Congyang
2012-03-16  8:27   ` Jan Kiszka
2012-03-16  8:38     ` Wen Congyang
2012-03-16 10:13       ` Jan Kiszka

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.