summaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorMaciej S. Szmigiero <maciej.szmigiero@oracle.com>2021-12-06 20:54:27 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2021-12-08 10:24:32 +0100
commit26b8345abc75a7404716864710930407b7d873f9 (patch)
tree1bb13126a02fc548af251f6a85f233517d7704dd /arch/s390
parentKVM: Move WARN on invalid memslot index to update_memslots() (diff)
downloadlinux-26b8345abc75a7404716864710930407b7d873f9.tar.xz
linux-26b8345abc75a7404716864710930407b7d873f9.zip
KVM: Resolve memslot ID via a hash table instead of via a static array
Memslot ID to the corresponding memslot mappings are currently kept as indices in static id_to_index array. The size of this array depends on the maximum allowed memslot count (regardless of the number of memslots actually in use). This has become especially problematic recently, when memslot count cap was removed, so the maximum count is now full 32k memslots - the maximum allowed by the current KVM API. Keeping these IDs in a hash table (instead of an array) avoids this problem. Resolving a memslot ID to the actual memslot (instead of its index) will also enable transitioning away from an array-based implementation of the whole memslots structure in a later commit. Co-developed-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com> Message-Id: <117fb2c04320e6cd6cf34f205a72eadb0aa8d5f9.1638817640.git.maciej.szmigiero@oracle.com>
Diffstat (limited to 'arch/s390')
0 files changed, 0 insertions, 0 deletions