From f60127899040f1103a286e56a27d67432c2c9652 Mon Sep 17 00:00:00 2001 From: Isaku Yamahata Date: Wed, 13 Aug 2008 13:18:06 +0900 Subject: [PATCH] [IA64] fix vtlb flush Live migration with uninitialized vcpu will crash xen by null pointer. Signed-off-by: Kouya Shimura --- xen/arch/ia64/xen/vhpt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xen/arch/ia64/xen/vhpt.c b/xen/arch/ia64/xen/vhpt.c index 6e89f0d44f..525b76fc37 100644 --- a/xen/arch/ia64/xen/vhpt.c +++ b/xen/arch/ia64/xen/vhpt.c @@ -526,6 +526,8 @@ void flush_tlb_for_log_dirty(struct domain *d) /* NB. There is no race because all vcpus are paused. */ if (is_hvm_domain(d)) { for_each_vcpu (d, v) { + if (!v->is_initialised) + continue; /* XXX: local_flush_tlb_all is called redundantly */ thash_purge_all(v); } @@ -533,6 +535,8 @@ void flush_tlb_for_log_dirty(struct domain *d) NULL, 1, 1); } else if (HAS_PERVCPU_VHPT(d)) { for_each_vcpu (d, v) { + if (!v->is_initialised) + continue; vcpu_purge_tr_entry(&PSCBX(v,dtlb)); vcpu_purge_tr_entry(&PSCBX(v,itlb)); vcpu_vhpt_flush(v); -- 2.30.2