[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] RE: One question to compat model

>-----Original Message-----
>From: Jan Beulich [mailto:JBeulich@xxxxxxxxxx]
>Sent: Wednesday, May 12, 2010 4:00 PM
>To: Jiang, Yunhong
>Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
>Subject: Re: One question to compat model
>>>> "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx> 12.05.10 09:38 >>>
>>Followed is part of my patch, I try to add a structure xen_mc_inject_v2 to 
>with xenctl_cpumap embeded in the xen_mc_inject_v2.
>>However, in the "include/compat/arch-x86/xen-mca.h", the xenctl_cpumap is
>translated to be compat_ctl_cpumap, this is sure not I wanted.
>Hmm, XEN_GUEST_HANDLE_64() is not being dealt with by the scripts so far, so I
>believe support for this will need to be added. No sure though whether simply 
>the type as a needs-checking one to xen/include/xlat.lst wouldn't suffice.

The followed small changes cayse compile failed with:

can't read compat/domctl.h: No such file or directory

diff -r 20713df6a7fe xen/include/xlat.lst
--- a/xen/include/xlat.lst  Wed May 12 16:05:08 2010 +0800
+++ b/xen/include/xlat.lst  Wed May 12 16:11:55 2010 +0800
@@ -63,6 +63,7 @@
 !  sched_poll          sched.h
 ?  sched_remote_shutdown       sched.h
 ?  sched_shutdown          sched.h
+?   xenctl_cpumap           domctl.h
 !  tmem_op             tmem.h
 ?  t_buf               trace.h
 ?  vcpu_get_physid         vcpu.h

>>After checking the related code, I find it should be caused by the
>[ r"(struct|union|enum)\s+(xen_?)?(\w)", r"\1 compat_\3" ] in
>tools/compat-build-header.py, which will replace all "struct xen" with "struct
>compat". Add the xenctl_cpumap to xlat.lst raise other warnings.
>Without knowing which ones I can't say much.
>>I can't find a solution on how to make sure the xenctl_cpumap will not be 
>can you please give me some information on it?
>>BTW, are there any guideline on how should we define the interface structure 
>handle them for compat model? For example, seems
>arch/x86/x86_64/platform_hypercall.c and arch/x86/cpu/mcheck/mce.c has
>different method to handle the compat model.
>Sure - I picked the model that was causing less headache in each place I 
>needed to
>do conversion and/or checking.
>In the worst case, if you can make the whole thing build without handling the 
>case, I could look into the checking/translation issues after the patch went 
>in. Please
>just remind me when submitting the patch if you want me to do this.

How can I disable compat model now? I remember that option has been removed.



Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.