This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-changelog] Get multiple domains working again

# HG changeset patch
# User djm@xxxxxxxxxxxxxxx
# Node ID f2309ac2648a7c815948593ac19f361631475948
# Parent  7f9acc83ffcd499ea66894aa9deed65211ff7063
Get multiple domains working again
Signed-off-by Kevin Tian <kevin.tian@xxxxxxxxx>

Some interesting issues found related to two small patches:
1. Only "xm console 1" and "Ctrl + ]" can make xenU forward progress,
and however still failed to connect blkback later.
        [Reason] Previous event injection on XEN/IPF only set vIRR bit
when evtchn_set_pending. However with the latest xenlinux code, it's
possible for xenlinux to set pending indication and selector when
unmasking some pending event channel. This path has nothing to do with
vIRR bit.

        [Solution] We should check event pending every time when
checking pending interrupts before returning to guest.

2. After fixing first issue, nested event is injected when first event
is still in handle with lock held. Then dead lock happens at end of
"xend start".
        [Reason] Due to same logic as above, xenlinux may set pending
indication and re-trigger pending event by force_evtchn_callback. On
x86, this stub just does a dummy xen_version hypercall and pending event
will be injected back when leaving hypervisor. However on IA64,
force_evtchn_callback is incautiously made invoking evtchn_interrupt()
directly, while the former may be called with lock held.

        [Solution] Just let force_evtchn_callback as empty for simple now.

diff -r 7f9acc83ffcd -r f2309ac2648a xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Mon Sep 19 17:08:20 2005
+++ b/xen/arch/ia64/xen/domain.c        Tue Sep 20 19:03:25 2005
@@ -917,7 +917,7 @@
        /* Mask all upcalls... */
-       for ( i = 0; i < MAX_VIRT_CPUS; i++ )
+       for ( i = 1; i < MAX_VIRT_CPUS; i++ )
            d->shared_info->vcpu_data[i].evtchn_upcall_mask = 1;
 #ifdef CONFIG_VTI
diff -r 7f9acc83ffcd -r f2309ac2648a xen/arch/ia64/xen/vcpu.c
--- a/xen/arch/ia64/xen/vcpu.c  Mon Sep 19 17:08:20 2005
+++ b/xen/arch/ia64/xen/vcpu.c  Tue Sep 20 19:03:25 2005
@@ -21,6 +21,7 @@
 #include <asm/processor.h>
 #include <asm/delay.h>
 #include <asm/vmx_vcpu.h>
+#include <xen/event.h>
 typedef        union {
        struct ia64_psr ia64_psr;
@@ -654,6 +655,15 @@
        UINT64 *p, *q, *r, bits, bitnum, mask, i, vector;
+       /* Always check pending event, since guest may just ack the
+        * event injection without handle. Later guest may throw out
+        * the event itself.
+        */
+       if (event_pending(vcpu) && 
+               !test_bit(vcpu->vcpu_info->arch.evtchn_vector,
+                       &PSCBX(vcpu, insvc[0])))
+               vcpu_pend_interrupt(vcpu, vcpu->vcpu_info->arch.evtchn_vector);
        p = &PSCBX(vcpu,irr[3]);
        /* q = &PSCB(vcpu,delivery_mask[3]); */
        r = &PSCBX(vcpu,insvc[3]);

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Get multiple domains working again, Xen patchbot -unstable <=