build: use vfio-ioctls that supports MSHV

Disable default features and propagate hypervisor selection where
necessary.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu 2021-09-02 09:44:08 +00:00 committed by LIU Wei
parent e4abf2ce6c
commit 10b954e954
5 changed files with 13 additions and 5 deletions

4
Cargo.lock generated
View File

@ -1147,12 +1147,14 @@ dependencies = [
[[package]]
name = "vfio-ioctls"
version = "0.1.0"
source = "git+https://github.com/rust-vmm/vfio-ioctls?branch=main#1080e8079976a44fd80311907cadd541a062b4bc"
source = "git+https://github.com/rust-vmm/vfio-ioctls?branch=main#a8ee64b978ccd000df88732814d626651a091891"
dependencies = [
"byteorder",
"kvm-bindings",
"kvm-ioctls",
"log",
"mshv-bindings",
"mshv-ioctls",
"vfio-bindings",
"vm-memory",
"vmm-sys-util",

2
fuzz/Cargo.lock generated
View File

@ -699,7 +699,7 @@ dependencies = [
[[package]]
name = "vfio-ioctls"
version = "0.1.0"
source = "git+https://github.com/rust-vmm/vfio-ioctls?branch=main#1080e8079976a44fd80311907cadd541a062b4bc"
source = "git+https://github.com/rust-vmm/vfio-ioctls?branch=main#a8ee64b978ccd000df88732814d626651a091891"
dependencies = [
"byteorder",
"kvm-bindings",

View File

@ -4,11 +4,16 @@ version = "0.1.0"
authors = ["Samuel Ortiz <sameo@linux.intel.com>"]
edition = "2018"
[features]
default = []
kvm = ["vfio-ioctls/kvm"]
mshv = ["vfio-ioctls/mshv"]
[dependencies]
anyhow = "1.0.43"
byteorder = "1.4.3"
hypervisor = { path = "../hypervisor" }
vfio-ioctls = { git = "https://github.com/rust-vmm/vfio-ioctls", branch = "main" }
vfio-ioctls = { git = "https://github.com/rust-vmm/vfio-ioctls", branch = "main", default-features = false }
vfio_user = { path = "../vfio_user" }
vmm-sys-util = "0.8.0"
libc = "0.2.101"

View File

@ -7,6 +7,7 @@ edition = "2018"
[features]
default = []
kvm = ["vfio-ioctls/kvm"]
mshv = ["vfio-ioctls/mshv"]
[dependencies]
anyhow = "1.0.43"

View File

@ -9,8 +9,8 @@ default = []
acpi = ["acpi_tables","devices/acpi", "arch/acpi"]
cmos = ["devices/cmos"]
fwdebug = ["devices/fwdebug"]
kvm = ["hypervisor/kvm", "vfio-ioctls/kvm", "vm-device/kvm"]
mshv = ["hypervisor/mshv", "virtio-devices/mshv"]
kvm = ["hypervisor/kvm", "vfio-ioctls/kvm", "vm-device/kvm", "pci/kvm"]
mshv = ["hypervisor/mshv", "virtio-devices/mshv", "vfio-ioctls/mshv", "vm-device/mshv", "pci/mshv"]
io_uring = ["virtio-devices/io_uring"]
tdx = ["arch/tdx", "hypervisor/tdx"]