Re: RFC/patch portability: split kvm_vm_ioctl v2

Carsten Otte
2007-10-26T14:53:54Z

Zhang, Xiantao wrote:
> I don't think we can move the whole function to arch-specific part,
> because it should work well (or with few issues) for most archs.
> Basically, IA64 mostly can use it directly. If we move them as
> arch-specific, it will introduces many duplicates. As you said, S390 has
> quite difference about this side, but I think maybe we can use macros,
> such as #ifndef CONFIG_S390 to comment out them, and S390 define it in
> your arch-specific portions. Any other good ideas ?
I really dislike CONFIG_ARCH sections. They are usually a strong
indication that proper interfaces between arch dependent and arch
independent code have not been found just yet. If you look at old
subsystems where lots of engineers had time to optimize the code, like
memory management for example, you rarely find #ifdefs at all. I think
that should be our goal.
As for KVM_SET_USER_MEMORY_REGION, the function you pointed at, I've
left it in common for now in patch version 3.

thanks for your review,
Carsten