On Tue, Jun 12, 2012 at 01:55:23PM +0200, Gerd Hoffmann wrote: > On 06/12/12 11:37, Daniel P. Berrange wrote: > > On Tue, Jun 12, 2012 at 09:51:12AM +0200, Gerd Hoffmann wrote: > >> From: Alon Levy <al...@redhat.com> > >> > >> In preperation for supporting a larger framebuffer for multiple monitors > >> on a single card, add a property to qxl vgamem_size_mb, and corresponding > >> byte sized vgamem_size, and use instead of VGA_RAM_SIZE. > > > > How is this new property different from the existing 'vram_size' property > > we can set for QXL ? > > > >> DEFINE_PROP_UINT32("ram_size_mb", PCIQXLDevice, ram_size_mb, -1), > >> DEFINE_PROP_UINT32("vram_size_mb", PCIQXLDevice, vram32_size_mb, > >> -1), > >> DEFINE_PROP_UINT32("vram64_size_mb", PCIQXLDevice, vram_size_mb, > >> -1), > >> + DEFINE_PROP_UINT32("vgamem_mb", PCIQXLDevice, vgamem_size_mb, 8), > >> DEFINE_PROP_END_OF_LIST(), > > > > Or indeed, can you describe the semantics of each of the different > > ram size parameters here ? > > Documenting this being a good idea just came across my mind these days > too. Ok here we go (should probably cut+paste to docs/qxl.txt):
Great idea! > > The qxl device has two large memory regions: > > Region #1 is called "ram" and is mapped to PCI bar 0. This is again > splitted into three parts: The framebuffer at the start, the command > rings at the end, and storage area for spice rendering commands and > image data inbetween. > > Region #2 is called "vram". This is storage for images, called > "surfaces" in spice. Surfaces can be both source and target for spice > rendering operations. X11 can store offscreen pixmaps there for > example. Once qxl gets 3D support surfaces can also be used for textures. > > Now for the properties: > > vgamem_mb > specifies the size of the framebuffer portion of the "ram" region, in > megabytes. Must be big enougth to hold the maximum display s/enougth/enough/ > resolution you want to use. Replaces the fixed VGA_RAM_SIZE define. > Default is 8 or 16 MB depending on machine type with all patches of > this series applied (see last patch). > > ram_size_mb > specifies the total size of the "ram" region, in megabytes. Defaults > to 64 MB. Must be larger than vgamem_mb obviously. > > vram_size_mb > specifies the total size of the "vram" region, in megabytes. > Defaults to 64 MB. > > vram64_size_mb > if this one is present and larger than vram_size_mb qxl will get an > additional 64bit pci bar. Both 32bit and 64bit vram pci bars are > backed by the "vram" memory region, the 32bit bar is an alias mapping > for the first part of the 64bit pci bar. This can be used to give > guests *lots* of vram without exhausting 32bit pci address space. > Obviously only useful for 64bit guests. Requires cutting edge > seabios to get the 64bit bar actually mapped above 4G. > > ram_size > specifies the total size of the "ram" region, in bytes. For > compatibility with older qemu versions, ignored if ram_size_mb > property is present. > > vram_size > specifies the total size of the "vram" region, in bytes. For > compatibility with older qemu versions, ignored if vram_size_mb > property is present. > > cheers, > Gerd >