Skip to contentSkip to conversation

qemu-xen: fix unmapping logic in hw/xen_console.c

PATCH Applied Wei Liu 3 participants 5 messages Jun 8, 2011 – Jun 21, 2011

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

PATCH 1/1 qemu-xen: fix unmapping logic in hw/xen_console.c

This is a patch for qemu-xen. Don't know if it is the right place to post.

It has been fixed in upstream QEMU.

------8<----------------
commit 28ec10ef3ff22873cd3f1b703d3aecbc93cbf680

Author: Wei Liu <[email protected]>
Date:   Wed Jun 8 17:40:02 2011 +0800

qemu-xen: fix unmapping logic in hw/xen_console.c.

hw/xen_console.c +1 -1
index 0a2374c..d7099c4 100644
@@ -258,7 +258,7 @@ static void con_disconnect(struct XenDevice *xendev)
     xen_be_unbind_evtchn(&con->xendev);
 
     if (con->sring) {
-        if (!xendev->dev)
+        if (!xendev->gnttabdev)
 	    munmap(con->sring, XC_PAGE_SIZE);
         else
             xc_gnttab_munmap(xendev->gnttabdev, con->sring, 1);
#1 lore raw
Quoted 3 lines · Wei Liu

This is a patch for qemu-xen. Don't know if it is the right place to post.

it is the right place

Quoted 2 lines

It has been fixed in upstream QEMU.

The patch looks sensible but I tried to find it in upstream QEMU and I couldn't. Where is the original patch you are referring to?

Quoted 30 lines

------8<----------------
commit 28ec10ef3ff22873cd3f1b703d3aecbc93cbf680

Author: Wei Liu <[email protected]>
Date:   Wed Jun 8 17:40:02 2011 +0800

qemu-xen: fix unmapping logic in hw/xen_console.c.

hw/xen_console.c +1 -1
index 0a2374c..d7099c4 100644
@@ -258,7 +258,7 @@ static void con_disconnect(struct XenDevice *xendev)
     xen_be_unbind_evtchn(&con->xendev);
 
     if (con->sring) {
-        if (!xendev->dev)
+        if (!xendev->gnttabdev)
 	    munmap(con->sring, XC_PAGE_SIZE);
         else
             xc_gnttab_munmap(xendev->gnttabdev, con->sring, 1);

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

author
#2 lore raw
Quoted 5 lines · Stefano Stabellini
Quoted 3 lines · Wei Liu

This is a patch for qemu-xen. Don't know if it is the right place to post.

Quoted 9 lines

it is the right place

Quoted 2 lines

It has been fixed in upstream QEMU.

The patch looks sensible but I tried to find it in upstream QEMU and I couldn't. Where is the original patch you are referring to?

Sorry if I got you confused. Here by "upstream" I mean Anthony's xenpv-support branch.

The commit is b1999dfdad84d1204a03bc5e7d0405255a6a7cf8 .

Quoted 31 lines
Quoted 31 lines

------8<----------------
commit 28ec10ef3ff22873cd3f1b703d3aecbc93cbf680

Author: Wei Liu <[email protected]>
Date:   Wed Jun 8 17:40:02 2011 +0800

qemu-xen: fix unmapping logic in hw/xen_console.c.

hw/xen_console.c +1 -1
index 0a2374c..d7099c4 100644
@@ -258,7 +258,7 @@ static void con_disconnect(struct XenDevice *xendev)
     xen_be_unbind_evtchn(&con->xendev);
 
     if (con->sring) {
-        if (!xendev->dev)
+        if (!xendev->gnttabdev)
 	    munmap(con->sring, XC_PAGE_SIZE);
         else
             xc_gnttab_munmap(xendev->gnttabdev, con->sring, 1);

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

#3 lore raw
Quoted 12 lines · Wei Liu
Quoted 11 lines · Stefano Stabellini
Quoted 3 lines · Wei Liu

This is a patch for qemu-xen. Don't know if it is the right place to post.

it is the right place

Quoted 2 lines

It has been fixed in upstream QEMU.

Quoted 9 lines
Quoted 3 lines

The patch looks sensible but I tried to find it in upstream QEMU and I couldn't. Where is the original patch you are referring to?

Sorry if I got you confused. Here by "upstream" I mean Anthony's xenpv-support branch.

The commit is b1999dfdad84d1204a03bc5e7d0405255a6a7cf8 .

I understand now.

Quoted 33 lines
Quoted 30 lines
Quoted 30 lines

------8<----------------
commit 28ec10ef3ff22873cd3f1b703d3aecbc93cbf680

Author: Wei Liu <[email protected]>
Date:   Wed Jun 8 17:40:02 2011 +0800

qemu-xen: fix unmapping logic in hw/xen_console.c.

hw/xen_console.c +1 -1
index 0a2374c..d7099c4 100644
@@ -258,7 +258,7 @@ static void con_disconnect(struct XenDevice *xendev)
     xen_be_unbind_evtchn(&con->xendev);
 
     if (con->sring) {
-        if (!xendev->dev)
+        if (!xendev->gnttabdev)
 	    munmap(con->sring, XC_PAGE_SIZE);
         else
             xc_gnttab_munmap(xendev->gnttabdev, con->sring, 1);

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

Applied
#4 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

qemu-xen: fix unmapping logic in hw/xen_console.c.

Applied, thanks.

I guess this should be considered for 4.1 backport too.

Ian.