Re: [PATCH] qxl: return 16M instead of 64M in virDomainVideoDefaultRAM

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

 




在 2015年07月27日 13:34, Martin Kletzander 写道:
On Mon, Jul 27, 2015 at 12:48:50PM +0800, Lin Ma wrote:
Return 16M for qxl because QEMU uses 16MB as the default video ram size
for qxl device since pc-1.2.


NACK, that function is not meant to return the default video ram size
of QEMU, but rather video ram size that libvirt will set by default.
For qxl, The return value of that function is used to set ram and vram attributes which qemu doesn't care of. The proper and effective attribute is vgamem which was set
to 16M already(commit#0e50246).

It causes the strange attribute list in guest xml:
  <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'/>
      ......
   </video>

and virt-manager also shows the inproper video ram size for qxl, It shows 64MB
qxl video ram size in guest detailed page, but guest reports only 16MB.

So should I keep 64MB in virDomainVideoDefaultRAM and set vgamem by virDomainVideoDefaultRAM?
Or something else?


Signed-off-by: Lin Ma <lma@xxxxxxxx>
---
src/conf/domain_conf.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 6b557d1..8efc973 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -11651,8 +11651,10 @@ virDomainVideoDefaultRAM(const virDomainDef *def,
        return 4 * 1024;

    case VIR_DOMAIN_VIDEO_TYPE_QXL:
-        /* QEMU use 64M as the minimal video memory for qxl device */
-        return 64 * 1024;
+        /* By default, QEMU uses 16MB as video memory size
+         * for qxl device since pc-1.2
+         */
+        return 16 * 1024;

    default:
        return 0;
--
2.1.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]