dragonball: Setup workspace

Setup workspace in dragonball, move `dbs` crates one level up to be
managed as members of dragonball workspace.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
This commit is contained in:
Ruoqing He 2025-02-13 13:51:40 +08:00
parent a174e2be03
commit b129972e12
206 changed files with 111 additions and 56 deletions

View File

@ -1,6 +1,6 @@
# This file is automatically @generated by Cargo. # This file is automatically @generated by Cargo.
# It is not intended for manual editing. # It is not intended for manual editing.
version = 3 version = 4
[[package]] [[package]]
name = "addr2line" name = "addr2line"
@ -265,6 +265,13 @@ dependencies = [
"typenum", "typenum",
] ]
[[package]]
name = "dbs-acpi"
version = "0.1.0"
dependencies = [
"vm-memory 0.9.0",
]
[[package]] [[package]]
name = "dbs-address-space" name = "dbs-address-space"
version = "0.3.0" version = "0.3.0"
@ -274,7 +281,7 @@ dependencies = [
"libc", "libc",
"nix 0.23.2", "nix 0.23.2",
"thiserror", "thiserror",
"vm-memory", "vm-memory 0.10.0",
"vmm-sys-util", "vmm-sys-util",
] ]
@ -294,7 +301,7 @@ dependencies = [
"libc", "libc",
"memoffset", "memoffset",
"thiserror", "thiserror",
"vm-memory", "vm-memory 0.10.0",
"vmm-sys-util", "vmm-sys-util",
] ]
@ -303,13 +310,15 @@ name = "dbs-boot"
version = "0.4.0" version = "0.4.0"
dependencies = [ dependencies = [
"dbs-arch", "dbs-arch",
"dbs-device",
"device_tree",
"kvm-bindings", "kvm-bindings",
"kvm-ioctls", "kvm-ioctls",
"lazy_static", "lazy_static",
"libc", "libc",
"thiserror", "thiserror",
"vm-fdt", "vm-fdt",
"vm-memory", "vm-memory 0.10.0",
] ]
[[package]] [[package]]
@ -350,6 +359,7 @@ version = "0.1.0"
dependencies = [ dependencies = [
"byteorder", "byteorder",
"dbs-allocator", "dbs-allocator",
"dbs-arch",
"dbs-boot", "dbs-boot",
"dbs-device", "dbs-device",
"dbs-interrupt", "dbs-interrupt",
@ -361,7 +371,17 @@ dependencies = [
"thiserror", "thiserror",
"vfio-bindings", "vfio-bindings",
"vfio-ioctls", "vfio-ioctls",
"vm-memory", "vm-memory 0.10.0",
]
[[package]]
name = "dbs-tdx"
version = "0.1.0"
dependencies = [
"kvm-bindings",
"serde_json",
"thiserror",
"vmm-sys-util",
] ]
[[package]] [[package]]
@ -385,6 +405,7 @@ dependencies = [
"libc", "libc",
"log", "log",
"serde", "serde",
"serde_json",
"thiserror", "thiserror",
"timerfd", "timerfd",
"vmm-sys-util", "vmm-sys-util",
@ -422,7 +443,7 @@ dependencies = [
"vhost", "vhost",
"virtio-bindings", "virtio-bindings",
"virtio-queue", "virtio-queue",
"vm-memory", "vm-memory 0.10.0",
"vmm-sys-util", "vmm-sys-util",
] ]
@ -446,6 +467,12 @@ dependencies = [
"syn 1.0.109", "syn 1.0.109",
] ]
[[package]]
name = "device_tree"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f18f717c5c7c2e3483feb64cccebd077245ad6d19007c2db0fd341d38595353c"
[[package]] [[package]]
name = "digest" name = "digest"
version = "0.10.7" version = "0.10.7"
@ -528,7 +555,7 @@ dependencies = [
"vfio-bindings", "vfio-bindings",
"vfio-ioctls", "vfio-ioctls",
"virtio-queue", "virtio-queue",
"vm-memory", "vm-memory 0.10.0",
"vmm-sys-util", "vmm-sys-util",
] ]
@ -657,7 +684,7 @@ dependencies = [
"mio", "mio",
"nix 0.24.3", "nix 0.24.3",
"virtio-queue", "virtio-queue",
"vm-memory", "vm-memory 0.10.0",
"vmm-sys-util", "vmm-sys-util",
] ]
@ -1007,7 +1034,7 @@ version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9259ddbfbb52cc918f6bbc60390004ddd0228cf1d85f402009ff2b3d95de83f" checksum = "b9259ddbfbb52cc918f6bbc60390004ddd0228cf1d85f402009ff2b3d95de83f"
dependencies = [ dependencies = [
"vm-memory", "vm-memory 0.10.0",
] ]
[[package]] [[package]]
@ -1215,7 +1242,7 @@ dependencies = [
"nydus-utils", "nydus-utils",
"serde", "serde",
"serde_json", "serde_json",
"vm-memory", "vm-memory 0.10.0",
] ]
[[package]] [[package]]
@ -1244,7 +1271,7 @@ dependencies = [
"tar", "tar",
"tokio", "tokio",
"url", "url",
"vm-memory", "vm-memory 0.10.0",
] ]
[[package]] [[package]]
@ -2141,7 +2168,7 @@ dependencies = [
"log", "log",
"thiserror", "thiserror",
"vfio-bindings", "vfio-bindings",
"vm-memory", "vm-memory 0.10.0",
"vmm-sys-util", "vmm-sys-util",
] ]
@ -2153,7 +2180,7 @@ checksum = "a6769e8dbf5276b4376439fbf36bb880d203bf614bf7ef444198edc24b5a9f35"
dependencies = [ dependencies = [
"bitflags 1.3.2", "bitflags 1.3.2",
"libc", "libc",
"vm-memory", "vm-memory 0.10.0",
"vmm-sys-util", "vmm-sys-util",
] ]
@ -2171,7 +2198,7 @@ checksum = "3ba81e2bcc21c0d2fc5e6683e79367e26ad219197423a498df801d79d5ba77bd"
dependencies = [ dependencies = [
"log", "log",
"virtio-bindings", "virtio-bindings",
"vm-memory", "vm-memory 0.10.0",
"vmm-sys-util", "vmm-sys-util",
] ]
@ -2181,6 +2208,16 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f43fb5a6bd1a7d423ad72802801036719b7546cf847a103f8fe4575f5b0d45a6" checksum = "f43fb5a6bd1a7d423ad72802801036719b7546cf847a103f8fe4575f5b0d45a6"
[[package]]
name = "vm-memory"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "583f213899e8a5eea23d9c507252d4bed5bc88f0ecbe0783262f80034630744b"
dependencies = [
"libc",
"winapi",
]
[[package]] [[package]]
name = "vm-memory" name = "vm-memory"
version = "0.10.0" version = "0.10.0"

View File

@ -9,23 +9,41 @@ repository = "https://github.com/kata-containers/kata-containers.git"
license = "Apache-2.0" license = "Apache-2.0"
edition = "2018" edition = "2018"
[workspace]
members = [
"dbs_acpi",
"dbs_address_space",
"dbs_allocator",
"dbs_arch",
"dbs_boot",
"dbs_device",
"dbs_interrupt",
"dbs_legacy_devices",
"dbs_pci",
"dbs_tdx",
"dbs_upcall",
"dbs_utils",
"dbs_virtio_devices",
]
resolver = "2"
[dependencies] [dependencies]
anyhow = "1.0.32" anyhow = "1.0.32"
arc-swap = "1.5.0" arc-swap = "1.5.0"
bytes = "1.1.0" bytes = "1.1.0"
dbs-address-space = { path = "./src/dbs_address_space" } dbs-address-space = { path = "dbs_address_space" }
dbs-allocator = { path = "./src/dbs_allocator" } dbs-allocator = { path = "dbs_allocator" }
dbs-arch = { path = "./src/dbs_arch" } dbs-arch = { path = "dbs_arch" }
dbs-boot = { path = "./src/dbs_boot" } dbs-boot = { path = "dbs_boot" }
dbs-device = { path = "./src/dbs_device" } dbs-device = { path = "dbs_device" }
dbs-interrupt = { path = "./src/dbs_interrupt", features = ["kvm-irq"] } dbs-interrupt = { path = "dbs_interrupt", features = ["kvm-irq"] }
dbs-legacy-devices = { path = "./src/dbs_legacy_devices" } dbs-legacy-devices = { path = "dbs_legacy_devices" }
dbs-upcall = { path = "./src/dbs_upcall", optional = true } dbs-upcall = { path = "dbs_upcall", optional = true }
dbs-utils = { path = "./src/dbs_utils" } dbs-utils = { path = "dbs_utils" }
dbs-virtio-devices = { path = "./src/dbs_virtio_devices", optional = true, features = [ dbs-virtio-devices = { path = "dbs_virtio_devices", optional = true, features = [
"virtio-mmio", "virtio-mmio",
] } ] }
dbs-pci = { path = "./src/dbs_pci", optional = true } dbs-pci = { path = "dbs_pci", optional = true }
derivative = "2.2.0" derivative = "2.2.0"
kvm-bindings = "0.6.0" kvm-bindings = "0.6.0"
kvm-ioctls = "0.12.0" kvm-ioctls = "0.12.0"

View File

@ -35,7 +35,7 @@ vendor:
format: format:
@echo "INFO: rust fmt..." @echo "INFO: rust fmt..."
# This is kinda dirty step here simply because cargo fmt --all will apply fmt to all dependencies of dragonball which will include /src/libs/protocols with some file generated during compilation time and could not be formatted when you use cargo fmt --all before building the whole project. In order to avoid this problem, we do fmt check in this following way. # This is kinda dirty step here simply because cargo fmt --all will apply fmt to all dependencies of dragonball which will include /src/libs/protocols with some file generated during compilation time and could not be formatted when you use cargo fmt --all before building the whole project. In order to avoid this problem, we do fmt check in this following way.
rustfmt --edition 2018 ./src/dbs_address_space/src/lib.rs ./src/dbs_allocator/src/lib.rs ./src/dbs_arch/src/lib.rs ./src/dbs_boot/src/lib.rs ./src/dbs_device/src/lib.rs ./src/dbs_interrupt/src/lib.rs ./src/dbs_legacy_devices/src/lib.rs ./src/dbs_pci/src/lib.rs ./src/dbs_upcall/src/lib.rs ./src/dbs_utils/src/lib.rs ./src/dbs_virtio_devices/src/lib.rs ./src/lib.rs --check rustfmt --edition 2018 ./dbs_address_space/src/lib.rs ./dbs_allocator/src/lib.rs ./dbs_arch/src/lib.rs ./dbs_boot/src/lib.rs ./dbs_device/src/lib.rs ./dbs_interrupt/src/lib.rs ./dbs_legacy_devices/src/lib.rs ./dbs_pci/src/lib.rs ./dbs_upcall/src/lib.rs ./dbs_utils/src/lib.rs ./dbs_virtio_devices/src/lib.rs ./src/lib.rs --check
clean: clean:
cargo clean cargo clean

View File

@ -20,19 +20,19 @@ and configuration process.
- vCPU: [vCPU Document](docs/vcpu.md) - vCPU: [vCPU Document](docs/vcpu.md)
- API: [API Document](docs/api.md) - API: [API Document](docs/api.md)
- `Upcall`: [`Upcall` Document](docs/upcall.md) - `Upcall`: [`Upcall` Document](docs/upcall.md)
- `dbs_acpi`: [`dbs_acpi` Document](src/dbs_acpi/README.md) - `dbs_acpi`: [`dbs_acpi` Document](dbs_acpi/README.md)
- `dbs_address_space`: [`dbs_address_space` Document](src/dbs_address_space/README.md) - `dbs_address_space`: [`dbs_address_space` Document](dbs_address_space/README.md)
- `dbs_allocator`: [`dbs_allocator` Document](src/dbs_allocator/README.md) - `dbs_allocator`: [`dbs_allocator` Document](dbs_allocator/README.md)
- `dbs_arch`: [`dbs_arch` Document](src/dbs_arch/README.md) - `dbs_arch`: [`dbs_arch` Document](dbs_arch/README.md)
- `dbs_boot`: [`dbs_boot` Document](src/dbs_boot/README.md) - `dbs_boot`: [`dbs_boot` Document](dbs_boot/README.md)
- `dbs_device`: [`dbs_device` Document](src/dbs_device/README.md) - `dbs_device`: [`dbs_device` Document](dbs_device/README.md)
- `dbs_interrupt`: [`dbs_interrput` Document](src/dbs_interrupt/README.md) - `dbs_interrupt`: [`dbs_interrput` Document](dbs_interrupt/README.md)
- `dbs_legacy_devices`: [`dbs_legacy_devices` Document](src/dbs_legacy_devices/README.md) - `dbs_legacy_devices`: [`dbs_legacy_devices` Document](dbs_legacy_devices/README.md)
- `dbs_tdx`: [`dbs_tdx` Document](src/dbs_tdx/README.md) - `dbs_tdx`: [`dbs_tdx` Document](dbs_tdx/README.md)
- `dbs_upcall`: [`dbs_upcall` Document](src/dbs_upcall/README.md) - `dbs_upcall`: [`dbs_upcall` Document](dbs_upcall/README.md)
- `dbs_utils`: [`dbs_utils` Document](src/dbs_utils/README.md) - `dbs_utils`: [`dbs_utils` Document](dbs_utils/README.md)
- `dbs_virtio_devices`: [`dbs_virtio_devices` Document](src/dbs_virtio_devices/README.md) - `dbs_virtio_devices`: [`dbs_virtio_devices` Document](dbs_virtio_devices/README.md)
- `dbs_pci`: [`dbc_pci` Document](src/dbs_pci/README.md) - `dbs_pci`: [`dbc_pci` Document](dbs_pci/README.md)
Currently, the documents are still actively adding. Currently, the documents are still actively adding.
You could see the [official documentation](docs/) page for more details. You could see the [official documentation](docs/) page for more details.

View File

@ -0,0 +1 @@
../LICENSE

View File

@ -0,0 +1 @@
../LICENSE

View File

@ -0,0 +1 @@
../LICENSE

View File

@ -0,0 +1 @@
../THIRD-PARTY

View File

@ -0,0 +1 @@
../LICENSE

View File

@ -0,0 +1 @@
../THIRD-PARTY

View File

@ -0,0 +1 @@
../LICENSE

View File

@ -0,0 +1 @@
../LICENSE

View File

@ -0,0 +1 @@
../LICENSE

View File

@ -0,0 +1 @@
../THIRD-PARTY

Some files were not shown because too many files have changed in this diff Show More