From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Otte Subject: Re: [PATCH]3/5 Using kvm_arch prefix to define functions, and replace Date: Thu, 08 Nov 2007 14:49:12 +0100 Message-ID: <473313D8.4010604@de.ibm.com> References: <42DFA526FC41B1429CE7279EF83C6BDC905005@pdsmsx415.ccr.corp.intel.com> Reply-To: carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org, Hollis Blanchard , Avi Kivity To: "Zhang, Xiantao" Return-path: In-Reply-To: <42DFA526FC41B1429CE7279EF83C6BDC905005-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: > +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. ------------------------------------------------------------------------- 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/