<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <div class="moz-cite-prefix">在 2015年07月27日 14:37, Martin Kletzander
      写道:<br>
    </div>
    <blockquote cite="mid:20150727063724.GB20186@wheatley" type="cite">On
      Mon, Jul 27, 2015 at 02:19:11PM +0800, Lin Ma wrote:
      <br>
      <blockquote type="cite">
        <br>
        在 2015年07月27日 13:34, Martin Kletzander 写道:
        <br>
        <blockquote type="cite">On Mon, Jul 27, 2015 at 12:48:50PM
          +0800, Lin Ma wrote:
          <br>
          <blockquote type="cite">Return 16M for qxl because QEMU uses
            16MB as the default video ram size
            <br>
            for qxl device since pc-1.2.
            <br>
            <br>
          </blockquote>
          <br>
          NACK, that function is not meant to return the default video
          ram size
          <br>
          of QEMU, but rather video ram size that libvirt will set by
          default.
          <br>
        </blockquote>
        For qxl, The return value of that function is used to set ram
        and vram
        <br>
        attributes which
        <br>
        qemu doesn't care of. The proper and effective attribute is
        vgamem
        <br>
        which was set
        <br>
        to 16M already(commit#0e50246).
        <br>
        <br>
        It causes the strange attribute list in guest xml:
        <br>
         <video>
        <br>
             <model type='qxl' ram='65536' vram='65536'
        vgamem='16384' heads='1'/>
        <br>
             ......
        <br>
          </video>
        <br>
        <br>
        and virt-manager also shows the inproper video ram size for qxl,
        It
        <br>
        shows 64MB
        <br>
        qxl video ram size in guest detailed page, but guest reports
        only 16MB.
        <br>
        <br>
        So should I keep 64MB in virDomainVideoDefaultRAM and set vgamem
        by
        <br>
        virDomainVideoDefaultRAM?
        <br>
        Or something else?
        <br>
        <br>
      </blockquote>
      <br>
      Well, in this case, I think the aim was to set everything to 64MB,
      but
      <br>
      I remember some migration problems needed to be taken care of.  So
      <br>
      maybe we need to keep it for some reason.  To be sure, I'll let
      Pavel
      <br>
      handle this as he dealt with all the stuff related.  But we need
      to be
      <br>
      consistent and be able to migrate from older versions that had
      these
      <br>
      attributes set.  Also if this change needs to be done for QEMU, it
      <br>
      should be somewhere in src/qemu and not in src/conf where it
      changes
      <br>
      behaviour for all drivers.
      <br>
    </blockquote>
    Thanks, Let's wait Pave's suggestion.
    <blockquote cite="mid:20150727063724.GB20186@wheatley" type="cite">
      <br>
      <blockquote type="cite">
        <blockquote type="cite">
          <br>
          <blockquote type="cite">Signed-off-by: Lin Ma
            <a class="moz-txt-link-rfc2396E" href="mailto:lma@suse.com"><lma@suse.com></a>
            <br>
            ---
            <br>
            src/conf/domain_conf.c | 6 ++++--
            <br>
            1 file changed, 4 insertions(+), 2 deletions(-)
            <br>
            <br>
            diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
            <br>
            index 6b557d1..8efc973 100644
            <br>
            --- a/src/conf/domain_conf.c
            <br>
            +++ b/src/conf/domain_conf.c
            <br>
            @@ -11651,8 +11651,10 @@ virDomainVideoDefaultRAM(const
            <br>
            virDomainDef *def,
            <br>
                   return 4 * 1024;
            <br>
            <br>
               case VIR_DOMAIN_VIDEO_TYPE_QXL:
            <br>
            -        /* QEMU use 64M as the minimal video memory for qxl
            device */
            <br>
            -        return 64 * 1024;
            <br>
            +        /* By default, QEMU uses 16MB as video memory size
            <br>
            +         * for qxl device since pc-1.2
            <br>
            +         */
            <br>
            +        return 16 * 1024;
            <br>
            <br>
               default:
            <br>
                   return 0;
            <br>
            --
            <br>
            2.1.4
            <br>
            <br>
            --
            <br>
            libvir-list mailing list
            <br>
            <a class="moz-txt-link-abbreviated" href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a>
            <br>
            <a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/libvir-list">https://www.redhat.com/mailman/listinfo/libvir-list</a>
            <br>
          </blockquote>
        </blockquote>
        <br>
        --
        <br>
        libvir-list mailing list
        <br>
        <a class="moz-txt-link-abbreviated" href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a>
        <br>
        <a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/libvir-list">https://www.redhat.com/mailman/listinfo/libvir-list</a>
        <br>
      </blockquote>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">--
libvir-list mailing list
<a class="moz-txt-link-abbreviated" href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/libvir-list">https://www.redhat.com/mailman/listinfo/libvir-list</a></pre>
    </blockquote>
    <br>
  </body>
</html>