A device, comprising a physical processor executing a physical function and a plurality of virtual machines arranged in a hierarchy of nested virtual machines, wherein the plurality of virtual machines execute respective virtual functions that are arranged in a logical nested hierarchy of virtual functions, the logical nested hierarchy comprising at least a first and a second branch, the first and second branches each having a plurality of levels of virtual functions, wherein the first branch comprises a first number of virtual functions and the second branch comprises a second number of different virtual functions, the second number different than the first number;
- wherein the physical function is configured to:
- allocate the first number of virtual functions of the plurality of virtual functions in the first branch to a first supervisory virtual function, the first supervisory virtual function being a root virtual function of the first branch, and wherein the first supervisory virtual function is enabled to grant or deny requests for the first number of virtual functions to process information;
- allocate the second number of virtual functions of the plurality of virtual functions in the second branch to a second supervisory virtual function, the second supervisory virtual function being a root virtual function of the second branch, wherein the second supervisory virtual function differs from the first supervisory virtual function, and wherein the second supervisory virtual function is enabled to grant or deny requests for the second number of virtual functions to process information;
- receive, from a particular virtual function at a particular level of the logical nested hierarchy, a request to process information using a target virtual function in a lower level of the logical nested hierarchy, wherein the target virtual function is a descendent of the particular virtual function in the logical nested hierarchy;
- in response to the request, and based on a determination that the particular virtual function is one of the second number of virtual functions, identifying the second supervisory virtual function as a supervisory virtual function of the particular virtual function;
- in response to identifying the second supervisory virtual function as the supervisory virtual function for the particular virtual function, and until a response to the request is received by the physical function from the target virtual function, and given an initial current level of nesting immediately below the particular level of the logical nested hierarchy, iteratively:
- providing, by the physical function, the request to each virtual function at the current level of nesting and, denying, by the second supervisory virtual function, the request until the request is provided to the target virtual function;
- when the request has been denied for each virtual function at the current level of nesting, setting by the physical function, a level in the logical nested hierarchy immediately below the current level of nesting as the current level of nesting;
- and
- when the request is provided to the target virtual function, granting, by the second supervisory virtual function, the request, and returning a response to the physical function, wherein the response is generated by processing the information by the target virtual function;
- after the response to the request is received by the physical function, the physical function setting a level immediately above the current level of nesting as the current level of nesting, and until the response is provided by the physical function to the particular virtual function, iteratively:
- providing, by the physical function, the response to each virtual function at the current level of nesting and
- by the physical function, a level immediately above the current level of nesting as the current level of nesting until the response is provided to the particular virtual function at the particular level of the logical nested hierarchy.