Skip to contentSkip to conversation

BUG: fbback doesn't unmap pages on disconnect

DISCUSSION Vladimir 'φ-coder/phcoder' Serbinenko 2 participants 2 messages Dec 18, 2013 – Dec 20, 2013

lore
Share & tools
lore
#0 lore raw

./tools/qemu-xen-traditional-dir-remote/hw/xenfb.c:

/*
* FIXME: qemu can't un-init gfx display (yet?).
* Replacing the framebuffer with anonymous shared memory
* instead. This releases the guest pages and keeps qemu happy.
*/
fb->pixels = mmap(fb->pixels, fb->fbpages * XC_PAGE_SIZE,
PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
Well it doesn't unmap. There is no unmap on this code path. And since the mapping is read-write the pages which are supposed to be released, are now not usable for holding paging table anymore. Can anyone suggest a workaround to munmap those pages? Could this bug be fixed?

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

#1 lore raw

CC'ing the relevant maintainers...

Quoted 16 lines · Vladimir 'φ-coder/phcoder' Serbinenko

./tools/qemu-xen-traditional-dir-remote/hw/xenfb.c:

/*
* FIXME: qemu can't un-init gfx display (yet?).
* Replacing the framebuffer with anonymous shared memory
* instead. This releases the guest pages and keeps qemu happy.
*/
fb->pixels = mmap(fb->pixels, fb->fbpages * XC_PAGE_SIZE,
PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
Well it doesn't unmap. There is no unmap on this code path. And since the mapping is read-write the pages which are supposed to be released, are now not usable for holding paging table anymore. Can anyone suggest a workaround to munmap those pages? Could this bug be fixed?

Quoted 5 lines

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

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