public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] in-kernel APIC support "v1"
@ 2007-05-09  3:03 Gregory Haskins
       [not found] ` <20070509023731.23443.86578.stgit-sLgBBP33vUGnsjUZhwzVf9HuzzzSOjJt@public.gmane.org>
  0 siblings, 1 reply; 30+ messages in thread
From: Gregory Haskins @ 2007-05-09  3:03 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Here is my latest series incorporating the feedback and numerous bugfixes.  I
did not keep an official change-log, so its difficult to say what changed off
the top of my head without an interdiff.  I will keep a changelog from here on
out.  Lets call this drop officially "v1".  I will start tracking versions of
the drop so its easier to refer to them in review notes, etc.

Here are a few notes:

A) I implemented Avi's idea for a fd-based signaling mechanism.  I didnt quite
get what he meant by "writable-fd".  The way I saw it, it should be readable
so that is how I implemented it.  If that is not satisfactory, please
elaborate on the writable idea and I will change it over.

B) I changed the controversial kvm_irqdevice_ack() mechanism to use an "out"
structure, instead of an int pointer + return bitmap.  Hopefully, this design
puts Avi's mind at ease as the return code is more standard now.  In addition,
this API makes it easier to extend, which I take advantage of later in the
series for the TPR-shadow stuff.

C) I changed the irq.task assignment from a lock to a barrier, per review
comments.  However, I left the irq.guestmode = 0 assignment in a lock because
I believe it is actually required to eliminate a race.  E.g. We want to make
sure that the irq.pending and IPI-method are decided atomically and the
irq.guest-mode is essentially identifiying a critical section.  I could be
convinced otherwise, but for now its still there.

D) Patch #8 is for demonstration purposes only.  Dont apply it (yet) as it
causes the system to error on VMENTRY.  I include it purely so its clear where
I am going.

Overall, this code (excluding patch #8) seems to be working quite well from a
pure functional standpoint.  One problem that I see is QEMU remains pretty
busy even when the guest is idle.  I have a feeling it has something to do
with the way signals are delivered...TBD.  Otherwise, its working from my
perspective.  I would love to hear feedback from testers.

An interesting discovery on my part while working on this is that there is an
aparent mis-emulation in the QEMU LAPIC code.  The kernel that ships as the
SLED-10 installer (2.6.16.21, I think) maps LINT0 as an NMI and masks off all
interrupts in the 8259 except the PIT.  It also leaves the PIT input on the
IOAPIC active. 

This means that every timer tick gets delivered both as a FIXED vector from
the IOAPIC, and as an NMI.  As far as I can tell from reading google, this is
what linux intended.  Note, however, that under QEMU LAPIC, LINT0 is dropped
if the vector is not EXTINT whereas the in-kernel APIC emulates both.
Therefore, cat'ing /proc/interrupts under stock KVM shows only IRQ: 0, and LOC
incrementing, with NMI at 0.  The in-kernel patches show NMIs also
incrementing. 

I could generate a patch to fix the QEMU code, but what I am not sure of is
whether this was intentionally coded to ignore the LINT0 NMI programming? 

Regards,
-Greg

-------------------------------------------------------------------------
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/

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2007-05-16 12:18 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-09  3:03 [PATCH 0/8] in-kernel APIC support "v1" Gregory Haskins
     [not found] ` <20070509023731.23443.86578.stgit-sLgBBP33vUGnsjUZhwzVf9HuzzzSOjJt@public.gmane.org>
2007-05-09  3:03   ` [PATCH 1/8] KVM: Adds support for in-kernel mmio handlers Gregory Haskins
     [not found]     ` <20070509030315.23443.93779.stgit-sLgBBP33vUGnsjUZhwzVf9HuzzzSOjJt@public.gmane.org>
2007-05-09  9:51       ` [PATCH 1/8] KVM: Adds support for in-kernel mmiohandlers Dor Laor
2007-05-09  3:03   ` [PATCH 2/8] KVM: Add irqdevice object Gregory Haskins
     [not found]     ` <20070509030320.23443.51197.stgit-sLgBBP33vUGnsjUZhwzVf9HuzzzSOjJt@public.gmane.org>
2007-05-09 15:16       ` Dor Laor
     [not found]         ` <64F9B87B6B770947A9F8391472E032160BBA6157-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-05-09 18:04           ` Gregory Haskins
     [not found]             ` <4641D4D8.BA47.005A.0-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>
2007-05-09 22:12               ` Dor Laor
     [not found]                 ` <64F9B87B6B770947A9F8391472E032160BBA6471-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-05-09 22:47                   ` Gregory Haskins
     [not found]                     ` <4642170B.BA47.005A.0-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>
2007-05-13 12:05                       ` Avi Kivity
2007-05-09  3:03   ` [PATCH 3/8] KVM: Adds ability to preempt an executing VCPU Gregory Haskins
     [not found]     ` <20070509030325.23443.90129.stgit-sLgBBP33vUGnsjUZhwzVf9HuzzzSOjJt@public.gmane.org>
2007-05-14  9:34       ` Avi Kivity
     [not found]         ` <46482D2E.7040809-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-05-14 15:19           ` Gregory Haskins
     [not found]             ` <464845AD.BA47.005A.0-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>
2007-05-14 15:45               ` Avi Kivity
     [not found]                 ` <46488426.8090705-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-05-14 18:19                   ` Gregory Haskins
     [not found]                     ` <46486FD4.BA47.005A.0-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>
2007-05-15  7:28                       ` Avi Kivity
     [not found]                         ` <46496125.5020909-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-05-15 11:56                           ` Gregory Haskins
     [not found]                             ` <4649679C.BA47.005A.0-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>
2007-05-16 10:05                               ` Avi Kivity
     [not found]                                 ` <464AD772.4050007-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-05-16 12:10                                   ` Gregory Haskins
     [not found]                                     ` <464ABC67.BA47.005A.0-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>
2007-05-16 12:18                                       ` Avi Kivity
2007-05-09  3:03   ` [PATCH 4/8] KVM: Adds ability to signal userspace using a file-descriptor Gregory Haskins
2007-05-09  3:03   ` [PATCH 5/8] KVM: Add support for in-kernel LAPIC model Gregory Haskins
2007-05-09  3:03   ` [PATCH 6/8] KVM: Adds support for real NMI injection on VMX processors Gregory Haskins
     [not found]     ` <20070509030340.23443.84153.stgit-sLgBBP33vUGnsjUZhwzVf9HuzzzSOjJt@public.gmane.org>
2007-05-14  9:38       ` Avi Kivity
2007-05-09  3:03   ` [PATCH 7/8] KVM: Adds basic plumbing to support TPR shadow features Gregory Haskins
2007-05-09  3:03   ` [PATCH 8/8] KVM: Adds support for TPR shadowing under VMX processors Gregory Haskins
     [not found]     ` <20070509030350.23443.35387.stgit-sLgBBP33vUGnsjUZhwzVf9HuzzzSOjJt@public.gmane.org>
2007-05-14 11:09       ` Avi Kivity
     [not found]         ` <46484376.6090304-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-05-14 15:28           ` Gregory Haskins
2007-05-13 12:02   ` [PATCH 0/8] in-kernel APIC support "v1" Avi Kivity
     [not found]     ` <4646FE71.5080009-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-05-13 14:09       ` Gregory Haskins
     [not found]         ` <4646E3D1.BA47.005A.0-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>
2007-05-13 15:45           ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox