[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Unmap vcpu_info mapping in arch_domain_destroy.



# HG changeset patch
# User Jeremy Fitzhardinge <jeremy@xxxxxxxxxxxxx>
# Date 1180009505 -3600
# Node ID f38f7f583f336aba7e70c3f46b2c7e33fd8640e1
# Parent  03c213fd2360e2b5e825108140dd4bc8b0b6936f
Unmap vcpu_info mapping in arch_domain_destroy.

We don't need to touch it in arch_vcpu_reset() because that's only used
to recover from a failed suspend, and the correct behaviour there is to
leave the mapping as-is.
---
 xen/arch/x86/domain.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff -r 03c213fd2360 -r f38f7f583f33 xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Thu May 24 10:48:58 2007 +0100
+++ b/xen/arch/x86/domain.c     Thu May 24 13:25:05 2007 +0100
@@ -489,6 +489,9 @@ void arch_domain_destroy(struct domain *
 {
     struct vcpu *v;
 
+    for_each_vcpu( d, v )
+        unmap_vcpu_info(v);
+
     if ( is_hvm_domain(d) )
     {
         for_each_vcpu ( d, v )
@@ -731,7 +734,6 @@ int arch_set_info_guest(
 
 int arch_vcpu_reset(struct vcpu *v)
 {
-    unmap_vcpu_info(v);
     destroy_gdt(v);
     vcpu_destroy_pagetables(v);
     return 0;
@@ -739,8 +741,8 @@ int arch_vcpu_reset(struct vcpu *v)
 
 /* 
  * Unmap the vcpu info page if the guest decided to place it somewhere
- * else.  This is only used from arch_vcpu_reset, so there's no need
- * to do anything clever.
+ * else.  This is only used from arch_domain_destroy, so there's no
+ * need to do anything clever.
  */
 static void
 unmap_vcpu_info(struct vcpu *v)

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.