US 12,248,799 B2
Guest time scaling for a virtual machine in a virtualized computer system
Andrei Warkentin, South Elgin, IL (US); Ye Li, Cambridge, MA (US); Alexander Fainkichen, Southborough, MA (US); Regis Duchesne, Monts-de-Corsier (CH); Cyprien Laplace, Boston, MA (US); Shruthi Muralidhara Hiriyuru, Medford, MA (US); and Sunil Kumar Kotian, San Jose, CA (US)
Assigned to VMware LLC, Palo Alto, CA (US)
Filed by VMware, Inc., Palo Alto, CA (US)
Filed on Dec. 16, 2021, as Appl. No. 17/553,607.
Prior Publication US 2023/0195484 A1, Jun. 22, 2023
Int. Cl. G06F 9/455 (2018.01)
CPC G06F 9/45558 (2013.01) [G06F 2009/45583 (2013.01)] 17 Claims
OG exemplary drawing
 
1. A method of managing guest time for a virtual machine (VM) supported by a hypervisor of a virtualized host computer, the method comprising:
configuring, by the hypervisor, a central processing unit (CPU) of the host computer to trap, to the hypervisor, access by guest code in the VM to a physical counter and timer of the CPU;
configuring, by the hypervisor, the guest code in the VM to use the physical counter and timer of the CPU rather than a virtual counter and timer of the CPU by masking, a device tree presented to the guest code by the hypervisor, presence of the virtual counter and timer in the CPU;
trapping, at the hypervisor, an access to the physical counter and timer by the guest code; and
executing, by the hypervisor, the access to the physical counter and timer on behalf of the guest code while compensating for an adjustment of a system count of the physical counter and timer to maintain the guest time as scaled with respect to frequency of the physical counter and timer.