From: Avi Kivity <avi@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Gregory Haskins <ghaskins@novell.com>,
kvm@vger.kernel.org, mtosatti@redhat.com
Subject: Re: [PATCH 0/3] RFC: virtual device as irq injection interface
Date: Mon, 01 Jun 2009 10:45:21 +0300 [thread overview]
Message-ID: <4A238711.2070508@redhat.com> (raw)
In-Reply-To: <20090601041804.GA4701@redhat.com>
Michael S. Tsirkin wrote:
> On Sun, May 31, 2009 at 11:30:48PM +0300, Avi Kivity wrote:
>
>> Michael S. Tsirkin wrote:
>>
>>>> Version N of irqfd actually had the kernel create the fd, due to
>>>> concerns about eventfd's flexibility (thread wakeup vs function
>>>> call). As it turned out these concerns were misplaced (well, we
>>>> still want the call to happen in process context when available).
>>>>
>>>>
>>> I'm afraid there are deep lifetime issues there, and the recent patch
>>> calling eventfd_fget seems to be just papering over the worst of them.
>>>
>>>
>> You'll have to be more specific.
>>
>
> My concern is that we do fget on eventfd and keep this reference until
> fput is done on vm fd. This works as long as no one else does
> similar tricks. Imagine for example eventfd or another fs/ change that makes
> eventfd do fget on descriptor X and keep it until fput is done on eventfd.
> We'll get resource leak if kvm fd is substituted for X.
>
> What do you think?
>
>
I think it's unlikely that eventfd will start hanging on to fds. If it
does, it will have to deal with recursion anyway (eventfd holding on to
itself), so irqfd will be just a part of the problem.
It's better to have one big problem rather than many small problems.
>>>> I'd really like to stick with eventfd if we can solve all the
>>>> problems there, rather than creating yet another interface.
>>>> Especially if we want uio to communicate directly with kvm.
>>>>
>>>>
>>> Actually, current irqfd might not be able to handle assigned pci devices
>>> because of the trick it does with set_irq(1)/set_irq(0) trick.
>>> Guest drivers for pci devices likely assume the interrupt
>>> is level.
>>>
>>>
>> Right. I'm willing to have some userspace mediation for level-triggered
>> interrupts.
>>
>
> In other words, you want to keep using KVM_IRQ_LINE for this, as well?
>
We'll need something more than level-triggered interrupts since we need
to pass the acknowledge from the guest to the host somehow.
>> It's a corner case anyway as we don't support shared
>> interrupts on the host, and PCI level-triggered interrupts are very
>> likely to be shared.
>>
>
> If you think about virtio-net-host, there's no host interrupt there.
>
I was talking about uio, sorry.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
next prev parent reply other threads:[~2009-06-01 7:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-31 18:58 [PATCH 0/3] RFC: virtual device as irq injection interface Michael S. Tsirkin
2009-05-31 19:40 ` Avi Kivity
2009-05-31 20:10 ` Michael S. Tsirkin
2009-05-31 20:30 ` Avi Kivity
2009-06-01 4:18 ` Michael S. Tsirkin
2009-06-01 7:45 ` Avi Kivity [this message]
2009-06-01 12:00 ` Gregory Haskins
2009-06-01 12:04 ` Avi Kivity
2009-06-01 12:14 ` Gregory Haskins
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=4A238711.2070508@redhat.com \
--to=avi@redhat.com \
--cc=ghaskins@novell.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox