Tian, Kevin
2005-Oct-23 03:46 UTC
[Xen-devel] [PATCH][RESEND] Control panel changes for IA64/VTI
>From: Keir Fraser [mailto:Keir.Fraser@cl.cam.ac.uk] >Sent: 2005年10月22日 14:26 >On 22 Oct 2005, at 04:20, Tian, Kevin wrote: > >> Attached are the necessary changes in control panel to support >> ia64/vti domain builder. One is in common side, and the other is in vti >> specific image builder. Please take a look, and if no objection, I''d >> like to ask Dan''s help to check into xen-ia64-unstable.hg first. > >The common changes to libxc look ia64 specific. Why not stick all of >them in ia64_stubs?OK, see updated version and I moved all interfaces within "ifdef __ia64__" to ia64_stubs.> >Adding code to memset to force into the TLB won''t be accepted. Either >those whole functions are ia64 specific or (better) replace use of >mlock/munlock with map_to_hypervisor/unmap_from_hypervisor which do >mlock/memset/munlock on ia64 and skip the memset on x86. > > -- KeirActually those changes are all ia64 specific. With normal diff command, I can use "-p" option to add one line like "@@ -322,46 +322,6 @@ int xc_ia64_get_pfn_list(int xc_handle,". However I don''t know how to produce same format with "hg diff". That brings some trouble to people when similar code pieces exist in same file. ;-( I also removed memset in xc_ia64_get_pfn_list since mlock seems to have the effect. Thanks, Kevin _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Tian, Kevin
2005-Oct-23 03:53 UTC
RE: [Xen-devel] [PATCH][RESEND] Control panel changes for IA64/VTI
BTW, the reason for an ia64 specific get_pfn_list (by Matt) is that machine pages for domain on ia64 are allocated on demand. So there''s requirement for parameters to contain start_pfn and nr_pages so that Xen can allocate necessary pages for that specific range. On x86 side, since all the pages are allocated when domain creation, get_pfn_list is aimed to query once for all pages and so the parameter can be only nr_pages. Just the background here. ;-) Thanks, Kevin>-----Original Message----- >From: xen-devel-bounces@lists.xensource.com >[mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Tian, Kevin >Sent: 2005年10月23日 11:47 >To: Keir Fraser >Cc: xen-devel@lists.xensource.com; Xen-IA64-Devel >Subject: [Xen-devel] [PATCH][RESEND] Control panel changes for IA64/VTI > >>From: Keir Fraser [mailto:Keir.Fraser@cl.cam.ac.uk] >>Sent: 2005年10月22日 14:26 >>On 22 Oct 2005, at 04:20, Tian, Kevin wrote: >> >>> Attached are the necessary changes in control panel to support >>> ia64/vti domain builder. One is in common side, and the other is in vti >>> specific image builder. Please take a look, and if no objection, I''d >>> like to ask Dan''s help to check into xen-ia64-unstable.hg first. >> >>The common changes to libxc look ia64 specific. Why not stick all of >>them in ia64_stubs? > >OK, see updated version and I moved all interfaces within "ifdef __ia64__" to >ia64_stubs. > >> >>Adding code to memset to force into the TLB won''t be accepted. Either >>those whole functions are ia64 specific or (better) replace use of >>mlock/munlock with map_to_hypervisor/unmap_from_hypervisor which do >>mlock/memset/munlock on ia64 and skip the memset on x86. >> >> -- Keir > >Actually those changes are all ia64 specific. With normal diff command, I can use "-p" >option to add one line like "@@ -322,46 +322,6 @@ int xc_ia64_get_pfn_list(int >xc_handle,". However I don''t know how to produce same format with "hg diff". That >brings some trouble to people when similar code pieces exist in same file. ;-( I also >removed memset in xc_ia64_get_pfn_list since mlock seems to have the effect. > >Thanks, >Kevin_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2005-Oct-23 08:14 UTC
Re: [Xen-devel] [PATCH][RESEND] Control panel changes for IA64/VTI
On 23 Oct 2005, at 04:53, Tian, Kevin wrote:> BTW, the reason for an ia64 specific get_pfn_list (by Matt) is that > machine pages for domain on ia64 are allocated on demand. So there''s > requirement for parameters to contain start_pfn and nr_pages so that > Xen can allocate necessary pages for that specific range. On x86 side, > since all the pages are allocated when domain creation, get_pfn_list > is aimed to query once for all pages and so the parameter can be only > nr_pages. Just the background here. ;-)We could have a common interface then. All the uses of get_pfn_list in common or x86 code will have start_pfn==0. The patches look okay, although the Python bits aren''t particularly pretty. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Tian, Kevin
2005-Oct-24 01:19 UTC
RE: [Xen-devel] [PATCH][RESEND] Control panel changes for IA64/VTI
>From: Keir Fraser [mailto:Keir.Fraser@cl.cam.ac.uk] >Sent: 2005年10月23日 16:15 > >On 23 Oct 2005, at 04:53, Tian, Kevin wrote: > >> BTW, the reason for an ia64 specific get_pfn_list (by Matt) is that >> machine pages for domain on ia64 are allocated on demand. So there''s >> requirement for parameters to contain start_pfn and nr_pages so that >> Xen can allocate necessary pages for that specific range. On x86 side, >> since all the pages are allocated when domain creation, get_pfn_list >> is aimed to query once for all pages and so the parameter can be only >> nr_pages. Just the background here. ;-) > >We could have a common interface then. All the uses of get_pfn_list in >common or x86 code will have start_pfn==0.OK. I can do it later when there''s no other requirement for an ia64 specific version. I believe that can be done just after current domU enable on ia64 will get solved at hand.> >The patches look okay, although the Python bits aren''t particularly >pretty. > > -- KeirSorry for bad Python skill. ;-) So Dan, please help check in. Thanks, Kevin _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ewan Mellor
2005-Oct-24 10:06 UTC
Re: [Xen-devel] [PATCH][RESEND] Control panel changes for IA64/VTI
On Mon, Oct 24, 2005 at 09:19:33AM +0800, Tian, Kevin wrote:> >From: Keir Fraser [mailto:Keir.Fraser@cl.cam.ac.uk] > > > >The patches look okay, although the Python bits aren''t particularly > >pretty. > > > > -- Keir > > Sorry for bad Python skill. ;-) So Dan, please help check in.Actually executing your code would be a good start. --- a/tools/python/xen/xend/image.py Sat Oct 15 03:09:43 2005 +++ b/tools/python/xen/xend/image.py Fri Oct 21 15:35:26 2005 @@ -58,6 +58,7 @@ """ ostype = None + page_kb = 4 def __init__(self, vm, imageConfig, deviceConfig): @@ -366,11 +367,13 @@ def getDomainMemory(self, mem): """@see ImageHandler.getDomainMemory""" + if os.uname[4] == ''ia64'': + page_kb = 16 # for ioreq_t and xenstore static_pages = 2 This is going to fail with a TypeError exception, because os.uname is a function. You want os.uname()[4]. Ewan. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Tian, Kevin
2005-Oct-24 10:55 UTC
RE: [Xen-devel] [PATCH][RESEND] Control panel changes for IA64/VTI
Ewan, thanks for pointing out following obvious error, and I need to make patch more carefully next time. ;-) Attached the updated version. To reduce the mail size, I skipped attaching the other untouched one. Thanks, Kevin>From: Ewan Mellor [mailto:ewan@xensource.com] >Sent: 2005年10月24日 18:07 >On Mon, Oct 24, 2005 at 09:19:33AM +0800, Tian, Kevin wrote: > >> >From: Keir Fraser [mailto:Keir.Fraser@cl.cam.ac.uk] >> > >> >The patches look okay, although the Python bits aren''t particularly >> >pretty. >> > >> > -- Keir >> >> Sorry for bad Python skill. ;-) So Dan, please help check in. > >Actually executing your code would be a good start. > >--- a/tools/python/xen/xend/image.py Sat Oct 15 03:09:43 2005 >+++ b/tools/python/xen/xend/image.py Fri Oct 21 15:35:26 2005 >@@ -58,6 +58,7 @@ > """ > > ostype = None >+ page_kb = 4 > > > def __init__(self, vm, imageConfig, deviceConfig): >@@ -366,11 +367,13 @@ > > def getDomainMemory(self, mem): > """@see ImageHandler.getDomainMemory""" >+ if os.uname[4] == ''ia64'': >+ page_kb = 16 > # for ioreq_t and xenstore > static_pages = 2 > >This is going to fail with a TypeError exception, because os.uname is a >function. You want os.uname()[4]. > >Ewan._______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel