Commit Graph

2302 Commits

Author SHA1 Message Date
Jose Carlos Venegas Munoz
e525003e96
Merge pull request #2552 from likebreath/warn_only_resizeCPU
clh: Report warning when requested vCPUs exceeds maxVCPU allowed
2020-03-27 13:01:48 -06:00
Bo Chen
669b6e32a5 clh: Report warning when requested vCPUs exceeds maxVCPU allowed
To have a consistent behavior of CPU hotplug with qemu in clh, we should
only report warning instead of errors when the requested vCPUs exceeds
the maximum number of vCPUs allowed.

Fixes: #2551

Signed-off-by: Bo Chen <chen.bo@intel.com>
2020-03-26 19:36:09 -07:00
Jose Carlos Venegas Munoz
2a19de8aa9
Merge pull request #2556 from jcvenegas/mem-hotplug-clh-v2
clh: Enable memory hotplug
2020-03-26 15:48:19 -06:00
Julio Montes
4fe62ade7f
Merge pull request #2543 from devimc/topic/virtcontainers/fixQ35vfioHotplug
virtcontainers: check PCI resource format before using it
2020-03-26 14:29:26 -06:00
Jose Carlos Venegas Munoz
11c998b6c7
Merge pull request #2515 from devimc/topic/pmem-CSI
Support persistent memory volumes
2020-03-26 11:57:17 -06:00
Graham Whaley
92b2ff723c
Merge pull request #2563 from chavafg/topic/update-containerd-version
versions: Update containerd commit
2020-03-26 09:33:24 +00:00
Jose Carlos Venegas Munoz
aab82f6745 clh: Add memory hotplug
Request memory to resize memory to hypervisor.

Depends-on: github.com/kata-containers/tests#2413

Fixes: #2526

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-03-26 04:31:21 +00:00
Salvador Fuentes
e62a8aa98e versions: Update containerd commit
We currently use containerd v1.3.0, but this version has an
issue when running the containerd/cri tests with go 1.13.
This commit: 3a4acfbc99aa976849f51a8edd4af20ead51d8d7 from
branch release/1.3 contains the fix to be able to run the
tests with go 1.13.

Depends-on: github.com/kata-containers/tests#2415
Fixes: #2562.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2020-03-25 18:10:52 -06:00
Jose Carlos Venegas Munoz
2f948738e4 clh: Use MemUnit to create VM
Provide memory in bytes using the new memory unit abstraction.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-03-25 04:32:03 +00:00
Jose Carlos Venegas Munoz
b6a7d8d63a utils: Add memory unit abstraction
Add MemUnit to help to manage memory, this will handle memory
units internally and provide proper methods to convert to different
units.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-03-25 04:32:03 +00:00
Jose Carlos Venegas Munoz
5e7d253859 clh: add vmInfo method
API VMInfo call is done more than one time. This leads to have
similar code in multiple times, create context, defer, do call.

Move the logic to one function.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-03-25 04:32:03 +00:00
Jose Carlos Venegas Munoz
ebb8fd576b versions: Update clh to latest master
Use latest master to enable memory hotplug.

Changes:

c1e6d00 ci: Add memory resizing use case to vhost-user tests
890582b ci: Factorize kernel command line
4de2584 ci: Fix mmio tests with direct kernel boot
f268246 ci: Factorize integration tests booting from vhost-user-blk
5a5b3cf ci: Factorize vhost-user-blk integration tests
dd8debf ci: Run vhost-user-blk tests for mmio builds
0c9c72c ci: Unify vhost-user-blk integration tests
c95851f ci: Run vhost-user-net tests for mmio transport
68293fc ci: Factorize vhost-user-net one step further
d75e745 vm-virtio: vhost-user: Send memory update to the backend
7ff82af vm-virtio: vhost-user: Factorize SET_MEM_TABLE setup
e54f8ec vmm: Update memory through DeviceManager
bc874a9 vm-virtio: Add update_memory() to VirtioDevice trait
93becca build(deps): bump backtrace from 0.3.45 to 0.3.46
feb8d7a vmm: Separate seccomp filters between VMM and API threads
5120c27 main: Add seccomp support
f1a23d7 vmm: api: Add seccomp to the HTTP API thread
db62cb3 vmm: Add seccomp filter to the VMM thread
cb98d90 vmm: Create new seccomp_filter module
708f02d vmm: Pull seccomp crate from Firecracker
18fbd30 vhost-user-fs: return correct result of fs_slave_io()
bbc385c devices: ioapic: Remove unused MsiMessage structure
2fc86ff dev_cli: Always pull the latest container image
4b462a5 Dockerfile: Add cpio and bsdtar to the container image
8acc15a build: Bump vm-memory and linux-loader dependencies
38ed560 build(deps): bump thiserror from 1.0.12 to 1.0.13
9f67de4 build(deps): bump proc-macro-hack from 0.5.12 to 0.5.14
ebab809 build(deps): bump thiserror from 1.0.11 to 1.0.12
c67e407 build(deps): bump syn from 1.0.16 to 1.0.17
bdcfe1e tests: Add "discard_writes" pmem test
7098602 tests: Make the test_virtio_pmem test use a temporary file
f7197e8 vmm: Add a "discard_writes=" to --pmem
d11a67b vmm: Use more generic MmapRegion constructor
7257e89 vmm: Add "readonly" parameter MemoryManager::create_userspace_mapping
03cb26c release: v0.6.0
3e9a39c github: Upload the ch-remote asset
c503118 vmm: fix a corrupted stack caused by get_win_size
0788600 build: Remove "pvh_boot" feature flag
477bc17 bin: Share VFIO device syntax between cloud-hypervisor and ch-remote
96be2db build(deps): bump serde_derive from 1.0.104 to 1.0.105
5a335fc build(deps): bump serde from 1.0.104 to 1.0.105
a31ffef openapi: Add hotplug_size for memory hotplug
87990f9 vmm: Add virtio-pci device to B/D/F hash table
fb185fa vmm: Always return PCI B/D/F from add_virtio_pci_device
462082c build(deps): bump arc-swap from 0.4.4 to 0.4.5
c821e96 vhost_user_fs: Implement support for FUSE_LSEEK
5aa9abc docs: Add document for vhost-user-net test with OVS/DPDK
6329219 vm-virtio: queue: Use a SeqCst fence on get_used_event
63eeed2 vm: Comment on the VM config update from memory hotplug
0895bcb build(deps): bump proc-macro-hack from 0.5.11 to 0.5.12
0541f5a build(deps): bump proc-macro-nested from 0.1.3 to 0.1.4
51f51ea build(deps): bump libc from 0.2.67 to 0.2.68
9cf67d1 arch: x86: Always set the bootloader type
ad35470 arch: x86: Extract common bootparams settings
28a5f9d vmm: acpi: Remove unused IORT related structures
5c1207c vhost-user-fs: handle FS_IO request
f61f78e build(deps): bump anyhow from 1.0.26 to 1.0.27
efb2447 pvh: Add integration test to validate PVH boot
da084fa pvh: Add unit tests for initial sregs and control registers
64941bf pvh: Add unit tests for start_info and memory map structures
9e247c4 pvh: Introduce "pvh_boot" feature
a22bc35 pvh: Write start_info structure to guest memory
840a9a9 pvh: Initialize vCPU regs/sregs for PVH boot
24f0e42 pvh: Introduce EntryPoint struct
98b9568 pvh: Add definitions for PVH boot protocol support
6e6ef83 build: Fix log dependency
291f1ce build(deps): bump linux-loader from `0c754f3` to `0ce5bfa`
07cc73b vhost_user_fs: add a flag to disable extended attributes
710520e vhost_user_fs: Process requests in parallel with a thread pool
90309b5 vm-virtio: queue: Add methods to switch a descriptor context
2294c2d Add .rustfmt.toml to the project
48c4885 vhost_user_fs: replace HandleData's File Mutex with RwLock
134e64c arch, qcow: Fix 1.42.0 clippy warnings
6ea85ca resources: Dockerfile: Update Rust toolchain
4579afa vmm: For --disk error if socket and path is specified
7e599b4 vmm: Make disk path optional
477d924 github: Build from a rust toolchain matrix
4f2469e main: Remove "--vhost-user-net"
8d785bb pci: Fix the PciBus using HashMap instead of Vec
04f2ccd build(deps): bump ryu from 1.0.2 to 1.0.3
02265bb build(deps): bump regex-syntax from 0.6.16 to 0.6.17
40b38a4 openapi: Make desired_ram int64 format
ca3b39c bin: Fix wrapping in help strings
ee1ba56 build: Use "wrap_help" feature for clap
3957d1e vhost_user_backend: call get_used_event from needs_notification
536323d vm-virtio: queue: hint that get_used_event should be inlined
401e1d2 vm-virtio: queue: fix a barrier comment at update_avail_event
e0bdfe8 vm-virtio: queue: add a missing memory barrier in get_used_event
df2570a resources: Simplify kernel config filename
9ab648b resources: Enable VIRTIO_MEM support
0339853 ci: Bump to kernel 5.6-rc4
abccf76 tests: Use ch-remote to add/remove devices in test_vfio
5c3ce9d tests: Extend ch-remote helper to support optional single argument
9a7d9c9 ch-remote: Support removing VFIO devices
0d53ba4 ch-remote: Support adding VFIO devices
babefbd main: Remove spurious second help line for "--device"
63c5d09 github: Trigger the build job on PRs
8cbb6d0 github: Replace Travis CI with github actions
efba48d vmm: Don't put a VFIO device behind the vIOMMU by default
34412c9 vmm: Add id option to VFIO hotplug
18dc916 vmm: Switch to the micro-http package
9023444 vmm: Add id field to --device through CLI
f4a956a vmm: Remove 32 bits MMIO range from correct address space
432eb5b vmm: Free PCI BARs when unplugging PCI device
f0dff8b vfio: pci: Remove KVM user memory region when cleaning up
34d1f43 vfio: pci: Implement free_bars() from the PciDevice trait
b8e1cf2 vm-allocator: Add new function to free 32 bits MMIO address space
f3dc245 pci: Extend PciDevice trait with new free_bars() method
911a2d6 tests: Use ch-remote to resize the VM
21160f7 ch-remote: Add "resize" command
bb2d04b ch-remote: Add support for sending a request body
bde4f73 ch-remote: Refactor HTTP response handling
6ed23bb build(deps): bump micro_http from `9bbde4f` to `6b3e5f0`
5edd812 build(deps): bump backtrace-sys from 0.1.33 to 0.1.34
f727714 ci: Add integration test for VFIO hot-unplug
b50cbe5 pci: Give PCI device ID back when removing a device
df71aae pci: Make the device ID allocation smarter
e514b12 vmm: Update VmConfig when removing VFIO device
81173bf vmm: Add id field to DeviceConfig structure
6cbdb9a vmm: api: Introduce new "remove-device" HTTP endpoint
991f3bb vmm: Remove VFIO device from everywhere it is referenced
6adebbc vmm: Detect when guest notifies about ejecting PCI device
0e21c32 devices: Add new method to remove all occurrences of a BusDevice
f8e2008 pci: Add a function to remove a PciDevice from the bus
08604ac vmm: Store PCI devices as Any devices from DeviceManager
0f99d3f vmm: Store VFIO device's name and its PCI b/d/f
13a61c4 build(deps): bump rand_chacha from 0.2.1 to 0.2.2
fcd605a build(deps): bump micro_http from `6d416af` to `9bbde4f`
30b6954 vm-virtio: Consume pause events to prevent infinite epoll_wait calls
16fd506 tests: Use new ch-remote for pause/resume integration test
ba8cd4d bin: Introduce "ch-remote" for controlling VMM
06cd31c build(deps): bump micro_http from `02def92` to `6d416af`
7e941c9 build(deps): bump linux-loader from `8cb7c66` to `0c754f3`

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-03-25 04:30:58 +00:00
Julio Montes
213f5dbaf5
Merge pull request #2550 from devimc/topic/virtcontainers/noVFIOInGuest
virtcontainers: Don't create vfio devices in the guest
2020-03-24 09:39:23 -06:00
Julio Montes
4d2574a723 virtcontainers: Don't create vfio devices in the guest
vfio devices hotplugged in the VM are expected to be handled by the kernel
driver in the guest, hence the char vfio devices shouldn't appear in the
container under /dev/vfio/.

fixes #2539

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-03-23 19:53:42 +00:00
Julio Montes
3b53114ad1 virtcontainers: improve algorithm to check Large bar devices
Instead of iterate in a loop dividing bytes by 1024, use right shift
to convert Bytes to GBytes and check if that number is greater than 4G

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-03-23 16:21:39 +00:00
Julio Montes
7aff546655 virtcontainers: check PCI resource format before using it
Make sure the number of columns in the PCI resource file is greater
or equal to 2, since the first two columns are used to calculate
the PCI bar space.
Add unit test for `isLargeBarSpace()`.

fixes #2542

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-03-23 16:20:09 +00:00
Julio Montes
078da1a6de
Merge pull request #2533 from bergwolf/mounted
shimv2: move container rootfs mounted flag to container level
2020-03-23 09:34:38 -06:00
Graham Whaley
c028329755
Merge pull request #2505 from Pennyzct/update_FC_0.21.0
AArch64: officially enable firecracker v0.21.0 on AArch64
2020-03-23 10:03:19 +00:00
Peng Tao
d0a730c6e8 shimv2: move container rootfs mounted flag to container level
It is in fact a container specific info not sandbox level info.
We are assuming that all containers use the same snapshotter
but it may not be the fact in reality.

Fixes: #2532
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-03-23 13:41:38 +08:00
Penny Zheng
d60902a95e FC: change minimum supported version of Firecracker to v0.21.1
Some changes in Firecracker v0.21.1 is incompatible with the old versions.
So we need to update the minimum supported FC version to v0.21.1

Fixes: #2504

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-03-23 09:57:25 +08:00
Penny Zheng
aadf8c4a01 AArch64: enable firecracker v0.21.1 on AArch64
We offically enable firecracker v0.21.1 on AArch64.

Fixes: #2504

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-03-23 09:57:25 +08:00
Penny Zheng
44e23493a2 FC: Fix error of overlong firecracker API unix socket
When sandbox id is too long, it will incur error of overlong firecracker
API unix socket.
In Linux, sun_path could maximumly contains 108 bytes in size.
http://man7.org/linux/man-pages/man7/unix.7.html
So here we try to truncate FC id to only keep the size of UUID(128bit).

Fixes: #2504

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-03-23 09:57:25 +08:00
Penny Zheng
c3bafd5793 FC: Change default API socket path
Firecracker has changed default API socket path to `/run/firecracker.socket`.
This path also applies when running with the jailer.
Related PR: https://github.com/firecracker-microvm/firecracker/pull/1500
kata is letting jailer automatically create API socket, so we need to
change api socket path from `/api.socket` to `/run/firecracker.socket` accordingly.

Fixes: #2504

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-03-23 09:57:25 +08:00
Penny Zheng
2945bcd796 FC: Removed redundant --seccomp-level jailer parameter
Firecracker has removed redundant `--seccomp-level` jailer parameter
since it can be simply forwarded to the Firecracker executable using
"end of command options" convention.
Related PR: https://github.com/firecracker-microvm/firecracker/pull/1491
Since kata is just using default seccomp level for firecracker, here
then we just removed the setting for jailer.

Fixes: #2504

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-03-23 09:57:25 +08:00
Penny Zheng
d2cae59ec7 FC: Removed redundant RescanBlockDevice action
Firecracker has removed RescanBlockDevice from the /actions API.
Related PR: https://github.com/firecracker-microvm/firecracker/pull/1542.
We need to remove according settings in kata-containers.

Fixes: #2504

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-03-23 09:57:25 +08:00
Penny Zheng
37b91b3378 FC: Remove logger.options
Firecracker has removed `memory.dirty_pages` metric and `logger.options`
configuration.
Related PR: https://github.com/firecracker-microvm/firecracker/pull/1532.
We need to remove according setting in kata-containers.

Fixes: #2504

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-03-23 09:57:16 +08:00
Jose Carlos Venegas Munoz
2d89766d3a
Merge pull request #2519 from jcvenegas/fio-clh
clh: add vfio support
2020-03-20 21:39:09 -06:00
Julio Montes
2c310fecd4 virtcontainers: handle persistent memory volumes
A persistent memory volume MUST meet the following conditions:
* A loop device must be mounted in the directory passed as volume
* The loop device must have a backing file
* The backing file must have the PFN signature at offset 4k [1][2]

The backing file is used as backend file for a NVDIMM device in the guest

fixes #2262

[1] - https://github.com/kata-containers/osbuilder/blob/master/image-builder
/nsdax.gpl.c
[2] - https://github.com/torvalds/linux/blob/master/drivers/nvdimm/pfn.h

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-03-20 15:02:01 +00:00
Julio Montes
434b30255e virtcontainers: hotplug block drives that are pmem devices as nvdimm
hotplug as NVDIMM devices the block drives that can be used as pmem devices
(`Pmem=true`), the host path to such devices is a raw file that contains
the PFN signature.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-03-20 15:02:01 +00:00
Julio Montes
84e0ee13c8 virtcontainers: reimplement createBlockDevices
Reimplement `createBlockDevices` to identify possible volumes that can be
used as pmem devices

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-03-20 15:02:01 +00:00
Julio Montes
abbdf078cd virtcontainers: add Pmem attribute to BlockDrive
A `BlockDrive` can be used as pmem device, since they both are similar and
can be mounted in the same way in the guest. The `Pmem` attribute helps kata
to identify a pmem device and how it has to be hotplugged in the guest.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-03-20 15:02:01 +00:00
Julio Montes
ee941e5c56 virtcontainers: Implement function to get the pmem DeviceInfo
Implement function to get the pmem `DeviceInfo` from a volume.
`PmemDeviceInfo` return a new `DeviceInfo` object if a volume has a loop device
as backend and the backing file for such loop device contains the PFN signature,
needed to enable DAX in the guest.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-03-20 15:02:01 +00:00
Julio Montes
9ff44dba87 virtcontainers: implement function to get the backing file
Implement function the get the backing file from a loop device.
The backing file can be used as backend file for a NVDIMM device in the guest

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-03-20 15:02:01 +00:00
Julio Montes
0a4e2edcf4 virtcontainers: move GetDevicePathAndFsType to utils_linux
`GetDevicePathAndFsType` is a function to get the path and filesystem type
of a mount point from `/proc/mounts`.
Move `GetDevicePathAndFsType` to utils_linux since it's linux specific
and that way it can be used in other subpackages.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-03-20 13:56:40 +00:00
Julio Montes
2c7f27ec4f vendor: update govmm
bring `pmem` option to pmem/nvdimm devices

shortlog:
qemu: add pmem flag to memory-backend-file

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-03-20 13:45:58 +00:00
Jose Carlos Venegas Munoz
f61eca8920 clh: Add comments around clh api
To make easier to know what a method of API is expected to do without go
to cloud-hypervisor documentation.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-03-20 07:03:55 +00:00
Jose Carlos Venegas Munoz
6a4e667f9c virtiofsd: Check if PID is valid
If try to kill with an not valid PID the thread goes to panic, check
to allow return a valid error from the runtime.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-03-19 19:15:31 +00:00
Jose Carlos Venegas Munoz
3251beaa23 version: Update clh to master
Move to master tip to get support for vfio hotplug.

Changes:

df79499 net: Do not check multiqueue for new interface
7d75b1f build(deps): bump quote from 1.0.2 to 1.0.3
841bf89 build(deps): bump failure from 0.1.6 to 0.1.7
86acdb9 build(deps): bump failure_derive from 0.1.6 to 0.1.7
4b32863 docs: Update api.md for VFIO hotplug
e518098 scripts: Make integration tests fail if some important commands fail
be6f91d tests: Refactoring vhost_user_net test cases
6341736 vhost_user_net: Provide tap option for vhost_user_net backend
e0419e9 build: Don't cancel older master builds
f0a3e7c build: Bump linux-loader and vm-memory dependencies
6539d4a vfio: handle case for missing iommu_group
cfbebd8 build(deps): bump micro_http from `88011bd` to `02def92`
4214806 tests: Remove further use of sudo subshells
2baf5ab tests: Simplfy the shm region check
97affbe tests: Re-enable the virtio-fs tests and make them work with virtio-mmio
7b1d5c1 tests: Remove entropy check from vhost-user-block test
a4cca5f tests: sha1sums --check can take a list of hashes
689415e build(deps): bump libssh2-sys from 0.2.15 to 0.2.16
09829c4 vmm: Remove IO bus strong reference from Vm
2dbb376 vmm: Remove all Weak references from DeviceManager
9e915a0 vmm: Remove all Weak references from CpuManager
49268bf pci: Remove all Weak references from PciBus
ca426cf devices: Make Bus hold a list of Weak BusDevice references
7773812 vmm: Store the list of BusDevice devices from DeviceManager
d0820cc vmm: Make add_vfio_device mutable
948f808 vm: Rename DeviceManager field in Vm structure
aa638ea build(deps): bump backtrace from 0.3.44 to 0.3.45
1152b1a ci: Add VFIO hotplug integration test
d47f733 vmm: Break the cyclic dependency between DeviceManager and IO bus
c1af13e vmm: Update VmConfig when adding new device
a86f436 vmm: Add VFIO PCI device hotplug support
320fea0 vmm: Factorize VFIO PCI device creation
00716f9 vmm: Store virtio-iommu device from DeviceManager
5902dfa vmm: Store VFIO KVM device from DeviceManager
d9c1b43 vmm: Store MSI InterruptManager from DeviceManager
02adc40 vmm: Store PciBus from DeviceManager
3f396d8 resources: Enable ACPI PCI hotplug in the kernel config
d0218e9 vmm: Trigger hotplug notification to the guest
0e58741 vmm: api: Introduce new "add-device" HTTP endpoint
0f1396a vmm: Insert PCI device hotplug operation region on IO bus
65774e8 vmm: Implement BusDevice for DeviceManager
2eb26d4 devices: acpi: Update GED to support PCI devices hotplug
8dbc843 vmm: acpi: Add PCNT method to invoke DVNT
c62db97 vmm: acpi: Add _EJ0 to each PCI device slot
4dc2a39 vmm: acpi: Create PHPR container
c3a0685 vmm: acpi: Add notification method for PCI device slots
5a68d5b vmm: acpi: Create PCI device slots
ead86bb build(deps): bump micro_http from `9945928` to `88011bd`
22dd49d tests: Test virtio-fs with virtio-mmio
642b890 vm-virtio: mmio: Enable reporting of SHM regions via config fields
0223cf8 ci: Update ClearLinux image
ed396b4 build(deps): bump vm-memory from `2099f41` to `a84a7b8`
81c2294 vhost_rs: remove unused crate
5200bf3 Cargo: switch vhost_rs to external crate
65a38e6 vm-virtio: vhost_user: Fix blk device configuration space offset value
d6e6901 vmm/api: Fix vm.info response definition
8f37200 build(deps): bump micro_http from `3eb926c` to `9945928`
cc2d03d build(deps): bump regex-syntax from 0.6.15 to 0.6.16
f5b37e3 build(deps): bump regex-syntax from 0.6.14 to 0.6.15
009f4d2 build(deps): bump micro_http from `8d48e73` to `3eb926c`
5ade9d4 tests: Remove unnecessary sleeps and kill on clean shutdown tests
c98949b tests: Wait for VMM to exit in test_serial_file/test_console_file
2f58fb8 tests: Test rebooting works for block self spawn test
e817aa6 tests: Improve VM shutdown behaviour
559b70c tests: Make output capture optional
dae7608 tests: Remove duplicated network configuration
6466ad2 tests: Remove duplicated disk configuration
9f1ac24 tests: Make the GuestCommand take a reference to the guest
49e70c6 tests: Port integration tests over to GuestCommand
67a5882 tests: Introduce new GuestCommand to handle launching the guest
8142c82 vmm: Move DeviceManager into an Arc<Mutex<>>
531f4ff vhost_user_fs: Remove an unneeded unwrap in handle_event
e52129e vhost_user_fs: Process events from HIPRIO queue
0c5c470 build(deps): bump micro_http from `b85757e` to `8d48e73`
5b96dd5 ci: Don't give special capabilities to Rust vhost-user-fs backend
d8d790b vhost_rs: Don't check for SLAVE_SEND_FD on SET_SLAVE_REQ_FD
1c5562b vhost_user_fs: Add support for EVENT_IDX
eae4f1d vhost_user_fs: Add support for indirect descriptors
ea0bc24 vhost_user_fs: Be honest about protocol supported features
42937c9 vm-virtio: Add support for indirect descriptors
d7b0b98 tests: Move integration tests to their own directory
3cb4513 vhost_rs: control SlaveFsCacheReq with vhost-user-slave feature
9de3ace devices: implement Aml trait for GED device
b77fdeb msi/msi-x: Prevent from losing masked interrupts
8423c08 build(deps): bump proc-macro2 from 1.0.8 to 1.0.9
6315f16 build(deps): bump syn from 1.0.15 to 1.0.16
4cf89d3 pci: handle extended configuration space properly
f6b9445 pci: fix pci MMCONFIG address parsing
77ee331 resources: Enable KASLR in kernel config
bba5ef3 vmm: Remove deprecated CPU syntax
374ac77 main, vmm: Remove deprecated --vhost-user-net
ffd816e main, vmm: Remove deprecated --vhost-user-blk
d04e0dc build(deps): bump crossbeam-utils from 0.7.0 to 0.7.2
7da5b53 build(deps): bump ssh2 from 0.7.1 to 0.8.0
109c7f7 build(deps): bump hermit-abi from 0.1.7 to 0.1.8
812a6b9 build(deps): bump syn from 1.0.14 to 1.0.15
ad30791 build(deps): bump memchr from 2.3.2 to 2.3.3
94f2fc3 release-notes: Update for v0.5.1 bug fix release
f190cb0 build(deps): bump libc from 0.2.66 to 0.2.67
299eb28 build(deps): bump micro_http from `6fd1545` to `b85757e`
d2f1749 vmm: config: Add poll_queue property to DiskConfig
378dd81 vmm: openapi: Add missing "direct" knob to DiskConfig
056f548 vmm: openapi: Fix "readonly" and "wce" defaults in DiskConfig
4ebf01b vhost_user_backend: Don't report out socket broken errors
b5755e9 vhost_rs: vhost_user: Return error when connection broken
c49e31a vmm: api: Return a resize error when resize fails
ebc6391 vmm: api: Fix resize command typos
9de7553 vmm: openapi: Update DiskConfig
ed1e781 vmm: Workaround double reboot triggered by the kernel
5c06b7f vhost_user_block: Implement optional static polling
0e4e27e vhost_user_block: Make use of the EVENT_IDX feature
1ef6996 vhost_user_backend: Add helpers for EVENT_IDX
d17fa78 vm-virtio: Implement support for EVENT_IDX
793d4e7 vmm: Move codebase to GuestMemoryAtomic from vm-memory
ddf6caf ci: Improve test_memory_mergeable_on stability
af621be build(deps): bump micro_http from `57ac9df` to `6fd1545`
4970e2f vhost-user-fs: add dax tests for vhost_user_fs rust daemon
59958f0 vhost_user_fs: add the ability to set slave req fd
3f09eff vhost_user_fs: add fs cache request operations
956a84f vhost_user_fs: add necessary structs for map/unmap requests
269d660 vhost_user_fs: add SlaveFsCacheReq to handle map/unmap
be78c6d vhost_rs: Fix unit test race condition
f7378bc tests: Add self spawning vhost-user-block test
1f6cbad vmm: Add support for spawning vhost-user-block backend
4d60ef5 vm-virtio: vhost_user: block: On shutdown() drop the socket
7fabca3 ci: Don't run unit tests in a privileged container
2724716 build(deps): bump micro_http from `4827569` to `57ac9df`
08a68f2 build: Run unit tests on worker node
f21cd31 scripts: dev_cli: Add more privileges for the integration tests
a94887e build: Use dev container for integration tests
3edc2bd vmm: Prevent memory overcommitment through virtio-fs shared regions
968c90a build(deps): bump hermit-abi from 0.1.6 to 0.1.7
7485a0c Revert "build: Don't fail build on test_vfio failure"
cbc0ac3 build(deps): bump micro_http from `7a23e54` to `4827569`
7fdb5ae build(deps): bump vm-memory from `eb2fc0b` to `f615b19`
0d748c5 build(deps): bump scopeguard from 1.0.0 to 1.1.0
6692fa6 build(deps): bump thiserror from 1.0.10 to 1.0.11
f03602a tests: Add self spawning vhost-user-net test
bc75c1b vmm: Add support for spawning vhost-user-net backend
d054ddd vm-virtio: Retry connections to vhost-user backends
b04eb47 vmm: Follow the "exe" symlink from the PID directory in /proc
5038878 vm-virtio: vhost_user: net: On shutdown() drop the socket
7c9e8b1 vmm: device_manager: Shutdown all virtio devices
545ea9e vm-virtio: Add shutdown method to VirtioDevice trait
ebd8369 main: Display git commit hash with the '--version' option
bdb92f9 build(deps): bump micro_http from `7fb2e46` to `7a23e54`
2061f0d tests: Always create shared VFIO directory from scratch
e8e4f43 tests: Use hugepages for test_vfio
296ada9 scripts: dev_cli: Fix post build permissions for the whole tree
287897d tests: Run test_vfio with PCI binary
1661444 build(deps): bump serde_json from 1.0.47 to 1.0.48
96479da build(deps): bump vm-memory from `f3d1c27` to `eb2fc0b`
88c1683 build(deps): bump memchr from 2.3.1 to 2.3.2
8d3e4f9 build(deps): bump micro_http from `c9e900c` to `7fb2e46`
53481aa docs: Update documentation related to multiqueue network
4dd16c2 vm-virtio: Detect if a tap interface supports multiqueue
8627656 net_util: Provide more accurate error messages
6e5338d build(deps): bump memchr from 2.3.0 to 2.3.1
014844d build: Don't fail build on test_vfio failure
779cbfe build(deps): bump backtrace from 0.3.43 to 0.3.44
700df9e vhost_user_net: Port to new exit event strategy
c33c38b vhost_user_block: Port to new exit event strategy
da7f31d bin: vhost_user_fs: Port to new exit event strategy
759a0be vhost_user_backend: Add support for handling exiting of worker thread
b17bafb build(deps): bump micro_http from `1de6f32` to `c9e900c`
7ca691f vhost_user_block: Implement and use worker shutdown
e619fe6 vhost_user_net: Remove "Clone" implementation
613f254 vhost_user_backend: Wait on the worker thread
97ab767 vhost_user_net: Shutdown worker thread on exit
7f032c8 bin: vhost_user_fs: Shutdown worker thread on exit
99cb8dc bin: vhost_user_fs use error! macro logging for consistency
710394b vhost_user_block: Forward the error from unexpected event
4f4c3d3 vhost_user_block: Make Error behave like net and fs versions
f1e19d6 vhost_user_backend: Forward the error from main thread
80c9dc2 Revert "vhost-user-backend: Correct error handling in run"
c706ca1 scripts: dev_cli: Simplify the build command exit path
0a1d6e1 scripts: dev_cli: Fix build directory permisions
c8fa809 scripts: dev_cli: Run unprivileged containers as the host user
26d8cae build(deps): bump micro_http from `ae15e75` to `1de6f32`
572aaa7 build(deps): bump serde_json from 1.0.46 to 1.0.47
04cb35e scripts: Make dev_cli.sh exit on test error
9bf100c build: Run worker and master build in parallel
bfbca59 scripts: Don't use interactive & terminal mode for docker
6e6eb5b build: Do cargo tests, unit tests and OpenAPI check on master
a5b053f scripts: dev_cli: Use a tmpfs mount for /tmp

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-03-19 19:13:51 +00:00
Jose Carlos Venegas Munoz
c5184641dc clh: Add vfio support
Add support to hotplug vfio devices.

Use hypervisor API to attach devices via hotplug.

Fixes: #2496

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-03-19 19:13:51 +00:00
Graham Whaley
aa0d4ee0e8
Merge pull request #2512 from Pennyzct/FC_mount_noexec
Jailer: checking whether chrootBasedir is mounted `noexec`
2020-03-19 09:35:12 +00:00
Penny
e433719f47
Merge pull request #2390 from dong-liuliu/xliu2/vhost-user-blk
Assign vhost-user-blk device to Kata container as ephemeral or persistent storage #2380
2020-03-19 10:00:53 +08:00
GabyCT
0329dbb5aa
Merge pull request #2534 from bergwolf/1.11.0-alpha1-branch-bump
# Kata Containers 1.11.0-alpha1
2020-03-18 10:13:15 -06:00
Penny Zheng
00da1270be unit-test: refine related unit tests
We need to refine related unit tests.

Fixes: #2511

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-03-17 05:22:00 +00:00
Penny Zheng
13390df005 Jailer: re-mount jailerRoot with exec
The default chrootBaseDir "/run/vc" in many distributions is mounted
with `noexec` flag, which will bring 'permission denied' error
when running kata-containers with jailer.
Therefore, we decided to remount the jailerRoot dir with exec when setting
up a new firecracker sandbox and umount it when cleaning up.

Fixes: #2511

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-03-17 04:10:33 +00:00
Penny Zheng
9d3022a85a mount: modify func bindMount
originally, we forcefully set any bind-mount with `private` propagation
type, and it's not applied for all scenarios. e.g. we need to provide
`slave` or `shared` propagation type for bind-mounts in setting up jail
house.
Here, we add another parameter `pgtype` in func bindMount for providing
customized propagation parameters.

Fixes: #2511

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-03-17 04:10:28 +00:00
Archana Shinde
aaa4e5c661
Merge pull request #2529 from likebreath/clh_remove_deadcode
clh: Remove dead-code on maxClhVcpus
2020-03-16 11:07:10 -07:00
Peng Tao
17a92aed6f release: Kata Containers 1.11.0-alpha1
- README: logging: add shimv2 information
- vc: add agent.container_pipe_size annotation
- clh: set rootfstype
- logging: reduce default log level to Warn from Info
- vc: Remove container share dir when stopping
- clh: enable CPU hotplug
- clh: add 'APIsocket' to persist HypervisorState
- vc: Use BlockIndexMap instead of BlockIndex
- vendor: update agent client
- cri-o: fix netns mount point leaking from cri-o
- cli: add virtioFsDaemon to kata-env
- qemu: pass rootfs image in readonly mode
- Fix rescan PCI conflicts with shpchp / pciehp
- clh: Fix version check
- Implement cgroup manager
- vc: do not follow symlink when umounting contanier host path

4ce44ab0 clh: set rootfstype
4c287173 vc: add agent.container_pipe_size annotation
eee4d701 katutils: logging: default log level to Warn
913d1530 cli: logging: Default to Warn level
2cd0c885 README: logging: add shimv2 information
ed431175 vc: Remove container share dir when stopping
17b9de14 clh: enable CPU hotplug
63c7ac5b clh: add 'APIsocket' to persist HypervisorState
e9a46580 vc: Use BlockIndexMap instead of BlockIndex
376c4252 cli: add virtioFsDaemon to kata-env.
171eb705 qemu: use govmm vhost user device types directly
c6cc8b93 virtcontainers: support lazy attach devices
46392945 qemu: pass guest image file readonly
63fdf532 vendor: update govmm dependency
7427fea8 dnm: vendor: update agent client
ea82922a virtcontainers/pkg/cgroups: implement cgroup manager
03cdf6c4 virtcontainers: add new package for cgroups
33459779 clh: update minimal supported version to check.
20332298 clh: Fix version check
0da10105 version-update: version update for cri-o and k8s
5f9a77cc vc: validate container path when cleaning up
5bf32312 vc: do not follow symlink when umounting contanier host path

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-03-16 12:39:48 +00:00
Bo Chen
94298dd15c clh: Remove dead-code on maxClhVcpus
Our CLH driver in kata defines its own constant variable 'maxClhVcpus'
which can conflict with the maximum number of vCPUs specified from the
kata configuration file 'clh.config.DefaultMaxVCPUs'. As the value from
kata configuration file is preferred anyway and the code on 'maxClhVcpus'
is not being used. We'd better remove it for better readability and
avoiding further confusions.

Fixes: #2528

Signed-off-by: Bo Chen <chen.bo@intel.com>
2020-03-13 13:02:22 -07:00
GabyCT
ee01fa82b5
Merge pull request #2521 from grahamwhaley/20200310_shimv2_logs
README: logging: add shimv2 information
2020-03-12 09:02:23 -06:00
Liu Xiaodong
126fa157a3 agent: append and handle vhost-user-blk device
Kata-runtime can append vhost-user-blk device to the
device list of a container. And handle volumes who is
a block device and in VhostUserBlk type.

The vhost-user-blk device will be identified by its
PCI address by Kata-agent inside VM.

Fixes: #2380

Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
2020-03-12 03:42:02 -04:00