mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
QXL: fix reloading of vram64 attribute
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>
This commit is contained in:
parent
99809fd482
commit
de0b091ae0
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user