[Patch 3/3] This patch moves the arch specific x86 code from kvm_main.c to kvm_x86.c and fills the kvm_arch.h header defining the current interface. Related part from the 0/3 mail: - A new header kvm_arch.h specifies the interface the architecture has to implement - The ioctl interfaces are implemented by the generic kvm_main.c in three ways a) a completely generic function is covered by kvm_main.c completely b) a completely arch dependent function is not covered in kvm_main.c - at the end each ioctl goes to a architecture mapping doing the rest of the ioctl not handled in the generic part e.g. in kvm_vcpu_ioctl: default: r = kvm_arch_vcpu_ioctl(filp, ioctl, arg); } c) functions that have a significant amount of shared code are implemented by kvm_main.c using kvm_arch_* to implement the arch specific part. Either by just mapping the old *_ioctl_whatever to *_arch_whatever or by moving some more of the code out of the arch function up to the generic portion e.g.: case KVM_RUN: r = -EINVAL; if (arg) goto out; r = kvm_arch_vcpu_run(vcpu, vcpu->run); break; -- Grüsse / regards, Christian Ehrhardt IBM Linux Technology Center, Open Virtualization +49 7031/16-3385 Ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org Ehrhardt-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Johann Weihen Geschäftsführung: Herbert Kircher Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294