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

I think we have an old thread related to mmu code in kvm_main.c. In
IA64, we haven't shadow mmu as well, but we still need mmu interfaces,
such as mmu load, reload, unload to notify arch-specific VMM module
about the memory changes. 

> - 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.

Actually, IA64 doesn't require it. As you said, decache_vcpus_on_cpu is
only needed by x86.

> - 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.

Yes, I think kvm_arch_vcpu_reset in this patch should meet your
requirement.

> - 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.
OK,  Maybe we can move them to arch-specific.  

Avi, How about your ideas?

Thanks 
Xiantao

-------------------------------------------------------------------------
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/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to