diff options
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r-- | include/linux/kvm_host.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 55830638aeb1..1ed030bad59e 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -250,6 +250,13 @@ void kvm_exit(void); | |||
250 | void kvm_get_kvm(struct kvm *kvm); | 250 | void kvm_get_kvm(struct kvm *kvm); |
251 | void kvm_put_kvm(struct kvm *kvm); | 251 | void kvm_put_kvm(struct kvm *kvm); |
252 | 252 | ||
253 | static inline struct kvm_memslots *kvm_memslots(struct kvm *kvm) | ||
254 | { | ||
255 | return rcu_dereference_check(kvm->memslots, | ||
256 | srcu_read_lock_held(&kvm->srcu) | ||
257 | || lockdep_is_held(&kvm->slots_lock)); | ||
258 | } | ||
259 | |||
253 | #define HPA_MSB ((sizeof(hpa_t) * 8) - 1) | 260 | #define HPA_MSB ((sizeof(hpa_t) * 8) - 1) |
254 | #define HPA_ERR_MASK ((hpa_t)1 << HPA_MSB) | 261 | #define HPA_ERR_MASK ((hpa_t)1 << HPA_MSB) |
255 | static inline int is_error_hpa(hpa_t hpa) { return hpa >> HPA_MSB; } | 262 | static inline int is_error_hpa(hpa_t hpa) { return hpa >> HPA_MSB; } |