[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-ia64-devel] [PATCH] Make VTIdomain boot again


  • To: "Magenheimer, Dan \(HP Labs Fort Collins\)" <dan.magenheimer@xxxxxx>
  • From: "Xu, Anthony" <anthony.xu@xxxxxxxxx>
  • Date: Wed, 8 Feb 2006 17:11:48 +0800
  • Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 08 Feb 2006 09:22:47 +0000
  • List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
  • Thread-index: AcYsj7AmEVtlI4naRbOSa3V6gzq13w==
  • Thread-topic: [Xen-ia64-devel] [PATCH] Make VTIdomain boot again

Hi All,

Since the merge from xen-unstable, there is a small window between
bvt_do_schedule and context_switch in function __enter_schedule, where
interrupt is enabled.

See below scenario:
1. VTI domain accesses legacy IO, VMM gets control, sets VTI-domain into
blocked status and calls __enter_schedule to yield scheduler and wait
QEMU in domain0 to handle IO request.
2. There is a timer interrupt in above window, and this timer interrupt
triggers schedule timer, then in irq_exit function, VMM will do
soft_irq, which in turn will invoke __enter_schedule, thus
__enter_schedule is reentered in VMM, which is not correct.

So the root cause is __enter_schedule is reentered.
The correct way is, soft_irq should be done just before VMM returning to
guest just like in native linux soft-irq is done just before linux
returning to application. But in current implementation soft-irq is done
in irq-exit function.

The reason why xenU can boot is,
xenU is always runable, so it will not be deleted from runqueue, though
__enter_schedule is reentered, no issue appear, as for VTIdomain, when
it does IO operation, it will be set into blocked status and be deleted
from runqueue, which will crash the whole system.

This patch is just a workaround, it makes sure in irq_exit only when VMM
is not in nested interrupted situation, soft_irq is done.

I strongly suggest soft-irq be done in the path of ia64_leave_kernel
just like native linux kernel.

Any comment?

Thanks,
-Anthony 

Attachment: vtidomianboot.patch
Description: vtidomianboot.patch

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.