Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KVM: guest_mem: Delay binding of memslot to guest_mem file
This patch uses the functions kvm_gmem_bind() and kvm_gmem_init_memslot() introduced in the previous patch. The pointer to kvm is not stored when the guest_mem file is created. Instead, binding (storing reference to memslot that is using certain ranges in a file) is deferred till pages in the memslot are requested (kvm_gmem_get_pfn()). When memslots with private memory are requested by userspace, the memslot's gmem fields are initialized using kvm_gmem_init_memslot(), and when the memslot is freed in kvm_free_memslot(), kvm_gmem_destroy_memslot() is used to clean the gmem fields up.
- Loading branch information
Ackerley Tng
committed
Jul 11, 2023
1 parent
93b31a0
commit dd5ac5e
Showing
2 changed files
with
27 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters