WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: [Xen-devel] RE: One question to compat model
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Wed, 12 May 2010 16:15:39 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 12 May 2010 01:17:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4BEA7C200200007800002687@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <789F9655DD1B8F43B48D77C5D30659731E5F20E1@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4BEA7C200200007800002687@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcrxqP4JwWnMl9zaS9iMBPPk0Gux8wAACBsw
Thread-topic: 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 
>>xen_mc,
>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 
>adding
>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 
>>changed,
>can you please give me some information on it?
>>
>>BTW, are there any guideline on how should we define the interface structure 
>>and
>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 
>compat
>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.

-jyh

>
>Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel