1. A method comprising: configuring, by a processing device executing a hypervisor, a first VM function component in a memory of the hypervisor for execution on behalf of a virtual machine, the first VM function component to execute a second VM function component, wherein the first VM function component is configured with a read-only view of the memory of the hypervisor; configuring, by the processing device executing the hypervisor, the second VM function component in a memory of the hypervisor to be invoked by the first VM function component, the second VM function component to execute at least one privileged instruction, wherein the at least one privileged instruction operates on and causes a modification of a privileged area of the memory of the hypervisor, and wherein the virtual machine does not have privileges to directly access the second VM function component; receiving, by the hypervisor, a request from the virtual machine to execute the first VM function component; executing, by the processing device executing the hypervisor, the first VM function component on behalf of the virtual machine; receiving, by the hypervisor, a request from the first VM function component to execute the second VM function component; executing, by the processing device executing the hypervisor, the second VM function component; and modifying the privileged area of the memory of the hypervisor based on execution of the at least one privileged instruction executed by the second VM function component.