From 75931cd608941fc8970c23308046e1c99fa3f7f1 Mon Sep 17 00:00:00 2001 From: Yi-De Wu Date: Fri, 31 Mar 2023 11:45:00 +0800 Subject: [PATCH] geniezone: Require static swiotlb allocation Bug: 278959491 Test: tools/presubmit --all Signed-off-by: Jerry Wang Signed-off-by: Yi-De Wu Change-Id: Ic8f19783dca1da8771c0500a56de3eaae73fb710 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4413736 Reviewed-by: Daniel Verkamp Reviewed-by: Frederick Mayle --- hypervisor/src/geniezone/mod.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hypervisor/src/geniezone/mod.rs b/hypervisor/src/geniezone/mod.rs index 66b854937f..25b577014a 100644 --- a/hypervisor/src/geniezone/mod.rs +++ b/hypervisor/src/geniezone/mod.rs @@ -574,10 +574,14 @@ impl Hypervisor for Geniezone { } fn check_capability(&self, cap: HypervisorCap) -> bool { - matches!( - cap, - HypervisorCap::UserMemory | HypervisorCap::ImmediateExit - ) + match cap { + HypervisorCap::UserMemory => true, + HypervisorCap::ArmPmuV3 => false, + HypervisorCap::ImmediateExit => true, + HypervisorCap::StaticSwiotlbAllocationRequired => true, + HypervisorCap::HypervisorInitializedBootContext => false, + HypervisorCap::S390UserSigp | HypervisorCap::TscDeadlineTimer => false, + } } }