All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: "Yang, Sheng" <sheng.yang@intel.com>,
	"Han, Weidong" <weidong.han@intel.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	Amit Shah <amit.shah@redhat.com>,
	"benami@il.ibm.com" <benami@il.ibm.com>,
	"muli@il.ibm.com" <muli@il.ibm.com>,
	"Kay, Allen M" <allen.m.kay@intel.com>,
	"Zhang, Xiantao" <xiantao.zhang@intel.com>
Subject: Re: Remaining passthrough/VT-d tasks list
Date: Sat, 27 Sep 2008 13:16:22 +0300	[thread overview]
Message-ID: <48DE07F6.1080908@redhat.com> (raw)
In-Reply-To: <48DE0672.4060801@web.de>

Jan Kiszka wrote:
> Avi Kivity wrote:
>   
>> Yang, Sheng wrote:
>>     
>>> After check host shared interrupts situation, I got a question here:
>>>
>>> If I understand correctly, current solution don't block host shared
>>> irq, just come with the performance pentry. The penalty come with host
>>> disabled irq line for a period. We have to wait guest to write EOI.
>>> But I fail to see the correctness problem here (except a lot of
>>> spurious interrupt in the guest).
>>>
>>> I've checked mail, but can't find clue about that. Can you explain the
>>> situation?
>>>
>>>   
>>>       
>> If the guest fails to disable interrupts on a device that shares an
>> interrupt line with the host, the host will experience an interrupt
>> flood.  Eventually the host will disable the host device as well.
>>
>>     
>
> It's the same issue we have since ages in the real-time domain: You
> cannot safely share IRQs between devices that are handled partly by
> RT-safe and partly by RT-unsafe drivers. The only sane solution is to
> write an RT-safe stub that is able to detect if an IRQ was triggered by
> the non-RT device, satisfy the IRQ source (disable further IRQ
> generation in the device), and forward the event to the non-RT driver
> part for handling the rest later.
>
>   

Yes indeed -- exactly the same problem.

> Transfered to the virtualization domain, you need a host driver stub for
> each guest device that shares an IRQ with another host device.

That will requires some communication between the guest driver and the 
host stub.

>  Maybe
> there is some generic hardware support for this in recent PCI or in
> VT-d, dunno. But that would simplify the stub development and
> maintenance significantly.
>
>   

Using MSI works around the issue nicely, since interrupts are no longer 
shared.  I imagine SR-IOV also fixes the issue.

> BTW, uio's IRQ handling pattern is also related to this issue: A small,
> device-specific IRQ receiver is written as a kernel driver while the
> major driver code sits in user space and can handle the IRQ later -
> without disturbing other devices sharing IRQs with the uio device.
>   

This is yet another manifestation of the same issue.  Those who 
understand computing are doomed to keep reinventing the wheel, badly.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


  reply	other threads:[~2008-09-27 10:16 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-24  6:15 Remaining passthrough/VT-d tasks list Han, Weidong
2008-09-24  6:31 ` Yang, Sheng
2008-09-24  6:58   ` Zhang, Xiantao
2008-09-24  7:41   ` Amit Shah
2008-09-24  7:51     ` Han, Weidong
2008-09-24  8:02       ` Amit Shah
2008-09-24  8:38         ` Han, Weidong
2008-09-24  8:49           ` Avi Kivity
2008-09-24  9:56           ` Amit Shah
2008-09-24 12:25             ` Han, Weidong
2008-09-24  8:46     ` Avi Kivity
2008-09-24  9:58       ` Amit Shah
2008-09-24 10:46         ` Avi Kivity
2008-09-24 14:46           ` Han, Weidong
2008-09-24  8:38   ` Avi Kivity
2008-09-24  8:46     ` Yang, Sheng
2008-09-27  9:15     ` Yang, Sheng
2008-09-27  9:49       ` Avi Kivity
2008-09-27 10:09         ` Jan Kiszka
2008-09-27 10:16           ` Avi Kivity [this message]
2008-09-28  6:03             ` Muli Ben-Yehuda
2008-09-28  1:48         ` Tian, Kevin
2008-09-28  2:03           ` Dong, Eddie
2008-09-28  2:29             ` Tian, Kevin
2008-09-28  4:22           ` Avi Kivity
2008-09-28  4:50             ` Tian, Kevin
2008-09-28  5:04               ` Avi Kivity
2008-09-28  5:17                 ` Yang, Sheng
2008-10-05 10:18                   ` Avi Kivity
2008-09-28  5:54                 ` Yang, Sheng
2008-09-24  8:34 ` Avi Kivity
2008-09-24  8:42   ` Yang, Sheng
2008-09-24  8:53     ` Avi Kivity
2008-09-24  9:08       ` Yang, Sheng
2008-09-24  9:22         ` Avi Kivity
2008-09-24  9:43           ` Yang, Sheng
2008-09-24  9:51             ` Avi Kivity
2008-09-28  6:09               ` Yang, Sheng
2008-09-24  9:40   ` Amit Shah
2008-09-24  9:46     ` Avi Kivity
2008-09-24 15:39   ` Dong, Eddie
2008-09-27 10:11     ` Avi Kivity
2008-09-28  2:28       ` Dong, Eddie
2008-09-28  4:25         ` Avi Kivity
2008-09-28  5:54           ` Dong, Eddie
2008-09-24  8:39 ` Avi Kivity
2008-09-24  8:50   ` Han, Weidong
2008-09-24  9:12     ` Avi Kivity
2008-09-24 15:12   ` Anthony Liguori
2008-09-24 15:38     ` Avi Kivity

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=48DE07F6.1080908@redhat.com \
    --to=avi@redhat.com \
    --cc=allen.m.kay@intel.com \
    --cc=amit.shah@redhat.com \
    --cc=benami@il.ibm.com \
    --cc=jan.kiszka@web.de \
    --cc=kvm@vger.kernel.org \
    --cc=muli@il.ibm.com \
    --cc=sheng.yang@intel.com \
    --cc=weidong.han@intel.com \
    --cc=xiantao.zhang@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.