Re: [PATCH v2] virsh domxml-from-native to treat SCSI as the bus type for pseries by default

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

 



On 11/13/2013 04:31 PM, Shivaprasad bhat wrote:
> Hi Jan, Cole, 
> 
> Could you please reviewing my patch ?
> 
> Thanks,
> Shiva
> 

I'd recommend adding a test case that demonstrates what exactly this is changing.

- Cole

> 
> On Wed, Oct 30, 2013 at 1:37 PM, Shivaprasad bhat <shivaprasadbhat@xxxxxxxxx
> <mailto:shivaprasadbhat@xxxxxxxxx>> wrote:
> 
>     Hi,
> 
>     Could someone please help reviewing the patch ?
> 
>     Thanks and Regards,
>     Shiva
> 
> 
>     On Mon, Oct 28, 2013 at 2:50 PM, Shivaprasad G Bhat
>     <shivaprasadbhat@xxxxxxxxx <mailto:shivaprasadbhat@xxxxxxxxx>> wrote:
> 
>         The bus type IDE being enum Zero, the bus type on pseries system
>         appears as IDE for all the disk types. Pseries platform needs this to
>         appear as SCSI instead of IDE.
> 
>         Signed-off-by: Shivaprasad G Bhat <sbhat@xxxxxxxxxxxxxxxxxx
>         <mailto:sbhat@xxxxxxxxxxxxxxxxxx>>
>         ---
>          src/qemu/qemu_domain.c |   11 +++++++++++
>          1 file changed, 11 insertions(+)
> 
>         diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
>         index b8aec2d..df06c13 100644
>         --- a/src/qemu/qemu_domain.c
>         +++ b/src/qemu/qemu_domain.c
>         @@ -827,6 +827,12 @@
>         qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
>              if (dev->type == VIR_DOMAIN_DEVICE_DISK) {
>                  virDomainDiskDefPtr disk = dev->data.disk;
> 
>         +        if ((def->os.arch == VIR_ARCH_PPC64) &&
>         +            def->os.machine && STREQ(def->os.machine, "pseries") &&
>         +            (disk->bus == VIR_DOMAIN_DISK_BUS_IDE)) {
>         +            disk->bus = VIR_DOMAIN_DISK_BUS_SCSI;
>         +        }
>         +
>                  /* both of these require data from the driver config */
>                  if (driver && (cfg = virQEMUDriverGetConfig(driver))) {
>                      /* assign default storage format and driver according to
>         config */
>         @@ -868,6 +874,11 @@
>         qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
>                  (def->os.arch == VIR_ARCH_S390 || def->os.arch ==
>         VIR_ARCH_S390X))
>                  dev->data.chr->targetType =
>         VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_VIRTIO;
> 
>         +    if (dev->type == VIR_DOMAIN_DEVICE_CONTROLLER &&
>         +        dev->data.controller->type == VIR_DOMAIN_CONTROLLER_TYPE_IDE &&
>         +        def->os.machine && STREQ(def->os.machine, "pseries"))
>         +        dev->data.controller->type = VIR_DOMAIN_CONTROLLER_TYPE_SCSI;
>         +
>              /* set the default USB model to none for s390 unless an address
>         is found */
>              if (dev->type == VIR_DOMAIN_DEVICE_CONTROLLER &&
>                  dev->data.controller->type == VIR_DOMAIN_CONTROLLER_TYPE_USB &&
> 
>         --
>         libvir-list mailing list
>         libvir-list@xxxxxxxxxx <mailto:libvir-list@xxxxxxxxxx>
>         https://www.redhat.com/mailman/listinfo/libvir-list
> 
> 
> 

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