diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2016-06-21 16:21:51 +0300 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-06-21 16:21:51 +0300 |
| commit | 8ff7b956471faadb0f874a49e8603d43cb1e55d5 (patch) | |
| tree | 17f3ed343083576ceca9bddef4a32951c548b138 /include | |
| parent | 64672c95ea4c2f7096e519e826076867e8ef0938 (diff) | |
| parent | a411edf1320ed8fa3b4560902ac4e033c4a72bcf (diff) | |
| download | linux-8ff7b956471faadb0f874a49e8603d43cb1e55d5.tar.xz | |
Merge tag 'kvm-s390-next-4.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD
KVM: s390: vSIE (nested virtualization) feature for 4.8 (kvm/next)
With an updated QEMU this allows to create nested KVM guests
(KVM under KVM) on s390.
s390 memory management changes from Martin Schwidefsky or
acked by Martin. One common code memory management change (pageref)
acked by Andrew Morton.
The feature has to be enabled with the nested medule parameter.
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/page_ref.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/page_ref.h b/include/linux/page_ref.h index 8b5e0a9f2431..610e13271918 100644 --- a/include/linux/page_ref.h +++ b/include/linux/page_ref.h @@ -124,6 +124,15 @@ static inline int page_ref_sub_and_test(struct page *page, int nr) return ret; } +static inline int page_ref_inc_return(struct page *page) +{ + int ret = atomic_inc_return(&page->_refcount); + + if (page_ref_tracepoint_active(__tracepoint_page_ref_mod_and_return)) + __page_ref_mod_and_return(page, 1, ret); + return ret; +} + static inline int page_ref_dec_and_test(struct page *page) { int ret = atomic_dec_and_test(&page->_refcount); |
