IP Library Granted Patent US 11,550,612
Granted Patent B2
US 11,550,612 · App. 16/913,879 · Granted Jan 10, 2023

Support for encrypted memory in nested virtual machines

Inventors: Michael Tsirkin (Westford, MA); Karen Lee Noel (Concord, CA)
Assignee: RED HAT, INC.
G06F9/45558G06F12/10G06F21/602H04L9/0819G06F2009/45583G06F2009/45587G06F2212/654
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 11,550,612
App. No.
16/913,879
Granted
Jan 10, 2023
Kind
B2
Abstract

A method includes receiving a memory access request comprising a first memory address and translating the first memory address to a second memory address using a first page table associated with the first virtual machine. The first page table indicates whether the memory of the first virtual machine is encrypted. The method further includes determining that the first virtual machine is nested within a second virtual machine and translating the second memory address to a third memory address using a second page table associated with the second virtual machine. The second page table indicates whether the memory of the second virtual machine is encrypted.

Claims (65)

1. A method comprising:

receiving, by a processing device from a first virtual machine, a memory access request comprising a first memory address;

translating the first memory address to a second memory address using a first page table associated with the first virtual machine, the first page table indicating whether memory of the first virtual machine is encrypted;

determining, by the processing device, that the first virtual machine is nested within a second virtual machine;

in response to determining that the first virtual machine is nested within the second virtual machine, translating, by the processing device, the second memory address to a third memory address using a second page table associated with the second virtual machine, the second page table indicating whether memory of the second virtual machine is encrypted;

determining from the first and second virtual machine, a deepest nested virtual machine that is encrypted; and

obtaining an encryption key associated with the deepest nested virtual machine that is encrypted.

2. The method of claim 1 , wherein determining that the first virtual machine is nested within the second virtual machine comprises determining that a context of the first virtual machine comprises a parent context pointer for the second virtual machine.

3. The method of claim 1 , further comprising:

obtaining a first encryption key associated with the first virtual machine for encryption of a page of memory associated with the second memory address in view of the first page table indicating that the second memory address is encrypted.

4. The method of claim 1 , further comprising:

obtaining an encryption key associated with the second virtual machine in view of the first page table indicating that the second memory address is not encrypted and the second page table indicating that the third memory address is encrypted.

5. The method of claim 1 , further comprising:

receiving a page fault associated with translating the second memory address to the third memory address;

in response to receiving the page fault, switching to a context of the second virtual machine; and

updating the second page table with a mapping of the second memory address to the third memory address.

6. The method of claim 1 , further comprising:

determining, by the processing device, that the second virtual machine is nested within a third virtual machine; and

translating, by the processing device, the third memory address to a fourth memory address using a third page table associated with the third virtual machine, the third page table indicating whether memory of the third virtual machine is encrypted.

7. The method of claim 6 , further comprising:

determining from the first, second, and third virtual machine, a deepest nested virtual machine that is encrypted; and

obtaining an encryption key associated with the deepest nested virtual machine that is encrypted.

8. A system comprising:

a memory; and

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

receive, from a first virtual machine, a memory access request comprising a first memory address;

translate the first memory address to a second memory address using a first page table associated with the first virtual machine, the first page table indicating whether the memory of the first virtual machine is encrypted;

determine that the first virtual machine is nested within a second virtual machine;

in response to determining that the first virtual machine is nested within the second virtual machine, translate the second memory address to a third memory address using a second page table associated with the second virtual machine, the second page table indicating whether the memory of the second virtual machine is encrypted;

determine from the first and second virtual machine, a deepest nested virtual machine that is encrypted; and

obtain an encryption key associated with the deepest nested virtual machine that is encrypted.

9. The system of claim 8 , wherein to determine that the first virtual machine is nested within the second virtual machine the processing device is to determine that a context of the first virtual machine comprises a parent context pointer for the second virtual machine.

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

obtain an encryption key associated with the first virtual machine for encryption of a page of memory associated with the second memory address in view of the first page table indicating that the second memory address is encrypted.

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

obtain an encryption key associated with the second virtual machine in view of the first page table indicating that the first memory address is not encrypted and the second page table indicating that the third memory address is encrypted.

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

receive a page fault associated with translating the second memory address to the third memory address:

in response to receiving the page fault, switch to a context of the second virtual machine; and

update the second page table with a mapping of the second memory address to the third memory address.

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

determine, by the processing device, that the second virtual machine is nested within a third virtual machine; and

translate, by the processing device, the third memory address to a fourth memory address using a third page table associated with the third virtual machine, the third page table indicating whether the memory of the third virtual machine is encrypted.

14. The system of claim 13 , wherein the processing device is further to:

determine from the first, second, and third virtual machine a deepest nested virtual machine that is encrypted; and

obtain an encryption key associated with the deepest nested virtual machine that is encrypted.

15. A non-transitory computer-readable storage medium including instructions that, when executed by a processing device, cause the processing device to:

receive, by the processing device from a first virtual machine, a memory access request comprising a first memory address;

translate the first memory address to a second memory address using a first page table associated with the first virtual machine, the first page table indicating whether memory of the first virtual machine is encrypted;

determine, by the processing device, that the first virtual machine is nested within a second virtual machine;

in response to determining that the first virtual machine is nested within a second virtual machine, translate, by the processing device, the second memory address to a third memory address using a second page table associated with the second virtual machine, the second page table indicating whether memory of the second virtual machine is encrypted;

determine from the first and second virtual machine, a deepest nested virtual machine that is encrypted; and

obtain an encryption key associated with the deepest nested virtual machine that is encrypted.

16. The non-transitory computer-readable storage medium of claim 15 , wherein to determine that the first virtual machine is nested within the second virtual machine the processing device is to determine that a context of the first virtual machine comprises a parent context pointer for the second virtual machine.

17. The non-transitory computer-readable storage medium of claim 15 , wherein the processing device is further to:

obtain a first encryption key associated with the first virtual machine for encryption of a page of memory associated with the second memory address in view of the first page table indicating that the second memory address is encrypted.

18. The non-transitory computer-readable storage medium of claim 15 , wherein the processing device is further to:

obtain an encryption key associated with the second virtual machine in view of the first page table indicating that the second memory address is not encrypted and the second page table indicating that the third memory address is encrypted.

19. The non-transitory computer-readable storage medium of claim 15 , wherein the processing device is further to:

receive a page fault associated with translating the second memory address to the third memory address:

in response to receiving the page fault, switch to a context of the second virtual machine; and

update the second page table with a mapping of the second memory address to the third memory address.

20. The non-transitory computer-readable storage medium of claim 19 , wherein the processing device is further to:

determine a deepest nested virtual machine that is encrypted; and

obtain an encryption key associated with the deepest nested virtual machine that is encrypted.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 26, 2020
From: TSIRKIN, MICHAEL; NOEL, KAREN LEE
To: RED HAT, INC.
Reel/Frame 053059/0764 →
Continuity (1)
Related Publication 20210406057A1 · Dec 30, 2021