From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 0 of 3] create kvm_x86 Date: Wed, 21 Nov 2007 11:55:52 +0200 Message-ID: <474400A8.8070706@qumranet.com> References: <4743F5AE.8090707@de.ibm.com> <4743F7DF.4000107@qumranet.com> <42DFA526FC41B1429CE7279EF83C6BDC9E7193@pdsmsx415.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org, kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Hollis Blanchard To: "Zhang, Xiantao" Return-path: In-Reply-To: <42DFA526FC41B1429CE7279EF83C6BDC9E7193-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Zhang, Xiantao wrote: >> IIRC a downside was mentioned that it is easier to cause a build >> failure for another arch now. >> > > I can't figure out why it can cause more build failure. > Nothing stops you from doing kvm->arch.blah in kvm_main.c, but blah will not be present for all architectures. It would compile for you but not others. With to_kvm_x86(), the function and arch specific structure aren't even visible on kvm_main.c, so you can't make that mistake. IMO this is a serious drawback to kvm->arch.blah. But kvm_x86->blah doesn't look good. Maybe if the variable was named 'kvm' it would look better. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/