Commit Graph

15609 Commits

Author SHA1 Message Date
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
Peng Tao
8f0d7f6acb
Merge pull request #1 from jcvenegas/image-creation-support
Image creation support
2017-12-11 10:20:42 +08: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
Jose Carlos Venegas Munoz
d2f31dfbf7
Merge pull request #4 from sameo/topic/coc
Code Of Conduct and pullapprove support
2017-12-07 10:05:14 -06:00
Xu Wang
b3404d58f6
Initial commit 2017-12-06 23:01:13 -06:00
Jose Carlos Venegas Munoz
48820425eb Makefile: Add image target
Use as default base OS centos

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2017-12-06 13:32:03 -06:00
Jose Carlos Venegas Munoz
0e1b500fec docs: Add README
- Overview
- Terms

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2017-12-06 13:32:03 -06:00
Jose Carlos Venegas Munoz
d9fe322a5f image: Add README
Add readme do document how to use ./image-builder/image_builder.sh

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2017-12-06 13:32:03 -06:00
Jose Carlos Venegas Munoz
52d6b044b7 image: Add script to build image
Add script to build image based on a rootfs directory.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2017-12-06 13:32:03 -06:00
Jose Carlos Venegas Munoz
b284e42aef rootfs: Add docker support
Allow users build a rootfs using docker, this will make easy if they
dont have dependencies need to pull packages from a distro.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2017-12-06 13:32:01 -06:00
Jose Carlos Venegas Munoz
48992d3fdf rootfs: Add README
Add docs about how rootfs generation.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2017-12-06 13:31:24 -06:00
Jose Carlos Venegas Munoz
206db3d585 rootfs: Add template files for new distros
Add template to add new distros.

Added a Makefile to initialize new environment.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2017-12-06 13:31:24 -06:00
Jose Carlos Venegas Munoz
75a9d5eab7 rootfs: Add rootfs based on CentOS 7
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2017-12-06 13:31:24 -06:00
Jose Carlos Venegas Munoz
5b8478c4cf rootfs: Add script for Fedora base OS
Add scirpts to build a rootfs based on Fedora.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2017-12-06 13:31:24 -06:00
Jose Carlos Venegas Munoz
91bf410118 rootfs: Add script for Clear Linux base OS
Add script and config to build a rootfs based
in Clear Linux OS.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2017-12-06 13:31:24 -06:00
Jose Carlos Venegas Munoz
f1b8da340e rootfs: Add rootfs.sh script
Add script that will use helper bash
scripts that provide a way to build a rootfs
based in a OS.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2017-12-06 13:31:15 -06:00
Samuel Ortiz
5a3115e965 pullapprove: Let the builder team approve PRs
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2017-12-04 23:36:49 +01:00
Samuel Ortiz
6a0d61363a CoC: Add Code of Conduct
We follow the OpenStack Foundation CoC.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2017-12-04 23:35:38 +01: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
Wang Xu
53901abe10 Initial commit 2017-11-21 17:03:45 +08: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
Samuel Ortiz
6d07e2cddb
Initial commit 2017-11-13 12:24:56 +01: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
Julio Montes
83485dc9a4 qemu: Implement Bridge struct
Bridge struct represent pci bridges(pci-bridge) or
pcie bridges(pcie-pci-bridges), bridges can be used to
hot plug devices in pc and q35 machines

Signed-off-by: Julio Montes <julio.montes@intel.com>
2017-10-24 08:31:37 -05:00
Manohar Castelino
cfa8a995de Networking: Add support for handling macvtap interfaces
Add support for macvtap interfaces. This also brings in support
for generic multiqueue support in virt containers.

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2017-10-12 09:59:03 -07:00
Julio Montes
83126d3e05 bios: add support for custom bios
Add Bios field into qemu Config struct, this allows to
start VM with custom bios

Partially fixes https://github.com/clearcontainers/runtime/issues/686

Signed-off-by: Julio Montes <julio.montes@intel.com>
2017-10-06 14:28:12 -05:00
Manohar Castelino
3da2ef9dea QEMU: Knobs: Huge Page Support: Add support for huge pages
Add support to launch virtual machines where the RAM is
allocated using huge pages. This is useful for running
with a user mode networking stack, and for custom setups
which require high performance and low latency.

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2017-09-26 11:29:45 -07:00
Archana Shinde
9bfa792795 vfio: Add ability to pass VFIO devices to qemu
VFIO is meant for exposing exposing direct device access
to the virtual machine.
Add ability to append VFIO devices to qemu command line.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2017-09-22 16:02:27 -07:00
Mark Ryan
a70ffd1980 Build: Fix the build after repo move.
Ciao has recently moved from github.com/01org/ciao to
github.com/ciao-project/ciao.  This moves requires us to update our
import paths to build successfully.

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
2017-09-21 17:39:45 +01:00
Manohar Castelino
0c206170c4 Knobs: Modify the behaviour of the Mlock knob.
The Mlock knob is unfortunately tied to realtime.
Allow Mlock knob to implicitly enable realtime to get the
desired swapping behavior when swapping is desired.

Note: Realtime as implemented today can only be used to enable
swap, and as such does not really control realtime behaviour.
The knob is redundant but retained here just to ensure that
when more capabilities are added in future QEMU iterations
we can take advantage of the same.

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2017-09-15 10:36:13 -07:00
Manohar Castelino
ddee41d553 QEMU: Enable realtime options
Enable realtime options in QEMU. Also add support to control memory
locking. Turning realtime on with memory locking disabled allows
memory to be swapped out, potentially increasing density of VMs.

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2017-09-14 08:54:35 -07:00
Manohar Castelino
4ecb9de5b3 qemu: Add support for memory pre-allocation
Add support for pre-allocating all of the RAM.
This increases the memory footprint of QEMU and should be used
only when needed.

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2017-09-12 15:45:16 -07:00
Archana Shinde
1fbe6c5d1d qmp: Update block device deletion for newer versions of qemu
blockdev-del command has been added in qemu 2.9 to replace
x-blockdev-del command used earlier for deleting block devices.
Update ExecuteXBlockdevDel() to use this updated qmp command.

Rename ExecuteXBlockdevDel to ExecuteBlockdevDel as this no longer
executes x-block-del command for qemu>=2.9.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2017-08-30 18:39:51 -07:00
Sebastien Boeuf
e74aeef1ad qemu: Add disable-modern option for virtio devices
For some cases, we have to disable the fast MMIO support, by disabling
virtio 1.0. The reason for this is that we want to be able to nest our
qemu VM inside a VM run by an hypervisor with no support for fast MMIO.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2017-08-17 08:47:50 -07:00
Sebastien Boeuf
8d617ff5b9 qemu: Update virtio-net-pci command line
In case of a network device, and specifically virtio-net-pci, we have
to update to what is expected by qemu. In this case, the driver name
should be prefixed with "driver=".

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2017-08-17 00:51:32 -07:00