[package]
name = "axvm"
authors = ["aarkegz <aarkegz@gmail.com>"]
version = "0.5.20"
edition.workspace = true
categories = ["virtualization", "no-std"]
description = "Virtual Machine resource management crate for ArceOS's hypervisor variant."
repository = "https://github.com/arceos-hypervisor/axvm"
keywords = ["vm", "hypervisor", "arceos"]
license = "Apache-2.0"

[features]
default = ["vmx"]
fs = ["vmx", "ax-std/fs"]
host-fs = ["ax-std/fs"]
vmx = ["x86_vcpu/vmx"]
svm = ["x86_vcpu/svm"]
sstc = ["riscv_vcpu/sstc"]

[dependencies]
log = "0.4"
cfg-if = "1.0"
extern-trait = "0.4"
bit_field = "0.10"
bitflags = "2.9"
byte-unit = { version = "5", default-features = false, features = ["byte"] }
numeric-enum-macro = "0.2"
spin = { workspace = true }

# System independent crates provided by ArceOS.
ax-errno = { workspace = true }
ax-cpumask = { workspace = true }
ax-crate-interface = { workspace = true }
ax-kernel-guard = { workspace = true }
ax-kspin.workspace = true
ax-lazyinit = { workspace = true }
ax-memory-addr = { workspace = true }
ax-memory-set = { workspace = true }
ax-percpu = { workspace = true, features = ["arm-el2"] }
page-table-generic = { workspace = true }
ax-std = { workspace = true, features = [
    "paging",
    "irq",
    "multitask",
    "task-ext",
    "smp",
    "hv",
    "wake-ipi",
] }
ax-hal = { workspace = true, features = ["ipi"] }
ax-timer-list = { workspace = true }
irq-framework = { workspace = true }
# System dependent modules provided by ArceOS-Hypervisor.
axaddrspace = { workspace = true }
axvm-types = { workspace = true }
axhvc = { workspace = true }
axdevice = { workspace = true }
axdevice_base = { workspace = true }
axvmconfig = { workspace = true, default-features = false }
fdt-edit = { workspace = true }
fdt-raw = { workspace = true }
hashbrown = "0.14"
[target.'cfg(target_arch = "x86_64")'.dependencies]
x86 = "0.52"
x86_vcpu = { workspace = true }
x86_vlapic = { workspace = true }
[target.'cfg(target_arch = "riscv64")'.dependencies]
riscv_vcpu = { workspace = true }
riscv_vplic = { workspace = true }
[target.'cfg(target_arch = "loongarch64")'.dependencies]
ax-driver = { workspace = true }
ax-plat = { workspace = true }
loongarch_vcpu = { workspace = true }
[target.'cfg(target_arch = "aarch64")'.dependencies]
aarch64-cpu-ext = "0.1"
arm_vcpu = { workspace = true }
arm_vgic = { workspace = true, features = ["vgicv3"] }
arm-gic-driver = { workspace = true, features = ["rdif"] }
rdif-intc.workspace = true
rdrive.workspace = true
