Get framebuffer size from 'vgamem' attribute for qxl device

Libvirt commit#742d49f introduces vgamem attribute to set the VGA
framebuffer size for QXL device of qemu, So we use vgamem instead
of vram here for qxl.

Signed-off-by: Lin Ma <lma@suse.com>
This commit is contained in:
Lin Ma 2015-07-28 13:19:17 +08:00 committed by Cole Robinson
parent 9f26bbb5e9
commit 7be81e6300

View File

@ -3043,7 +3043,10 @@ class vmmDetails(vmmGObjectUI):
self.widget("video-model"))
model = vid.model
ram = vid.vram
if model == "qxl" and vid.vgamem:
ram = vid.vgamem
else:
ram = vid.vram
heads = vid.heads
try:
ramlabel = ram and "%d MiB" % (int(ram) / 1024) or "-"