On Tue, Aug 7, 2012 at 6:14 AM, Gerd Hoffmann <[email protected]> wrote:
> Add scsi_hba option to set the scsi hba, defaulting
> to virtio-scsi-pci for backward compatibility.

LGTM, applied to next, thanks Gerd!

> Put it into use by adding a testcase for the lsi hba.
>
> Signed-off-by: Gerd Hoffmann <[email protected]>
> ---
>  client/virt/guest-hw.cfg.sample |    5 +++++
>  client/virt/kvm_vm.py           |    3 ++-
>  2 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/client/virt/guest-hw.cfg.sample b/client/virt/guest-hw.cfg.sample
> index 2d9b8f6..83417a4 100644
> --- a/client/virt/guest-hw.cfg.sample
> +++ b/client/virt/guest-hw.cfg.sample
> @@ -71,6 +71,11 @@ variants:
>          # NOTE:  scsi-block and scsi-generic are pass-through physical dev 
> only
>          drive_format=scsi-hd
>          cd_format=scsi-cd
> +        scsi_hba=virtio-scsi-pci
> +    - lsi_scsi:
> +        drive_format=scsi-hd
> +        cd_format=scsi-cd
> +        scsi_hba=lsi53c895a
>      - ahci:
>          drive_format=ahci
>          cd_format=ahci
> diff --git a/client/virt/kvm_vm.py b/client/virt/kvm_vm.py
> index 4b2c037..a5e596b 100644
> --- a/client/virt/kvm_vm.py
> +++ b/client/virt/kvm_vm.py
> @@ -1030,7 +1030,8 @@ class VM(virt_vm.BaseVM):
>                      raise virt_vm.VMError("cfg: drive_bus have to be an "
>                                            "integer. (%s)" % image_name)
>                  for i in range(len(virtio_scsi_pcis), bus + 1):
> -                    qemu_cmd += " -device 
> virtio-scsi-pci,id=virtio_scsi_pci%d" % i
> +                    hba = params.get("scsi_hba", "virtio-scsi-pci");
> +                    qemu_cmd += " -device %s,id=virtio_scsi_pci%d" % (hba, i)
>                      virtio_scsi_pcis.append("virtio_scsi_pci%d" % i)
>
>              qemu_cmd += add_drive(help,
> --
> 1.7.1
>
> _______________________________________________
> Autotest-kernel mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/autotest-kernel



-- 
Lucas

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to