All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Avi Kivity <avi@redhat.com>
Cc: KVM list <kvm@vger.kernel.org>, kvm-ppc@vger.kernel.org
Subject: Re: [PATCH 0/2] KVM: PPC: Support ioeventfd
Date: Tue, 16 Oct 2012 14:49:55 +0000	[thread overview]
Message-ID: <507D7413.1000506@suse.de> (raw)
In-Reply-To: <507D656C.3020502@redhat.com>

On 10/16/2012 03:47 PM, Avi Kivity wrote:
> On 10/16/2012 01:06 PM, Alexander Graf wrote:
>> On 16.10.2012, at 13:01, Avi Kivity wrote:
>>
>>> On 10/16/2012 12:59 PM, Alexander Graf wrote:
>>>> On 16.10.2012, at 12:56, Avi Kivity wrote:
>>>>
>>>>> On 10/15/2012 02:02 PM, Alexander Graf wrote:
>>>>>> In order to support vhost, we need to be able to support ioeventfd.
>>>>>>
>>>>>> This patch set adds support for ioeventfd to PPC and makes it possible to
>>>>>> do so without implementing irqfd along the way, as it requires an in-kernel
>>>>>> irqchip which we don't have yet.
>>>>> It's not strictly required.  You have an interrupt line leading to the
>>>>> core, no?  You could have your irqfd trigger that.
>>>> The irqfd code in KVM directly triggers the in-kernel irqchip. That's what this patch set is cleaning up: enable you to build ioeventfd support without in-kernel irqchip irqfd support.
>>>>
>>>> Vhost can work without in-kernel irqchip too, by listening to an eventfd (iiuc) in user space. That path works just fine with these patches applied.
>>> That's all true but it wasn't my point.  I was asking whether you can
>>> enable irqfd without in-kernel irqchip.  If your irq input is edge
>>> triggered then it's trivial.  If it's level triggered then you can use
>>> the new resampling irqfd.
>> I'm not sure I fully grasp what you're trying to say :).
>>
>> We have a single interrupt line on the core. So whenever any external interrupt gets injected (same thing for MSI), we need to go to the MPIC / XICS and ask it which line is active.
> Couldn't you attach that payload to the irqfd?  On x86 an irqfd is
> associated with a gsi, and a gsi with extra information, including all
> that is needed to queue an MSI.
>
>> So yes, we could create a direct fd channel between vhost and the user space MPIC, but it wouldn't buy us anything. The interrupt injection path would be as long as it is with the current mechanism.
>>
> If there is a lot of prioritization and/or queuing logic, then yes.  But
> what about MSI?  Doesn't that have a direct path?

Nope. Well, yes, in a certain special case where the MPIC pushes the 
interrupt vector on interrupt delivery into a special register. But not 
for the "normal" case.


Alex


WARNING: multiple messages have this Message-ID (diff)
From: Alexander Graf <agraf@suse.de>
To: Avi Kivity <avi@redhat.com>
Cc: KVM list <kvm@vger.kernel.org>, kvm-ppc@vger.kernel.org
Subject: Re: [PATCH 0/2] KVM: PPC: Support ioeventfd
Date: Tue, 16 Oct 2012 16:49:55 +0200	[thread overview]
Message-ID: <507D7413.1000506@suse.de> (raw)
In-Reply-To: <507D656C.3020502@redhat.com>

On 10/16/2012 03:47 PM, Avi Kivity wrote:
> On 10/16/2012 01:06 PM, Alexander Graf wrote:
>> On 16.10.2012, at 13:01, Avi Kivity wrote:
>>
>>> On 10/16/2012 12:59 PM, Alexander Graf wrote:
>>>> On 16.10.2012, at 12:56, Avi Kivity wrote:
>>>>
>>>>> On 10/15/2012 02:02 PM, Alexander Graf wrote:
>>>>>> In order to support vhost, we need to be able to support ioeventfd.
>>>>>>
>>>>>> This patch set adds support for ioeventfd to PPC and makes it possible to
>>>>>> do so without implementing irqfd along the way, as it requires an in-kernel
>>>>>> irqchip which we don't have yet.
>>>>> It's not strictly required.  You have an interrupt line leading to the
>>>>> core, no?  You could have your irqfd trigger that.
>>>> The irqfd code in KVM directly triggers the in-kernel irqchip. That's what this patch set is cleaning up: enable you to build ioeventfd support without in-kernel irqchip irqfd support.
>>>>
>>>> Vhost can work without in-kernel irqchip too, by listening to an eventfd (iiuc) in user space. That path works just fine with these patches applied.
>>> That's all true but it wasn't my point.  I was asking whether you can
>>> enable irqfd without in-kernel irqchip.  If your irq input is edge
>>> triggered then it's trivial.  If it's level triggered then you can use
>>> the new resampling irqfd.
>> I'm not sure I fully grasp what you're trying to say :).
>>
>> We have a single interrupt line on the core. So whenever any external interrupt gets injected (same thing for MSI), we need to go to the MPIC / XICS and ask it which line is active.
> Couldn't you attach that payload to the irqfd?  On x86 an irqfd is
> associated with a gsi, and a gsi with extra information, including all
> that is needed to queue an MSI.
>
>> So yes, we could create a direct fd channel between vhost and the user space MPIC, but it wouldn't buy us anything. The interrupt injection path would be as long as it is with the current mechanism.
>>
> If there is a lot of prioritization and/or queuing logic, then yes.  But
> what about MSI?  Doesn't that have a direct path?

Nope. Well, yes, in a certain special case where the MPIC pushes the 
interrupt vector on interrupt delivery into a special register. But not 
for the "normal" case.


Alex

  reply	other threads:[~2012-10-16 14:49 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-15 12:02 [PATCH 0/2] KVM: PPC: Support ioeventfd Alexander Graf
2012-10-15 12:02 ` Alexander Graf
2012-10-15 12:02 ` [PATCH 1/2] KVM: Distangle eventfd code from irqchip Alexander Graf
2012-10-15 12:02   ` Alexander Graf
2012-10-16 10:57   ` Avi Kivity
2012-10-16 10:57     ` Avi Kivity
2012-10-16 11:01     ` Alexander Graf
2012-10-16 11:01       ` Alexander Graf
2012-10-15 12:02 ` [PATCH 2/2] KVM: PPC: Support eventfd Alexander Graf
2012-10-15 12:02   ` Alexander Graf
2012-10-16 10:56 ` [PATCH 0/2] KVM: PPC: Support ioeventfd Avi Kivity
2012-10-16 10:56   ` Avi Kivity
2012-10-16 10:59   ` Alexander Graf
2012-10-16 10:59     ` Alexander Graf
2012-10-16 11:01     ` Avi Kivity
2012-10-16 11:01       ` Avi Kivity
2012-10-16 11:06       ` Alexander Graf
2012-10-16 11:06         ` Alexander Graf
2012-10-16 13:47         ` Avi Kivity
2012-10-16 13:47           ` Avi Kivity
2012-10-16 14:49           ` Alexander Graf [this message]
2012-10-16 14:49             ` Alexander Graf
2012-10-17 14:50             ` Avi Kivity
2012-10-17 14:50               ` Avi Kivity
2012-10-17 17:23               ` Alexander Graf
2012-10-17 17:23                 ` Alexander Graf

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=507D7413.1000506@suse.de \
    --to=agraf@suse.de \
    --cc=avi@redhat.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.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 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.