In kernel PIC support: kernel patch
Quoted 16 lines · Avi Kivity
Quoted 8 lines · Gregory Haskins
Unless I misunderstood Avi, I think he was suggesting that use use KVM_EXTINT/ISA_INTERRUPT as a way to distinguish between the dual modes of
ISA_INTERRUPTas I have today (e.g. ISA_INTERRUPT(level-1)/ISA_INTERRUPT(level-2)). This doesn't really have anything to do with LINT0/1 (directly, anyway). Hope this helps to clarify.Well, we don't need to think in terms of modes. Each ioctl controls interrupts at a different point in the architecture.
KVM_INTERRUPTis at the interface between the processor core and the lapic/system bus.
Quoted 6 lines
KVM_APIC_MESSAGEis at the apic bus.
KVM_EXTINTis at the interface between the lapic and the system bus. If the guest disabled the local apic, it's equivalent to theKVM_INTERRUPT(injecting a vector directly); otherwise it is handled by the lapic (LINT0/1 handling).
Ok, now I understand what Eddie was saying about LINT0/1 and we were both describing the same thing in different ways. I think we are all on the same page.
Quoted 5 lines
KVM_ISA_INTERRUPT(maybeKVM_IRQ_LINE, to signify it doesn't carry a vector) is at the boundary between the interrupt controller chips and the rest of the system.
Ack on s/ISA/IRQ or something similar
-------------------------------------------------------------------------
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/
Woo, we have gone through so many threads within single day and get almost
everything in hand now :-) Should we make a short notes on the decision to be referenced in future (Any place to KVM I/F)?
Basically we have solved the I/Fs issue and part IRQ delivery issue.
Several other minor points in my mind:
1: Cross architecture consideration
If we want to consider other platform too such as IA64 and PPC like that in Xen, then use GSI is better for KVM_IOAPIC_INTERRUPT. BTW, IA64 platform doesn;t have PIC usually.(The work for IA64 is under going.)
2: MSI.
Not sure if there will have requirement to support a virtual
device
with MSI support, if yes, then we may add new APIs in future. So let us reserve some I/F for future irq injection.
3: IOAPIC position
Though it looks like neutral to have this one in user or kernel
space,
but I'd like to suggest we only support one model. Considering future VT-d
case, hypervisor need to inject an IRQ directly in KVM (still thru IOAPIC)
without going to user level, so probably moving IOAPIC to kernel is good
in this point.
Any suggestion?
thanks, eddie
-------------------------------------------------------------------------
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/
Quoted 7 lines · Eddie
Woo, we have gone through so many threads within single day and get almost
everything in hand now :-) Should we make a short notes on the decision to be referenced in future (Any place to KVM I/F)?Basically we have solved the I/Fs issue and part IRQ delivery issue.
Quoted 9 lines
Several other minor points in my mind:
1: Cross architecture consideration
If we want to consider other platform too such as IA64 and PPC like that in Xen, then use GSI is better forKVM_IOAPIC_INTERRUPT. BTW, IA64 platform doesn;t have PIC usually.(The work for IA64 is under going.)
What is GSI?
Quoted 6 lines
2: MSI.
Not sure if there will have requirement to support a virtual
device
with MSI support, if yes, then we may add new APIs in future. So let us reserve some I/F for future irq injection.
We'll add it as soon as it becomes necessary. But isn't it just a memory write?
Quoted 11 lines
3: IOAPIC position
Though it looks like neutral to have this one in user or kernel
space,
but I'd like to suggest we only support one model. Considering future VT-d
case, hypervisor need to inject an IRQ directly in KVM (still thru IOAPIC)
without going to user level, so probably moving IOAPIC to kernel is goodin this point.
Even paravirt device drivers will want to inject IRQs via the ioapic (when the guest is not paravirt_ops enabled, like older Linux and Windows). 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.
-------------------------------------------------------------------------
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/
Quoted 17 lines · Avi Kivity
Quoted 6 lines · Eddie
Woo, we have gone through so many threads within single day and get almost everything in hand now :-) Should we make a short notes on the decision to be referenced in future (Any place to KVM I/F)?
Basically we have solved the I/Fs issue and part IRQ delivery issue.
Quoted 9 lines
Several other minor points in my mind:
1: Cross architecture consideration
If we want to consider other platform too such as IA64 and PPC like that in Xen, then use GSI is better forKVM_IOAPIC_INTERRUPT. BTW, IA64 platform doesn;t have PIC usually.(The work for IA64 is under going.)
Quoted 1 line
What is GSI?
GSI is ACPI notion of "Global System Interrupt". (Just parameter passing difference: GSI use GSI #, our previous discussion use: PIC/IOAPIC # + line #)
Quoted 11 lines
Quoted 7 lines
2: MSI.
Not sure if there will have requirement to support a virtual
device
with MSI support, if yes, then we may add new APIs in future. So let us reserve some I/F for future irq injection.We'll add it as soon as it becomes necessary. But isn't it just a memory
write?
Yes. So you mean we just add a memory Write I/F? It could be another good alternative.
(I suppose MSI emulation is in kernel too if other irqchip is in kernel.)
Quoted 17 lines
Quoted 10 lines
3: IOAPIC position
Though it looks like neutral to have this one in user or kernel
space, but I'd like to suggest we only support one model. Considering future VT-d case, hypervisor need to inject an IRQ directly in KVM (still thru IOAPIC) without going to user level, so probably moving IOAPIC to kernel is goodin this point.
Even paravirt device drivers will want to inject IRQs via the ioapic (when the guest is not
paravirt_opsenabled, like older Linux and Windows). 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.
Quoted 3 lines
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.
Yes, so basically in kernel IOAPIC has stronger reason :-) Any strong reason
to support user level IOAPIC + kernel level APIC/PIC/MSI ? thx,eddie
-------------------------------------------------------------------------
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/
Quoted 20 lines · Eddie
Quoted 18 lines · Avi Kivity
Quoted 16 lines · Eddie
Woo, we have gone through so many threads within single day and get almost everything in hand now :-) Should we make a short notes on the decision to be referenced in future (Any place to KVM I/F)?
Basically we have solved the I/Fs issue and part IRQ delivery issue.
Several other minor points in my mind:
1: Cross architecture consideration
If we want to consider other platform too such as IA64 and PPC like that in Xen, then use GSI is better forKVM_IOAPIC_INTERRUPT. BTW, IA64 platform doesn;t have PIC usually.(The work for IA64 is under going.)
Quoted 9 lines
Quoted 2 lines
What is GSI?
GSI is ACPI notion of "Global System Interrupt". (Just parameter passing difference: GSI use GSI #, our previous discussion use: PIC/IOAPIC # + line #)
Can you refer me to any documentation about it?
Quoted 12 lines
Quoted 11 lines
Quoted 7 lines
2: MSI.
Not sure if there will have requirement to support a virtual
device
with MSI support, if yes, then we may add new APIs in future. So let us reserve some I/F for future irq injection.We'll add it as soon as it becomes necessary. But isn't it just a memory
write?
Quoted 5 lines
Yes. So you mean we just add a memory Write I/F? It could be another good alternative.
(I suppose MSI emulation is in kernel too if other irqchip is in kernel.)
We already have kernel->user write (normal mmio)
If both the interrupt originator and the irqchip are in the kernel there is no need for an api.
So all that is left is an mmio api from user to kernel. Which makes
sense: if we have memory resources in the kernel, we need to be able to access them from userspace (one example already exists, RAM, which is accessed in userspace through mmap()).
Quoted 18 lines
Quoted 18 lines
Quoted 12 lines
3: IOAPIC position
Though it looks like neutral to have this one in user or kernel
space, but I'd like to suggest we only support one model. Considering future VT-d case, hypervisor need to inject an IRQ directly in KVM (still thru IOAPIC) without going to user level, so probably moving IOAPIC to kernel is goodin this point.
Even paravirt device drivers will want to inject IRQs via the ioapic (when the guest is not
paravirt_opsenabled, like older Linux and Windows). 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.
Quoted 9 lines
Quoted 4 lines
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.
Yes, so basically in kernel IOAPIC has stronger reason :-) Any strong reason
to support user level IOAPIC + kernel level APIC/PIC/MSI ?
No strong reason. It may be desirable for debuggability, but not much else.
-------------------------------------------------------------------------
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/
Quoted 9 lines · Avi Kivity
Quoted 7 lines
GSI is ACPI notion of "Global System Interrupt". (Just parameter passing difference: GSI use GSI #, our previous discussion use: PIC/IOAPIC # + line #)
Can you refer me to any documentation about it?
ACPI spec 3.0a, section 5.2.12.
http://www.acpi.info/spec.htm has a copy. I don't where is formal release org.
-------------------------------------------------------------------------
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/