ia64/xen-unstable

diff xen/arch/ia64/vmx/vmx_phy_mode.c @ 18501:3d96f88fb220

[IA64] fix INIT injection.

xm trigger command sometimes causes an unexpected domain panic.
There are several symptoms:
* Guest nested fault (INIT handler runs with vpsr.cpl != 0)
* Interrupt when IC=0
* Unexpected virtual <--> physical mode transition

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Thu Sep 18 17:54:15 2008 +0900 (2008-09-18)
parents 6607624285b2
children
line diff
     1.1 --- a/xen/arch/ia64/vmx/vmx_phy_mode.c	Tue Sep 16 21:25:30 2008 +0900
     1.2 +++ b/xen/arch/ia64/vmx/vmx_phy_mode.c	Thu Sep 18 17:54:15 2008 +0900
     1.3 @@ -255,7 +255,12 @@ void
     1.4  switch_mm_mode(VCPU *vcpu, IA64_PSR old_psr, IA64_PSR new_psr)
     1.5  {
     1.6      int act;
     1.7 -    act = mm_switch_action(old_psr, new_psr);
     1.8 +    /* Switch to physical mode when injecting PAL_INIT */
     1.9 +    if (unlikely(MODE_IND(new_psr) == 0 &&
    1.10 +                 vcpu_regs(vcpu)->cr_iip == PAL_INIT_ENTRY))
    1.11 +        act = SW_2P_DT;
    1.12 +    else
    1.13 +        act = mm_switch_action(old_psr, new_psr);
    1.14      perfc_incra(vmx_switch_mm_mode, act);
    1.15      switch (act) {
    1.16      case SW_2P_DT: