Skip to contentSkip to conversation

xen: Make sure log-dirty is turned off before trying to dismantle it

PATCH In review George Dunlap 4 participants 5 messages Mar 7, 2012 – Mar 8, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: Make sure log-dirty is turned off before trying to dismantle it

xen/arch/x86/mm/paging.c +4 -0
@@ -722,6 +722,10 @@ int paging_domctl(struct domain *d, xen_
 /* Call when destroying a domain */
 void paging_teardown(struct domain *d)
 {
+    /* Make sure log-dirty is turned off before trying to dismantle it. 
+     * Needs to be done here becuse it's covered by the hap/shadow lock */
+    d->arch.paging.log_dirty.disable_log_dirty(d);
+
     if ( hap_enabled(d) )
         hap_teardown(d);
     else
#1 lore raw
Quoted 5 lines · George Dunlap

xen/arch/x86/mm/paging.c int paging_domctl(struct domain *d, xen_ · line 731

Quoted 10 lines
xen/arch/x86/mm/paging.c +4 -0
@@ -722,6 +722,10 @@ int paging_domctl(struct domain *d, xen_
 /* Call when destroying a domain */
 void paging_teardown(struct domain *d)
 {
+    /* Make sure log-dirty is turned off before trying to dismantle it. 
+     * Needs to be done here becuse it's covered by the hap/shadow lock */
+    d->arch.paging.log_dirty.disable_log_dirty(d);
+
     if ( hap_enabled(d) )
         hap_teardown(d);
     else

This isn't needed upstream because the spinlock confusion that it's papering over has been properly fixed (by eliminating the log-dirty lock).

Cheers,

Tim.

#2 lore raw
Quoted 12 lines · Tim Deegan
Quoted 11 lines · George Dunlap
xen/arch/x86/mm/paging.c +4 -0
@@ -722,6 +722,10 @@ int paging_domctl(struct domain *d, xen_
 /* Call when destroying a domain */
 void paging_teardown(struct domain *d)
 {
+    /* Make sure log-dirty is turned off before trying to dismantle it. 
+     * Needs to be done here becuse it's covered by the hap/shadow lock */
+    d->arch.paging.log_dirty.disable_log_dirty(d);
+
Quoted 8 lines

xen/arch/x86/mm/paging.c int paging_domctl(struct domain *d, xen_ · line 731

Quoted 4 lines
xen/arch/x86/mm/paging.c +0 -0
     if ( hap_enabled(d) )
         hap_teardown(d);
     else

This isn't needed upstream because the spinlock confusion that it's papering over has been properly fixed (by eliminating the log-dirty lock).

Yes; I'm afraid I didn't read the ticket referenced here very well either. Sorry about that -- it just looked so obvious. :-)

It looks like Keir has already added it -- do you want to revert it?

-George

#3 lore raw
Quoted 22 lines · George Dunlap
Quoted 12 lines · Tim Deegan
Quoted 11 lines · George Dunlap
xen/arch/x86/mm/paging.c +4 -0
@@ -722,6 +722,10 @@ int paging_domctl(struct domain *d, xen_
 /* Call when destroying a domain */
 void paging_teardown(struct domain *d)
 {
+    /* Make sure log-dirty is turned off before trying to dismantle it.
+     * Needs to be done here becuse it's covered by the hap/shadow lock */
+    d->arch.paging.log_dirty.disable_log_dirty(d);
+
Quoted 8 lines

xen/arch/x86/mm/paging.c int paging_domctl(struct domain *d, xen_ · line 731

Quoted 4 lines
xen/arch/x86/mm/paging.c +0 -0
     if ( hap_enabled(d) )
         hap_teardown(d);
     else

This isn't needed upstream because the spinlock confusion that it's papering over has been properly fixed (by eliminating the log-dirty lock).

Quoted 4 lines

Yes; I'm afraid I didn't read the ticket referenced here very well either. Sorry about that -- it just looked so obvious. :-)

It looks like Keir has already added it -- do you want to revert it?

Done.

-- Keir

Quoted 8 lines

-George

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#4 lore raw
In reply to George Dunlap
Quoted 22 lines · George Dunlap
Quoted 12 lines · Tim Deegan
Quoted 11 lines · George Dunlap
xen/arch/x86/mm/paging.c +4 -0
@@ -722,6 +722,10 @@ int paging_domctl(struct domain *d, xen_
 /* Call when destroying a domain */
 void paging_teardown(struct domain *d)
 {
+    /* Make sure log-dirty is turned off before trying to dismantle it. 
+     * Needs to be done here becuse it's covered by the hap/shadow lock */
+    d->arch.paging.log_dirty.disable_log_dirty(d);
+
Quoted 8 lines

xen/arch/x86/mm/paging.c int paging_domctl(struct domain *d, xen_ · line 731

Quoted 4 lines
xen/arch/x86/mm/paging.c +0 -0
     if ( hap_enabled(d) )
         hap_teardown(d);
     else

This isn't needed upstream because the spinlock confusion that it's papering over has been properly fixed (by eliminating the log-dirty lock).

Quoted 4 lines

Yes; I'm afraid I didn't read the ticket referenced here very well either. Sorry about that -- it just looked so obvious. :-)

It looks like Keir has already added it -- do you want to revert it?

Yep - though I see it's already been reverted too. :) The code is harmless enough but the comment was confusing.

Tim.