Avi Kivity wrote:
Gregory Haskins wrote:
Incorporates v8 plus the following changes:
1) Fix for hang on AMD
2) Fixes issue where irq-windows are inaccurately reported to userspace
3) Fixed issue where irq-window-exiting requests can be ignored in
some cases
FC6 x86_64 hangs on this (AMD) after 'Detected 62.502 MHz APIC
Timer.'. At least it doesn't kill the machine -- just the guest.
I'll try to see what's wrong.
Note that this is with just the kernel patches applied.
The patchset is available as the lapic branch in kvm.git (with some
whitespace damage fixed).
Things are a little better with the attached patch.
On AMD, to detect the interrupt window opening, we queue an interrupt
and then ask for an intercept immediately before interrupt disaptching.
Effectively that means an intercept after sti, as on vmx.
The problem occurs when we want to inject an interrupt _and_ request an
interrupt window. Using the current code, we loop immediately because
we queue the requested interrupt, then ask for an intercept when it is
dispatched. A complex way to spin.
The fix is to inject the interrupt instead of queueing it. Injected
events are not intercepted, so we can ask for an interrupt window
concurrently with injecting an interrupt.
However, there are still problems (like Windows spontaneously
rebooting). Will investigate further.
--
error compiling committee.c: too many arguments to function
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index bdc5d98..651c860 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -1425,13 +1425,18 @@ static void do_intr_requests(struct kvm_vcpu *vcpu,
if (ack.flags & KVM_IRQACKDATA_VECTOR_VALID) {
control = &vcpu->svm->vmcb->control;
+#if 0
control->int_vector = ack.vector;
control->int_ctl &= ~V_INTR_PRIO_MASK;
control->int_ctl |= V_IRQ_MASK |
((/*control->int_vector >> 4*/ 0xf) <<
V_INTR_PRIO_SHIFT);
+#endif
+ control->event_inj = ack.vector
+ | SVM_EVTINJ_VALID
+ | SVM_EVTINJ_TYPE_INTR;
++vcpu->stat.irq_accepted;
}
}
-------------------------------------------------------------------------
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/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel