Re: [PATCH 1/3] conf: Introduce @memReserve to <controller/>

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

 



On Mon, Apr 15, 2024 at 10:53:16AM +0200, Michal Privoznik wrote:
> +++ b/docs/formatdomain.rst
> @@ -4153,6 +4153,12 @@ generated by libvirt. :since:`Since 1.2.19 (QEMU only)`.
>  ``index``
>     pci-root controllers for pSeries guests use this attribute to record the
>     order they will show up in the guest. :since:`Since 3.6.0`
> +``memReserve``
> +   Some PCI devices have non-prefetchable memory bar larger than 2MiB. Use this
> +   attribute to override value computed by firmware and thus make controller
> +   reserve more memory (in KiB) so that such PCI device can be hot plugged.
> +   For cold plugged PCI devices firmware recognizes this and computes correct
> +   value. :since:`Since 10.3.0`

Suggestion: "For cold plugged PCI devices, the firmware will
automatically reserve the correct amount of memory."

> +++ b/src/conf/domain_conf.c
> @@ -8528,6 +8528,11 @@ virDomainControllerDefParseXML(virDomainXMLOption *xmlopt,
>                                &def->opts.pciopts.targetIndex,
>                                def->opts.pciopts.targetIndex) < 0)
>                  return NULL;
> +
> +            if (virXMLPropULongLong(targetNodes[0], "memReserve", 0,
> +                                    VIR_XML_PROP_NONZERO,
> +                                    &def->opts.pciopts.memReserve) < 0)

When I saw this, I immediately thought of

  https://bugzilla.redhat.com/show_bug.cgi?id=1408810

and was concerned that whatever you implemented here might rule out
potentially implementing that in the future, or having to resort to
some hacks. But since the parser will reject memReserve='0', we can
still decide to relax things in the future and permit ioReserve='0'
without creating nasty inconsistencies. Good.

Reviewed-by: Andrea Bolognani <abologna@xxxxxxxxxx>

-- 
Andrea Bolognani / Red Hat / Virtualization
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




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

  Powered by Linux