Re: [PATCH] qemu: Support ram bar size for qxl devices

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

 



  Hi,

> What is the difference between this new RAM size and what we currently
> set for ram size.  That will influence how we pick a good name, ie
> one with any qxl prefix, which is not something we can use.

It's all a bit more complicated ...

Current upstream has *four* parameters here:

qxl-vga.ram_size_mb=uint32

   Size of PCI Bar 0.  Default: 64.  VGA framebuffer lives there, also
   qxl rendering commands and parameters (image data, clip regions,
   whatever) for the qxl rendering commands.

qxl-vga.vram_size_mb=uint32

  Size of PCI Bar 1.  Default: 64.  Storage for surfaces.  Basically
  image data too, but you can do qxl raster ops on them.  X11 uses
  this for offscreen pixmaps.

qxl-vga.vram64_size_mb=uint32

  There is an (optional) 64bit version of PCI Bar 1 (Bar 5 IIRC),
  which can be mapped above 4G.  Both bars are backed by the same
  memory.

qxl-vga.vgamem_mb=uint32

  VGA framebuffer size.  Default: 16.  Specifies how much of the
  PCI bar 0 memory should be available for the VGA framebuffer.

ram_size/vramsize is there too.  Same as ram_size_mb/vram_size_mb, but
they want bytes instead of megabytes.

And to complete the picture:  The other vga cards (std, cirrus, vmware)
got vgamem_mb parameters too, which simply specify the size of the
card's memory.  For cirrus its pointless as the emulated hardware
constrains the memory size and the only reason this is configurable in
the first place is qemu <-> qemu-kvm live migration compatibility.  For
the other cards it  makes sense to allow tuning the vgamem_mb parameter
via domain xml.

So, how expose this to the user?

We already have 'vram'.  Adding 'ram' makes sense.  vram64 not so IMHO.
 I think it would be better to have a 64bit bool, then do this:

  if (64bit)
     qxl-vga.vram64_size_mb=${vram},vram_size_mb=1
  else
     qxl-vga.vram_size_mb=${vram}

Dunno what to do best with vgamem_mb for qxl.  One more parameter?  Or
use ram_size/4?

The other vga cards are a bit tricky too.  If you add a cirrus or stdvga
libvirt fills in vram='9216'.  Where does *that* come from btw?  It
isn't the qemu default (used to be 8 MB, now 16 MB).  It's also not the
qemu-kvm default (was 16 MB all the time).  And it isn't valid too (pci
bar size must be a power of two).  So reusing that for vgamem_mb is
probably asking for trouble.  So maybe the best and least confusing
would be to add a vgamem parameter for all vga cards (including qxl,
except cirrus)?

cheers,
  Gerd

--
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]