1 IMPLEMENTATION [vmx && svm]:
10 template< typename VM >
12 Vm_factory::allocate(Ram_quota *quota)
14 if (void *t = Vm::allocator<VM>()->q_alloc(quota))
16 VM *a = new (t) VM(quota);
28 Vm_factory::create(Ram_quota *quota, int *err)
30 *err = -L4_err::ENomem;
31 if (Svm::cpus.cpu(current_cpu()).svm_enabled())
32 return allocate<Vm_svm>(quota);
33 if (Vmx::cpus.cpu(current_cpu()).vmx_enabled())
34 return allocate<Vm_vmx>(quota);
36 *err = L4_err::ENodev;