]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kvm tools: Use ioport context to control blk devices
authorSasha Levin <levinsasha928@gmail.com>
Thu, 26 May 2011 10:30:06 +0000 (13:30 +0300)
committerPekka Enberg <penberg@kernel.org>
Thu, 26 May 2011 15:55:55 +0000 (18:55 +0300)
commit8282838324444ef225ef6ad9ec226eb6d9c28343
treedf173fe281c702b60788c4c61587815065a76703
parent6d149cd2802b0c8788ed0bf13fb3319e293e1bba
kvm tools: Use ioport context to control blk devices

Since ioports now has the ability to pass context to its
callbacks, we can implement multiple blk devices more efficiently.

We can get a ptr to the 'current' blk dev on each ioport call, which
means that we don't need to keep track of the blk device allocation
and ioport distribution within the module.

The advantages are easier management of multiple blk devices and
removal of any hardcoded limits to the amount of possible blk
devices.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/include/kvm/ioport.h
tools/kvm/virtio/blk.c