qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [RFC][PATCH] File-backed memory maps


From: Nathan Baum
Subject: [Qemu-devel] [RFC][PATCH] File-backed memory maps
Date: Fri, 18 Sep 2009 13:11:36 +0100

Hello,

This patch makes QEMU optionally use file-backed mmaps for the
ram_alloc'ed memory from hw/pc.c and hw/vga.c. I've only tested on
Linux, but I haven't knowingly used Linux specific features.

It means that

  qemu ... -sharedmaps prefix:vga,bios

makes two files named "prefix.vga" and "prefix.bios" which contain the
respective memory regions. The maps I've named are 640k, before_4g,
after_4g, vga, bios and option_rom.

I'm mainly interested in the idea of moving the VNC server into its own
process. It would listen for connections as usual and then send
framebuffer updates from the file. Doing that also requires a
side-channel for communicating graphics mode updates and peripheral
input between QEMU and the VNC server. (Something like "-mouse
<char-dev-spec> -keyboard <char-dev-spec>", perhaps?)

This would make it (relatively) easy for people to create other
interfaces to a VM, like RDP, or an MPEG stream.

To be honest, I'm not sure how useful the mappings other than vga could
be.

I also considered mmaping a framebuffer in a known format (e.g. RGBA)
and swapping/reformating the VGA buffer into that periodically. It
would probably be another display type, and could make it even easier
for other processes. OTOH, it would introduce additional latency which
could be an issue for some?

But mainly I didn't do that because I don't know QEMU's innards well
enough to do that yet. :-)

Signed-off-by: Nathan Baum <address@hidden>

Attachment: shared-maps.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]