diff options
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r-- | include/linux/kvm_host.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 392af47a4353..123925cd3ae8 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -333,6 +333,12 @@ static inline struct kvm_memslots *kvm_memslots(struct kvm *kvm) | |||
333 | || lockdep_is_held(&kvm->slots_lock)); | 333 | || lockdep_is_held(&kvm->slots_lock)); |
334 | } | 334 | } |
335 | 335 | ||
336 | static inline struct kvm_memory_slot * | ||
337 | id_to_memslot(struct kvm_memslots *slots, int id) | ||
338 | { | ||
339 | return &slots->memslots[id]; | ||
340 | } | ||
341 | |||
336 | #define HPA_MSB ((sizeof(hpa_t) * 8) - 1) | 342 | #define HPA_MSB ((sizeof(hpa_t) * 8) - 1) |
337 | #define HPA_ERR_MASK ((hpa_t)1 << HPA_MSB) | 343 | #define HPA_ERR_MASK ((hpa_t)1 << HPA_MSB) |
338 | static inline int is_error_hpa(hpa_t hpa) { return hpa >> HPA_MSB; } | 344 | static inline int is_error_hpa(hpa_t hpa) { return hpa >> HPA_MSB; } |