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-changelog

[Xen-changelog] Fix gcc warning and clean a piece of code in arch_set_in

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix gcc warning and clean a piece of code in arch_set_info_guest to avoid
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 22 Feb 2006 19:54:08 +0000
Delivery-date: Wed, 22 Feb 2006 19:54:20 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 049929854f7f0c1707ac395c92fea3db2ddbc91f
# Parent  8fb4392c1d87c0b2a003d290e6d6d0541230c1c7
Fix gcc warning and clean a piece of code in arch_set_info_guest to avoid
AP of HVM domain going to a wrong code path.

Signed-off-by: Xin Li <xin.b.li@xxxxxxxxx>

diff -r 8fb4392c1d87 -r 049929854f7f xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Wed Feb 22 18:23:35 2006
+++ b/xen/arch/x86/domain.c     Wed Feb 22 18:38:50 2006
@@ -346,7 +346,7 @@
     struct vcpu *v, struct vcpu_guest_context *c)
 {
     struct domain *d = v->domain;
-    unsigned long phys_basetab;
+    unsigned long phys_basetab = INVALID_MFN;
     int i, rc;
 
     /*
@@ -421,7 +421,14 @@
     if ( (rc = (int)set_gdt(v, c->gdt_frames, c->gdt_ents)) != 0 )
         return rc;
 
-    if ( shadow_mode_refcounts(d) )
+    if ( c->flags & VGCF_HVM_GUEST )
+    {
+        v->arch.guest_table = mk_pagetable(0);
+
+        if ( !hvm_initialize_guest_resources(v) )
+            return -EINVAL;
+    }
+    else if ( shadow_mode_refcounts(d) )
     {
         if ( !get_page(mfn_to_page(phys_basetab>>PAGE_SHIFT), d) )
         {
@@ -429,7 +436,7 @@
             return -EINVAL;
         }
     }
-    else if ( !(c->flags & VGCF_HVM_GUEST) )
+    else
     {
         if ( !get_page_and_type(mfn_to_page(phys_basetab>>PAGE_SHIFT), d,
                                 PGT_base_page_table) )
@@ -437,14 +444,6 @@
             destroy_gdt(v);
             return -EINVAL;
         }
-    }
-
-    if ( c->flags & VGCF_HVM_GUEST )
-    {
-        v->arch.guest_table = mk_pagetable(0);
-
-        if ( !hvm_initialize_guest_resources(v) )
-            return -EINVAL;
     }
 
     update_pagetables(v);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix gcc warning and clean a piece of code in arch_set_info_guest to avoid, Xen patchbot -unstable <=