From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [Patch] [0/3] Patches to support new architectures. Date: Fri, 12 Oct 2007 08:36:07 +0200 Message-ID: <470F15D7.7080205@qumranet.com> References: <42DFA526FC41B1429CE7279EF83C6BDC7AEDD6@pdsmsx415.ccr.corp.intel.com> <470E0599.40102@qumranet.com> <42DFA526FC41B1429CE7279EF83C6BDC7AEE24@pdsmsx415.ccr.corp.intel.com> <470E1E96.4040601@qumranet.com> <42DFA526FC41B1429CE7279EF83C6BDC7AEEFB@pdsmsx415.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: "Zhang, Xiantao" Return-path: In-Reply-To: <42DFA526FC41B1429CE7279EF83C6BDC7AEEFB-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: >> >> x86 will continue to use kvm_x86_ops for that purposes. But other >> archs should not. >> >> x86 will use both mechanisms: first, linkage will select the x86 >> function, and then kvm_x86_ops will be used to select the >> implementation dependent code. The two levels are very different as >> kvm_x86_ops is very low level and x86 specific. >> > Hi Avi, > Maybe linkage is a better choice. But if we need to maintain two > different implmentation for different archs, it may introduce > unnecessary effort. > In addition, I can't figure out any disadvantages with function > pointers, moreover, it makes source uniform for all architectures, > though it is not very necessary. > Linkage is more efficient (though I don't think we'll be able to measure the difference) and is also the traditional way of doing things in Linux. I don't see why it causes extra effort. Can you explain? -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/