#
b0d56e3c |
| 01-Jul-2022 |
Jean-Philippe Brucker <jean-philippe.brucker@arm.com> |
virtio: Add support for modern virtio-pci
Add support for modern virtio-pci implementation (based on the 1.0 virtio spec). We add a new transport, alongside MMIO and PCI-legacy. This is now the defa
virtio: Add support for modern virtio-pci
Add support for modern virtio-pci implementation (based on the 1.0 virtio spec). We add a new transport, alongside MMIO and PCI-legacy. This is now the default when selecting PCI, but users can still select the legacy transport for all virtio devices by passing "--virtio-legacy" on the command-line.
The main change in modern PCI is the way we address virtqueues, using 64-bit values instead of PFNs. To keep the queue configuration atomic the device also gets a "queue enable" register. Configuration is also made extensible by more feature bits and PCI capabilities. Scalability is improved as well, as devices can have notification registers for each virtqueue on separate pages. However this implementation keeps a single notification register.
Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com> Link: https://lore.kernel.org/r/20220701142434.75170-9-jean-philippe.brucker@arm.com Signed-off-by: Will Deacon <will@kernel.org>
show more ...
|
#
117d6495 |
| 15-Sep-2020 |
Tianjia Zhang <tianjia.zhang@linux.alibaba.com> |
virtio: add support for vsock
The "run" command accepts a new option (--vsock <cid>) which specify the guest CID. For instance:
$ lkvm run --kernel ./bzImage --disk test --vsock 3
One can easily
virtio: add support for vsock
The "run" command accepts a new option (--vsock <cid>) which specify the guest CID. For instance:
$ lkvm run --kernel ./bzImage --disk test --vsock 3
One can easily test by: https://github.com/stefanha/nc-vsock.
In the guest:
# modprobe vsock # nc-vsock -l 1234
In the host:
# modprobe vhost_vsock # nc-vsock 3 1234
This patch comes from the early submission of G. Campana. On this basis, I fixed the compilation errors and runtime crashes. Thanks for the work done by G. Campana. https://patchwork.kernel.org/patch/9542313/
Signed-off-by: G. Campana <gcampana+kvm@quarkslab.com> Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> Link: https://lore.kernel.org/r/20200915094402.107988-1-tianjia.zhang@linux.alibaba.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 ...
|
#
5529bcd7 |
| 07-Apr-2012 |
Asias He <asias.hejun@gmail.com> |
kvm tools: Rename VIRTIO_P9 to VIRTIO_9P
This makes the naming more consistent.
Signed-off-by: Asias He <asias.hejun@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
|
#
507e02d8 |
| 27-Oct-2011 |
Asias He <asias.hejun@gmail.com> |
kvm tools: Set correct virtio pci device class code
All the virtio pci device is set to class code 0x010000, this is wrong. This patch sets the correct class code and makes lspci report correct clas
kvm tools: Set correct virtio pci device class code
All the virtio pci device is set to class code 0x010000, this is wrong. This patch sets the correct class code and makes lspci report correct class type. For example, the net device:
Before: $ lspci 00:03.0 SCSI storage controller: Red Hat, Inc Virtio network device
After: $ lspci 00:03.0 Ethernet controller: Red Hat, Inc Virtio network device
Acked-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Asias He <asias.hejun@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
95d13a52 |
| 29-Aug-2011 |
Sasha Levin <levinsasha928@gmail.com> |
kvm tools: Add ivshmem device
The patch adds an ivshmem device which can be used to share memory between guests on the same host.
This implementation is lacking inter-guest communication which shou
kvm tools: Add ivshmem device
The patch adds an ivshmem device which can be used to share memory between guests on the same host.
This implementation is lacking inter-guest communication which should be implemented later once information regarding the client-server protocol is gathered, though infrastructure used to add and remove clients already exists in the patch (but isn't used anywhere).
Patch is based on David Evansky's shmem device.
Original-patch-by: David Evensky <evensky@sandia.gov> Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
82d2f21e |
| 02-Jul-2011 |
Sasha Levin <levinsasha928@gmail.com> |
kvm tools: Add virtio-balloon device
From the virtio spec:
The virtio memory balloon device is a primitive device for managing guest memory: the device asks for a certain amount of memory, and the
kvm tools: Add virtio-balloon device
From the virtio spec:
The virtio memory balloon device is a primitive device for managing guest memory: the device asks for a certain amount of memory, and the guest supplies it (or withdraws it, if the device has more than it asks for). This allows the guest to adapt to changes in allowance of underlying physical memory.
To activate the virtio-balloon device run kvm tools with the '--balloon' command line parameter.
Current implementation listens for two signals:
- SIGKVMADDMEM: Adds 1M to the balloon driver (inflate). This will decrease available memory within the guest. - SIGKVMDELMEM: Remove 1M from the balloon driver (deflate). This will increase available memory within the guest.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
b025083d |
| 23-May-2011 |
John Floren <john@jfloren.net> |
kvm tools: Add VESA device
Add a simple VESA device which simply moves a framebuffer from guest kernel to a VNC server.
VESA device PCI code is very similar to virtio-* PCI code.
Signed-off-by: Jo
kvm tools: Add VESA device
Add a simple VESA device which simply moves a framebuffer from guest kernel to a VNC server.
VESA device PCI code is very similar to virtio-* PCI code.
Signed-off-by: John Floren <john@jfloren.net> [ turning code into patches and cleanup ] Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
1c7850f9 |
| 20-May-2011 |
Sasha Levin <levinsasha928@gmail.com> |
kvm tools: Add virtio-9p
Overview: 9p allows for simple RPC based resource sharing over different transports (in our case, virtio).
This is the implementation of (most of) the original 9p2000 proto
kvm tools: Add virtio-9p
Overview: 9p allows for simple RPC based resource sharing over different transports (in our case, virtio).
This is the implementation of (most of) the original 9p2000 protocol, without the .u or the .l extensions.
How to use: 1. Make sure kernel is compiled with: CONFIG_NET_9P=y CONFIG_NET_9P_VIRTIO=y CONFIG_NET_9P_DEBUG=y (At least until code is stable) CONFIG_9P_FS=y
2. Start KVM with '--virtio-9p <dirname>'. What happens now is that a virtio transport with the name 'kvm_9p' is created. The server side of the transport maps dirname to the root of the file system.
3. Within the guest, mount the fs: mount -t 9p -otrans=virtio kvm_9p <local_dir> -oversion=9p2000 This will mount the 9p server to local_dir.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
0a7ab0c6 |
| 17-May-2011 |
Sasha Levin <levinsasha928@gmail.com> |
kvm tools: Use virtio IDs from <linux/virtio_ids.h>
Instead of redefining virtio IDs in our headers, use IDs defined in <linux/virtio_ids.h>.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Si
kvm tools: Use virtio IDs from <linux/virtio_ids.h>
Instead of redefining virtio IDs in our headers, use IDs defined in <linux/virtio_ids.h>.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
b8f43678 |
| 11-May-2011 |
Sasha Levin <levinsasha928@gmail.com> |
kvm tools: Use definitions from kernel headers
Instead of redefining virtio pci constants (or not using them at all), use constants from kernel header.
Acked-and-tested-by: Ingo Molnar <mingo@elte.
kvm tools: Use definitions from kernel headers
Instead of redefining virtio pci constants (or not using them at all), use constants from kernel header.
Acked-and-tested-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
2449f6e3 |
| 06-May-2011 |
Sasha Levin <levinsasha928@gmail.com> |
kvm tools: Convert virtio devices to use IRQ registry
Instead of using static IRQ/device data, register the device upon initialization and use the assign parameters when issuing IRQs.
Clean up stat
kvm tools: Convert virtio devices to use IRQ registry
Instead of using static IRQ/device data, register the device upon initialization and use the assign parameters when issuing IRQs.
Clean up static definitions of IRQs.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
31638bca |
| 05-May-2011 |
Cyrill Gorcunov <gorcunov@gmail.com> |
kvm tools: Gather Virtio-PCI constants into one place
It's better than have them sprinkled in.c files. Note that pin for ring device is changed so it no longer shared with block device (it is done i
kvm tools: Gather Virtio-PCI constants into one place
It's better than have them sprinkled in.c files. Note that pin for ring device is changed so it no longer shared with block device (it is done in a sake of simplicity).
Also comment style if a bit tuned up in virtio-pci.h just to be consistent.
Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|