Message ID | 20250110121936.1559655-1-qperret@google.com (mailing list archive) |
---|---|
Headers | show |
Series | KVM: arm64: Simplify pKVM memory transitions | expand |
On Fri, 10 Jan 2025 12:19:33 +0000, Quentin Perret wrote: > Since its early days, pKVM has formalized memory 'transitions' (shares > and donations) using 'struct pkvm_mem_transition' and bunch of helpers > to manipulate it. The intention was for all transitions to use this > machinery to ensure we're checking things consistently. However, as > development progressed, it became clear that the rigidity of this model > made it really difficult to use in some use-cases which ended-up > side-stepping it entirely. That is the case for the > hyp_{un}pin_shared_mem() and host_{un}share_guest() paths upstream which > use lower level helpers directly, as well as for several other pKVM > features that should land upstream in the future (ex: when a guest > relinquishes a page during ballooning, when annotating a page that is > being DMA'd to, ...). On top of this, the pkvm_mem_transition machinery > requires a lot of boilerplate which makes the code hard to read, but > also adds layers of indirection that no compilers seems to see through, > hence leading to suboptimal generated code. > > [...] Applied to next, thanks! [1/3] KVM: arm64: Drop pkvm_mem_transition for FF-A commit: ed2f80fd76bd2c6e00d2e90f78d21a3055ee3562 [2/3] KVM: arm64: Drop pkvm_mem_transition for host/hyp sharing commit: d3b3473c15e4391673d8dca9c36dd5e9c3a8a4ac [3/3] KVM: arm64: Drop pkvm_mem_transition for host/hyp donations commit: 2d2aa2eb275fa6f80d68ed442c3328273bbbecba Cheers, M.