diff options
author | Gleb Natapov <gleb@redhat.com> | 2010-10-18 15:22:23 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-01-12 11:23:08 +0200 |
commit | 49c7754ce57063b819b01eb8a4290841ad0886c4 (patch) | |
tree | 67561bbc829d93efa5316c246ec84fe2f2493236 /include/linux/kvm_types.h | |
parent | 56028d0861e48f7cc9c573d79f2d8a0a933a2bba (diff) | |
download | linux-stable-49c7754ce57063b819b01eb8a4290841ad0886c4.tar.gz linux-stable-49c7754ce57063b819b01eb8a4290841ad0886c4.tar.bz2 linux-stable-49c7754ce57063b819b01eb8a4290841ad0886c4.zip |
KVM: Add memory slot versioning and use it to provide fast guest write interface
Keep track of memslots changes by keeping generation number in memslots
structure. Provide kvm_write_guest_cached() function that skips
gfn_to_hva() translation if memslots was not changed since previous
invocation.
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'include/linux/kvm_types.h')
-rw-r--r-- | include/linux/kvm_types.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/kvm_types.h b/include/linux/kvm_types.h index 7ac0d4eee430..fa7cc7244cbd 100644 --- a/include/linux/kvm_types.h +++ b/include/linux/kvm_types.h @@ -67,4 +67,11 @@ struct kvm_lapic_irq { u32 dest_id; }; +struct gfn_to_hva_cache { + u64 generation; + gpa_t gpa; + unsigned long hva; + struct kvm_memory_slot *memslot; +}; + #endif /* __KVM_TYPES_H__ */ |