ia64/xen-unstable

changeset 16102:9c52742f7734

[IA64] Avoid set cr.ivt when context switch if possible

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Alex Williamson <alex.williamson@hp.com>
date Fri Oct 12 13:56:42 2007 -0600 (2007-10-12)
parents e71c7789c2f5
children 52b71f12dce7
files xen/arch/ia64/xen/domain.c
line diff
     1.1 --- a/xen/arch/ia64/xen/domain.c	Fri Oct 12 13:52:30 2007 -0600
     1.2 +++ b/xen/arch/ia64/xen/domain.c	Fri Oct 12 13:56:42 2007 -0600
     1.3 @@ -206,7 +206,8 @@ void schedule_tail(struct vcpu *prev)
     1.4  		migrate_timer(&current->arch.arch_vmx.vtm.vtm_timer,
     1.5  		              current->processor);
     1.6  	} else {
     1.7 -		ia64_set_iva(&ia64_ivt);
     1.8 +		if (VMX_DOMAIN(prev))
     1.9 +			ia64_set_iva(&ia64_ivt);
    1.10  		load_region_regs(current);
    1.11  		ia64_set_pta(vcpu_pta(current));
    1.12  		vcpu_load_kernel_regs(current);
    1.13 @@ -259,7 +260,8 @@ void context_switch(struct vcpu *prev, s
    1.14          struct domain *nd;
    1.15          extern char ia64_ivt;
    1.16  
    1.17 -        ia64_set_iva(&ia64_ivt);
    1.18 +        if (VMX_DOMAIN(prev))
    1.19 +            ia64_set_iva(&ia64_ivt);
    1.20  
    1.21          nd = current->domain;
    1.22          if (!is_idle_domain(nd)) {
    1.23 @@ -911,7 +913,7 @@ int arch_set_info_guest(struct vcpu *v, 
    1.24  			             tr->dtrs[i].rid);
    1.25  		}
    1.26  		v->arch.event_callback_ip = c.nat->event_callback_ip;
    1.27 -		v->arch.iva = c.nat->regs.cr.iva;
    1.28 +		vcpu_set_iva(v, c.nat->regs.cr.iva);
    1.29  	}
    1.30  
    1.31  	return 0;