#
db927775 |
| 14-Apr-2020 |
Alexandru Elisei <alexandru.elisei@arm.com> |
virtio: Don't ignore initialization failures
Don't ignore an error in the bus specific initialization function in virtio_init; don't ignore the result of virtio_init; and don't return 0 in virtio_bl
virtio: Don't ignore initialization failures
Don't ignore an error in the bus specific initialization function in virtio_init; don't ignore the result of virtio_init; and don't return 0 in virtio_blk__init and virtio_scsi__init when we encounter an error. Hopefully this will save some developer's time debugging faulty virtio devices in a guest.
To take advantage of the cleanup function virtio_blk__exit, move appending the new device to the list before the call to virtio_init. Change virtio_net__exit to free all allocated net_dev devices on exit, and matching what virtio_blk__exit does.
To safeguard against this in the future, virtio_init has been annoted with the compiler attribute warn_unused_result.
Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com> Signed-off-by: Will Deacon <will@kernel.org>
show more ...
|
#
a67da3be |
| 17-Aug-2012 |
Asias He <asias.hejun@gmail.com> |
kvm tools: Add initial virtio-scsi support
This patch brings virito-scsi support to kvm tool.
With the introduce of tcm_vhost (vhost-scsi)
tcm_vhost: Initial merge for vhost level target fabric
kvm tools: Add initial virtio-scsi support
This patch brings virito-scsi support to kvm tool.
With the introduce of tcm_vhost (vhost-scsi)
tcm_vhost: Initial merge for vhost level target fabric driver
we can implement virito-scsi by simply having vhost-scsi to handle the SCSI command.
Howto use: 1) Setup the tcm_vhost target through /sys/kernel/config
[Stefan Hajnoczi, Thanks for the script to setup tcm_vhost]
** Setup wwpn and tpgt $ wwpn="naa.0" $ tpgt=/sys/kernel/config/target/vhost/$wwpn/tpgt_0 $ nexus=$tpgt/nexus $ mkdir -p $tpgt $ echo -n $wwpn > $nexus
** Setup lun using /dev/ram $ n=0 $ lun=$tpgt/lun/lun_${n} $ data=/sys/kernel/config/target/core/iblock_0/data_${n} $ ram=/dev/ram${n} $ mkdir -p $lun $ mkdir -p $data $ echo -n udev_path=${ram} > $data/control $ echo -n 1 > $data/enable $ ln -s $data $lun
2) Run kvm tool with the new disk option '-d scsi:$wwpn:$tpgt', e.g $ lkvm run -k /boot/bzImage -d ~/img/sid.img -d scsi:naa.0:0
Signed-off-by: Asias He <asias.hejun@gmail.com> Cc: Nicholas A. Bellinger <nab@linux-iscsi.org> Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
7095a905 |
| 17-Dec-2011 |
Wanlong Gao <wanlong.gao@gmail.com> |
kvm tools: prevent the redefined error
In file included from ../../include/linux/stddef.h:4:0, from ../../include/linux/list.h:5, from include/kvm/framebuffer.h:5,
kvm tools: prevent the redefined error
In file included from ../../include/linux/stddef.h:4:0, from ../../include/linux/list.h:5, from include/kvm/framebuffer.h:5, from builtin-run.c:8: include/linux/compiler.h:8:0: error: "__attribute_const__" redefined [-Werror] /usr/include/sys/cdefs.h:226:0: note: this is the location of the previous definition cc1: all warnings being treated as errors
make: *** [builtin-run.o] Error 1
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
f9b8c3a6 |
| 15-Dec-2011 |
Lan Tianyu <tianyu.lan@intel.com> |
kvm tools: Use kernel error check functions
Add compiler.h file to support using kernel error check funciotns(e.g ERR_PTR, PTR_ERR and so on).
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signe
kvm tools: Use kernel error check functions
Add compiler.h file to support using kernel error check funciotns(e.g ERR_PTR, PTR_ERR and so on).
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
886c5381 |
| 09-Aug-2010 |
Pekka Enberg <penberg@kernel.org> |
kvm: Add KVM ABI headers
This patch adds KVM ABI headers to the source tree. We can no longer include <linux/kvm.h> directly because someone added a "#warning" to <linux/types.h> that prevents kerne
kvm: Add KVM ABI headers
This patch adds KVM ABI headers to the source tree. We can no longer include <linux/kvm.h> directly because someone added a "#warning" to <linux/types.h> that prevents kernel header inclusion from userspace.
We can switch back to using kernel headers if we ever make it to Linux mainline.
Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|