]> xenbits.xensource.com Git - libvirt.git/commitdiff
QXL: fix reloading of vram64 attribute
authorPavel Hrdina <phrdina@redhat.com>
Wed, 13 Apr 2016 08:13:16 +0000 (10:13 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Wed, 1 Jun 2016 12:33:08 +0000 (14:33 +0200)
Commit b4a5fd95 introduced vram64 attribute for QXL video device but
there were two issues.  Only function
qemuMonitorJSONUpdateVideoVram64Size should update the vram64 attribute
and also the value is in MiB, not in B.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
src/qemu/qemu_monitor_json.c

index 64827c342ddd72cee13db7e5518dc2457912952d..585b8822dc9265ba80ce0b4d7a4e7b44cea4aa0c 100644 (file)
@@ -1483,17 +1483,6 @@ qemuMonitorJSONUpdateVideoMemorySize(qemuMonitorPtr mon,
         }
         video->vram = prop.val.ul / 1024;
 
-        if (video->vram64 != 0) {
-            if (qemuMonitorJSONGetObjectProperty(mon, path,
-                                                 "vram64_size_mb", &prop) < 0) {
-                virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("QOM Object '%s' has no property 'vram64_size_mb'"),
-                               path);
-                return -1;
-            }
-            video->vram64 = prop.val.ul / 1024;
-        }
-
         if (qemuMonitorJSONGetObjectProperty(mon, path, "ram_size", &prop) < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
                            _("QOM Object '%s' has no property 'ram_size'"),
@@ -1555,7 +1544,7 @@ qemuMonitorJSONUpdateVideoVram64Size(qemuMonitorPtr mon,
                                path);
                 return -1;
             }
-            video->vram64 = prop.val.ul / 1024;
+            video->vram64 = prop.val.ul * 1024;
         }
         break;
     case VIR_DOMAIN_VIDEO_TYPE_VGA: