From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH]3/5 Using kvm_arch prefix to define functions, and replace Date: Sun, 11 Nov 2007 12:49:52 +0200 Message-ID: <4736DE50.5010200@qumranet.com> References: <42DFA526FC41B1429CE7279EF83C6BDC905005@pdsmsx415.ccr.corp.intel.com> <473313D8.4010604@de.ibm.com> <1194553107.22879.29.camel@basalt> <473421E7.2070205@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, "Zhang, Xiantao" , Hollis Blanchard To: carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org Return-path: In-Reply-To: <473421E7.2070205-tA70FqPdS9bQT0dZR+AlfA@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 Carsten Otte wrote: > Hollis Blanchard wrote: > >> On Thu, 2007-11-08 at 14:49 +0100, Carsten Otte wrote: >> >>> Zhang, Xiantao wrote: >>> >>>> +void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu); >>>> +void kvm_arch_vcpu_decache(struct kvm_vcpu *vcpu); >>>> +void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu); >>>> +void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu); >>>> +struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int >>>> id); >>>> + >>>> +int kvm_arch_vcpu_reset(struct kvm_vcpu *vcpu); >>>> +void kvm_arch_hardware_enable(void *garbage); >>>> +void kvm_arch_hardware_disable(void *garbage); >>>> +int kvm_arch_hardware_setup(void); >>>> +void kvm_arch_hardware_unsetup(void); >>>> +void kvm_arch_check_processor_compat(void *rtn); >>>> >>> I don't like the generic introduction of all x86_ops wrappers into the >>> arch callbacks. I would rather prefer to work out a different split >>> between common and arch specifics - at least in the following cases: >>> - unloading the mmu needs to be moved out of kvm_free_vcpus into the >>> arch part, because we don't have a shaddow mmu on s390 >>> - decache_vcpus_on_cpu should be arch-dependent alltogether, rather >>> than having a per cpu callback. We've got nothing to decache, so the >>> entire thing is a nop for us. >>> - vcpu_reset works very different for our architecture, we'd need an >>> initial processor status word. I'd prefer to keep the existence of >>> this callback arch dependent. >>> - hardware enable/disable/setup/unsetup/check_processor_compat does not >>> make any sense for us: all CPUs that have been sold since the 1970s have >>> proper hardware virtualization, and there's nothing to enable - it just >>> works. >>> >> Sounds fine to me: you're just proposing to move the abstraction one >> level higher in some places. >> > That's right, I'd like to drag the bar a little where the common code > does something just to call a callback that is nop for us. > For the present discussion, I agree, but in general we should be prepared to accept some no-op callouts. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- 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/