diff options
author | Wei Yang <richard.weiyang@gmail.com> | 2018-08-22 21:57:11 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-10-17 00:29:48 +0200 |
commit | 31fc4f95dddc4ebc9f9596a2720662e15e5d444e (patch) | |
tree | 222a3c04a58bfdfbbd58d72bdc9da3f665b92998 /arch/x86/kvm/vmx.c | |
parent | 3c6e099fa15fdb6fb1892199ed8709012e1294f2 (diff) | |
download | blackbird-op-linux-31fc4f95dddc4ebc9f9596a2720662e15e5d444e.tar.gz blackbird-op-linux-31fc4f95dddc4ebc9f9596a2720662e15e5d444e.zip |
KVM: leverage change to adjust slots->used_slots in update_memslots()
update_memslots() is only called by __kvm_set_memory_region(), in which
"change" is calculated and indicates how to adjust slots->used_slots
* increase by one if it is KVM_MR_CREATE
* decrease by one if it is KVM_MR_DELETE
* not change for others
This patch adjusts slots->used_slots in update_memslots() based on "change"
value instead of re-calculate those states again.
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
0 files changed, 0 insertions, 0 deletions