Re: [PATCH v2 4/8] qemu: vfio-ccw device address generation

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

 



On 05/10/2018 10:52 PM, John Ferlan wrote:


On 05/07/2018 10:41 AM, Boris Fiuczynski wrote:
From: Shalini Chellathurai Saroja <shalini@xxxxxxxxxxxxxxxxxx>

Introduces the vfio-ccw model for mediated devices and prime vfio-ccw
devices such that CCW address will be generated.

Signed-off-by: Shalini Chellathurai Saroja <shalini@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Bjoern Walk <bwalk@xxxxxxxxxxxxx>
Reviewed-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxx>
Reviewed-by: Marc Hartmayer <mhartmay@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Stefan Zimmermann <stzi@xxxxxxxxxxxxx>
---
  docs/schemas/domaincommon.rng  |  5 ++++-
  src/qemu/qemu_domain_address.c | 20 ++++++++++++++++++++
  src/util/virmdev.c             |  3 ++-
  src/util/virmdev.h             |  1 +
  4 files changed, 27 insertions(+), 2 deletions(-)


Looking at all places using VIR_MDEV_MODEL_TYPE_VFIO_PCI - should this
patch make a change to virDomainHostdevDefPostParse to do something
similar - that is:

        if (model == VIR_MDEV_MODEL_TYPE_VFIO_CCW &&
             dev->info->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) {
... error message
       }

?

Let me know... I think it should and can add it before pushing...
You are correct. Good catch!
How about fixing it like this?
        if ((model == VIR_MDEV_MODEL_TYPE_VFIO_PCI &&
            dev->info->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) ||
            (model == VIR_MDEV_MODEL_TYPE_VFIO_CCW &&
            dev->info->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW)) {
            virReportError(VIR_ERR_XML_ERROR,
                           _("Unsupported address type '%s' with mediated "
                             "device model '%s'"),

virDomainDeviceAddressTypeToString(dev->info->type),
                           virMediatedDeviceModelTypeToString(model));
            return -1;
        }



Besides that I just saw that the indention of the second parameter of method qemuDomainPrimeVfioDeviceAddresses is off by three blanks.


Reviewed-by: John Ferlan <jferlan@xxxxxxxxxx>

John

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



--
Mit freundlichen Grüßen/Kind regards
   Boris Fiuczynski

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martina Köderitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294

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