Pankaj Biswas
2013-May-15 10:07 UTC
I want to add a Xen driver and it doesn''t look completely trivial given the current driver architecture - any advice?
hi Team, Can you help me here. because the Xen driver is not mutually exclusive with their Linux driver, because I think the ability to detect Xen depends on it first finding that it is running on Linux. Any help is really appreciated. thanks, PANKAJCABS _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Ian Campbell
2013-May-15 11:00 UTC
Re: I want to add a Xen driver and it doesn''t look completely trivial given the current driver architecture - any advice?
On Wed, 2013-05-15 at 15:37 +0530, Pankaj Biswas wrote:> hi Team, > > > Can you help me here. because the Xen driver is not mutually exclusive > with their Linux driver, > > because I think the ability to detect Xen depends on it first finding > that it is running on Linux.I''m afraid I cannot parse the above, but: In a Xen system the majority if the drivers are handled by guest domains, often the domain 0 kernel, and not by the hypervisor. In other words usually a standard Linux driver will be sufficient and no special Xen code is required. What sort of device are you working with? Ian.
Konrad Rzeszutek Wilk
2013-May-15 14:15 UTC
Re: I want to add a Xen driver and it doesn''t look completely trivial given the current driver architecture - any advice?
On Wed, May 15, 2013 at 03:37:39PM +0530, Pankaj Biswas wrote:> hi Team, > > Can you help me here. because the Xen driver is not mutually exclusive with > their Linux driver, > > because I think the ability to detect Xen depends on it first finding that > it is running on Linux.I have no idea what you are saying here. Could you be more specific please?> > > Any help is really appreciated. > > > thanks, > > PANKAJCABS> _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel
Pankaj Biswas
2013-May-24 09:51 UTC
Re: I want to add a Xen driver and it doesn''t look completely trivial given the current driver architecture - any advice?
hi Ian and Konrad, Thanks for the reply and sorry for not being clear on what I want. I want to work on a CPU/RAM/PCI diagram tool in Xen, which will help in debugging kernel,hypervisor problems to understand the bus topology of a server. Tool will create a layout diagram for a server automatically using data from ACPI/SM-Bios tables, lspci oputput etc. It will either run on a Live system or offline using captured data to produce a graphical representation of the hardware device locations,memory bank locations etc. There are other benefits like labelling relevant hardware errata, performing bus throughput calculations. I think hwloc will be good for this requirement.in the code base, there is a "linux driver" which uses /sys/acpi/$FOO to discover the CPU topology. A good first task might be to write a "Xen driver" which can work out it is on Xen and use the topology hypercalls to gain the same information. So trying and geting hwloc working under Xen will solve this purpose. Can you please guide me here? -PankajCabs On Wed, May 15, 2013 at 7:45 PM, Konrad Rzeszutek Wilk < konrad.wilk@oracle.com> wrote:> On Wed, May 15, 2013 at 03:37:39PM +0530, Pankaj Biswas wrote: > > hi Team, > > > > Can you help me here. because the Xen driver is not mutually exclusive > with > > their Linux driver, > > > > because I think the ability to detect Xen depends on it first finding > that > > it is running on Linux. > > I have no idea what you are saying here. Could you be more specific please? > > > > > > > Any help is really appreciated. > > > > > > thanks, > > > > PANKAJCABS > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xen.org > > http://lists.xen.org/xen-devel > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Ian Campbell
2013-May-24 09:55 UTC
Re: I want to add a Xen driver and it doesn''t look completely trivial given the current driver architecture - any advice?
On Fri, 2013-05-24 at 15:21 +0530, Pankaj Biswas wrote: Please don''t top-post and please don''t post HTML emails to the list, plain text only please.> A good first task might be to write a "Xen driver" which can work out > it is on Xen and use the topology hypercalls to gain the same > information.You can use libxenctrl to make the Xen topology hypercalls. You do not need a special driver.> So trying and geting hwloc working under Xen will solve this purpose. > Can you please guide me here?I have no idea what hwloc requires. Ian.
Santosh Jodh
2013-May-24 15:06 UTC
Re: I want to add a Xen driver and it doesn''t look completely trivial given the current driver architecture - any advice?
Hey Pankaj, I wrote a script sometime back that uses ACPI tables to determine IO proximity for PCI devices using _PXM and SRAT tables. I am attaching the scripts. It expect acpidump, acpixtract and iasl on the system. This was written to run in a XenServer dom0 which does not have iasl - it expects iasl binary in the script directory. If you have iasl in the path, you can tweak run.sh to modify path for iasl. Let me know if this provides useful information and any comments/feedback or if you have trouble running it. Regards, Santosh -----Original Message----- From: xen-devel-bounces@lists.xen.org [mailto:xen-devel-bounces@lists.xen.org] On Behalf Of Ian Campbell Sent: Friday, May 24, 2013 2:56 AM To: Pankaj Biswas Cc: xen-devel@lists.xen.org; Konrad Rzeszutek Wilk Subject: Re: [Xen-devel] I want to add a Xen driver and it doesn''t look completely trivial given the current driver architecture - any advice? On Fri, 2013-05-24 at 15:21 +0530, Pankaj Biswas wrote: Please don''t top-post and please don''t post HTML emails to the list, plain text only please.> A good first task might be to write a "Xen driver" which can work out > it is on Xen and use the topology hypercalls to gain the same > information.You can use libxenctrl to make the Xen topology hypercalls. You do not need a special driver.> So trying and geting hwloc working under Xen will solve this purpose. > Can you please guide me here?I have no idea what hwloc requires. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Dario Faggioli
2013-May-29 15:55 UTC
Re: I want to add a Xen driver and it doesn''t look completely trivial given the current driver architecture - any advice?
On ven, 2013-05-24 at 10:55 +0100, Ian Campbell wrote:> On Fri, 2013-05-24 at 15:21 +0530, Pankaj Biswas wrote: > > Please don''t top-post and please don''t post HTML emails to the list, > plain text only please. > > > A good first task might be to write a "Xen driver" which can work out > > it is on Xen and use the topology hypercalls to gain the same > > information. > > You can use libxenctrl to make the Xen topology hypercalls. You do not > need a special driver. >Indeed, and that is available on top of libxl too (in case it is easier to use). Just look at output_topologyinfo() and output_numainfo() in tools/libxl/xl_cmdimpl.c . This might not be the complete set of information you need, but that''s all we have for now. Let us/me know whether there is something that you think is missing, and we''ll see whether and how to put it together. :-)> > So trying and geting hwloc working under Xen will solve this purpose. > > Can you please guide me here? > > I have no idea what hwloc requires. >Me neither, sorry. :-( Dario -- <<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel