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>
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>
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>
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>
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>
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>
The existing NetDevice relies on virtio-net driver, but there is a
useful PCI variant which was not available: virtio-net-pci.
This patch adds this new driver and adds two parameters specific to
this: "bus" and "addr".
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
We add a new device driver, and also a name to the CharDev structure
this is needed for qemu to actually create the serial port on
the guest.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
The QMP socket implementation does not support multiple clients sending
and receiving QMP commands. As a consequence we need to be able to
create multiple QMP sockets from the qemu package, so that at least we
can support a fixed number of QMP clients.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
All file descriptors will come from specific devices configurations, so
this patch:
1) Make the Config FDs file private
2) Provide an appendFDs() method for Config, that takes a slice of
os.File pointers and
a) Adds them to the Config private fd slice
b) Return a slice of ints that represent the file descriptors for
these device specific files, as seen by the qemu process.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
It is a private field now, and all append*() routines are now
Config methods instead of private qemu functions.
Since we will have to carry a kernelParams private field as well,
this change will keep all built parameters internal and make things
consistent.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
By adding QemuParams() to the Device interface, we can get rid of the
driver structure and simplify further the appendDevices() routine.
With that implementation we can generate the following qemu parameters:
"-device virtio-9p-pci,fsdev=foo,mount_tag=rootfs -fsdev local,id=foo,path=/bar/foo,security-model=none"
from these single structures:
fsdev := FSDevice{
Driver: Virtio9P
FSDriver: Local,
ID: "foo",
Path: "/bar/foo",
MountTag: "rootfs",
SecurityModel: None,
}
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Instead of open coding the RTC fields, we now have specific types for
it.
We also have a RTC unit test now.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Having separate structures for the qemu driver definitions
and each possible device definitions is confusing and error prone as one
needs to be very careful using matching IDs and names in both
structures.
As the driver parameter can be derived from the device
ones, this patch changes the Device and Driver structures to be linked
together, i.e. each driver needs to have its corresponding device.
For example this allows us to build the following 9pfs qemu parameters:
"-fsdev local,id=foo,path=/bar/foo,security-model=none -device virtio-9p-pci,fsdev=foo,mount_tag=rootfs"
from these structures:
fsdev := FSDevice{
Driver: Local,
ID: "foo",
Path: "/bar/foo",
MountTag: "rootfs",
SecurityModel: None,
}
driver := Driver{
Driver: Virtio9P,
Device: fsdev,
}
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
With the NetDev and MACAddress strings, we can now create networking
device drivers.
We also add a unit test for netdev Device creation.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
We can now specify if we want vhost to be enabled and wich fds we should
use for multiqueue support.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
The NetDevice structure represents a network device to be emulated by
qemu.
We also add the corresponding unit test.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>