WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[Xen-ia64-devel] [PATCH] fix vtlb flush

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH] fix vtlb flush
From: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Date: Wed, 13 Aug 2008 11:08:03 +0900
Delivery-date: Tue, 12 Aug 2008 19:08:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
Live migration with uninitialized vcpu will crash xen by null pointer.

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>

diff -r d24bc5f549ba xen/arch/ia64/vmx/vtlb.c
--- a/xen/arch/ia64/vmx/vtlb.c  Mon Aug 11 11:04:52 2008 +0900
+++ b/xen/arch/ia64/vmx/vtlb.c  Wed Aug 13 10:50:00 2008 +0900
@@ -633,6 +633,9 @@ static void __thash_purge_all(void *arg)
 
 void vmx_vcpu_flush_vtlb_all(VCPU *v)
 {
+    if (!v->is_initialised)
+        return;
+
     if (v == current) {
         thash_purge_all(v);
         return;
diff -r d24bc5f549ba xen/arch/ia64/xen/vhpt.c
--- a/xen/arch/ia64/xen/vhpt.c  Mon Aug 11 11:04:52 2008 +0900
+++ b/xen/arch/ia64/xen/vhpt.c  Wed Aug 13 10:21:45 2008 +0900
@@ -526,6 +526,8 @@ void flush_tlb_for_log_dirty(struct doma
        /* 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 doma
                                        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);
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
<Prev in Thread] Current Thread [Next in Thread>