Commit 3148030c authored by Vincent Donnefort's avatar Vincent Donnefort
Browse files

ANDROID: KVM: arm64: Fix hyp_alloc(0)



As the name suggests, MIN_ALLOC is the minimum allocation. Make sure
that hyp_alloc(0) always uses that value. Without this, the newly
allocated chunk would look like it is free (alloc_size == 0), so the
allocator would be able to merge or recycle it.

Bug: 424172976
Bug: 273748186
Fixes: 08477328 ("ANDROID: KVM: arm64: Add a heap allocator for the pKVM hyp")
Reported-by: default avatarHiroyuki Katsura <hk590@cam.ac.uk>
Signed-off-by: default avatarVincent Donnefort <vdonnefort@google.com>
(cherry picked from https://android-review.googlesource.com/q/commit:e6f1cbbab1843a62714bf19329cbabf43adbd297)
Merged-In: Ia873c8d075025a9aa759057f46c7c8fe8ce20fb8
Change-Id: Ia873c8d075025a9aa759057f46c7c8fe8ce20fb8
parent 4ec55296
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment