[libvirt] [PATCH v2 03/15] qemu: Move skip for implicit PHB of pSeries guests

Peter Krempa pkrempa at redhat.com
Mon Feb 19 14:58:50 UTC 2018


On Fri, Feb 16, 2018 at 17:28:00 +0100, Andrea Bolognani wrote:
> Performing the skip earlier will help us making the function
> nicer later on. We also make the condition for the skip a bit
> more precise, though that'a more for self-documenting purposes
> and doesn't change anything in practice.
> 
> Signed-off-by: Andrea Bolognani <abologna at redhat.com>
> ---
>  src/qemu/qemu_command.c | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 1ab5b0818..5e4dfcf75 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -2732,6 +2732,14 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef,
>              def->model != VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST)
>              modelName = virDomainControllerPCIModelNameTypeToString(pciopts->modelName);
>  
> +        /* Skip the implicit PHB for pSeries guests */
> +        if (def->model == VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT &&
> +            pciopts->modelName == VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_SPAPR_PCI_HOST_BRIDGE &&
> +            pciopts->targetIndex == 0 &&
> +            qemuDomainIsPSeries(domainDef)) {

I'm not sure about the last line. Shouldn't that alredy be validated? At
least in the case when the PHB model should not be present on
non-pseries qemus?

ACK if you agree and drop the last line.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180219/a62d1cdc/attachment-0001.sig>


More information about the libvir-list mailing list