Commit Graph

271 Commits

Author SHA1 Message Date
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
Julio Montes
8fe572367a qemu: Add maxcpus attribute to -smp
maxcpus is used to specify how many cpus a VM can have.
This attribute must be specified to enable the hotplugging CPUs capability,
otherwise the maximum number of CPU will be defined by the number of CPU
in -smp.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2017-12-12 10:14:13 -06:00
Mark Ryan
425b3629c7
Merge pull request #2 from markdryan/badges
Add badges to the README.md file
2017-12-12 14:50:14 +00:00
Mark Ryan
3baa776515 Add badges to the README.md file
This commit adds three badges to the README.md file

- Goreportcard
- Godoc
- Travis

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
2017-12-12 12:06:13 +00:00
Mark Ryan
eacde4d37d
Merge pull request #1 from markdryan/add-travis
Enable Travis builds
2017-12-12 12:05:08 +00:00
Mark Ryan
d74e3b6633 Fix errcheck failures in the unit tests
There were some unchecked errors in some of the unit files relating to
the closure and removal of temporary files.  As the closure and removal
of these files is not really important to whether the next passes or
fails we ignore the errors.

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
2017-12-12 11:51:17 +00:00
Mark Ryan
db60e32f30 Enable Travis builds
This commit adds a .travis file which enables Travis builds for
govmm.  The script builds the source and runs the unit tests
and gometalinter enabling

- misspell
- vet
- ineffassign
- gofmt
- gocyclo 15
- golint
- errcheck
- deadcode

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
2017-12-12 11:46:40 +00:00
Mark Ryan
9cb47fc07d Add .gitignore file.
Currently it just ignores emacs backup files.

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
2017-12-11 11:05:31 +00:00
Mark Ryan
a8aaf534b6 Add project documentation
This commit adds three documents:

- CONTRIBUTING.md ( a files describing how to contribute to the project )`
- COPYING         ( the Apache 2.0 license )
- README.md       ( a brief description of the project)

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
2017-12-11 11:05:31 +00:00
Mark Ryan
57aafb5638 Remove all references to and dependencies on ciao
This commit removes all the references to the ciao project.  It also removes
some of the dependencies that the unit tests were pulling in.

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
2017-12-11 11:05:31 +00:00
Mark Ryan
27709fce43 Move files to the qemu folder
This commit moves all of the source files to the qemu folder.

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
2017-12-11 11:05:31 +00:00
Mark Ryan
367ac50fe8 Merge pull request #1624 from egernst/vhostuser-enabling
qemu: introduce vhost-user handling
2017-12-08 17:28:37 +00:00
Eric Ernst
48feb29fe5 qemu: introduce vhost-user handling
Add ability to add a vhostuser device to the
QEMU commandline.  We expect two different types of devices
to be connected through a vhostuser socket: SCSI and network.

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2017-12-08 09:03:34 -08:00
Julio Montes
b8ddd24400 qemu: Add function to list hotpluggable CPUs
ExecuteQueryHotpluggableCPUs returns the list of hotpluggable CPUs

Signed-off-by: Julio Montes <julio.montes@intel.com>
2017-12-08 10:01:06 -06:00
Julio Montes
8c428ed722 qemu: Add function to hotplug CPUs
ExecuteCPUDeviceAdd hot-adds a CPU to a running VM

Signed-off-by: Julio Montes <julio.montes@intel.com>
2017-12-07 14:16:00 -06:00
Julio Montes
24b14059b3 qemu: Add functions to process QMP response
Some QMP commands like ```query-hotpluggable-cpus``` returns a
response that needs to be processed and returned to the client as
a struct. This patch adds the function ```executeCommandWithResponse```
that returns the response of a QMP command.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2017-12-07 12:33:12 -06:00
Julio Montes
e39da6ca47 qmp: Add support for hot plugging VFIO devices on PCI(E) bridges
This patch adds a new function to hot plug VFIO devices on PCI(E) bridges,
This change allows to hot plug N VFIO devices in Qemu PC and Q35

Signed-off-by: Julio Montes <julio.montes@intel.com>
2017-11-29 10:48:53 -06:00
Mark Ryan
bc030d13d1 qemu: Add a SysProcAttr parameter to CreateCloudInitISO
This change adds an additional parameter to CreateCloudInitISO that
allows users more control over the newly created xorriso process.
They can for instance specify the user under which the new qemu process
should run and which capabilities should be retained in the child
xorriso process.

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
2017-11-20 17:27:02 +00:00
Mark Ryan
11977072ea qemu: Add a SysProcAttr parameter to LaunchCustomQemu
This change adds an additional parameter to LaunchCustomQemu that
allows users more control over the newly created process.  They can
for instance specify the user under which the new qemu process should
run and which capabilities should be retained in the child qemu
process.

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
2017-11-20 17:27:02 +00:00
Archana Shinde
b639da45ed qemu: Add function to hotplug vfio device
Add ability to hotplug a pci device bound to
vfio-pci driver.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2017-11-09 18:04:33 -08:00
Manohar Castelino
7e5614b8a7 Networking: Add vhost fd support
Add vhost fd support. This is needed in the case of multi queue.

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2017-11-02 13:02:33 -07:00
Julio Montes
14316ce0b1 qemu/qmp: Implement function to hot plug PCI devices
ExecutePCIDeviceAdd is a function that can be used to hot plug
devices directly on pci(e).0 or pci(e) bridges. ExecutePCIDeviceAdd
is PCI specific because unlike ExecuteDeviceAdd, it includes an
extra parameter to specify the device address on its parent bus.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2017-10-24 09:01:12 -05:00