US 12,493,564 B2
Memory deduplication for encrypted virtual machines
Michael Tsirkin, Yokneam (IL); and Andrea Arcangeli, New York, NY (US)
Assigned to Red Hat, Inc., Raleigh, NC (US)
Filed by RED HAT, INC., Raleigh, NC (US)
Filed on Sep. 19, 2022, as Appl. No. 17/947,840.
Prior Publication US 2024/0095188 A1, Mar. 21, 2024
Int. Cl. H04L 9/00 (2022.01); G06F 9/455 (2018.01); G06F 12/14 (2006.01)
CPC G06F 12/1408 (2013.01) [G06F 9/45558 (2013.01); G06F 2009/45583 (2013.01); G06F 2009/45587 (2013.01); G06F 2212/1052 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A non-transitory computer-readable medium comprising program code that is executable by a processor for causing a virtual machine to:
select a target memory page stored in an encrypted format in an encrypted memory of the virtual machine, the encrypted memory being inaccessible to a hypervisor configured to manage the virtual machine;
store an unencrypted copy of the target memory page to a shared memory that is accessible to the hypervisor, wherein the hypervisor is configured to execute a deduplication process with respect to the unencrypted copy of the target memory page stored in the shared memory, and wherein the deduplication process executed by the hypervisor involves comparing the unencrypted copy of the target memory page stored in the shared memory to an unencrypted copy of another memory page to determine whether the target memory page is duplicative of the other memory page;
subsequent to storing the unencrypted copy of the target memory page to the shared memory, remove the target memory page from the encrypted memory; and
subsequent to removing the target memory page from the encrypted memory, prompt the hypervisor to reallocate memory space of the encrypted memory previously used to store the target memory page.