Bin Liu
515bdcb138
Merge pull request #4900 from wllenyj/dragonball-ut
...
Built-in Sandbox: add more unit tests for dragonball.
2022-08-31 14:00:07 +08:00
wllenyj
c75970b816
dragonball: add more unit test for config manager
...
Added more unit tests for config manager.
Fixes : #4899
Signed-off-by: wllenyj <wllenyj@linux.alibaba.com >
2022-08-17 23:46:26 +08:00
Peng Tao
338c282950
dep: update nix dependency
...
To fix CVE-2021-45707 that affects nix < 0.20.2.
Fixes : #4929
Signed-off-by: Peng Tao <bergwolf@hyper.sh >
2022-08-17 16:06:26 +08:00
xuejun-xj
2b01e9ba40
dragonball: fix warning
...
Add map_err for vcpu_manager.set_reset_event_fd() function.
Fixes : #4676
Signed-off-by: xuejun-xj <jiyunxue@alibaba.linux.com >
2022-07-18 09:52:13 +08:00
Quanwei Zhou
3c989521b1
dragonball: update for review
...
update for review
Fixes : #3785
Signed-off-by: Quanwei Zhou <quanweiZhou@linux.alibaba.com >
2022-07-14 10:43:59 +08:00
Quanwei Zhou
3d6156f6ec
runtime-rs: support dragonball and runtime-binary
...
Fixes : #3785
Signed-off-by: Quanwei Zhou <quanweiZhou@linux.alibaba.com >
Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com >
2022-07-14 08:49:30 +08:00
xuejun-xj
d2584991eb
dragonball: fix dependency unused warning
...
Fix the warning "unused import: `dbs_arch::gic::Error as GICError`" and
"unused import: `dbs_arch::gic::GICDevice`" in file src/vm/mod.rs when
compiling.
Fixes : #4544
Signed-off-by: xuejun-xj <jiyunxue@alibaba.linux.com >
Signed-off-by: jingshan <jingshan@linux.alibaba.com >
2022-07-11 17:55:04 +08:00
xuejun-xj
458f6f42f6
dragonball: use const string for legacy device type
...
As string "com1", "com2" and "rtc" are used in two files
(device_manager/mod.rs and device_manager/legacy.rs), we use public
const variables COM1, COM2 and RTC to replace them respectively.
Fixes : #4544
Signed-off-by: xuejun-xj <jiyunxue@alibaba.linux.com >
Signed-off-by: jingshan <jingshan@linux.alibaba.com >
2022-07-11 17:46:10 +08:00
xuejun-xj
f6f96b8fee
dragonball: add legacy device support for aarch64
...
Implement RTC device for aarch64.
Fixes : #4544
Signed-off-by: xuejun-xj <jiyunxue@alibaba.linux.com >
Signed-off-by: jingshan <jingshan@linux.alibaba.com >
2022-07-10 17:35:30 +08:00
xuejun-xj
7a4183980e
dragonball: add device info support for aarch64
...
Implement generate_virtio_device_info() and
get_virtio_mmio_device_info() functions su support the mmio_device_info
member, which is used by FDT.
Fixes : #4544
Signed-off-by: xuejun-xj <jiyunxue@linux.alibaba.com >
Signed-off-by: jingshan <jingshan@linux.alibaba.com >
2022-07-10 17:09:59 +08:00
Chao Wu
9cee52153b
fmt: do cargo fmt and add a dependency for blk_dev
...
fmt: do cargo fmt and add a dependency for blk_dev
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
2022-07-07 10:32:35 +08:00
Chao Wu
47a4142e0d
fs: change vhostuser and virtio into const
...
change fs mode vhostuser and virtio into const.
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
2022-07-07 10:32:35 +08:00
Chao Wu
e14e98bbeb
cpu_topo: add handle_cpu_topology function
...
add handle_cpu_topology funciton to make it easier to understand the
set_vm_configuration function.
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
2022-07-07 10:32:35 +08:00
Chao Wu
5d3b53ee7b
downtime: add downtime support
...
add downtime support in `resume_all_vcpus_with_downtime`
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
2022-07-07 10:32:35 +08:00
Chao Wu
6a1fe85f10
vfio: add vfio as TODO
...
We add vfio as TODO in this commit and create a github issue for this.
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
2022-07-07 10:32:35 +08:00
Chao Wu
5ea35ddcdc
refractor: remove redundant by_id
...
remove redundant by_id in get_vm_by_id_mut and get_vm_by_id. They are
optimized to get_vm_mut and get_vm.
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
2022-07-07 10:32:35 +08:00
Chao Wu
b646d7cb37
config: remove ht_enabled
...
Since cpu topology could tell whether hyper thread is enabled or not, we
removed ht_enabled config from VmConfigInfo
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
2022-07-07 10:32:35 +08:00
Chao Wu
cb54ac6c6e
memory: remove reserve_memory_bytes
...
This is currently an unsupported feature and we will remove it from the
current code.
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
2022-07-07 10:32:35 +08:00
Chao Wu
bde6609b93
hotplug: add room for other hotplug solution
...
Add room in the code for other hotplug solution without upcall
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
2022-07-07 10:32:35 +08:00
wllenyj
d88b1bf01c
dragonball: update vsock dependency
...
1. fix vsock device init failed
2. fix VsockDeviceConfigInfo not found
Signed-off-by: wllenyj <wllenyj@linux.alibaba.com >
2022-07-07 10:32:35 +08:00
Chao Wu
dd003ebe0e
Dragonball: change error name and fix compile error
...
Change error name from `StartMicrovm` to `StartMicroVm`,
`StartMicrovmError` to `StartMicroVmError`.
Besides, we fix a compile error in config_manager.
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
2022-07-07 10:32:35 +08:00
Chao Wu
38957fe00b
UT: fix compile error in unit tests
...
fix compile error in unit tests for DummyConfigInfo.
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
2022-07-07 10:32:35 +08:00
wllenyj
11b3f95140
dragonball: add virtio-fs device support
...
Virtio-fs devices are supported.
Fixes : #4257
Signed-off-by: wllenyj <wllenyj@linux.alibaba.com >
2022-07-07 10:32:35 +08:00
wllenyj
948381bdbe
dragonball: add virtio-net device support
...
Virtio-net devices are supported.
Signed-off-by: wllenyj <wllenyj@linux.alibaba.com >
2022-07-07 10:32:35 +08:00
wllenyj
3d20387a25
dragonball: add virtio-blk device support
...
Virtio-blk devices are supported.
Signed-off-by: wllenyj <wllenyj@linux.alibaba.com >
2022-07-07 10:32:35 +08:00
Chao Wu
87d38ae49f
Doc: add document for Dragonball API
...
add detailed explanation for Dragonball API
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
2022-07-07 10:32:26 +08:00
wllenyj
090de2dae2
dragonball: fix the clippy errors.
...
fix clippy errors and do fmt in this PR.
Signed-off-by: wllenyj <wllenyj@linux.alibaba.com >
2022-07-06 11:29:49 +08:00
wllenyj
a1593322bd
dragonball: add vsock api to api server
...
Enables vsock to use the api for device configuration.
Signed-off-by: wllenyj <wllenyj@linux.alibaba.com >
2022-07-06 11:29:49 +08:00
wllenyj
89b9ba8603
dragonball: add set_vm_configuration api
...
Set virtual machine configuration configurations.
Signed-off-by: wllenyj <wllenyj@linux.alibaba.com >
2022-07-06 11:29:49 +08:00
wllenyj
95fa0c70c3
dragonball: add start microvm support
...
We add microvm start related support in thie pull request.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com >
Signed-off-by: wllenyj <wllenyj@linux.alibaba.com >
Signed-off-by: jingshan <jingshan@linux.alibaba.com >
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
2022-07-06 11:29:49 +08:00
wllenyj
5c1ccc376b
dragonball: add Vmm struct
...
The Vmm struct is global coordinator to manage API servers, virtual
machines etc.
Signed-off-by: wllenyj <wllenyj@linux.alibaba.com >
2022-07-06 11:29:49 +08:00
Jiang Liu
4d234f5742
dragonball: refactor code layout
...
Refactored some code layout.
Signed-off-by: Jiang Liu <gerry@linux.alibaba.com >
2022-07-06 11:29:49 +08:00
wllenyj
cfd5dae47c
dragonball: add vm struct
...
The vm struct to manage resources and control states of an virtual
machine instance.
Signed-off-by: wllenyj <wllenyj@linux.alibaba.com >
Signed-off-by: jingshan <jingshan@linux.alibaba.com >
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com >
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
2022-07-06 11:29:46 +08:00
wllenyj
527b73a8e5
dragonball: remove unused feature in AddressSpaceMgr
...
log_dirty_pages is useless now and will be redesigned to support live
migration in the future.
Signed-off-by: wllenyj <wllenyj@linux.alibaba.com >
2022-07-06 11:28:32 +08:00
xuejun-xj
7120afe4ed
dragonball: add vcpu test function for aarch64
...
add create_vcpu() function in vcpu test unit for aarch64
Fixes : #4445
Signed-off-by: xuejun-xj <jiyunxue@linux.alibaba.com >
Signed-off-by: jingshan <jingshan@linux.alibaba.com >
2022-07-04 15:23:43 +08:00
xuejun-xj
648d285a24
dragonball: add vcpu support for aarch64
...
add configure() function for aarch64 vcpu
Fixes : #4543
Signed-off-by: xuejun-xj <jiyunxue@linux.alibaba.com >
Signed-off-by: jingshan <jingshan@linux.alibaba.com >
2022-07-04 15:23:37 +08:00
xuejun-xj
7dad7c89f3
dragonball: update dbs-xxx dependency
...
change to up-to-date commit ID
Fixes : #4543
Signed-off-by: xuejun-xj <jiyunxue@linux.alibaba.com >
Signed-off-by: jingshan <jingshan@linux.alibaba.com >
2022-07-04 15:23:11 +08:00
Chao Wu
71db2dd5b8
hotplug: add room for future acpi hotplug mechanism
...
In order to support ACPI hotplug in the future with the cooperative work
from the Kata community, we add ACPI feature and dbs-upcall feature to
add room for ACPI hotplug.
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
2022-06-27 21:52:36 +08:00
Zizheng Bian
8bb00a3dc8
dragonball: fix a bug when generating kernel boot args
...
We should refuse to generate boot args when hotplugging, not cold starting.
Signed-off-by: Zizheng Bian <zizheng.bian@linux.alibaba.com >
2022-06-27 18:12:50 +08:00
Chao Wu
2aedd4d12a
doc: add document for vCPU, api and device
...
Create the document for vCPU and api.
Add some detail in the device document.
Fixes : #4257
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
2022-06-27 18:12:50 +08:00
wllenyj
bec22ad01f
dragonball: add api module
...
It is used to define the vmm communication interface.
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
Signed-off-by: wllenyj <wllenyj@linux.alibaba.com >
2022-06-27 18:12:50 +08:00
wllenyj
07f44c3e0a
dragonball: add vcpu manager
...
Manage vcpu related operations.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com >
Signed-off-by: jingshan <jingshan@linux.alibaba.com >
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
Signed-off-by: wllenyj <wllenyj@linux.alibaba.com >
2022-06-27 18:12:48 +08:00
wllenyj
78c9718752
dragonball: add upcall support
...
Upcall is a direct communication tool between VMM and guest developed
upon vsock. It is used to implement device hotplug.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com >
Signed-off-by: jingshan <jingshan@linux.alibaba.com >
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
Signed-off-by: wllenyj <wllenyj@linux.alibaba.com >
Signed-off-by: Zizheng Bian <zizheng.bian@linux.alibaba.com >
2022-06-27 17:04:47 +08:00
wllenyj
7d1953b52e
dragonball: add vcpu
...
Virtual CPU manager for virtual machines.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com >
Signed-off-by: jingshan <jingshan@linux.alibaba.com >
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
Signed-off-by: wllenyj <wllenyj@linux.alibaba.com >
2022-06-27 17:04:42 +08:00
wllenyj
468c73b3cb
dragonball: add kvm context
...
KVM operation context for virtual machines.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com >
Signed-off-by: jingshan <jingshan@linux.alibaba.com >
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
Signed-off-by: wllenyj <wllenyj@linux.alibaba.com >
2022-06-27 16:02:06 +08:00
wllenyj
e89e6507a4
dragonball: add signal handler
...
Used to register dragonball's signal handler.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com >
Signed-off-by: jingshan <jingshan@linux.alibaba.com >
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
Signed-off-by: wllenyj <wllenyj@linux.alibaba.com >
2022-06-16 17:31:58 +08:00
wllenyj
b6cb2c4ae3
dragonball: add metrics system
...
metrics system is added for collecting Dragonball metrics to analyze the
system.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com >
Signed-off-by: jingshan <jingshan@linux.alibaba.com >
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
Signed-off-by: wllenyj <wllenyj@linux.alibaba.com >
2022-06-13 13:51:51 +08:00
wllenyj
e80e0c4645
dragonball: add io manager wrapper
...
Wrapper over IoManager to support device hotplug.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com >
Signed-off-by: jingshan <jingshan@linux.alibaba.com >
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
Signed-off-by: wllenyj <wllenyj@linux.alibaba.com >
2022-06-13 13:51:46 +08:00
Chao Wu
93c10dfd86
runtime-rs: add crosvm license in Dragonball
...
add THIRD-PARTY file to add license for crosvm.
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com >
2022-06-11 17:24:58 +08:00
wllenyj
39ff85d610
dragonball: green ci
...
Revert this patch, after dragonball-sandbox is ready. And all
subsequent implementations are submitted.
Fixes : #4257
Signed-off-by: wllenyj <wllenyj@linux.alibaba.com >
2022-06-11 17:24:17 +08:00