Re: [PATCH] conf: Use the correct limit for the number of PHBs

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

 



On Thu, Aug 17, 2017 at 09:55:42 +0200, Andrea Bolognani wrote:
> I mistakenly thought pSeries guests supported 32 PHBs,
> but it turns out they only support 31. Validate the
> target index accordingly.
> 
> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1479647
> 
> Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
> ---
>  src/conf/domain_conf.c                                |  4 ++--
>  src/qemu/qemu_domain_address.c                        |  4 ++--
>  .../qemuxml2argv-pseries-phb-too-many.xml             | 19 +++++++++++++++++++
>  tests/qemuxml2argvtest.c                              |  1 +
>  4 files changed, 24 insertions(+), 4 deletions(-)
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-phb-too-many.xml
> 
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 281dc68f0..8257f04ab 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -9326,10 +9326,10 @@ virDomainControllerDefParseXML(xmlNodePtr node,
>                  goto error;
>              }
>              if (def->opts.pciopts.targetIndex < 0 ||
> -                def->opts.pciopts.targetIndex > 31) {
> +                def->opts.pciopts.targetIndex > 30) {
>                  virReportError(VIR_ERR_XML_ERROR,
>                                 _("PCI controller target index '%s' out of "
> -                                 "range - must be 0-31"),
> +                                 "range - must be 0-30"),

NACK, you can't make parser checks more strict once the code is released.
This needs to go to the validation callback.

Attachment: signature.asc
Description: PGP signature

--
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]
  Powered by Linux