[libvirt] [PATCH 1/1] Assign spapr-vio bus address to ibmvscsi controller

ibmvscsi is based on spapr-vio bus address type. It can't work on PCI bus. Now, it is still on pci bus. This patch is to assign spapr-vio address type to ibmvscsi controller. Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com> --- src/qemu/qemu_command.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 117542f..3100f41 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2566,6 +2566,7 @@ qemuBuildControllerDevStr(virDomainDefPtr domainDef, virBufferAddLit(&buf, "lsi"); break; case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_IBMVSCSI: + def->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO; virBufferAddLit(&buf, "spapr-vscsi"); break; default: -- 1.7.9.5

On Wed, May 09, 2012 at 02:51:21PM +0800, Li Zhang wrote:
ibmvscsi is based on spapr-vio bus address type. It can't work on PCI bus. Now, it is still on pci bus.
This patch is to assign spapr-vio address type to ibmvscsi controller.
Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com> --- src/qemu/qemu_command.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 117542f..3100f41 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2566,6 +2566,7 @@ qemuBuildControllerDevStr(virDomainDefPtr domainDef, virBufferAddLit(&buf, "lsi"); break; case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_IBMVSCSI: + def->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO; virBufferAddLit(&buf, "spapr-vscsi"); break; default:
This is not really the right part of the code to be assigning addresses. That must be done at the point where the domain is initially defined, shortly after parsing. We have a method for assigning device addresses which needs to be made aware of SPar-vio address types. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On 05/09/2012 05:06 PM, Daniel P. Berrange wrote:
On Wed, May 09, 2012 at 02:51:21PM +0800, Li Zhang wrote:
ibmvscsi is based on spapr-vio bus address type. It can't work on PCI bus. Now, it is still on pci bus.
This patch is to assign spapr-vio address type to ibmvscsi controller.
Signed-off-by: Li Zhang<zhlcindy@linux.vnet.ibm.com> --- src/qemu/qemu_command.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 117542f..3100f41 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2566,6 +2566,7 @@ qemuBuildControllerDevStr(virDomainDefPtr domainDef, virBufferAddLit(&buf, "lsi"); break; case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_IBMVSCSI: + def->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO; virBufferAddLit(&buf, "spapr-vscsi"); break; default:
This is not really the right part of the code to be assigning addresses. That must be done at the point where the domain is initially defined, shortly after parsing. We have a method for assigning device addresses which needs to be made aware of SPar-vio address types.
Got it. I have sent this patch version 2. Would you please help review it? Thanks a lot.
Daniel
-- Best Regards Li IBM LTC, China System&Technology Lab, Beijing
participants (2)
-
Daniel P. Berrange
-
Li Zhang