Commit d131f00
committed
KVM: Assert slots_lock is held when setting memory regions
Add proper lockdep assertions in __kvm_set_memory_region() and
__x86_set_memory_region() instead of relying comments.
Opportunistically delete __kvm_set_memory_region()'s entire function
comment as the API doesn't allocate memory or select a gfn, and the
"mostly for framebuffers" comment hasn't been true for a very long time.
Cc: Tao Su <tao1.su@linux.intel.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Acked-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
Link: https://lore.kernel.org/r/20250111002022.1230573-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent f81a6d1 commit d131f00
2 files changed
Lines changed: 4 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12793 | 12793 | | |
12794 | 12794 | | |
12795 | 12795 | | |
12796 | | - | |
| 12796 | + | |
| 12797 | + | |
12797 | 12798 | | |
12798 | 12799 | | |
12799 | 12800 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1926 | 1926 | | |
1927 | 1927 | | |
1928 | 1928 | | |
1929 | | - | |
1930 | | - | |
1931 | | - | |
1932 | | - | |
1933 | | - | |
1934 | | - | |
1935 | | - | |
1936 | | - | |
1937 | 1929 | | |
1938 | 1930 | | |
1939 | 1931 | | |
| |||
1945 | 1937 | | |
1946 | 1938 | | |
1947 | 1939 | | |
| 1940 | + | |
| 1941 | + | |
1948 | 1942 | | |
1949 | 1943 | | |
1950 | 1944 | | |
| |||
0 commit comments