|
|
|
|
|
|
|
|
|
|
xen-devel
RE: [Xen-devel] [PATCH] make HVM PIC emulation code SMP-safe
>As I mentioned, I have a very similar patch to make the IOAPIC code
>SMP safe. But since (even with these changes) I still see a huge
>number of lost hda interrupts when using the IOAPIC on SMP guests, I
>haven't been able to test it yet. I assume others see the same
>problems with the IOAPIC?? (I'll be diving into this soon --
>probably tonight or tomorrow. At this point I have no clue what's
>going wrong.)
On which situation will the IOAPIC has a lot of hd lost interrupt?
What's the guest kernel version are you using? I remember some old
version kernel has problem.
Also there is a bug on the round robin code.Current code will always
leads interrupt to vcpu 0.
Followed is the fix for it. But this fix cause problem for timer
interrupt, I'm not sure the cause, but I suspect it is because the timer
is injected in flood.
The below fix is based one of my another APIC patch , so not sure if you
can apply it directly, but I think you can figure out the changes
easily.
Thanks
Yunhong Jiang
diff -r 86d8246c6aff xen/arch/x86/hvm/vlapic.c
--- a/xen/arch/x86/hvm/vlapic.c Wed May 17 23:15:36 2006 +0100
+++ b/xen/arch/x86/hvm/vlapic.c Thu May 18 22:30:06 2006 +0800
@@ -308,8 +308,15 @@ struct vlapic* apic_round_robin(struct d
old = next = d->arch.hvm_domain.round_info[vector];
- do {
- /* the vcpu array is arranged according to vcpu_id */
+ /* the vcpu array is arranged according to vcpu_id */
+ do
+ {
+ next ++;
+ if ( !d->vcpu[next] ||
+ !test_bit(_VCPUF_initialised, &d->vcpu[next]->vcpu_flags) ||
+ next == MAX_VIRT_CPUS )
+ next = 0;
+
if ( test_bit(next, &bitmap) )
{
target = d->vcpu[next]->arch.hvm_vcpu.vlapic;
@@ -321,12 +328,6 @@ struct vlapic* apic_round_robin(struct d
}
break;
}
-
- next ++;
- if ( !d->vcpu[next] ||
- !test_bit(_VCPUF_initialised, &d->vcpu[next]->vcpu_flags)
||
- next == MAX_VIRT_CPUS )
- next = 0;
} while ( next != old );
d->arch.hvm_domain.round_info[vector] = next;
~
>
>Dave
>
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@xxxxxxxxxxxxxxxxxxx
>http://lists.xensource.com/xen-devel
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|