Zhang, Xiantao wrote:
> Avi Kivity wrote:
>   
>> Christian Ehrhardt wrote:
>>     
>>> Hi Xiantao,
>>> it looks good to me to move kvm_vcpu_cache out to the x86 specific
>>> code 
>>>       
>> Why is that?  Do other archs not want kvm_vcpu_cache, or is it just
>> the alignment?
>>     
> At lease we didn't fall across the similar requirements about such
> alignment issues in IA64.  
>   

What I mean is, other archs do require kvm_vcpu_cache (without the
alignment), so why move the code?  Just make the alignment arch
dependent with a #define.

Oh, and since the code is written as

> -     /* A kmem cache lets us meet the alignment requirements of
> fx_save. */
> -     kvm_vcpu_cache = kmem_cache_create("kvm_vcpu", vcpu_size,
> -                                        __alignof__(struct kvm_vcpu),
> -                                        0, NULL);
> -     if (!kvm_vcpu_cache) {

If other archs don't require special alignment for kvm_vcpu,
__alignof__(struct kvm_vcpu) will return the natural alignment for that
arch, and no memory will be wasted.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to 
panic.


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to