]> git.proxmox.com Git - qemu.git/commit
qdev: fix get_fw_dev_path to support to add nothing to fw_dev_path
authorAmos Kong <akong@redhat.com>
Wed, 29 May 2013 07:56:42 +0000 (15:56 +0800)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 11 Jun 2013 22:30:29 +0000 (17:30 -0500)
commit032ce1baacc332fd5c3d40fb9bb0a9cb1c48cbfb
treeb17d3c419debf343654a1115ed51e2902da76ea2
parentbaa8a8b44452f4a51de5ba33089dd8882d3fa545
qdev: fix get_fw_dev_path to support to add nothing to fw_dev_path

Recent virtio refactoring in QEMU made virtio-bus become the parent bus
of scsi-bus, and virtio-bus doesn't have get_fw_dev_path implementation,
typename will be added to fw_dev_path by default, the new fw_dev_path
could not be identified by seabios. It causes that bootindex parameter
of scsi device doesn't work.

This patch implements get_fw_dev_path() in BusClass, it will be called
if bus doesn't implement the method, tyename will be added to
fw_dev_path. If the implemented method returns NULL, nothing will be
added to fw_dev_path.

It also implements virtio_bus_get_fw_dev_path() to return NULL. Then
QEMU will still pass original style of fw_dev_path to seabios.

Signed-off-by: Amos Kong <akong@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-id: 1369814202-10346-1-git-send-email-akong@redhat.com
--
v2: only add nothing to fw_dev_path when get_fw_dev_path() is
    implemented and returns NULL. then it will not effect other devices
    don't have get_fw_dev_path() implementation.
v3: implement default get_fw_dev_path() in BusClass
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit bbfa18fca4e44ff9c23d36b50d8a998af9c9e9fc)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/core/qdev.c
hw/virtio/virtio-bus.c