ia64/xen-unstable

changeset 18303:fa8be8a6cb74

[IA64] fix vtlb flush

Live migration with uninitialized vcpu will crash xen by null pointer.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Wed Aug 13 13:18:06 2008 +0900 (2008-08-13)
parents d24bc5f549ba
children da236d7f59b9
files xen/arch/ia64/xen/vhpt.c
line diff
     1.1 --- a/xen/arch/ia64/xen/vhpt.c	Mon Aug 11 11:04:52 2008 +0900
     1.2 +++ b/xen/arch/ia64/xen/vhpt.c	Wed Aug 13 13:18:06 2008 +0900
     1.3 @@ -526,6 +526,8 @@ void flush_tlb_for_log_dirty(struct doma
     1.4  	/* NB. There is no race because all vcpus are paused. */
     1.5  	if (is_hvm_domain(d)) {
     1.6  		for_each_vcpu (d, v) {
     1.7 +			if (!v->is_initialised)
     1.8 +				continue;
     1.9  			/* XXX: local_flush_tlb_all is called redundantly */
    1.10  			thash_purge_all(v);
    1.11  		}
    1.12 @@ -533,6 +535,8 @@ void flush_tlb_for_log_dirty(struct doma
    1.13  					NULL, 1, 1);
    1.14  	} else if (HAS_PERVCPU_VHPT(d)) {
    1.15  		for_each_vcpu (d, v) {
    1.16 +			if (!v->is_initialised)
    1.17 +				continue;
    1.18  			vcpu_purge_tr_entry(&PSCBX(v,dtlb));
    1.19  			vcpu_purge_tr_entry(&PSCBX(v,itlb));
    1.20  			vcpu_vhpt_flush(v);