Commit Graph

192 Commits

Author SHA1 Message Date
Sebastien Boeuf
eda239928b
Merge pull request #33 from caoruidong/hotplug-by-fds
qemu/qmp: add function for hotplug network by fds
2018-08-08 07:49:07 -07:00
Ruidong Cao
10efa84132 qemu/qmp: add function for hotplug network by fds
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>
2018-08-08 11:12:47 +08:00
Mark Ryan
8d626afb0c
Merge pull request #31 from devimc/topic/virtserialportHotplug
qemu/qmp: implement functions to hotplug chardevs and serial ports
2018-08-06 18:44:34 +01:00
Julio Montes
80ed88edb1 qemu/qmp: implement function to hotplug serial ports
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>
2018-08-03 13:50:25 -05:00
Julio Montes
ca46f21f3f qemu/qmp: implement function to hotplug character devices
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>
2018-08-03 08:01:05 -05:00
Sebastien Boeuf
1c5466db3d
Merge pull request #23 from devimc/topic/vsockHotplug
qemu: add vhostfd and disable-modern to vsock hotplug
2018-08-03 01:19:55 -07:00
Sebastien Boeuf
a5cbc6122f
Merge pull request #19 from markdryan/static-checks
Add two additional static analysis tools to the travis builds
2018-08-03 01:19:22 -07:00
Julio Montes
03f1a1c3a8 qemu/qmp: implement getfd
`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>
2018-08-02 11:07:16 -05:00
Julio Montes
84b212f1b8 qemu: add vhostfd and disable-modern to vsock hotplug
`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>
2018-08-02 11:07:16 -05:00
Sebastien Boeuf
131c8d0caa
Merge branch 'master' into static-checks 2018-08-02 08:27:54 -07:00
Sebastien Boeuf
79e74d936b
Merge pull request #24 from caoruidong/master
qemu/qmp: implement function for hotplug network
2018-07-25 09:44:51 -07:00
Ruidong Cao
12dfa87293 qemu/qmp: implement function for hotplug network
Implement function to hotplug and delete a network device to QEMU

Signed-off-by: Ruidong Cao <caoruidong@huawei.com>
2018-07-25 17:39:23 +08:00
Sebastien Boeuf
6ff20ae2f4
Merge pull request #25 from devimc/topic/improveVSockColdplug
qemu: add vhostfd and disable-modern to vhost-vsock-pci
2018-07-24 16:20:31 -07:00
Julio Montes
3830b4419f qemu: add vhostfd and disable-modern to vhost-vsock-pci
`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>
2018-07-24 15:24:43 -05:00
Mark Ryan
db7e149611
Merge pull request #22 from devimc/topic/vsockHotplug
qemu/qmp: implement function to hotplug vsock-pci
2018-07-17 09:07:44 +01:00
Julio Montes
f700a97bee qemu/qmp: implement function to hotplug vsock-pci
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>
2018-07-16 14:19:43 -05:00
Mark Ryan
4ca232ecdf qmp_test: Fix Warning and Error level logs
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>
2018-06-28 16:05:00 +01:00
Mark Ryan
430e72c63b qemu,qmp: Enable gas security checker
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>
2018-06-28 15:56:27 +01:00
Mark Ryan
ffc06e6bc4 qemu,qmp: Add staticcheck to travis and fix errors
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>
2018-06-28 15:11:13 +01:00
Sebastien Boeuf
ff2401825e
Merge pull request #18 from bergwolf/templating
Add APIs to enable vm templating
2018-06-25 07:58:45 -07:00
Peng Tao
54caf7810b qmp: add hotplug memory
It adds size of MiB memory to the guest.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-06-23 11:39:28 +08:00
Peng Tao
e66a9b481b qemu: add appendMemoryKnobs helper
To fix travis failure about cyclomatic complexity in appendKnobs().

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-06-23 11:39:28 +08:00
Peng Tao
8aeca15388 qmp: add migrate set arguments
It allows to set migration arguments so that callers can control how
migration is done.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-06-23 11:39:28 +08:00
Peng Tao
a03d4968e1 qmp: add set migration capabilities
It allows to set guest migration capabilities.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-06-23 11:39:28 +08:00
Peng Tao
0ace4176b4 qemu: allow to set migration incoming
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>
2018-06-23 11:39:23 +08:00
Peng Tao
723bc5f3c6 qemu: allow to create a stopped guest
When Knobs.Stopped is set, the guest CPU will not be started at startup.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-06-19 14:56:34 +08:00
Peng Tao
283d7df99e qemu: add file backed memory device support
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>
2018-06-19 14:55:47 +08:00
Sebastien Boeuf
9cf8ce6c6d
Merge pull request #15 from amshinde/pass-addr-bridge
qemu: Add qemu parameter for PCI address for a bridge.
2018-04-03 12:21:35 -07:00
Archana Shinde
30aeacb89e qemu: Add qemu parameter for PCI address for a bridge.
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>
2018-04-03 12:10:02 -07:00
Sebastien Boeuf
1509acf186
Merge pull request #14 from amshinde/scsi-iothreads
Add ability to associate a SCSI controller device with an iothread
2018-03-29 10:35:47 -07:00
Archana Shinde
9130f37516 scsi: Allow scsi controller to associate with an IO thread.
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>
2018-03-28 17:02:47 -07:00
Archana Shinde
a54de1835b iothread: Add ability to configure iothreads
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>
2018-03-28 17:02:47 -07:00
Mark Ryan
82c67ab9b2
Merge pull request #12 from bergwolf/initrd
qemu: add initrd support
2018-03-20 11:02:07 +00:00
Peng Tao
0c0ec8f3c9 qemu: add initrd support
Append initrd image to qemu arguments if configured.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-03-20 16:42:39 +08:00
Mark Ryan
e87160f8ea
Merge pull request #11 from devimc/scsi/disable_modern
qemu: add DisableModern to SCSIController
2018-03-06 18:39:29 +00:00
Julio Montes
68f3071806 qemu: add DisableModern to SCSIController
DisableModern prevents qemu from relying on fast MMIO.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-03-06 12:11:02 -06:00
Mark Ryan
d60256118f
Merge pull request #9 from devimc/qemu/extraOptions
qemu: add extra options for the machine type
2018-02-12 15:33:44 +00:00
Julio Montes
693d9548dc qemu: add options for the machine type
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>
2018-02-12 09:27:30 -06:00
Mark Ryan
065d1d2517
Merge pull request #7 from amshinde/scsi-device-add
scsi: Add function to send device_add qmp command for a scsi device
2018-01-12 11:09:25 +00:00
Archana Shinde
3273aafd53 scsi: Add function to send device_add qmp command for a scsi device
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>
2018-01-11 18:19:10 -08:00
Julio Montes
22c99930c2
Merge pull request #8 from markdryan/coveralls
Compute coverage statistics for unit tests in Travis builds
2018-01-04 14:00:30 -06:00
Mark Ryan
6d198b8a13 Compute coverage statistics for unit tests in Travis builds
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>
2018-01-02 16:21:01 +00:00
Julio Montes
0ecfba63e5
Merge pull request #5 from amshinde/add-scsi-controller-device
scsi: Add a scsi controller device
2017-12-21 18:33:03 -06:00
Archana Shinde
3a31da32af scsi: Add a scsi controller device
SCSI controller allows scsi disks to be attached on the SCSI
bus created by the controller.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2017-12-21 16:11:17 -08:00
Julio Montes
9250e77eda
Merge pull request #6 from sameo/topic/vsock
qemu: Add VSOCK support
2017-12-20 08:21:44 -06:00
Samuel Ortiz
5316779d35 qemu: Add VSOCK support
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>
2017-12-19 23:40:39 +01:00
Manohar Castelino
064ffdb2b2
Merge pull request #4 from egernst/vhost-user-add-blk
Vhost-user:  add block device support
2017-12-15 13:45:12 -08:00
Manohar Castelino
1bbe457172
Merge pull request #3 from devimc/hotplug/CPU
qemu: Add maxcpus attribute to -smp
2017-12-15 13:44:54 -08:00
Eric Ernst
f565536673 vhost-user: add blk device support
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>
2017-12-13 07:19:28 -08:00
Eric Ernst
e9e27673fa vhost-user: updating comments for accuracy, rename device field
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>
2017-12-13 07:19:28 -08:00