IP Library Granted Patent US 12,461,771
Granted Patent B2
US 12,461,771 · App. 18/331,514 · Granted Nov 4, 2025

Hypercall acceleration for nested virtual machines

Inventors: Michael Tsirkin (Yokneam Illit, IL); Karen Noel (Pembroke, NH)
Assignee: Red Hat, Inc.
G06F9/45558G06F2009/45583
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,461,771
App. No.
18/331,514
Granted
Nov 4, 2025
Kind
B2
Abstract

Systems and methods for accelerating hypercalls for nested virtual machines. An example method comprises: executing, by a host computer system, a Level 0 hypervisor managing a Level 1 virtual machine (VM); receiving, by a Level 1 hypervisor managing a Level 2 VM, a first function component from a Level 2 hypervisor managing a Level 3 VM, wherein the first function component performs a first functionality associated with a hypercall issued by the Level 3 VM; generating, by the Level 1 hypervisor, a second function component that performs a second functionality associated with the hypercall issued by the Level 2 VM; and responsive to detecting the hypercall issued by the Level 3 VM, causing the Level 0 hypervisor to execute at least one of: the first function component or the second function component.

Claims (50)

1 . A method comprising:

executing, by a host computer system, a Level 0 hypervisor managing a Level 1 virtual machine (VM);

receiving, by a Level 1 hypervisor managing a Level 2 VM, a first function component from a Level 2 hypervisor managing a Level 3 VM, wherein the first function component performs a first functionality associated with a hypercall issued by the Level 3 VM, wherein the first function component performs a first modification of a context of the Level 2 VM;

generating, by the Level 1 hypervisor, a second function component that performs a second functionality associated with the hypercall issued by the Level 3 VM; and

responsive to detecting the hypercall issued by the Level 3 VM, causing the Level 0 hypervisor to

directly perform, without transferring control away from the Level 0 hypervisor and using the first function component and the second function component, the first modification of the context of the Level 2 VM.

2 . The method of claim 1 , further comprising:

determining, by the Level 0 hypervisor, a completion status of the first function component; and

returning control to the Level 2 hypervisor in view of the completion status.

3 . The method of claim 1 , wherein directly performing the first modification of the context of the Level 2 VM comprises:

determining, by the Level 0 hypervisor, a completion status of the first function component; and

executing, by the Level 0 hypervisor, the second function component in view of the completion status, the second function component to modify the context of the Level 2 VM.

4 . The method of claim 3 , further comprising:

determining, by the Level 0 hypervisor, a second completion status of the second function component; and

returning control to the Level 2 hypervisor in view of the second completion status.

5 . The method of claim 1 , wherein the second functionality is implemented by a second set of instructions that translates the first modification of the context of the Level 2 VM into a second modification of a context of the Level 1 VM.

6 . The method of claim 1 , wherein the first function component is generated by the Level 2 hypervisor based on instructions received from the Level 3 VM.

7 . The method of claim 1 , wherein the second function component is generated by the Level 1 hypervisor based on instructions received from the Level 2 VM.

8 . A system comprising:

a memory; and

a processing device, operatively coupled to the memory, the processing device configured to:

execute a Level 0 hypervisor managing a Level 1 virtual machine (VM);

receive, by a Level 1 hypervisor managing a Level 2 VM, a first function component from a Level 2 hypervisor managing a Level 3 VM, wherein the first function component performs a first functionality associated with a hypercall issued by the Level 3 VM, wherein the first function component performs a first modification of a context of the Level 2 VM;

generate, by the Level 1 hypervisor, a second function component that performs a second functionality associated with the hypercall issued by the Level 3 VM; and

responsive to detecting the hypercall issued by the Level 3 VM, cause the Level 0 hypervisor to

directly perform, without transferring control away from the Level 0 hypervisor and using the first function component and the second function component, the first modification of the context of the Level 2 VM.

9 . The system of claim 8 , wherein the processing device is further to:

determine, by the Level 0 hypervisor, a completion status of the first function component; and

return control to the Level 2 hypervisor in view of the completion status.

10 . The system of claim 8 , wherein to directly perform the first modification of the context of the Level 2 VM, the processing device is to:

determine, by the Level 0 hypervisor, a completion status of the first function component; and

execute, by the Level 0 hypervisor, the second function component in view of the completion status, the second function component to modify the context of the Level 2 VM.

11 . The system of claim 10 , wherein the processing device is further to:

determine, by the Level 0 hypervisor, a second completion status of the second function component; and

return control to the Level 2 hypervisor in view of the second completion status.

12 . The system of claim 8 , wherein the second functionality is implemented by a second set of instructions that translates the first modification of the context of the Level 2 VM into a second modification of a context of the Level 1 VM.

13 . A non-transitory computer readable storage medium comprising executable instructions, which when executed by a processing device, cause the processing device to:

execute a Level 0 hypervisor managing a Level 1 virtual machine (VM);

receive, by a Level 1 hypervisor managing a Level 2 VM, a first function component from a Level 2 hypervisor managing a Level 3 VM, wherein the first function component performs a first functionality associated with a hypercall issued by the Level 3 VM, wherein the first function component performs a first modification of a context of the Level 2 VM;

generate, by the Level 1 hypervisor, a second function component that performs a second functionality associated with the hypercall issued by the Level 3 VM; and

responsive to detecting the hypercall issued by the Level 3 VM, cause the Level 0 hypervisor to

directly perform, without transferring control away from the Level 0 hypervisor and using the first function component and the second function component, the first modification of the context of the Level 2 VM.

14 . The non-transitory computer readable storage medium of claim 13 , further comprising executable instructions, which when executed by the processing device, cause the processing device to:

determine, by the Level 0 hypervisor, a completion status of the first function component; and

return control to the Level 2 hypervisor in view of the completion status.

15 . The non-transitory computer readable storage medium of claim 13 , wherein, to directly perform the first modification of the context of the Level 2 VM, the processing device is to:

determine, by the Level 0 hypervisor, a completion status of the first function component; and

execute, by the Level 0 hypervisor, the second function component in view of the completion status, the second function component to modify the context of the Level 2 VM.

16 . The non-transitory computer readable storage medium of claim 13 , wherein the first function component is generated by the Level 2 hypervisor based on instructions received from the Level 3 VM.

17 . The non-transitory computer readable storage medium of claim 13 , wherein the second function component is generated by the Level 1 hypervisor based on instructions received from the Level 2 VM.

Assignments (3)
CHANGE OF NAME Recorded Mar 3, 2026
From: RED HAT, INC.
To: RED HAT, LLC
Reel/Frame 074913/0759 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 10, 2024
From: TSIRKIN, MICHAEL; NOEL, KAREN
To: RED HAT, INC.
Reel/Frame 066079/0287 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 6, 2023
From: TSIRKIN, MICHAEL; NOEL, KAREN
To: RED HAT, INC.
Reel/Frame 064816/0901 →
Continuity (2)
Continuation 16866510 · May 4, 2020
Related Publication 20230315508A1 · Oct 5, 2023
References Cited (13)
US 20050240700A1 · Bennett · 2005 [cited by applicant]
US 20090007112A1 · Moriki · 2009 [cited by applicant]
US 20110047544A1 · Yehuda · 2011 [cited by examiner]
US 20120216187A1 · Ben-Yehuda · 2012 [cited by examiner]
US 20140053272A1 · Lukacs · 2014 [cited by examiner]
US 20140229943A1 · Tian · 2014 [cited by examiner]
US 20160085568A1 · Dupre · 2016 [cited by examiner]
US 20170004002A1 · Nakamura · 2017 [cited by examiner]
US 20170262306A1 · Wang · 2017 [cited by examiner]
Lluís Vilanova, “Using SMT to Accelerate Nested Virtualization”, ACM ISBN 978-1-4503-6669-4/19/06 (Year: 2019). [cited by examiner]
“Analyzing KVM Hypercalls with eBPF Tracing”, https://suchakra.wordpress.com/2017/03/31/analyzing-kvm-hypercalls-with--ebpf-tracing/, 2017, 5 pgs. [cited by applicant]
Zhenhao Pan et al., “NestCloud: Towards Practical Nested Virtualization”, 2011 International Conference on Cloud and Service Computing, 2011, pp. 321-329. [cited by applicant]
Nadav Amit, “The Design and Implementation of Hyperupcalls”, USENIX Association, 2018 USENIX Annual Technical Conference, 2018, pp. 97-111. [cited by applicant]