60 lines
2.2 KiB
Diff
60 lines
2.2 KiB
Diff
# HG changeset patch
|
|
# User kaf24@localhost.localdomain
|
|
# Date Fri Oct 27 18:02:40 2006 +0100
|
|
# Node ID ee140fbcb88df2e55259b0c6519de7645641468a
|
|
# parent: a1939d76c0e8e27bdac5233df7bd78c004ea8deb
|
|
[HVM] Ensure that, if AP is blocked, it is woken by interrupt delivered by IOAPIC.
|
|
|
|
This fixes 64-bit SMP Windows 2k3 boot.
|
|
|
|
Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
|
|
Signed-off-by: Xin Li <xin.b.li@intel.com>
|
|
|
|
Index: xen-3.0.3-testing/xen/arch/x86/hvm/vioapic.c
|
|
===================================================================
|
|
--- xen-3.0.3-testing.orig/xen/arch/x86/hvm/vioapic.c
|
|
+++ xen-3.0.3-testing/xen/arch/x86/hvm/vioapic.c
|
|
@@ -39,6 +39,7 @@
|
|
#include <asm/hvm/vpic.h>
|
|
#include <asm/hvm/support.h>
|
|
#include <asm/current.h>
|
|
+#include <asm/event.h>
|
|
|
|
/* HACK: Route IRQ0 only to VCPU0 to prevent time jumps. */
|
|
#define IRQ0_SPECIAL_ROUTING 1
|
|
@@ -436,9 +437,10 @@ static void ioapic_deliver(hvm_vioapic_t
|
|
#endif
|
|
target = apic_round_robin(s->domain, dest_mode,
|
|
vector, deliver_bitmask);
|
|
- if (target)
|
|
+ if (target) {
|
|
ioapic_inj_irq(s, target, vector, trig_mode, delivery_mode);
|
|
- else
|
|
+ vcpu_kick(target->vcpu);
|
|
+ } else
|
|
HVM_DBG_LOG(DBG_LEVEL_IOAPIC,
|
|
"null round robin mask %x vector %x delivery_mode %x\n",
|
|
deliver_bitmask, vector, dest_LowestPrio);
|
|
@@ -448,6 +450,7 @@ static void ioapic_deliver(hvm_vioapic_t
|
|
case dest_Fixed:
|
|
case dest_ExtINT:
|
|
{
|
|
+ struct vlapic* target;
|
|
uint8_t bit;
|
|
for (bit = 0; bit < s->lapic_count; bit++) {
|
|
if (deliver_bitmask & (1 << bit)) {
|
|
@@ -458,9 +461,10 @@ static void ioapic_deliver(hvm_vioapic_t
|
|
domain_crash_synchronous();
|
|
}
|
|
#endif
|
|
- if (s->lapic_info[bit]) {
|
|
- ioapic_inj_irq(s, s->lapic_info[bit],
|
|
- vector, trig_mode, delivery_mode);
|
|
+ target = s->lapic_info[bit];
|
|
+ if (target) {
|
|
+ ioapic_inj_irq(s, target, vector, trig_mode, delivery_mode);
|
|
+ vcpu_kick(target->vcpu);
|
|
}
|
|
}
|
|
}
|