Implement function to hotplug a network device to QEMU by fds.
Macvtap can only be hotplug by this way.
Signed-off-by: Ruidong Cao <caoruidong@huawei.com>
Implement function to hotplug virtio serial ports, the serial ports
are visible in the guest at the directory /dev/virtio-ports.
Signed-off-by: Julio Montes <julio.montes@intel.com>
implement function to hotplug character devices using as backend
unix sockets, binding a character device with a serial port allows
the communnication between processes running in the guest with
processes running in the host.
Signed-off-by: Julio Montes <julio.montes@intel.com>
`getfd` receives a file descriptor via SCM rights and assign it a name,
this command is useful to send file descriptors from the host, and then
hot plug devices that needs file descriptors like vhost-vsock-pci devices.
Signed-off-by: Julio Montes <julio.montes@intel.com>
`vhostfd` is used to specify the vhost-vsock device fd, and it holds
the context ID previously opened.
`disable-modern` is to disable the use of "modern" devices, by using virtio 0.9
instead of virtio 1.0. Particularly, this is useful when running the VM in a
nested environment.
Signed-off-by: Julio Montes <julio.montes@intel.com>
`vhostfd` is the vhost file descriptor that holds the socket context ID
`disable-modern` prevents qemu from relying on fast MMIO
Signed-off-by: Julio Montes <julio.montes@intel.com>
Implement function to hotplug vsocks, vsocks are needed
to communicate processes are running inside the VM
with processes are running on the host.
Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit fixes an issue with the log handlers defined by qmp_test.
The issue was picked up by the latest version of go vet on go tip.
qemu/qmp_test.go:56::error: missing ... in args forwarded to printf-like function (vet)
qemu/qmp_test.go:60::error: missing ... in args forwarded to printf-like function (vet)
Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
This commit enables the gas security checker on govmm builds. The
security checker has signalled 4 issues all of which I've checked
and have determined to be non issues. These issues are disabled
by this commit.
Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
This commit enables staticcheck in the travis builds and fixes the existing
errors detected by staticcheck. There was one type of error repeated in
qemu.go in which the type of some constants was not explicitly specified.
Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
It is useful when we want to specify migration incoming source.
Supported source are fd and exec right now.
Signed-off-by: Peng Tao <bergwolf@gmail.com>
It allows a caller to use a local file as the memory backend of the
guest, and it also allows the file backed memory device to be set shared
or not.
Signed-off-by: Peng Tao <bergwolf@gmail.com>
We need to be able to specify the PCI slot for a bridge while
adding it.
Add test to verify bridge is correctly added.
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
This enable data-plane for scsi. All drives attached to the
scsi controller will have their IO processed in a single separate
IO thread instead of qemu's main event loop.
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
IOthreads also known as x-data-plane allow IO to
be processed in a separate thread rather than the main event
loop. This produces much better IO throughput and latency.
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
certain machines types need to have options to enable or disable features
For example the machine type virt in certain hosts must have the gic version
(gic-version=3 or gic-version=host) to start without problems
Signed-off-by: Julio Montes <julio.montes@intel.com>
device_add qmp command for scsi devices accepts additional parameters like
scsi-id and lun. Implement function to add scsi devices. Devices
with drivers "scsi-hd", "scsi-cd" and "scsi-disk" are accepted.
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
This commit enables unit test coverage computation in Travis CI builds.
Going forward, builds that decrease the unit test coverage by more than
1.0% will fail.
Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
VSOCK sockets are added through a vhost PCI device.
It takes a device ID and a context ID, the latter being
the endpoint value to be reached from the host.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Introduce basic vhost-user-blk-pci support.
In adding this, cleaned up the QemuParams function to use a more
appropriate switch statement. Similarly, cleanup up the Valid() logic.
We still need to look into parameterization of the block parameter
fields as well as introducing multiqueue support for the vhost-user devices.
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
Some comments were network specific for vhost-user devices, which is
incorect. Fixed these.
Renamed the HWAddress field to be Address, so that it could potentially
be used more generically for non-network based vhost-user types.
Signed-off-by: Eric Ernst <eric.ernst@intel.com>