All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Gregory Haskins <ghaskins-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: In kernel PIC support: kernel patch
Date: Mon, 25 Jun 2007 18:08:26 -0400	[thread overview]
Message-ID: <46803CDA.1010304@qumranet.com> (raw)
In-Reply-To: <467F8E260200005A00026573-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>

Gregory Haskins wrote:
>> n paravirt device drivers will want to inject IRQs via the ioapic 
>> (when the guest is not paravirt_ops enabled, like older Linux and 
>> Windows). 
>>     
>
> Note that its probably not a requirement to do so.  The IOAPIC
> essentially provides a standard mechanism to map input "irq pins" to
> APIC messages.  A pv driver could conceivably call kvm_apicbus_send()
> directly if I knew its vector instead of calling ioapic_setpin() and it
> would achieve the same goal.
>
> What is nice about using an IOAPIC is that the irq routing can be done
> for you automatically by any ACPI compliant OS.  The device just has to
> say "raise my output pin" and the IOAPIC translates that into a vector.
> If you forgo the IOAPIC in favor of direct APIC messages, you have to
> solve the problem of irq-routing a different way.  
>
>   

Very good point.  There's a slight issue that Windows with the ACPI HAL 
is dog slow when virtulalized, but maybe we can find another HAL that 
supports ACPI but doesn't use the APIC.

> Note that there is another standard that would allow us to use built-in
> routing without ACPI/IOAPIC: MSI.  I know the battle over
> virtual-bus-rendering is still raging w.r.t. to PCI or not-PCI.  But I
> will point out that if we do use PCI, setting the PV devices up as MSI
> capable in the config space potentially eliminates the need to also wire
> them to an IOAPIC.  They will get their vector data from the MSI setup
> and can then send APIC messages directly.  (I think there is some
> confusion about how we can do MSI later in this thread...I will reply to
> those mails separately)
>   

MSI is also a good solution; but do all semi-modern guest OSes support it?

>   
>> It's probably okay to implement the device side of a block 
>> device in qemu, but more difficult for networking. If we have device 
>> implementations in the kernel then we'll need an ioapic in the kernel.
>>     
>
>   
>> Also, if we end up sharing interrupts between the kernel and userspace, 
>> we'll need the kernel to perform the OR between the level specified by 
>> the kernel devices and the level specified by userspace.
>>     
>
> I not sure I fully understand what you are getting at here.  It sounds
> like you are talking about splitting a single IOAPIC into both a user
> and kernel space device?  

No, a single ioapic in the kernel, with one interrupt line that is 
shared between a kernel-provided device and a userspace-provided 
device.  The kernel would need to provide the OR function that sharing 
implies.


> If we do end up needing the IOAPIC in the
> kernel and userspace, I would suggest using two IOAPICs (we just need to
> update the ACPI tables to say there are two) so that they can operate
> independently.  This should be supportable from a virtual system
> infrastructure standpoint, and is much cleaner IMHO.  If you were
> talking about a different scenario. please clarify

I was talking about a different scenario, but your solution is cleaner 
(though it involves more hand-dirtying with the ACPI tables).  Basically 
each PCI IRQ would have its own dedicated line.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

  parent reply	other threads:[~2007-06-25 22:08 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-25 13:43 In kernel PIC support: kernel patch Gregory Haskins
     [not found] ` <467F8E260200005A00026573-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>
2007-06-25 13:54   ` Dong, Eddie
2007-06-25 22:08   ` Avi Kivity [this message]
     [not found] <468E0FD2.2090305@qumranet.com>
     [not found] ` <468E0FD2.2090305-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-06 17:46   ` Dong, Eddie
     [not found]     ` <10EA09EFD8728347A513008B6B0DA77A01B8F3C5-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-07-08  8:18       ` Avi Kivity
  -- strict thread matches above, loose matches on Subject: below --
2007-06-25 22:36 Gregory Haskins
2007-06-25 22:23 Gregory Haskins
     [not found] ` <468008090200005A00026619-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>
2007-06-25 22:25   ` Avi Kivity
2007-06-26  0:30   ` Dong, Eddie
2007-06-27 15:50   ` Luca
2007-06-25 14:10 Gregory Haskins
     [not found] ` <467F94850200005A00026595-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>
2007-06-25 21:13   ` Dor Laor
     [not found]     ` <64F9B87B6B770947A9F8391472E032160C654F85-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-06-25 21:57       ` Avi Kivity
2007-06-25 13:53 Gregory Haskins
2007-06-25 13:45 Gregory Haskins
2007-06-25 13:44 Gregory Haskins
2007-06-25 13:26 Gregory Haskins
     [not found] ` <467F8A2D0200005A00026567-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>
2007-06-25 22:00   ` Avi Kivity
2007-06-22 12:14 Gregory Haskins
     [not found] ` <467B84EF0200005A00026401-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>
2007-06-23  7:53   ` Avi Kivity
2007-06-22 12:06 Gregory Haskins
     [not found] ` <467B830B0200005A000263FB-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>
2007-06-22 15:09   ` Dong, Eddie
     [not found]     ` <10EA09EFD8728347A513008B6B0DA77A014E8AC7-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-06-23 17:41       ` Avi Kivity
     [not found]         ` <467D5B5B.9090702-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-06-25  3:32           ` Dong, Eddie
     [not found]             ` <10EA09EFD8728347A513008B6B0DA77A01AA46F5-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-06-25  3:39               ` Avi Kivity
     [not found]                 ` <467F38F7.9090101-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-06-25  4:11                   ` Dong, Eddie
2007-06-22 12:02 Gregory Haskins
2007-06-22  3:49 Gregory Haskins
     [not found] ` <467B0E7D0200005A000263E4-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>
2007-06-22  7:25   ` Dong, Eddie
2007-06-22  9:57   ` Avi Kivity
2007-06-21 16:44 Gregory Haskins
     [not found] ` <467A72970200005A00026354-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>
2007-06-22  9:46   ` Avi Kivity
2007-06-21 15:43 Gregory Haskins
2007-06-21 15:42 Gregory Haskins
2007-06-21 15:17 Gregory Haskins
2007-06-21 15:10 Gregory Haskins
     [not found] ` <467A5C8C0200005A00026321-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>
2007-06-21 15:13   ` Dong, Eddie
2007-06-21 16:31   ` Avi Kivity
     [not found]     ` <467AA7FF.5000701-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-06-22  2:09       ` Dong, Eddie
     [not found]         ` <10EA09EFD8728347A513008B6B0DA77A01A56750-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-06-22 10:32           ` Avi Kivity
2007-06-21 14:01 Gregory Haskins
     [not found] ` <467A4C970200005A000262FD-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>
2007-06-21 14:57   ` Dong, Eddie
2007-06-21 13:31 Gregory Haskins
     [not found] ` <467A45690200005A000262F0-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>
2007-06-21 14:28   ` Dong, Eddie
2007-06-21 12:36 Gregory Haskins
     [not found] ` <467A38720200005A000262C8-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>
2007-06-21 13:02   ` Dong, Eddie
2007-06-20  7:43 Dong, Eddie
     [not found] ` <10EA09EFD8728347A513008B6B0DA77A01A55F0A-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-06-22 10:50   ` Avi Kivity
     [not found]     ` <467BA95A.704-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-06-22 14:21       ` Rusty Russell
     [not found]         ` <1182522074.17478.45.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-06-23  7:50           ` Avi Kivity
2007-06-25  1:45       ` Dong, Eddie
     [not found]         ` <10EA09EFD8728347A513008B6B0DA77A01AA45AD-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-06-25  3:28           ` Avi Kivity
2007-06-27 15:25       ` Dong, Eddie
     [not found]         ` <10EA09EFD8728347A513008B6B0DA77A01AE9255-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-07-02 23:53           ` Avi Kivity
     [not found]             ` <46898FE6.7040709-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-03  4:45               ` Dong, Eddie
     [not found]                 ` <10EA09EFD8728347A513008B6B0DA77A01B40B4A-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-07-03 14:52                   ` Avi Kivity
2007-07-03  7:19               ` Dong, Eddie

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=46803CDA.1010304@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=ghaskins-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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.