On 11/20/14 20:21, Pavel Hrdina wrote: > The vram attribute was introduced to set the video memory but it is > usable only for few hypervisors excluding QEMU/KVM and the old XEN > driver. Only in case of QEMU the vram was used for QXL. > > This patch updates the documentation to reflect current code in libvirt > and also changes the cases when we will set the default vram attribute. > It also fixes existing strange default value for VGA devices 9MB to 16MB > because the video ram should be rounded to power of two. > > The change of default value could affect migrations but I found out that > QEMU always round the video ram to power of two internally so it's safe > to change the default value to the next closest power of two and also > silently correct every domain XML definition. And it's also safe because > we don't pass the value to QEMU. > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1076098 > > Signed-off-by: Pavel Hrdina <[email protected]> > --- > docs/formatdomain.html.in | 66 > ++++++++++++++-------- > src/conf/domain_conf.c | 15 +++-- > src/conf/domain_conf.h | 3 +- > src/qemu/qemu_command.c | 16 ++++-- > src/xen/xen_driver.c | 2 +- > ...qemuhotplug-console-compat-2+console-virtio.xml | 2 +- > .../qemuxml2argv-console-compat-2.xml | 2 +- > .../qemuxml2argv-controller-order.xml | 2 +- > .../qemuxml2argv-graphics-listen-network.xml | 2 +- > .../qemuxml2argv-graphics-listen-network2.xml | 2 +- > .../qemuxml2argv-graphics-sdl-fullscreen.xml | 2 +- > .../qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml | 2 +- > .../qemuxml2argv-graphics-spice-agentmouse.xml | 2 +- > .../qemuxml2argv-graphics-spice-compression.args | 2 +- > .../qemuxml2argv-graphics-spice-compression.xml | 2 +- > .../qemuxml2argv-graphics-spice-sasl.args | 2 +- > .../qemuxml2argv-graphics-spice-sasl.xml | 2 +- > .../qemuxml2argv-graphics-spice-timeout.xml | 2 +- > .../qemuxml2argv-graphics-spice.args | 2 +- > .../qemuxml2argv-graphics-spice.xml | 2 +- > .../qemuxml2argv-graphics-vnc-policy.xml | 2 +- > .../qemuxml2argv-graphics-vnc-sasl.xml | 2 +- > .../qemuxml2argv-graphics-vnc-socket.xml | 2 +- > .../qemuxml2argv-graphics-vnc-tls.xml | 2 +- > .../qemuxml2argv-graphics-vnc-websocket.xml | 2 +- > .../qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml | 2 +- > .../qemuxml2argv-net-bandwidth.xml | 2 +- > .../qemuxml2argv-pci-autoadd-addr.xml | 2 +- > .../qemuxml2argv-pci-autoadd-idx.xml | 2 +- > tests/qemuxml2argvdata/qemuxml2argv-pci-bridge.xml | 2 +- > .../qemuxml2argv-pcihole64-q35.args | 2 +- > .../qemuxml2argv-pcihole64-q35.xml | 2 +- > .../qemuxml2argvdata/qemuxml2argv-pseries-disk.xml | 2 +- > tests/qemuxml2argvdata/qemuxml2argv-q35.args | 2 +- > tests/qemuxml2argvdata/qemuxml2argv-q35.xml | 2 +- > .../qemuxml2argv-serial-spiceport.args | 2 +- > .../qemuxml2argv-serial-spiceport.xml | 2 +- > .../qemuxml2xmlout-graphics-listen-network2.xml | 2 +- > .../qemuxml2xmlout-graphics-spice-timeout.xml | 2 +- > .../qemuxml2xmlout-pci-autoadd-addr.xml | 2 +- > .../qemuxml2xmlout-pci-autoadd-idx.xml | 2 +- > tests/qemuxml2xmloutdata/qemuxml2xmlout-q35.xml | 2 +- > tests/virt-aa-helper-test | 2 +- > 43 files changed, 103 insertions(+), 75 deletions(-) >
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 5f4b9f6..cf55b15 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -3160,6 +3160,12 @@
> virDomainDeviceDefPostParseInternal(virDomainDeviceDefPtr dev,
> return -1;
> }
>
> + if (dev->type == VIR_DOMAIN_DEVICE_VIDEO) {
> + virDomainVideoDefPtr video = dev->data.video;
> + video->ram = VIR_ROUND_UP_POWER_OF_TWO(video->ram);
> + video->vram = VIR_ROUND_UP_POWER_OF_TWO(video->vram);
> + }
> +
> return 0;
> }
>
This hunk got applied to a different place in my tree. Please repost the
patch with more context.
Peter
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
