From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 5/5 V2] kvm tools: Initialize and use VESA and VNC Date: Tue, 24 May 2011 17:37:02 +0300 Message-ID: <4DDBC28E.8080009@redhat.com> References: <1306149553-26793-1-git-send-email-levinsasha928@gmail.com> <1306149553-26793-5-git-send-email-levinsasha928@gmail.com> <20110523113824.GE4042@elte.hu> <4DDB6E55.8080408@redhat.com> <20110524085024.GA31453@elte.hu> <4DDB75EC.7000300@redhat.com> <4DDB9510.8030501@redhat.com> <4DDB96CA.1030206@redhat.com> <4DDB9972.5050501@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Paolo Bonzini , Ingo Molnar , Sasha Levin , john@jfloren.net, kvm@vger.kernel.org, asias.hejun@gmail.com, gorcunov@gmail.com, prasadjoshi124@gmail.com To: Pekka Enberg Return-path: Received: from mx1.redhat.com ([209.132.183.28]:10261 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932099Ab1EXOhX (ORCPT ); Tue, 24 May 2011 10:37:23 -0400 In-Reply-To: <4DDB9972.5050501@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/24/2011 02:41 PM, Avi Kivity wrote: > >> We switched to u64 and friends for two reasons: (1) using uint*_t >> turned out to be painful when using kernel headers (e.g., mptables, >> e820, etc.) and (2) we want to be as close as possible to the coding >> style of tools/perf to be able to reuse their code in the future. >> > > Regarding this reuse, I see it's done by copy/paste. Won't it be > better to have tools/lib and have tools/perf and tools/kvm use that? > Another thing, I believe reuse of actual kernel code has limited utility. The kernel has vast infrastructure and porting all of it to userspace would be a huge undertaking. It's pretty common for code to use printk(), kmalloc(), slab caches, rcu, various locks, per-cpu variables. Are you going to port all of it? and maintain it when it changes? It's a lot easier to use the native userspace stacks. -- error compiling committee.c: too many arguments to function