From: Mark Williamson Subject: Re: Unable to include xen/sched.h Date: Sun, 2 Dec 2007 05:13:16 +0000 Message-ID: <200712020513.17600.mark.williamson@cl.cam.ac.uk> References: <54C82503D3EA20takebe_akio@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: ashutosh mehra , Akio Takebe List-Id: xen-devel@lists.xenproject.org On Monday 12 November 2007, ashutosh mehra wrote: > Can't I access it in a module running in dom0? Do I have to move the > module's code to the hypervisor? Depending on what you're trying to do, you could run the part of the code which gets the list of domain details in userspace. You can invoke domctl / sysctl calls from there, so you should be able to get the domain list just by calling an xc library function. If you really need a kernel component, you could either abuse the domctl / sysctls in kernel (if you use these from kernelspace then your kernel may be tied to a specific version of Xen when those change), or a userspace component could access those APIs and then communicate the relevant information to your kernel module. Hope that helps, Cheers, Mark > On Nov 12, 2007 1:42 PM, Akio Takebe wrote: > > Hi, > > > > >I'm unable to include xen/sched.h in my kernel module, although > > >xen/xenbus.h, etc work fine. I get an error - xen/sched.h - no such > > > file. > > > > I > > > > >need to access the for_each_domain macro. Please help! > > > > The macro and header file are for hypervisor. > > Guest kernel cannot use the macro and domain_list. > > > > Best Regards, > > > > Akio Takebe -- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel!