vmm: simplify seccomp code

Only Thread::Vmm and Thread::Vcpu need to know the hypervisor type.
Make the type optional, and then simplify the users.

Assisted-by: Pi-agent:Claude-Opus-4.7
Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu
2026-05-14 22:17:04 +00:00
parent 59b72c51c2
commit 73146be06b
8 changed files with 19 additions and 39 deletions

View File

@@ -1172,7 +1172,7 @@ impl CpuManager {
let vcpu_seccomp_filter = get_seccomp_filter(
&self.seccomp_action,
Thread::Vcpu,
self.hypervisor.hypervisor_type(),
Some(self.hypervisor.hypervisor_type()),
)
.map_err(Error::CreateSeccompFilter)?;