Commit Graph

27 Commits

Author SHA1 Message Date
Mark Ryan
c2d92fe208 Merge pull request #48 from bergwolf/memsize
qemu: skip setting system memory if it is set via dimm device
2018-09-26 08:53:24 +02:00
Peng Tao
a429677a0b govmm: fix memory prealloc
The memory-backend-ram should also be set to a numa node instead of
being inserted as a new device. Otherwise it becomes additional memory
and requires explicit online to be available, instead of just being a
backend of the memory specified by -m option.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-09-25 15:01:31 +08:00
Jose Carlos Venegas Munoz
6c3d84ea8c qemu: Add virtio RNG device.
Add support for virtio-rng divice.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-09-07 15:11:02 -05:00
Rob Bradford
2706a07be5 qemu: Use the supplied context.Context for launching
This will kill the process when the context is cancelled. As using a nil
context is not permitted it is necessary to substitute with a real
context if it is not initialised in the Config struct.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2018-08-14 15:09:49 +01:00
Rob Bradford
e46092e03a qemu: Do not try and generate invalid RTC parameters
If no RTC is specified in the config then do not generate any RTC command line
options. RTC command line options are optional for QEMU so make Valid() return
false when presented with the empty version of the RTC struct containing empty
strings.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2018-08-10 14:54:22 +01:00
Sebastien Boeuf
131c8d0caa Merge branch 'master' into static-checks 2018-08-02 08:27:54 -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
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
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
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
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
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
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
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
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
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
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
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
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
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