mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
KVM: Make mark_page_dirty() work for aliased pages too.
Recommended by Izik Eidus. Signed-off-by: Uri Lublin <uril@qumranet.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
This commit is contained in:
parent
9f1ef3f8f5
commit
3b6fff198c
1 changed files with 1 additions and 1 deletions
|
@ -796,11 +796,11 @@ int kvm_clear_guest(struct kvm *kvm, gpa_t gpa, unsigned long len)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(kvm_clear_guest);
|
||||
|
||||
/* WARNING: Does not work on aliased pages. */
|
||||
void mark_page_dirty(struct kvm *kvm, gfn_t gfn)
|
||||
{
|
||||
struct kvm_memory_slot *memslot;
|
||||
|
||||
gfn = unalias_gfn(kvm, gfn);
|
||||
memslot = __gfn_to_memslot(kvm, gfn);
|
||||
if (memslot && memslot->dirty_bitmap) {
|
||||
unsigned long rel_gfn = gfn - memslot->base_gfn;
|
||||
|
|
Loading…
Reference in a new issue