xenfb: map framebuffer read-only and handle unmap errors
commit0193c62c94643a837832f2b5ccc133434ee740cb
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 17 Jan 2014 15:28:18 +0000 (17 15:28 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 17 Jan 2014 15:28:18 +0000 (17 15:28 +0000)
treec859a3aa0b8ff27169c8fa34c9fceadea5cd4f37
parent1cf892ca2689c84960b4ce4d2723b6bee453711c
xenfb: map framebuffer read-only and handle unmap errors

The framebuffer is needlessly mapped (PROT_READ | PROT_WRITE), map it
PROT_READ instead.

The framebuffer is unmapped by replacing the framebuffer pages with
anonymous shared memory, calling mmap. Check for return errors and print
a warning.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/display/xenfb.c