From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH for 4.7] xen: Replace alloc_vcpu_guest_context() with vmalloc() Date: Fri, 28 Aug 2015 13:57:17 +0100 Message-ID: <55E05AAD.7020608@citrix.com> References: <1440179506-478-1-git-send-email-andrew.cooper3@citrix.com> <55E056DC.7030906@citrix.com> <55E05A6C.10408@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <55E05A6C.10408@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , Xen-devel Cc: Stefano Stabellini , Tim Deegan , Ian Campbell , Jan Beulich , Roger Pau Monne List-Id: xen-devel@lists.xenproject.org On 28/08/15 13:56, Andrew Cooper wrote: > On 28/08/15 13:41, Julien Grall wrote: >> Hi Andrew, >> >> On 21/08/15 18:51, Andrew Cooper wrote: >>> This essentially reverts c/s 2037f2adb "x86: introduce >>> alloc_vcpu_guest_context()", including the newer arm bits, but achieves >>> the same end goal by using the newer vmalloc() infrastructure. >> I would keep alloc_vcpu_guest_context and replace the content by >> vmalloc(...). It would avoid to open-coding the allocation on the vCPU >> on different places. > > alloc_vcpu_guest_context() only existed because x86 used to need to do > something quite cumbersome. This is no longer the case, given vmalloc() > as a more general solution. > > Retaining alloc_vcpu_guest_context() as just think wrapper, identical on > all architectures, is a bad idea as it call into a separate translation > unit which cannot be optimised. Unless if you introduce a static inline helper in the header. It would avoid open coding vmalloc and make easier future usage of it. Regards, -- Julien Grall