US 12,217,080 B1
Physical memory management for virtual machines
Alexey Koryakin, Moscow (RU); and Nikolay Dobrovolskiy, Moscow (RU)
Assigned to Parallels International GmbH, Schaffhausen (CH)
Filed by PARALLELS INTERNATIONAL GMBH, Schaffhausen (CH)
Filed on Feb. 28, 2024, as Appl. No. 18/590,447.
Application 18/590,447 is a continuation of application No. 18/190,409, filed on Mar. 27, 2023, granted, now 11,934,862.
Application 18/190,409 is a continuation of application No. 17/342,927, filed on Jun. 9, 2021, granted, now 11,625,262, issued on Apr. 11, 2023.
Application 17/342,927 is a continuation of application No. 16/553,411, filed on Aug. 28, 2019, granted, now 11,113,094, issued on Sep. 7, 2019.
This patent is subject to a terminal disclaimer.
Int. Cl. G06F 9/455 (2018.01); G06F 9/38 (2018.01); G06F 9/48 (2006.01)
CPC G06F 9/45558 (2013.01) [G06F 9/3836 (2013.01); G06F 9/4843 (2013.01); G06F 2009/45575 (2013.01); G06F 2009/45583 (2013.01)] 6 Claims
OG exemplary drawing
 
1. A method comprising:
providing a computer system comprising one or more processors executing a host operating system (OS) and supporting a plurality of plurality of guest OS processes within a virtualization environment; wherein the one or more processors are configured to:
determine whether a current process step of a first guest OS process of the
plurality of guest OS processes has an associated timing which exceeds a predetermined period of time;
upon a positive determination that the current process step timing exceeds the predetermined period of time triggering a rescheduling routine for the first OS process of the plurality of guest OS processes and an asynchronous shift to a second guest OS process of the plurality of guest OS processes;
determining whether an indication is received with respect to completion of the current process step of first OS process of the plurality of guest OS processes;
upon a positive determination that the indication was received with respect to completion of the current process step of first OS process of the plurality of guest OS processes:
establishing an interrupt on the second guest OS process of the plurality of guest OS processes; and
resuming execution of the first OS process of the plurality of guest OS processes;
upon a negative determination that the current process step timing exceeds the predetermined period of time:
executing the current process step of the first guest OS process of the plurality of guest OS processes; and
determining whether an indication of a first fault relating to an instruction of the current process step or a subsequent process step is raised by the first guest OS process of the plurality of guest OS processes; and
upon a positive determination of the first fault executing a sub-process; and
the sub-process comprises the steps of:
communicating the indication of the first fault to a virtual machine monitor (VMM) in execution upon the one or more processors;
handling the first fault with a virtualization event loop forming part of the VMM;
initiating an asynchronous memory allocation request to a host operating system (OS) from the virtualization event loop;
generating a synthetic guest interrupt with the virtualization event loop;
restarting the instruction of the first guest OS process of the plurality of guest OS processes with either a pending guest hardware interrupt or an emulated switch to a synthetic hardware interrupt handler in accordance with a set of guest emulation rules associated with the first computer system;
injecting a synthetic hardware interrupt into a guest interrupt descriptor table forming part of the first memory;
executing a guest operating system kernel which:
handles with a synthetic interrupt handler the synthetic hardware interrupt;
establishes a scheduling operation;
transmits a request to a further non-transitory storage memory storing data a request for a page of data; and
interrupts the first process of the plurality of processes;
switches execution from the first process of the plurality of processes to a second process of the plurality of processes; and
receives a hardware interrupt from the further non-transitory storage memory;
adding allocated memory established in dependence by the host OS in dependence upon the memory allocation request to a virtual machine working set forming part of the VMM;
mapping that portion of the virtual machine working set related to the allocated memory to a set of cache tables forming part of the VMM; and
restarting the first process of the plurality of processes based upon rescheduling established by the scheduling operation.