On Tue, Nov 01, 2016 at 03:48:54PM +0100, Paolo Bonzini wrote: > > > On 31/10/2016 19:51, Andrew Jones wrote: > > We've had malloc, calloc, free, and memalign available for quite a > > while, and arm and powerpc make use of them. x86 hasn't yet, but > > let's give it the option. arm and powerpc use the early_alloc_ops, > > built on phys_alloc, but x86 already has virtual memory management, > > so we can build on that instead. > > What are your plans for using them? vmalloc imposes a pretty large > alignment and is quite different from early_alloc_ops, so I'm not sure > it's a good idea to conflate the two into the same high-level API. I was mostly thinking that common lib/* code might want to start using malloc, etc. Unless x86 implements them then that won't be possible. I don't have a need yet though, so I'm fine with leaving it until a different allocation scheme could be used as the base. Although, that said, we could use the vmalloc allocation scheme now, just to satisfy malloc, etc., and then improve the underlying scheme later too. Anyway, I see I had a bug in my memalign implementation, so it needs a bit more work either way. Thanks, drew -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html