# Re: \[RFC PATCH v2 12/26\] KVM: arm64: Introduce a Hyp buddy page allocator

- From: Quentin Perret \<hidden\>
- Date: 2021-02-04 18:24:45 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2021/02/6258981
- Thread: https://ratatoskr.run/linux-devicetree/2021/01/6227695/t/2.md

```text
On Thursday 04 Feb 2021 at 14:31:08 (+0000), Will Deacon wrote:
> Just feels a bit backwards having __find_buddy() take an order parameter,
> yet then return a page of the wrong order! __hyp_extract_page() always
> passes the p->order as the order,

Gotcha, so maybe this is just a naming problem. __find_buddy() is simply
a helper to lookup/index the vmemmap, but it's perfectly possible that
the 'destination' page that is being indexed has already been allocated,
and split up multiple time (and so at a different order), etc ... And
that is the caller's job to decide.

How about __lookup_potential_buddy() ? Any suggestion?

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```
