All of lore.kernel.org
 help / color / mirror / Atom feed
* [GSoc] GSoc Introduction : Xen on ARM: create multiple guests from device tree
@ 2017-03-27  5:47 Methuku Karthik
  2017-03-27 23:43 ` Stefano Stabellini
  0 siblings, 1 reply; 15+ messages in thread
From: Methuku Karthik @ 2017-03-27  5:47 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: Stefano, xen-devel, Dario.faggioli, Meng Xu, Lars.kurt


[-- Attachment #1.1: Type: text/plain, Size: 1179 bytes --]

Hi Everyone,

My name is Karthik. I am a first year graduate student in Embedded Systems
at University of Pennsylvania. I am avid c, c++ and python programmer.I
have 4 years of work experience as Embedded Software developer at Airbus.

For the last four months ​I ​have been working as a research assistant ​in
PRECISE lab at the University of Pennsylvania​, ​helping Meng Xu​ (cc.ed)​
to evaluate ​the performance of the Xen's RTDS scheduler.

I'm interested in the following two projects. I'm happy to work on one of
them.
(1) Share a page in memory from the VM config file​.
(2)  Xen on ARM: create multiple guests from device tree.

I have experience in compiling Xen and installing it on ARM board(Nvidia
Jetson TK1). I'm also well equiped in using the xl tool to manage the VMs.

I noticed that I should contribute some bug fixes to be able to get the
ticket to the Xen GSoC.
Do you have some suggestions on how I should start?
Do you have a list of simple bugs that I can fix?

I'm very interested in the Xen Project. I want to become a Xen contributor
in the near future.

Thank you very much for your help!

Best,
Karthik

[-- Attachment #1.2: Type: text/html, Size: 1274 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GSoc] GSoc Introduction : Xen on ARM: create multiple guests from device tree
  2017-03-27  5:47 [GSoc] GSoc Introduction : Xen on ARM: create multiple guests from device tree Methuku Karthik
@ 2017-03-27 23:43 ` Stefano Stabellini
  2017-03-28 17:38   ` Stefano Stabellini
  0 siblings, 1 reply; 15+ messages in thread
From: Stefano Stabellini @ 2017-03-27 23:43 UTC (permalink / raw)
  To: Methuku Karthik
  Cc: Stefano Stabellini, Lars.kurt, Dario.faggioli, Stefano,
	julien.grall, Meng Xu, xen-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2047 bytes --]

Hello Methuku,

It is great to hear that you are interested in working on Xen on ARM.
It's good that you already know how to build and install Xen on an ARM
board.

Do you have serial access to your Nvidia Jetson TK1? If not, I would
suggest to setup another test environment based on a different board, or
simply use the ARM Foundation Platform which is a free (as in beer)
software emulator.

In terms of bug fixes, you could give a look at

https://xenproject.atlassian.net/projects/XEN/issues

Most of the items listed are large projects, but some of them are pretty
small, small enough to be a starting point. For example XEN-29 (Add
-fstack-protector support to the hypervisor), XEN-30 (Make out-of-tree
builds work) or XEN-38 (Xen - Embed .config in Xen binary).

Cheers,

Stefano


On Mon, 27 Mar 2017, Methuku Karthik wrote:
> Hi Everyone,
> 
> My name is Karthik. I am a first year graduate student in Embedded Systems at University of Pennsylvania. I am avid c, c++ and python programmer.I have 4 years of
> work experience as Embedded Software developer at Airbus.
> 
> For the last four months ​I ​have been working as a research assistant ​in PRECISE lab at the University of Pennsylvania​, ​helping Meng Xu​ (cc.ed)​ to evaluate ​the
> performance of the Xen's RTDS scheduler.
>      
> I'm interested in the following two projects. I'm happy to work on one of them.
> (1) Share a page in memory from the VM config file​.
> (2)  Xen on ARM: create multiple guests from device tree.
> 
> I have experience in compiling Xen and installing it on ARM board(Nvidia Jetson TK1). I'm also well equiped in using the xl tool to manage the VMs.
> 
> I noticed that I should contribute some bug fixes to be able to get the ticket to the Xen GSoC.
> Do you have some suggestions on how I should start?
> Do you have a list of simple bugs that I can fix?
> 
> I'm very interested in the Xen Project. I want to become a Xen contributor in the near future.
> 
> Thank you very much for your help!
> 
> Best,
> Karthik
> 
> 

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GSoc] GSoc Introduction : Xen on ARM: create multiple guests from device tree
  2017-03-27 23:43 ` Stefano Stabellini
@ 2017-03-28 17:38   ` Stefano Stabellini
  2017-03-28 23:25     ` Methuku Karthik
  0 siblings, 1 reply; 15+ messages in thread
From: Stefano Stabellini @ 2017-03-28 17:38 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: Methuku Karthik, Lars.kurt, Dario.faggioli, Stefano,
	julien.grall, Meng Xu, xen-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2842 bytes --]

I would also like to take the opportunity to remind you of the upcoming
deadline for applications submissions, which is the 3rd of April for
GSoC, see:

http://marc.info/?l=xen-devel&m=149071502330534

The GSoC application system is
https://summerofcode.withgoogle.com/get-started/.

Please give a look at the Xen Project application template here:

https://wiki.xenproject.org/wiki/GSoC_Student_Application_Template

It also includes an "Implementation Plan", where you have the chance to
explain the implementation plan for the projects you would like to apply
for. You can apply for more than one project if you want to.

Thanks,

Stefano


On Mon, 27 Mar 2017, Stefano Stabellini wrote:
> Hello Methuku,
> 
> It is great to hear that you are interested in working on Xen on ARM.
> It's good that you already know how to build and install Xen on an ARM
> board.
> 
> Do you have serial access to your Nvidia Jetson TK1? If not, I would
> suggest to setup another test environment based on a different board, or
> simply use the ARM Foundation Platform which is a free (as in beer)
> software emulator.
> 
> In terms of bug fixes, you could give a look at
> 
> https://xenproject.atlassian.net/projects/XEN/issues
> 
> Most of the items listed are large projects, but some of them are pretty
> small, small enough to be a starting point. For example XEN-29 (Add
> -fstack-protector support to the hypervisor), XEN-30 (Make out-of-tree
> builds work) or XEN-38 (Xen - Embed .config in Xen binary).
> 
> Cheers,
> 
> Stefano
> 
> 
> On Mon, 27 Mar 2017, Methuku Karthik wrote:
> > Hi Everyone,
> > 
> > My name is Karthik. I am a first year graduate student in Embedded Systems at University of Pennsylvania. I am avid c, c++ and python programmer.I have 4 years of
> > work experience as Embedded Software developer at Airbus.
> > 
> > For the last four months ​I ​have been working as a research assistant ​in PRECISE lab at the University of Pennsylvania​, ​helping Meng Xu​ (cc.ed)​ to evaluate ​the
> > performance of the Xen's RTDS scheduler.
> >      
> > I'm interested in the following two projects. I'm happy to work on one of them.
> > (1) Share a page in memory from the VM config file​.
> > (2)  Xen on ARM: create multiple guests from device tree.
> > 
> > I have experience in compiling Xen and installing it on ARM board(Nvidia Jetson TK1). I'm also well equiped in using the xl tool to manage the VMs.
> > 
> > I noticed that I should contribute some bug fixes to be able to get the ticket to the Xen GSoC.
> > Do you have some suggestions on how I should start?
> > Do you have a list of simple bugs that I can fix?
> > 
> > I'm very interested in the Xen Project. I want to become a Xen contributor in the near future.
> > 
> > Thank you very much for your help!
> > 
> > Best,
> > Karthik
> > 
> > 

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GSoc] GSoc Introduction : Xen on ARM: create multiple guests from device tree
  2017-03-28 17:38   ` Stefano Stabellini
@ 2017-03-28 23:25     ` Methuku Karthik
  2017-03-28 23:56       ` Stefano Stabellini
  0 siblings, 1 reply; 15+ messages in thread
From: Methuku Karthik @ 2017-03-28 23:25 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: Lars.kurt, Dario.faggioli, Stefano Stabellini, julien.grall,
	Meng Xu, xen-devel

Hi Stefano,

Kindly suggest me reading material that could help me understand and
come up with the proposal.

On Tue, Mar 28, 2017 at 1:38 PM, Stefano Stabellini
<sstabellini@kernel.org> wrote:
> I would also like to take the opportunity to remind you of the upcoming
> deadline for applications submissions, which is the 3rd of April for
> GSoC, see:
>
> http://marc.info/?l=xen-devel&m=149071502330534
>
> The GSoC application system is
> https://summerofcode.withgoogle.com/get-started/.
>
> Please give a look at the Xen Project application template here:
>
> https://wiki.xenproject.org/wiki/GSoC_Student_Application_Template
>
> It also includes an "Implementation Plan", where you have the chance to
> explain the implementation plan for the projects you would like to apply
> for. You can apply for more than one project if you want to.

Thanks for the reminder Stefano. I will post some questions about my
implementation plan.

I would like to spend my time fixing the bug but as deadline is
approaching , I would like to know the bare essential expected in the
proposal?


>
> Thanks,
>
> Stefano
>
>
> On Mon, 27 Mar 2017, Stefano Stabellini wrote:
>> Hello Methuku,
>>
>> It is great to hear that you are interested in working on Xen on ARM.
>> It's good that you already know how to build and install Xen on an ARM
>> board.
>>
>> Do you have serial access to your Nvidia Jetson TK1? If not, I would
>> suggest to setup another test environment based on a different board, or
>> simply use the ARM Foundation Platform which is a free (as in beer)
>> software emulator.
>>
>> In terms of bug fixes, you could give a look at
>>
>> https://xenproject.atlassian.net/projects/XEN/issues
>>
>> Most of the items listed are large projects, but some of them are pretty
>> small, small enough to be a starting point. For example XEN-29 (Add
>> -fstack-protector support to the hypervisor), XEN-30 (Make out-of-tree
>> builds work) or XEN-38 (Xen - Embed .config in Xen binary).

I  started working on XEN-38 for now. But i am also interested to look
into XEN-30.

>>
>> Cheers,
>>
>> Stefano
>>
>>
>> On Mon, 27 Mar 2017, Methuku Karthik wrote:
>> > Hi Everyone,
>> >
>> > My name is Karthik. I am a first year graduate student in Embedded Systems at University of Pennsylvania. I am avid c, c++ and python programmer.I have 4 years of
>> > work experience as Embedded Software developer at Airbus.
>> >
>> > For the last four months I have been working as a research assistant in PRECISE lab at the University of Pennsylvania, helping Meng Xu (cc.ed) to evaluate the
>> > performance of the Xen's RTDS scheduler.
>> >
>> > I'm interested in the following two projects. I'm happy to work on one of them.
>> > (1) Share a page in memory from the VM config file.
>> > (2)  Xen on ARM: create multiple guests from device tree.
>> >
>> > I have experience in compiling Xen and installing it on ARM board(Nvidia Jetson TK1). I'm also well equiped in using the xl tool to manage the VMs.
>> >
>> > I noticed that I should contribute some bug fixes to be able to get the ticket to the Xen GSoC.
>> > Do you have some suggestions on how I should start?
>> > Do you have a list of simple bugs that I can fix?
>> >
>> > I'm very interested in the Xen Project. I want to become a Xen contributor in the near future.
>> >
>> > Thank you very much for your help!
>> >
>> > Best,
>> > Karthik
>> >
>> >

Best,
Karthik.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GSoc] GSoc Introduction : Xen on ARM: create multiple guests from device tree
  2017-03-28 23:25     ` Methuku Karthik
@ 2017-03-28 23:56       ` Stefano Stabellini
  2017-03-29  0:12         ` Stefano Stabellini
  0 siblings, 1 reply; 15+ messages in thread
From: Stefano Stabellini @ 2017-03-28 23:56 UTC (permalink / raw)
  To: Methuku Karthik
  Cc: Stefano Stabellini, Lars.kurt, Dario.faggioli,
	Stefano Stabellini, julien.grall, Meng Xu, xen-devel

On Tue, 28 Mar 2017, Methuku Karthik wrote:
> Hi Stefano,
> 
> Kindly suggest me reading material that could help me understand and
> come up with the proposal.

Sure! For the "Xen on ARM: create multiple guests from device tree"
project, the idea is that on many embedded systems the user knows how
many guests to create beforehand, and usually it is a small number, like
2 or 3. Often these guests don't even have any PV frontends, but just a
set of devices assigned to them. An example could be an extremely simple
guest that only accesses one physical device (which is assigned to it at
boot) and prints messages using the debug hypercalls (see
xen/arch/arm/traps.c:do_debug_trap).

In this scenario, there is no need to wait for Dom0 to boot to create
this second guest (I'll call it Dom1, to distinguish it from Dom0). Xen
could actually create it directly by itself, the same way it starts Dom0
(see xen/arch/arm/domain_build.c:construct_dom0 and
docs/misc/arm/device-tree/booting.txt).

The project is about extending the existing device interface to pass an
additional kernel, initrd, command line arguments for the second virtual
machine. It would also need to include which devices should be assigned
to it. In response, Xen should build the second VM the same way it would
do normally when done via the toolstack (xl/libxl), but it would happen
at boot time, before Dom0 is fully up and running.



For the "Share a page in memory from the VM config file" project, 


> On Tue, Mar 28, 2017 at 1:38 PM, Stefano Stabellini
> <sstabellini@kernel.org> wrote:
> > I would also like to take the opportunity to remind you of the upcoming
> > deadline for applications submissions, which is the 3rd of April for
> > GSoC, see:
> >
> > http://marc.info/?l=xen-devel&m=149071502330534
> >
> > The GSoC application system is
> > https://summerofcode.withgoogle.com/get-started/.
> >
> > Please give a look at the Xen Project application template here:
> >
> > https://wiki.xenproject.org/wiki/GSoC_Student_Application_Template
> >
> > It also includes an "Implementation Plan", where you have the chance to
> > explain the implementation plan for the projects you would like to apply
> > for. You can apply for more than one project if you want to.
> 
> Thanks for the reminder Stefano. I will post some questions about my
> implementation plan.
> 
> I would like to spend my time fixing the bug but as deadline is
> approaching , I would like to know the bare essential expected in the
> proposal?

It needs to include the basic milestones and how long you estimate it is
going to take to complete each of them. More details you add, more
you'll show your understanding of the problem.


> >
> > Thanks,
> >
> > Stefano
> >
> >
> > On Mon, 27 Mar 2017, Stefano Stabellini wrote:
> >> Hello Methuku,
> >>
> >> It is great to hear that you are interested in working on Xen on ARM.
> >> It's good that you already know how to build and install Xen on an ARM
> >> board.
> >>
> >> Do you have serial access to your Nvidia Jetson TK1? If not, I would
> >> suggest to setup another test environment based on a different board, or
> >> simply use the ARM Foundation Platform which is a free (as in beer)
> >> software emulator.
> >>
> >> In terms of bug fixes, you could give a look at
> >>
> >> https://xenproject.atlassian.net/projects/XEN/issues
> >>
> >> Most of the items listed are large projects, but some of them are pretty
> >> small, small enough to be a starting point. For example XEN-29 (Add
> >> -fstack-protector support to the hypervisor), XEN-30 (Make out-of-tree
> >> builds work) or XEN-38 (Xen - Embed .config in Xen binary).
> 
> I  started working on XEN-38 for now. But i am also interested to look
> into XEN-30.

Be careful that XEN-30 is longer than it looks because there are lots of
Makefiles to fix. However, even if you don't convert all Makefiles to
support out-of-tree builds but only some, it would still be OK.


> >> Cheers,
> >>
> >> Stefano
> >>
> >>
> >> On Mon, 27 Mar 2017, Methuku Karthik wrote:
> >> > Hi Everyone,
> >> >
> >> > My name is Karthik. I am a first year graduate student in Embedded Systems at University of Pennsylvania. I am avid c, c++ and python programmer.I have 4 years of
> >> > work experience as Embedded Software developer at Airbus.
> >> >
> >> > For the last four months I have been working as a research assistant in PRECISE lab at the University of Pennsylvania, helping Meng Xu (cc.ed) to evaluate the
> >> > performance of the Xen's RTDS scheduler.
> >> >
> >> > I'm interested in the following two projects. I'm happy to work on one of them.
> >> > (1) Share a page in memory from the VM config file.
> >> > (2)  Xen on ARM: create multiple guests from device tree.
> >> >
> >> > I have experience in compiling Xen and installing it on ARM board(Nvidia Jetson TK1). I'm also well equiped in using the xl tool to manage the VMs.
> >> >
> >> > I noticed that I should contribute some bug fixes to be able to get the ticket to the Xen GSoC.
> >> > Do you have some suggestions on how I should start?
> >> > Do you have a list of simple bugs that I can fix?
> >> >
> >> > I'm very interested in the Xen Project. I want to become a Xen contributor in the near future.
> >> >
> >> > Thank you very much for your help!
> >> >
> >> > Best,
> >> > Karthik
> >> >
> >> >
> 
> Best,
> Karthik.
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GSoc] GSoc Introduction : Xen on ARM: create multiple guests from device tree
  2017-03-28 23:56       ` Stefano Stabellini
@ 2017-03-29  0:12         ` Stefano Stabellini
  2017-04-03 15:43           ` Methuku Karthik
  0 siblings, 1 reply; 15+ messages in thread
From: Stefano Stabellini @ 2017-03-29  0:12 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: wei.liu2, Methuku Karthik, Lars.kurt, andrew.cooper3,
	Dario.faggioli, Stefano Stabellini, julien.grall, Meng Xu,
	xen-devel

CC'ing a couple of maintainers that might have more insights on this
project.

On Tue, 28 Mar 2017, Stefano Stabellini wrote:
> On Tue, 28 Mar 2017, Methuku Karthik wrote:
> > Hi Stefano,
> > 
> > Kindly suggest me reading material that could help me understand and
> > come up with the proposal.
> 
> Sure! For the "Xen on ARM: create multiple guests from device tree"
> project, the idea is that on many embedded systems the user knows how
> many guests to create beforehand, and usually it is a small number, like
> 2 or 3. Often these guests don't even have any PV frontends, but just a
> set of devices assigned to them. An example could be an extremely simple
> guest that only accesses one physical device (which is assigned to it at
> boot) and prints messages using the debug hypercalls (see
> xen/arch/arm/traps.c:do_debug_trap).
> 
> In this scenario, there is no need to wait for Dom0 to boot to create
> this second guest (I'll call it Dom1, to distinguish it from Dom0). Xen
> could actually create it directly by itself, the same way it starts Dom0
> (see xen/arch/arm/domain_build.c:construct_dom0 and
> docs/misc/arm/device-tree/booting.txt).
> 
> The project is about extending the existing device interface to pass an
> additional kernel, initrd, command line arguments for the second virtual
> machine. It would also need to include which devices should be assigned
> to it. In response, Xen should build the second VM the same way it would
> do normally when done via the toolstack (xl/libxl), but it would happen
> at boot time, before Dom0 is fully up and running.
> 
> 
> 
> For the "Share a page in memory from the VM config file" project, 

Ops, I forgot to add this description :-)

I was saying, for the "Share a page in memory from the VM config file"
project, the idea is that we want to share a page in memory between two
VMs just by adding one line to their VM config files. They should be
able to communicate with each others straight away by writing at the
right address in memory. That way, even small embedded systems with no
xenstore support can still setup a communication channel with each
others.

Fundamentally, it just requires the xl/libxl toolstack (see tools/xl and
tools/libxl) to parse a new VM config file option, and in response share
a page at the specified address, or map a page at a specified address.
If the memory address is wrong, the toolstack needs to be able to handle
the failure. Sharing pages and mapping pages in xl/libxl is easy; the
difficulty of the project is coming up with the right parameter in the
VM config file so that multiple VMs can share different pages with each
others. It probably requires the introduction of a "token" to identify
the page you want to share across multiple VM config files.

For example, Dom1 should be able to share a page with Dom2 and a
different page with Dom3. It needs to be clear which page is shared with
which VM from the VM config files.


 
> > On Tue, Mar 28, 2017 at 1:38 PM, Stefano Stabellini
> > <sstabellini@kernel.org> wrote:
> > > I would also like to take the opportunity to remind you of the upcoming
> > > deadline for applications submissions, which is the 3rd of April for
> > > GSoC, see:
> > >
> > > http://marc.info/?l=xen-devel&m=149071502330534
> > >
> > > The GSoC application system is
> > > https://summerofcode.withgoogle.com/get-started/.
> > >
> > > Please give a look at the Xen Project application template here:
> > >
> > > https://wiki.xenproject.org/wiki/GSoC_Student_Application_Template
> > >
> > > It also includes an "Implementation Plan", where you have the chance to
> > > explain the implementation plan for the projects you would like to apply
> > > for. You can apply for more than one project if you want to.
> > 
> > Thanks for the reminder Stefano. I will post some questions about my
> > implementation plan.
> > 
> > I would like to spend my time fixing the bug but as deadline is
> > approaching , I would like to know the bare essential expected in the
> > proposal?
> 
> It needs to include the basic milestones and how long you estimate it is
> going to take to complete each of them. More details you add, more
> you'll show your understanding of the problem.
> 
> 
> > >
> > > Thanks,
> > >
> > > Stefano
> > >
> > >
> > > On Mon, 27 Mar 2017, Stefano Stabellini wrote:
> > >> Hello Methuku,
> > >>
> > >> It is great to hear that you are interested in working on Xen on ARM.
> > >> It's good that you already know how to build and install Xen on an ARM
> > >> board.
> > >>
> > >> Do you have serial access to your Nvidia Jetson TK1? If not, I would
> > >> suggest to setup another test environment based on a different board, or
> > >> simply use the ARM Foundation Platform which is a free (as in beer)
> > >> software emulator.
> > >>
> > >> In terms of bug fixes, you could give a look at
> > >>
> > >> https://xenproject.atlassian.net/projects/XEN/issues
> > >>
> > >> Most of the items listed are large projects, but some of them are pretty
> > >> small, small enough to be a starting point. For example XEN-29 (Add
> > >> -fstack-protector support to the hypervisor), XEN-30 (Make out-of-tree
> > >> builds work) or XEN-38 (Xen - Embed .config in Xen binary).
> > 
> > I  started working on XEN-38 for now. But i am also interested to look
> > into XEN-30.
> 
> Be careful that XEN-30 is longer than it looks because there are lots of
> Makefiles to fix. However, even if you don't convert all Makefiles to
> support out-of-tree builds but only some, it would still be OK.
> 
> 
> > >> Cheers,
> > >>
> > >> Stefano
> > >>
> > >>
> > >> On Mon, 27 Mar 2017, Methuku Karthik wrote:
> > >> > Hi Everyone,
> > >> >
> > >> > My name is Karthik. I am a first year graduate student in Embedded Systems at University of Pennsylvania. I am avid c, c++ and python programmer.I have 4 years of
> > >> > work experience as Embedded Software developer at Airbus.
> > >> >
> > >> > For the last four months I have been working as a research assistant in PRECISE lab at the University of Pennsylvania, helping Meng Xu (cc.ed) to evaluate the
> > >> > performance of the Xen's RTDS scheduler.
> > >> >
> > >> > I'm interested in the following two projects. I'm happy to work on one of them.
> > >> > (1) Share a page in memory from the VM config file.
> > >> > (2)  Xen on ARM: create multiple guests from device tree.
> > >> >
> > >> > I have experience in compiling Xen and installing it on ARM board(Nvidia Jetson TK1). I'm also well equiped in using the xl tool to manage the VMs.
> > >> >
> > >> > I noticed that I should contribute some bug fixes to be able to get the ticket to the Xen GSoC.
> > >> > Do you have some suggestions on how I should start?
> > >> > Do you have a list of simple bugs that I can fix?
> > >> >
> > >> > I'm very interested in the Xen Project. I want to become a Xen contributor in the near future.
> > >> >
> > >> > Thank you very much for your help!
> > >> >
> > >> > Best,
> > >> > Karthik
> > >> >
> > >> >
> > 
> > Best,
> > Karthik.
> > 
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GSoc] GSoc Introduction : Xen on ARM: create multiple guests from device tree
  2017-03-29  0:12         ` Stefano Stabellini
@ 2017-04-03 15:43           ` Methuku Karthik
  2017-04-03 19:35             ` Stefano Stabellini
  0 siblings, 1 reply; 15+ messages in thread
From: Methuku Karthik @ 2017-04-03 15:43 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: wei.liu2, Lars.kurt, andrew.cooper3, Dario.faggioli,
	Stefano Stabellini, julien.grall, Meng Xu, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 10448 bytes --]

Hi Stefano,

Thanks for Input. I was not able to spend enough time last couple of weeks
due to projects. I have received mail from Lars Kurt explaining submission
of draft proposal and possibility to work on micro tasks.

I have created a draft proposal from with your inputs and what i learnt
about sharing pages and memory management in Xen, please access it from here
<https://docs.google.com/document/d/1xLmR7x4yfCbRgpuefZQNhZ4lAu-6slW0oXPmjnxcnz0/edit#heading=h.1yvc35w6t3fu>

https://docs.google.com/document/d/1xLmR7x4yfCbRgpuefZQNhZ4lAu-
6slW0oXPmjnxcnz0/edit#heading=h.1yvc35w6t3fu

I haven't written anything about maintenance. I have included some links i
thought will be helpful under references and referenced wherever applicable.

Please suggest comments and inputs.

On Tue, Mar 28, 2017 at 8:12 PM, Stefano Stabellini <sstabellini@kernel.org>
wrote:
> CC'ing a couple of maintainers that might have more insights on this
> project.
>
> On Tue, 28 Mar 2017, Stefano Stabellini wrote:
>> On Tue, 28 Mar 2017, Methuku Karthik wrote:
>> > Hi Stefano,
>> >
>> > Kindly suggest me reading material that could help me understand and
>> > come up with the proposal.
>>
>> Sure! For the "Xen on ARM: create multiple guests from device tree"
>> project, the idea is that on many embedded systems the user knows how
>> many guests to create beforehand, and usually it is a small number, like
>> 2 or 3. Often these guests don't even have any PV frontends, but just a
>> set of devices assigned to them. An example could be an extremely simple
>> guest that only accesses one physical device (which is assigned to it at
>> boot) and prints messages using the debug hypercalls (see
>> xen/arch/arm/traps.c:do_debug_trap).
>>
>> In this scenario, there is no need to wait for Dom0 to boot to create
>> this second guest (I'll call it Dom1, to distinguish it from Dom0). Xen
>> could actually create it directly by itself, the same way it starts Dom0
>> (see xen/arch/arm/domain_build.c:construct_dom0 and
>> docs/misc/arm/device-tree/booting.txt).
>>
>> The project is about extending the existing device interface to pass an
>> additional kernel, initrd, command line arguments for the second virtual
>> machine. It would also need to include which devices should be assigned
>> to it. In response, Xen should build the second VM the same way it would
>> do normally when done via the toolstack (xl/libxl), but it would happen
>> at boot time, before Dom0 is fully up and running.
>>
>>
>>
>> For the "Share a page in memory from the VM config file" project,
>
> Ops, I forgot to add this description :-)
>
> I was saying, for the "Share a page in memory from the VM config file"
> project, the idea is that we want to share a page in memory between two
> VMs just by adding one line to their VM config files. They should be
> able to communicate with each others straight away by writing at the
> right address in memory. That way, even small embedded systems with no
> xenstore support can still setup a communication channel with each
> others.
>
> Fundamentally, it just requires the xl/libxl toolstack (see tools/xl and
> tools/libxl) to parse a new VM config file option, and in response share
> a page at the specified address, or map a page at a specified address.
> If the memory address is wrong, the toolstack needs to be able to handle
> the failure. Sharing pages and mapping pages in xl/libxl is easy; the
> difficulty of the project is coming up with the right parameter in the
> VM config file so that multiple VMs can share different pages with each
> others. It probably requires the introduction of a "token" to identify
> the page you want to share across multiple VM config files.
>
> For example, Dom1 should be able to share a page with Dom2 and a
> different page with Dom3. It needs to be clear which page is shared with
> which VM from the VM config files.
>
when we create vms using xl create , for example if i am planning create
three VMs,

Dom1, Dom2 and Dom3, because of the page sharing are we imposing any order
of creating VMs.

I am asking this question to clarify this point, while creation of Dom1 if
its sharing pages with Dom 2 and Dom 3 , should Xen already be aware of
Dom2 and Dom3?

I am referring to following links to understand about mem sharing.

http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/tests/mem-sharing/memshrtool.c;h=8e5e22b9e95d91f1441d8eb226b64852eca075d5;hb=HEAD
http://xenbits.xen.org/docs/unstable/misc/grant-tables.txt

I also want to figure out how domains are created and how xl tool parses
the file and passes on the information to domain creation . Let me know if
i am thinking in right direction.

suggest any resource or work which would help with designing config file
options.

>
>
>> > On Tue, Mar 28, 2017 at 1:38 PM, Stefano Stabellini
>> > <sstabellini@kernel.org> wrote:
>> > > I would also like to take the opportunity to remind you of the
upcoming
>> > > deadline for applications submissions, which is the 3rd of April for
>> > > GSoC, see:
>> > >
>> > > http://marc.info/?l=xen-devel&m=149071502330534
>> > >
>> > > The GSoC application system is
>> > > https://summerofcode.withgoogle.com/get-started/.
>> > >
>> > > Please give a look at the Xen Project application template here:
>> > >
>> > > https://wiki.xenproject.org/wiki/GSoC_Student_Application_Template
>> > >
>> > > It also includes an "Implementation Plan", where you have the chance
to
>> > > explain the implementation plan for the projects you would like to
apply
>> > > for. You can apply for more than one project if you want to.
>> >
>> > Thanks for the reminder Stefano. I will post some questions about my
>> > implementation plan.
>> >
>> > I would like to spend my time fixing the bug but as deadline is
>> > approaching , I would like to know the bare essential expected in the
>> > proposal?
>>
>> It needs to include the basic milestones and how long you estimate it is
>> going to take to complete each of them. More details you add, more
>> you'll show your understanding of the problem.
>>
>>
>> > >
>> > > Thanks,
>> > >
>> > > Stefano
>> > >
>> > >
>> > > On Mon, 27 Mar 2017, Stefano Stabellini wrote:
>> > >> Hello Methuku,
>> > >>
>> > >> It is great to hear that you are interested in working on Xen on
ARM.
>> > >> It's good that you already know how to build and install Xen on an
ARM
>> > >> board.
>> > >>
>> > >> Do you have serial access to your Nvidia Jetson TK1? If not, I would
>> > >> suggest to setup another test environment based on a different
board, or
>> > >> simply use the ARM Foundation Platform which is a free (as in beer)
>> > >> software emulator.
>> > >>
>> > >> In terms of bug fixes, you could give a look at
>> > >>
>> > >> https://xenproject.atlassian.net/projects/XEN/issues
>> > >>
>> > >> Most of the items listed are large projects, but some of them are
pretty
>> > >> small, small enough to be a starting point. For example XEN-29 (Add
>> > >> -fstack-protector support to the hypervisor), XEN-30 (Make
out-of-tree
>> > >> builds work) or XEN-38 (Xen - Embed .config in Xen binary).
>> >
>> > I  started working on XEN-38 for now. But i am also interested to look
>> > into XEN-30.
>>
>> Be careful that XEN-30 is longer than it looks because there are lots of
>> Makefiles to fix. However, even if you don't convert all Makefiles to
>> support out-of-tree builds but only some, it would still be OK.

I will start with Xen-38 that would help me in exploring init code. Correct
me if i am wrong.

I have a few questions and clarifications before proceeding further. I have
checked how config.gz file is generated in linux kernel source.
In linux kernel sources, if CONFIG_IKCONFIG_PROC option is set, .conifg
file which is generated after choosing options with lets say from make
menuconfig  is read into a variable, this way its part of build.

during init time proc_create service is used to create this file config.gz.
http://lxr.free-electrons.com/source/kernel/configs.c


I guess i have to do something similar.

Questions :

1. When Xen is build using the make command, we effectively set
XEN_COMPILE_ARCH, XEN_OS, XEN_TARGET which allow using corresponding .mk
file from config folder. These variable in turn decide what are the config
options. I wasnt able to find any .config. Please direct me to find the
file or if i am missing something.

2. Where and how this config file should be accessible to  User once in
Dom0. Is the xen folder created to keep the information about guest domains
like proc for process in linux kernel ? Will that be suitable location to
have config file.

3. if i assume that i will approach similarly, i have to add services to be
called during init stage. As am not acquainted with code base, i could just
grep with _start or _init or similar strings to find out initialization
code. Any input(function name or filename) to look for will be of great
help.

Best,
Karthik.

>>
>>
>> > >> Cheers,
>> > >>
>> > >> Stefano
>> > >>
>> > >>
>> > >> On Mon, 27 Mar 2017, Methuku Karthik wrote:
>> > >> > Hi Everyone,
>> > >> >
>> > >> > My name is Karthik. I am a first year graduate student in
Embedded Systems at University of Pennsylvania. I am avid c, c++ and python
programmer.I have 4 years of
>> > >> > work experience as Embedded Software developer at Airbus.
>> > >> >
>> > >> > For the last four months I have been working as a research
assistant in PRECISE lab at the University of Pennsylvania, helping Meng Xu
(cc.ed) to evaluate the
>> > >> > performance of the Xen's RTDS scheduler.
>> > >> >
>> > >> > I'm interested in the following two projects. I'm happy to work
on one of them.
>> > >> > (1) Share a page in memory from the VM config file.
>> > >> > (2)  Xen on ARM: create multiple guests from device tree.
>> > >> >
>> > >> > I have experience in compiling Xen and installing it on ARM
board(Nvidia Jetson TK1). I'm also well equiped in using the xl tool to
manage the VMs.
>> > >> >
>> > >> > I noticed that I should contribute some bug fixes to be able to
get the ticket to the Xen GSoC.
>> > >> > Do you have some suggestions on how I should start?
>> > >> > Do you have a list of simple bugs that I can fix?
>> > >> >
>> > >> > I'm very interested in the Xen Project. I want to become a Xen
contributor in the near future.
>> > >> >
>> > >> > Thank you very much for your help!
>> > >> >
>> > >> > Best,
>> > >> > Karthik
>> > >> >
>> > >> >
>> >
>> > Best,
>> > Karthik.
>> >
>>

[-- Attachment #1.2: Type: text/html, Size: 14147 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GSoc] GSoc Introduction : Xen on ARM: create multiple guests from device tree
  2017-04-03 15:43           ` Methuku Karthik
@ 2017-04-03 19:35             ` Stefano Stabellini
  2017-04-03 19:56               ` Methuku Karthik
  0 siblings, 1 reply; 15+ messages in thread
From: Stefano Stabellini @ 2017-04-03 19:35 UTC (permalink / raw)
  To: Methuku Karthik
  Cc: Stefano Stabellini, wei.liu2, Lars.kurt, andrew.cooper3,
	Dario.faggioli, Stefano Stabellini, julien.grall, Meng Xu,
	xen-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 11409 bytes --]

Thank you! I am looking forward to your contribution on the list! If you
encounter any issues, please let us know.

The code contribution is more important, but if you find the time in the
next few days, it would be nice to add more details to the
implementation plan, such as where the memory gets allocated, whether it
is taken from a VM, and if so, which one. Also what kind of "token"
could be used in the config option and how the toolstack could keep
track of the token - memory page references.

Thanks,

Stefano

On Mon, 3 Apr 2017, Methuku Karthik wrote:
> Hi Stefano,
> 
> Thanks for Input. I was not able to spend enough time last couple of weeks due to
> projects. I have received mail from Lars Kurt explaining submission of draft
> proposal and possibility to work on micro tasks.
> 
> I have created a draft proposal from with your inputs and what i learnt about
> sharing pages and memory management in Xen, please access it from here
> 
> https://docs.google.com/document/d/1xLmR7x4yfCbRgpuefZQNhZ4lAu-6slW0oXPmjnxcnz0/edi
> t#heading=h.1yvc35w6t3fu
> 
> I haven't written anything about maintenance. I have included some links i thought
> will be helpful under references and referenced wherever applicable.
> 
> Please suggest comments and inputs.
> 
> On Tue, Mar 28, 2017 at 8:12 PM, Stefano Stabellini <sstabellini@kernel.org> wrote:
> > CC'ing a couple of maintainers that might have more insights on this
> > project.
> >
> > On Tue, 28 Mar 2017, Stefano Stabellini wrote:
> >> On Tue, 28 Mar 2017, Methuku Karthik wrote:
> >> > Hi Stefano,
> >> >
> >> > Kindly suggest me reading material that could help me understand and
> >> > come up with the proposal.
> >>
> >> Sure! For the "Xen on ARM: create multiple guests from device tree"
> >> project, the idea is that on many embedded systems the user knows how
> >> many guests to create beforehand, and usually it is a small number, like
> >> 2 or 3. Often these guests don't even have any PV frontends, but just a
> >> set of devices assigned to them. An example could be an extremely simple
> >> guest that only accesses one physical device (which is assigned to it at
> >> boot) and prints messages using the debug hypercalls (see
> >> xen/arch/arm/traps.c:do_debug_trap).
> >>
> >> In this scenario, there is no need to wait for Dom0 to boot to create
> >> this second guest (I'll call it Dom1, to distinguish it from Dom0). Xen
> >> could actually create it directly by itself, the same way it starts Dom0
> >> (see xen/arch/arm/domain_build.c:construct_dom0 and
> >> docs/misc/arm/device-tree/booting.txt).
> >>
> >> The project is about extending the existing device interface to pass an
> >> additional kernel, initrd, command line arguments for the second virtual
> >> machine. It would also need to include which devices should be assigned
> >> to it. In response, Xen should build the second VM the same way it would
> >> do normally when done via the toolstack (xl/libxl), but it would happen
> >> at boot time, before Dom0 is fully up and running.
> >>
> >>
> >>
> >> For the "Share a page in memory from the VM config file" project,
> >
> > Ops, I forgot to add this description :-)
> >
> > I was saying, for the "Share a page in memory from the VM config file"
> > project, the idea is that we want to share a page in memory between two
> > VMs just by adding one line to their VM config files. They should be
> > able to communicate with each others straight away by writing at the
> > right address in memory. That way, even small embedded systems with no
> > xenstore support can still setup a communication channel with each
> > others.
> >
> > Fundamentally, it just requires the xl/libxl toolstack (see tools/xl and
> > tools/libxl) to parse a new VM config file option, and in response share
> > a page at the specified address, or map a page at a specified address.
> > If the memory address is wrong, the toolstack needs to be able to handle
> > the failure. Sharing pages and mapping pages in xl/libxl is easy; the
> > difficulty of the project is coming up with the right parameter in the
> > VM config file so that multiple VMs can share different pages with each
> > others. It probably requires the introduction of a "token" to identify
> > the page you want to share across multiple VM config files.
> >
> > For example, Dom1 should be able to share a page with Dom2 and a
> > different page with Dom3. It needs to be clear which page is shared with
> > which VM from the VM config files.
> >
> when we create vms using xl create , for example if i am planning create three VMs,
> 
> Dom1, Dom2 and Dom3, because of the page sharing are we imposing any order of
> creating VMs.
> 
> I am asking this question to clarify this point, while creation of Dom1 if its
> sharing pages with Dom 2 and Dom 3 , should Xen already be aware of Dom2 and Dom3?
> 
> I am referring to following links to understand about mem sharing.
> 
> http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/tests/mem-sharing/memshrtoo
> l.c;h=8e5e22b9e95d91f1441d8eb226b64852eca075d5;hb=HEAD
> http://xenbits.xen.org/docs/unstable/misc/grant-tables.txt
> 
> I also want to figure out how domains are created and how xl tool parses the file
> and passes on the information to domain creation . Let me know if i am thinking in
> right direction.
> 
> suggest any resource or work which would help with designing config file options.
> 
> >
> >
> >> > On Tue, Mar 28, 2017 at 1:38 PM, Stefano Stabellini
> >> > <sstabellini@kernel.org> wrote:
> >> > > I would also like to take the opportunity to remind you of the upcoming
> >> > > deadline for applications submissions, which is the 3rd of April for
> >> > > GSoC, see:
> >> > >
> >> > > http://marc.info/?l=xen-devel&m=149071502330534
> >> > >
> >> > > The GSoC application system is
> >> > > https://summerofcode.withgoogle.com/get-started/.
> >> > >
> >> > > Please give a look at the Xen Project application template here:
> >> > >
> >> > > https://wiki.xenproject.org/wiki/GSoC_Student_Application_Template
> >> > >
> >> > > It also includes an "Implementation Plan", where you have the chance to
> >> > > explain the implementation plan for the projects you would like to apply
> >> > > for. You can apply for more than one project if you want to.
> >> >
> >> > Thanks for the reminder Stefano. I will post some questions about my
> >> > implementation plan.
> >> >
> >> > I would like to spend my time fixing the bug but as deadline is
> >> > approaching , I would like to know the bare essential expected in the
> >> > proposal?
> >>
> >> It needs to include the basic milestones and how long you estimate it is
> >> going to take to complete each of them. More details you add, more
> >> you'll show your understanding of the problem.
> >>
> >>
> >> > >
> >> > > Thanks,
> >> > >
> >> > > Stefano
> >> > >
> >> > >
> >> > > On Mon, 27 Mar 2017, Stefano Stabellini wrote:
> >> > >> Hello Methuku,
> >> > >>
> >> > >> It is great to hear that you are interested in working on Xen on ARM.
> >> > >> It's good that you already know how to build and install Xen on an ARM
> >> > >> board.
> >> > >>
> >> > >> Do you have serial access to your Nvidia Jetson TK1? If not, I would
> >> > >> suggest to setup another test environment based on a different board, or
> >> > >> simply use the ARM Foundation Platform which is a free (as in beer)
> >> > >> software emulator.
> >> > >>
> >> > >> In terms of bug fixes, you could give a look at
> >> > >>
> >> > >> https://xenproject.atlassian.net/projects/XEN/issues
> >> > >>
> >> > >> Most of the items listed are large projects, but some of them are pretty
> >> > >> small, small enough to be a starting point. For example XEN-29 (Add
> >> > >> -fstack-protector support to the hypervisor), XEN-30 (Make out-of-tree
> >> > >> builds work) or XEN-38 (Xen - Embed .config in Xen binary).
> >> >
> >> > I  started working on XEN-38 for now. But i am also interested to look
> >> > into XEN-30.
> >>
> >> Be careful that XEN-30 is longer than it looks because there are lots of
> >> Makefiles to fix. However, even if you don't convert all Makefiles to
> >> support out-of-tree builds but only some, it would still be OK.
> 
> I will start with Xen-38 that would help me in exploring init code. Correct me if i
> am wrong.
> 
> I have a few questions and clarifications before proceeding further. I have checked
> how config.gz file is generated in linux kernel source.
> In linux kernel sources, if CONFIG_IKCONFIG_PROC option is set, .conifg file which
> is generated after choosing options with lets say from make menuconfig  is read into
> a variable, this way its part of build.
> 
> during init time proc_create service is used to create this file config.gz.
> http://lxr.free-electrons.com/source/kernel/configs.c
> 
> 
> I guess i have to do something similar.
> 
> Questions :
> 
> 1. When Xen is build using the make command, we effectively set XEN_COMPILE_ARCH,
> XEN_OS, XEN_TARGET which allow using corresponding .mk file from config folder.
> These variable in turn decide what are the config options. I wasnt able to find any
> .config. Please direct me to find the file or if i am missing something. 
> 
> 2. Where and how this config file should be accessible to  User once in Dom0. Is the
> xen folder created to keep the information about guest domains like proc for process
> in linux kernel ? Will that be suitable location to have config file.
> 
> 3. if i assume that i will approach similarly, i have to add services to be called
> during init stage. As am not acquainted with code base, i could just grep with
> _start or _init or similar strings to find out initialization code. Any
> input(function name or filename) to look for will be of great help.
> 
> Best,
> Karthik.
> 
> >>
> >>
> >> > >> Cheers,
> >> > >>
> >> > >> Stefano
> >> > >>
> >> > >>
> >> > >> On Mon, 27 Mar 2017, Methuku Karthik wrote:
> >> > >> > Hi Everyone,
> >> > >> >
> >> > >> > My name is Karthik. I am a first year graduate student in Embedded Systems
> at University of Pennsylvania. I am avid c, c++ and python programmer.I have 4 years
> of
> >> > >> > work experience as Embedded Software developer at Airbus.
> >> > >> >
> >> > >> > For the last four months I have been working as a research assistant in
> PRECISE lab at the University of Pennsylvania, helping Meng Xu (cc.ed) to evaluate
> the
> >> > >> > performance of the Xen's RTDS scheduler.
> >> > >> >
> >> > >> > I'm interested in the following two projects. I'm happy to work on one of
> them.
> >> > >> > (1) Share a page in memory from the VM config file.
> >> > >> > (2)  Xen on ARM: create multiple guests from device tree.
> >> > >> >
> >> > >> > I have experience in compiling Xen and installing it on ARM board(Nvidia
> Jetson TK1). I'm also well equiped in using the xl tool to manage the VMs.
> >> > >> >
> >> > >> > I noticed that I should contribute some bug fixes to be able to get the
> ticket to the Xen GSoC.
> >> > >> > Do you have some suggestions on how I should start?
> >> > >> > Do you have a list of simple bugs that I can fix?
> >> > >> >
> >> > >> > I'm very interested in the Xen Project. I want to become a Xen contributor
> in the near future.
> >> > >> >
> >> > >> > Thank you very much for your help!
> >> > >> >
> >> > >> > Best,
> >> > >> > Karthik
> >> > >> >
> >> > >> >
> >> >
> >> > Best,
> >> > Karthik.
> >> >
> >>
> 
> 
> 

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GSoc] GSoc Introduction : Xen on ARM: create multiple guests from device tree
  2017-04-03 19:35             ` Stefano Stabellini
@ 2017-04-03 19:56               ` Methuku Karthik
  2017-04-03 21:19                 ` Stefano Stabellini
  2017-04-04 17:29                 ` Stefano Stabellini
  0 siblings, 2 replies; 15+ messages in thread
From: Methuku Karthik @ 2017-04-03 19:56 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: wei.liu2, Lars.kurt, andrew.cooper3, Dario.faggioli,
	Stefano Stabellini, julien.grall, Meng Xu, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 14921 bytes --]

Hi Stefano,

I have asked questions in inline. Clarification below questions would
really help me in contribution. Please look into the questions. I am
highlighting them in this mail.

 For example, Dom1 should be able to share a page with Dom2 and a
  different page with Dom3. It needs to be clear which page is shared with
which VM from the VM config files.


when we create vms using xl create , for example if i am planning create
three VMs,

Dom1, Dom2 and Dom3, because of the page sharing are we imposing any order
of
  creating VMs.

  I am asking this question to clarify this point, while creation of Dom1
if its
  sharing pages with Dom 2 and Dom 3 , should Xen already be aware of Dom2
and Dom3?

  I am referring to following links to understand about mem sharing.

  http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/
tests/mem-sharing/memshrtoo
  l.c;h=8e5e22b9e95d91f1441d8eb226b64852eca075d5;hb=HEAD
  http://xenbits.xen.org/docs/unstable/misc/grant-tables.txt

  I also want to figure out how domains are created and how xl tool parses
the file
  and passes on the information to domain creation . Let me know if i am
thinking in
  right direction.

  suggest any resource or work which would help with designing config file
options.


 I will start with Xen-38 that would help me in exploring init code.
Correct me if i
  am wrong.

  I have a few questions and clarifications before proceeding further. I
have checked
  how config.gz file is generated in linux kernel source.
  In linux kernel sources, if CONFIG_IKCONFIG_PROC option is set, .conifg
file which
  is generated after choosing options with lets say from make menuconfig
is read into
  a variable, this way its part of build.

  during init time proc_create service is used to create this file
config.gz.
  http://lxr.free-electrons.com/source/kernel/configs.c


  I guess i have to do something similar.

  Questions :

  1. When Xen is build using the make command, we effectively set
XEN_COMPILE_ARCH,
  XEN_OS, XEN_TARGET which allow using corresponding .mk file from config
folder.
  These variable in turn decide what are the config options. I wasnt able
to find any
  .config. Please direct me to find the file or if i am missing something.

  2. Where and how this config file should be accessible to  User once in
Dom0. Is the
  xen folder created to keep the information about guest domains like proc
for process
  in linux kernel ? Will that be suitable location to have config file.

  3. if i assume that i will approach similarly, i have to add services to
be called
  during init stage. As am not acquainted with code base, i could just grep
with
  _start or _init or similar strings to find out initialization code. Any
  input(function name or filename) to look for will be of great help.

On Mon, Apr 3, 2017 at 3:35 PM, Stefano Stabellini <sstabellini@kernel.org>
wrote:

> Thank you! I am looking forward to your contribution on the list! If you
> encounter any issues, please let us know.
>
> The code contribution is more important, but if you find the time in the
> next few days, it would be nice to add more details to the
> implementation plan, such as where the memory gets allocated, whether it
> is taken from a VM, and if so, which one. Also what kind of "token"
> could be used in the config option and how the toolstack could keep
> track of the token - memory page references.
>
> Thanks,
>
> Stefano
>
> On Mon, 3 Apr 2017, Methuku Karthik wrote:
> > Hi Stefano,
> >
> > Thanks for Input. I was not able to spend enough time last couple of
> weeks due to
> > projects. I have received mail from Lars Kurt explaining submission of
> draft
> > proposal and possibility to work on micro tasks.
> >
> > I have created a draft proposal from with your inputs and what i learnt
> about
> > sharing pages and memory management in Xen, please access it from here
> >
> > https://docs.google.com/document/d/1xLmR7x4yfCbRgpuefZQNhZ4lAu-
> 6slW0oXPmjnxcnz0/edi
> > t#heading=h.1yvc35w6t3fu
> >
> > I haven't written anything about maintenance. I have included some links
> i thought
> > will be helpful under references and referenced wherever applicable.
> >
> > Please suggest comments and inputs.
> >
> > On Tue, Mar 28, 2017 at 8:12 PM, Stefano Stabellini <
> sstabellini@kernel.org> wrote:
> > > CC'ing a couple of maintainers that might have more insights on this
> > > project.
> > >
> > > On Tue, 28 Mar 2017, Stefano Stabellini wrote:
> > >> On Tue, 28 Mar 2017, Methuku Karthik wrote:
> > >> > Hi Stefano,
> > >> >
> > >> > Kindly suggest me reading material that could help me understand and
> > >> > come up with the proposal.
> > >>
> > >> Sure! For the "Xen on ARM: create multiple guests from device tree"
> > >> project, the idea is that on many embedded systems the user knows how
> > >> many guests to create beforehand, and usually it is a small number,
> like
> > >> 2 or 3. Often these guests don't even have any PV frontends, but just
> a
> > >> set of devices assigned to them. An example could be an extremely
> simple
> > >> guest that only accesses one physical device (which is assigned to it
> at
> > >> boot) and prints messages using the debug hypercalls (see
> > >> xen/arch/arm/traps.c:do_debug_trap).
> > >>
> > >> In this scenario, there is no need to wait for Dom0 to boot to create
> > >> this second guest (I'll call it Dom1, to distinguish it from Dom0).
> Xen
> > >> could actually create it directly by itself, the same way it starts
> Dom0
> > >> (see xen/arch/arm/domain_build.c:construct_dom0 and
> > >> docs/misc/arm/device-tree/booting.txt).
> > >>
> > >> The project is about extending the existing device interface to pass
> an
> > >> additional kernel, initrd, command line arguments for the second
> virtual
> > >> machine. It would also need to include which devices should be
> assigned
> > >> to it. In response, Xen should build the second VM the same way it
> would
> > >> do normally when done via the toolstack (xl/libxl), but it would
> happen
> > >> at boot time, before Dom0 is fully up and running.
> > >>
> > >>
> > >>
> > >> For the "Share a page in memory from the VM config file" project,
> > >
> > > Ops, I forgot to add this description :-)
> > >
> > > I was saying, for the "Share a page in memory from the VM config file"
> > > project, the idea is that we want to share a page in memory between two
> > > VMs just by adding one line to their VM config files. They should be
> > > able to communicate with each others straight away by writing at the
> > > right address in memory. That way, even small embedded systems with no
> > > xenstore support can still setup a communication channel with each
> > > others.
> > >
> > > Fundamentally, it just requires the xl/libxl toolstack (see tools/xl
> and
> > > tools/libxl) to parse a new VM config file option, and in response
> share
> > > a page at the specified address, or map a page at a specified address.
> > > If the memory address is wrong, the toolstack needs to be able to
> handle
> > > the failure. Sharing pages and mapping pages in xl/libxl is easy; the
> > > difficulty of the project is coming up with the right parameter in the
> > > VM config file so that multiple VMs can share different pages with each
> > > others. It probably requires the introduction of a "token" to identify
> > > the page you want to share across multiple VM config files.
> > >
> > > For example, Dom1 should be able to share a page with Dom2 and a
> > > different page with Dom3. It needs to be clear which page is shared
> with
> > > which VM from the VM config files.
> > >
> > when we create vms using xl create , for example if i am planning create
> three VMs,
> >
> > Dom1, Dom2 and Dom3, because of the page sharing are we imposing any
> order of
> > creating VMs.
> >
> > I am asking this question to clarify this point, while creation of Dom1
> if its
> > sharing pages with Dom 2 and Dom 3 , should Xen already be aware of Dom2
> and Dom3?
> >
> > I am referring to following links to understand about mem sharing.
> >
> > http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/
> tests/mem-sharing/memshrtoo
> > l.c;h=8e5e22b9e95d91f1441d8eb226b64852eca075d5;hb=HEAD
> > http://xenbits.xen.org/docs/unstable/misc/grant-tables.txt
> >
> > I also want to figure out how domains are created and how xl tool parses
> the file
> > and passes on the information to domain creation . Let me know if i am
> thinking in
> > right direction.
> >
> > suggest any resource or work which would help with designing config file
> options.
> >
> > >
> > >
> > >> > On Tue, Mar 28, 2017 at 1:38 PM, Stefano Stabellini
> > >> > <sstabellini@kernel.org> wrote:
> > >> > > I would also like to take the opportunity to remind you of the
> upcoming
> > >> > > deadline for applications submissions, which is the 3rd of April
> for
> > >> > > GSoC, see:
> > >> > >
> > >> > > http://marc.info/?l=xen-devel&m=149071502330534
> > >> > >
> > >> > > The GSoC application system is
> > >> > > https://summerofcode.withgoogle.com/get-started/.
> > >> > >
> > >> > > Please give a look at the Xen Project application template here:
> > >> > >
> > >> > > https://wiki.xenproject.org/wiki/GSoC_Student_Application_
> Template
> > >> > >
> > >> > > It also includes an "Implementation Plan", where you have the
> chance to
> > >> > > explain the implementation plan for the projects you would like
> to apply
> > >> > > for. You can apply for more than one project if you want to.
> > >> >
> > >> > Thanks for the reminder Stefano. I will post some questions about my
> > >> > implementation plan.
> > >> >
> > >> > I would like to spend my time fixing the bug but as deadline is
> > >> > approaching , I would like to know the bare essential expected in
> the
> > >> > proposal?
> > >>
> > >> It needs to include the basic milestones and how long you estimate it
> is
> > >> going to take to complete each of them. More details you add, more
> > >> you'll show your understanding of the problem.
> > >>
> > >>
> > >> > >
> > >> > > Thanks,
> > >> > >
> > >> > > Stefano
> > >> > >
> > >> > >
> > >> > > On Mon, 27 Mar 2017, Stefano Stabellini wrote:
> > >> > >> Hello Methuku,
> > >> > >>
> > >> > >> It is great to hear that you are interested in working on Xen on
> ARM.
> > >> > >> It's good that you already know how to build and install Xen on
> an ARM
> > >> > >> board.
> > >> > >>
> > >> > >> Do you have serial access to your Nvidia Jetson TK1? If not, I
> would
> > >> > >> suggest to setup another test environment based on a different
> board, or
> > >> > >> simply use the ARM Foundation Platform which is a free (as in
> beer)
> > >> > >> software emulator.
> > >> > >>
> > >> > >> In terms of bug fixes, you could give a look at
> > >> > >>
> > >> > >> https://xenproject.atlassian.net/projects/XEN/issues
> > >> > >>
> > >> > >> Most of the items listed are large projects, but some of them
> are pretty
> > >> > >> small, small enough to be a starting point. For example XEN-29
> (Add
> > >> > >> -fstack-protector support to the hypervisor), XEN-30 (Make
> out-of-tree
> > >> > >> builds work) or XEN-38 (Xen - Embed .config in Xen binary).
> > >> >
> > >> > I  started working on XEN-38 for now. But i am also interested to
> look
> > >> > into XEN-30.
> > >>
> > >> Be careful that XEN-30 is longer than it looks because there are lots
> of
> > >> Makefiles to fix. However, even if you don't convert all Makefiles to
> > >> support out-of-tree builds but only some, it would still be OK.
> >
> > I will start with Xen-38 that would help me in exploring init code.
> Correct me if i
> > am wrong.
> >
> > I have a few questions and clarifications before proceeding further. I
> have checked
> > how config.gz file is generated in linux kernel source.
> > In linux kernel sources, if CONFIG_IKCONFIG_PROC option is set, .conifg
> file which
> > is generated after choosing options with lets say from make menuconfig
> is read into
> > a variable, this way its part of build.
> >
> > during init time proc_create service is used to create this file
> config.gz.
> > http://lxr.free-electrons.com/source/kernel/configs.c
> >
> >
> > I guess i have to do something similar.
> >
> > Questions :
> >
> > 1. When Xen is build using the make command, we effectively set
> XEN_COMPILE_ARCH,
> > XEN_OS, XEN_TARGET which allow using corresponding .mk file from config
> folder.
> > These variable in turn decide what are the config options. I wasnt able
> to find any
> > .config. Please direct me to find the file or if i am missing something.
> >
> > 2. Where and how this config file should be accessible to  User once in
> Dom0. Is the
> > xen folder created to keep the information about guest domains like proc
> for process
> > in linux kernel ? Will that be suitable location to have config file.
> >
> > 3. if i assume that i will approach similarly, i have to add services to
> be called
> > during init stage. As am not acquainted with code base, i could just
> grep with
> > _start or _init or similar strings to find out initialization code. Any
> > input(function name or filename) to look for will be of great help.
> >
> > Best,
> > Karthik.
> >
> > >>
> > >>
> > >> > >> Cheers,
> > >> > >>
> > >> > >> Stefano
> > >> > >>
> > >> > >>
> > >> > >> On Mon, 27 Mar 2017, Methuku Karthik wrote:
> > >> > >> > Hi Everyone,
> > >> > >> >
> > >> > >> > My name is Karthik. I am a first year graduate student in
> Embedded Systems
> > at University of Pennsylvania. I am avid c, c++ and python programmer.I
> have 4 years
> > of
> > >> > >> > work experience as Embedded Software developer at Airbus.
> > >> > >> >
> > >> > >> > For the last four months I have been working as a research
> assistant in
> > PRECISE lab at the University of Pennsylvania, helping Meng Xu (cc.ed)
> to evaluate
> > the
> > >> > >> > performance of the Xen's RTDS scheduler.
> > >> > >> >
> > >> > >> > I'm interested in the following two projects. I'm happy to
> work on one of
> > them.
> > >> > >> > (1) Share a page in memory from the VM config file.
> > >> > >> > (2)  Xen on ARM: create multiple guests from device tree.
> > >> > >> >
> > >> > >> > I have experience in compiling Xen and installing it on ARM
> board(Nvidia
> > Jetson TK1). I'm also well equiped in using the xl tool to manage the
> VMs.
> > >> > >> >
> > >> > >> > I noticed that I should contribute some bug fixes to be able
> to get the
> > ticket to the Xen GSoC.
> > >> > >> > Do you have some suggestions on how I should start?
> > >> > >> > Do you have a list of simple bugs that I can fix?
> > >> > >> >
> > >> > >> > I'm very interested in the Xen Project. I want to become a Xen
> contributor
> > in the near future.
> > >> > >> >
> > >> > >> > Thank you very much for your help!
> > >> > >> >
> > >> > >> > Best,
> > >> > >> > Karthik
> > >> > >> >
> > >> > >> >
> > >> >
> > >> > Best,
> > >> > Karthik.
> > >> >
> > >>
> >
> >
> >
>

[-- Attachment #1.2: Type: text/html, Size: 20172 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GSoc] GSoc Introduction : Xen on ARM: create multiple guests from device tree
  2017-04-03 19:56               ` Methuku Karthik
@ 2017-04-03 21:19                 ` Stefano Stabellini
  2017-04-03 21:35                   ` Julien Grall
  2017-04-04 17:29                 ` Stefano Stabellini
  1 sibling, 1 reply; 15+ messages in thread
From: Stefano Stabellini @ 2017-04-03 21:19 UTC (permalink / raw)
  To: Methuku Karthik
  Cc: Stefano Stabellini, wei.liu2, Lars.kurt, andrew.cooper3,
	Dario.faggioli, Stefano Stabellini, julien.grall, Meng Xu,
	xen-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 17605 bytes --]

On Mon, 3 Apr 2017, Methuku Karthik wrote:
> Hi Stefano,
> 
> I have asked questions in inline. Clarification below questions would really help me in contribution. Please look into the questions. I am highlighting them in this mail.

Hi Methuku,

please do not use HTML in emails.


>  For example, Dom1 should be able to share a page with Dom2 and a
>   different page with Dom3. It needs to be clear which page is shared with
> which VM from the VM config files.
> 
>  
> when we create vms using xl create , for example if i am planning create three VMs,
> 
> Dom1, Dom2 and Dom3, because of the page sharing are we imposing any order of
>   creating VMs.
> 
>   I am asking this question to clarify this point, while creation of Dom1 if its
>   sharing pages with Dom 2 and Dom 3 , should Xen already be aware of Dom2 and Dom3?

I don't think so. The user should be able to share the same page even
with Dom4 when it comes along.



>   I am referring to following links to understand about mem sharing.
> 
>   http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/tests/mem-sharing/memshrtoo
>   l.c;h=8e5e22b9e95d91f1441d8eb226b64852eca075d5;hb=HEAD
>   http://xenbits.xen.org/docs/unstable/misc/grant-tables.txt
> 
>   I also want to figure out how domains are created and how xl tool parses the file
>   and passes on the information to domain creation . Let me know if i am thinking in
>   right direction.

I think we won't be able to use the grant table for this. The toolstack
will have to manually map a given page of one guest to another guest.


>   suggest any resource or work which would help with designing config file options.

Look at the existing xl config file options which are described on the
man page.


>  I will start with Xen-38 that would help me in exploring init code. Correct me if i
>   am wrong.

XEN-38 is a good start but it's actually only a build change.


>   I have a few questions and clarifications before proceeding further. I have checked
>   how config.gz file is generated in linux kernel source.
>   In linux kernel sources, if CONFIG_IKCONFIG_PROC option is set, .conifg file which
>   is generated after choosing options with lets say from make menuconfig  is read into
>   a variable, this way its part of build.
> 
>   during init time proc_create service is used to create this file config.gz.
>   http://lxr.free-electrons.com/source/kernel/configs.c
> 
> 
>   I guess i have to do something similar.
> 
>   Questions :
> 
>   1. When Xen is build using the make command, we effectively set XEN_COMPILE_ARCH,
>   XEN_OS, XEN_TARGET which allow using corresponding .mk file from config folder.
>   These variable in turn decide what are the config options. I wasnt able to find any
>   .config. Please direct me to find the file or if i am missing something. 

Give a look at xen/.config, that is the file we would like to embed into
the xen binary. Probably it would need to be included in an header file
and become a very long char[].


>   2. Where and how this config file should be accessible to  User once in Dom0. Is the
>   xen folder created to keep the information about guest domains like proc for process
>   in linux kernel ? Will that be suitable location to have config file.

One option is to export it as a new hypercall. That would be great, but
I think that is beyond the scope of a small inital code contribution.

What we would like is to be able to extract the .config from a xen
binary manually, for example using the "strings" command. Let's supposed
that a user is running Xen and finds a bug. We asked her to provide us
with her Xen binary. We get the binary and from it we extract the
.config.


>   3. if i assume that i will approach similarly, i have to add services to be called
>   during init stage. As am not acquainted with code base, i could just grep with
>   _start or _init or similar strings to find out initialization code. Any
>   input(function name or filename) to look for will be of great help.
>
> On Mon, Apr 3, 2017 at 3:35 PM, Stefano Stabellini <sstabellini@kernel.org> wrote:
>       Thank you! I am looking forward to your contribution on the list! If you
>       encounter any issues, please let us know.
> 
>       The code contribution is more important, but if you find the time in the
>       next few days, it would be nice to add more details to the
>       implementation plan, such as where the memory gets allocated, whether it
>       is taken from a VM, and if so, which one. Also what kind of "token"
>       could be used in the config option and how the toolstack could keep
>       track of the token - memory page references.
> 
>       Thanks,
> 
>       Stefano
> 
>       On Mon, 3 Apr 2017, Methuku Karthik wrote:
>       > Hi Stefano,
>       >
>       > Thanks for Input. I was not able to spend enough time last couple of weeks due to
>       > projects. I have received mail from Lars Kurt explaining submission of draft
>       > proposal and possibility to work on micro tasks.
>       >
>       > I have created a draft proposal from with your inputs and what i learnt about
>       > sharing pages and memory management in Xen, please access it from here
>       >
>       > https://docs.google.com/document/d/1xLmR7x4yfCbRgpuefZQNhZ4lAu-6slW0oXPmjnxcnz0/edi
>       > t#heading=h.1yvc35w6t3fu
>       >
>       > I haven't written anything about maintenance. I have included some links i thought
>       > will be helpful under references and referenced wherever applicable.
>       >
>       > Please suggest comments and inputs.
>       >
>       > On Tue, Mar 28, 2017 at 8:12 PM, Stefano Stabellini <sstabellini@kernel.org> wrote:
>       > > CC'ing a couple of maintainers that might have more insights on this
>       > > project.
>       > >
>       > > On Tue, 28 Mar 2017, Stefano Stabellini wrote:
>       > >> On Tue, 28 Mar 2017, Methuku Karthik wrote:
>       > >> > Hi Stefano,
>       > >> >
>       > >> > Kindly suggest me reading material that could help me understand and
>       > >> > come up with the proposal.
>       > >>
>       > >> Sure! For the "Xen on ARM: create multiple guests from device tree"
>       > >> project, the idea is that on many embedded systems the user knows how
>       > >> many guests to create beforehand, and usually it is a small number, like
>       > >> 2 or 3. Often these guests don't even have any PV frontends, but just a
>       > >> set of devices assigned to them. An example could be an extremely simple
>       > >> guest that only accesses one physical device (which is assigned to it at
>       > >> boot) and prints messages using the debug hypercalls (see
>       > >> xen/arch/arm/traps.c:do_debug_trap).
>       > >>
>       > >> In this scenario, there is no need to wait for Dom0 to boot to create
>       > >> this second guest (I'll call it Dom1, to distinguish it from Dom0). Xen
>       > >> could actually create it directly by itself, the same way it starts Dom0
>       > >> (see xen/arch/arm/domain_build.c:construct_dom0 and
>       > >> docs/misc/arm/device-tree/booting.txt).
>       > >>
>       > >> The project is about extending the existing device interface to pass an
>       > >> additional kernel, initrd, command line arguments for the second virtual
>       > >> machine. It would also need to include which devices should be assigned
>       > >> to it. In response, Xen should build the second VM the same way it would
>       > >> do normally when done via the toolstack (xl/libxl), but it would happen
>       > >> at boot time, before Dom0 is fully up and running.
>       > >>
>       > >>
>       > >>
>       > >> For the "Share a page in memory from the VM config file" project,
>       > >
>       > > Ops, I forgot to add this description :-)
>       > >
>       > > I was saying, for the "Share a page in memory from the VM config file"
>       > > project, the idea is that we want to share a page in memory between two
>       > > VMs just by adding one line to their VM config files. They should be
>       > > able to communicate with each others straight away by writing at the
>       > > right address in memory. That way, even small embedded systems with no
>       > > xenstore support can still setup a communication channel with each
>       > > others.
>       > >
>       > > Fundamentally, it just requires the xl/libxl toolstack (see tools/xl and
>       > > tools/libxl) to parse a new VM config file option, and in response share
>       > > a page at the specified address, or map a page at a specified address.
>       > > If the memory address is wrong, the toolstack needs to be able to handle
>       > > the failure. Sharing pages and mapping pages in xl/libxl is easy; the
>       > > difficulty of the project is coming up with the right parameter in the
>       > > VM config file so that multiple VMs can share different pages with each
>       > > others. It probably requires the introduction of a "token" to identify
>       > > the page you want to share across multiple VM config files.
>       > >
>       > > For example, Dom1 should be able to share a page with Dom2 and a
>       > > different page with Dom3. It needs to be clear which page is shared with
>       > > which VM from the VM config files.
>       > >
>       > when we create vms using xl create , for example if i am planning create three VMs,
>       >
>       > Dom1, Dom2 and Dom3, because of the page sharing are we imposing any order of
>       > creating VMs.
>       >
>       > I am asking this question to clarify this point, while creation of Dom1 if its
>       > sharing pages with Dom 2 and Dom 3 , should Xen already be aware of Dom2 and Dom3?
>       >
>       > I am referring to following links to understand about mem sharing.
>       >
>       > http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/tests/mem-sharing/memshrtoo
>       > l.c;h=8e5e22b9e95d91f1441d8eb226b64852eca075d5;hb=HEAD
>       > http://xenbits.xen.org/docs/unstable/misc/grant-tables.txt
>       >
>       > I also want to figure out how domains are created and how xl tool parses the file
>       > and passes on the information to domain creation . Let me know if i am thinking in
>       > right direction.
>       >
>       > suggest any resource or work which would help with designing config file options.
>       >
>       > >
>       > >
>       > >> > On Tue, Mar 28, 2017 at 1:38 PM, Stefano Stabellini
>       > >> > <sstabellini@kernel.org> wrote:
>       > >> > > I would also like to take the opportunity to remind you of the upcoming
>       > >> > > deadline for applications submissions, which is the 3rd of April for
>       > >> > > GSoC, see:
>       > >> > >
>       > >> > > http://marc.info/?l=xen-devel&m=149071502330534
>       > >> > >
>       > >> > > The GSoC application system is
>       > >> > > https://summerofcode.withgoogle.com/get-started/.
>       > >> > >
>       > >> > > Please give a look at the Xen Project application template here:
>       > >> > >
>       > >> > > https://wiki.xenproject.org/wiki/GSoC_Student_Application_Template
>       > >> > >
>       > >> > > It also includes an "Implementation Plan", where you have the chance to
>       > >> > > explain the implementation plan for the projects you would like to apply
>       > >> > > for. You can apply for more than one project if you want to.
>       > >> >
>       > >> > Thanks for the reminder Stefano. I will post some questions about my
>       > >> > implementation plan.
>       > >> >
>       > >> > I would like to spend my time fixing the bug but as deadline is
>       > >> > approaching , I would like to know the bare essential expected in the
>       > >> > proposal?
>       > >>
>       > >> It needs to include the basic milestones and how long you estimate it is
>       > >> going to take to complete each of them. More details you add, more
>       > >> you'll show your understanding of the problem.
>       > >>
>       > >>
>       > >> > >
>       > >> > > Thanks,
>       > >> > >
>       > >> > > Stefano
>       > >> > >
>       > >> > >
>       > >> > > On Mon, 27 Mar 2017, Stefano Stabellini wrote:
>       > >> > >> Hello Methuku,
>       > >> > >>
>       > >> > >> It is great to hear that you are interested in working on Xen on ARM.
>       > >> > >> It's good that you already know how to build and install Xen on an ARM
>       > >> > >> board.
>       > >> > >>
>       > >> > >> Do you have serial access to your Nvidia Jetson TK1? If not, I would
>       > >> > >> suggest to setup another test environment based on a different board, or
>       > >> > >> simply use the ARM Foundation Platform which is a free (as in beer)
>       > >> > >> software emulator.
>       > >> > >>
>       > >> > >> In terms of bug fixes, you could give a look at
>       > >> > >>
>       > >> > >> https://xenproject.atlassian.net/projects/XEN/issues
>       > >> > >>
>       > >> > >> Most of the items listed are large projects, but some of them are pretty
>       > >> > >> small, small enough to be a starting point. For example XEN-29 (Add
>       > >> > >> -fstack-protector support to the hypervisor), XEN-30 (Make out-of-tree
>       > >> > >> builds work) or XEN-38 (Xen - Embed .config in Xen binary).
>       > >> >
>       > >> > I  started working on XEN-38 for now. But i am also interested to look
>       > >> > into XEN-30.
>       > >>
>       > >> Be careful that XEN-30 is longer than it looks because there are lots of
>       > >> Makefiles to fix. However, even if you don't convert all Makefiles to
>       > >> support out-of-tree builds but only some, it would still be OK.
>       >
>       > I will start with Xen-38 that would help me in exploring init code. Correct me if i
>       > am wrong.
>       >
>       > I have a few questions and clarifications before proceeding further. I have checked
>       > how config.gz file is generated in linux kernel source.
>       > In linux kernel sources, if CONFIG_IKCONFIG_PROC option is set, .conifg file which
>       > is generated after choosing options with lets say from make menuconfig  is read into
>       > a variable, this way its part of build.
>       >
>       > during init time proc_create service is used to create this file config.gz.
>       > http://lxr.free-electrons.com/source/kernel/configs.c
>       >
>       >
>       > I guess i have to do something similar.
>       >
>       > Questions :
>       >
>       > 1. When Xen is build using the make command, we effectively set XEN_COMPILE_ARCH,
>       > XEN_OS, XEN_TARGET which allow using corresponding .mk file from config folder.
>       > These variable in turn decide what are the config options. I wasnt able to find any
>       > .config. Please direct me to find the file or if i am missing something. 
>       >
>       > 2. Where and how this config file should be accessible to  User once in Dom0. Is the
>       > xen folder created to keep the information about guest domains like proc for process
>       > in linux kernel ? Will that be suitable location to have config file.
>       >
>       > 3. if i assume that i will approach similarly, i have to add services to be called
>       > during init stage. As am not acquainted with code base, i could just grep with
>       > _start or _init or similar strings to find out initialization code. Any
>       > input(function name or filename) to look for will be of great help.
>       >
>       > Best,
>       > Karthik.
>       >
>       > >>
>       > >>
>       > >> > >> Cheers,
>       > >> > >>
>       > >> > >> Stefano
>       > >> > >>
>       > >> > >>
>       > >> > >> On Mon, 27 Mar 2017, Methuku Karthik wrote:
>       > >> > >> > Hi Everyone,
>       > >> > >> >
>       > >> > >> > My name is Karthik. I am a first year graduate student in Embedded Systems
>       > at University of Pennsylvania. I am avid c, c++ and python programmer.I have 4 years
>       > of
>       > >> > >> > work experience as Embedded Software developer at Airbus.
>       > >> > >> >
>       > >> > >> > For the last four months I have been working as a research assistant in
>       > PRECISE lab at the University of Pennsylvania, helping Meng Xu (cc.ed) to evaluate
>       > the
>       > >> > >> > performance of the Xen's RTDS scheduler.
>       > >> > >> >
>       > >> > >> > I'm interested in the following two projects. I'm happy to work on one of
>       > them.
>       > >> > >> > (1) Share a page in memory from the VM config file.
>       > >> > >> > (2)  Xen on ARM: create multiple guests from device tree.
>       > >> > >> >
>       > >> > >> > I have experience in compiling Xen and installing it on ARM board(Nvidia
>       > Jetson TK1). I'm also well equiped in using the xl tool to manage the VMs.
>       > >> > >> >
>       > >> > >> > I noticed that I should contribute some bug fixes to be able to get the
>       > ticket to the Xen GSoC.
>       > >> > >> > Do you have some suggestions on how I should start?
>       > >> > >> > Do you have a list of simple bugs that I can fix?
>       > >> > >> >
>       > >> > >> > I'm very interested in the Xen Project. I want to become a Xen contributor
>       > in the near future.
>       > >> > >> >
>       > >> > >> > Thank you very much for your help!
>       > >> > >> >
>       > >> > >> > Best,
>       > >> > >> > Karthik
>       > >> > >> >
>       > >> > >> >
>       > >> >
>       > >> > Best,
>       > >> > Karthik.
>       > >> >
>       > >>
>       >
>       >
>       >
> 
> 
> 
> 

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GSoc] GSoc Introduction : Xen on ARM: create multiple guests from device tree
  2017-04-03 21:19                 ` Stefano Stabellini
@ 2017-04-03 21:35                   ` Julien Grall
  0 siblings, 0 replies; 15+ messages in thread
From: Julien Grall @ 2017-04-03 21:35 UTC (permalink / raw)
  To: Stefano Stabellini, Methuku Karthik
  Cc: wei.liu2, Lars.kurt, andrew.cooper3, Dario.faggioli,
	Stefano Stabellini, Meng Xu, xen-devel

Hi,

On 04/03/2017 10:19 PM, Stefano Stabellini wrote:
> On Mon, 3 Apr 2017, Methuku Karthik wrote:
> What we would like is to be able to extract the .config from a xen
> binary manually, for example using the "strings" command. Let's supposed
> that a user is running Xen and finds a bug. We asked her to provide us
> with her Xen binary. We get the binary and from it we extract the
> .config.

You might want to have a look at what Linux does to embedded and extract 
.config. Specially the script scripts/ikconfig under the Linux repo.

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GSoc] GSoc Introduction : Xen on ARM: create multiple guests from device tree
  2017-04-03 19:56               ` Methuku Karthik
  2017-04-03 21:19                 ` Stefano Stabellini
@ 2017-04-04 17:29                 ` Stefano Stabellini
  2017-04-06 23:29                   ` Methuku Karthik
  1 sibling, 1 reply; 15+ messages in thread
From: Stefano Stabellini @ 2017-04-04 17:29 UTC (permalink / raw)
  To: Methuku Karthik
  Cc: Stefano Stabellini, wei.liu2, Lars.kurt, andrew.cooper3,
	Dario.faggioli, Stefano Stabellini, julien.grall, Meng Xu,
	xen-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 16873 bytes --]

One more thing: the deadline for microtasks (the patch submission below
to fix XEN-38) is technically Monday the 10th of April, but in practice
the patch needs to be sent this week to be able to follow up review
comments appropriately. Ideally the patch should be already committed by
Monday the 10th.

On Mon, 3 Apr 2017, Methuku Karthik wrote:
> Hi Stefano,
> 
> I have asked questions in inline. Clarification below questions would really help me in contribution. Please look into the questions. I am highlighting them in this mail.
> 
>  For example, Dom1 should be able to share a page with Dom2 and a
>   different page with Dom3. It needs to be clear which page is shared with
> which VM from the VM config files.
> 
>  
> when we create vms using xl create , for example if i am planning create three VMs,
> 
> Dom1, Dom2 and Dom3, because of the page sharing are we imposing any order of
>   creating VMs.
> 
>   I am asking this question to clarify this point, while creation of Dom1 if its
>   sharing pages with Dom 2 and Dom 3 , should Xen already be aware of Dom2 and Dom3?
> 
>   I am referring to following links to understand about mem sharing.
> 
>   http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/tests/mem-sharing/memshrtoo
>   l.c;h=8e5e22b9e95d91f1441d8eb226b64852eca075d5;hb=HEAD
>   http://xenbits.xen.org/docs/unstable/misc/grant-tables.txt
> 
>   I also want to figure out how domains are created and how xl tool parses the file
>   and passes on the information to domain creation . Let me know if i am thinking in
>   right direction.
> 
>   suggest any resource or work which would help with designing config file options.
> 
> 
>  I will start with Xen-38 that would help me in exploring init code. Correct me if i
>   am wrong.
> 
>   I have a few questions and clarifications before proceeding further. I have checked
>   how config.gz file is generated in linux kernel source.
>   In linux kernel sources, if CONFIG_IKCONFIG_PROC option is set, .conifg file which
>   is generated after choosing options with lets say from make menuconfig  is read into
>   a variable, this way its part of build.
> 
>   during init time proc_create service is used to create this file config.gz.
>   http://lxr.free-electrons.com/source/kernel/configs.c
> 
> 
>   I guess i have to do something similar.
> 
>   Questions :
> 
>   1. When Xen is build using the make command, we effectively set XEN_COMPILE_ARCH,
>   XEN_OS, XEN_TARGET which allow using corresponding .mk file from config folder.
>   These variable in turn decide what are the config options. I wasnt able to find any
>   .config. Please direct me to find the file or if i am missing something. 
> 
>   2. Where and how this config file should be accessible to  User once in Dom0. Is the
>   xen folder created to keep the information about guest domains like proc for process
>   in linux kernel ? Will that be suitable location to have config file.
> 
>   3. if i assume that i will approach similarly, i have to add services to be called
>   during init stage. As am not acquainted with code base, i could just grep with
>   _start or _init or similar strings to find out initialization code. Any
>   input(function name or filename) to look for will be of great help.
> 
> On Mon, Apr 3, 2017 at 3:35 PM, Stefano Stabellini <sstabellini@kernel.org> wrote:
>       Thank you! I am looking forward to your contribution on the list! If you
>       encounter any issues, please let us know.
> 
>       The code contribution is more important, but if you find the time in the
>       next few days, it would be nice to add more details to the
>       implementation plan, such as where the memory gets allocated, whether it
>       is taken from a VM, and if so, which one. Also what kind of "token"
>       could be used in the config option and how the toolstack could keep
>       track of the token - memory page references.
> 
>       Thanks,
> 
>       Stefano
> 
>       On Mon, 3 Apr 2017, Methuku Karthik wrote:
>       > Hi Stefano,
>       >
>       > Thanks for Input. I was not able to spend enough time last couple of weeks due to
>       > projects. I have received mail from Lars Kurt explaining submission of draft
>       > proposal and possibility to work on micro tasks.
>       >
>       > I have created a draft proposal from with your inputs and what i learnt about
>       > sharing pages and memory management in Xen, please access it from here
>       >
>       > https://docs.google.com/document/d/1xLmR7x4yfCbRgpuefZQNhZ4lAu-6slW0oXPmjnxcnz0/edi
>       > t#heading=h.1yvc35w6t3fu
>       >
>       > I haven't written anything about maintenance. I have included some links i thought
>       > will be helpful under references and referenced wherever applicable.
>       >
>       > Please suggest comments and inputs.
>       >
>       > On Tue, Mar 28, 2017 at 8:12 PM, Stefano Stabellini <sstabellini@kernel.org> wrote:
>       > > CC'ing a couple of maintainers that might have more insights on this
>       > > project.
>       > >
>       > > On Tue, 28 Mar 2017, Stefano Stabellini wrote:
>       > >> On Tue, 28 Mar 2017, Methuku Karthik wrote:
>       > >> > Hi Stefano,
>       > >> >
>       > >> > Kindly suggest me reading material that could help me understand and
>       > >> > come up with the proposal.
>       > >>
>       > >> Sure! For the "Xen on ARM: create multiple guests from device tree"
>       > >> project, the idea is that on many embedded systems the user knows how
>       > >> many guests to create beforehand, and usually it is a small number, like
>       > >> 2 or 3. Often these guests don't even have any PV frontends, but just a
>       > >> set of devices assigned to them. An example could be an extremely simple
>       > >> guest that only accesses one physical device (which is assigned to it at
>       > >> boot) and prints messages using the debug hypercalls (see
>       > >> xen/arch/arm/traps.c:do_debug_trap).
>       > >>
>       > >> In this scenario, there is no need to wait for Dom0 to boot to create
>       > >> this second guest (I'll call it Dom1, to distinguish it from Dom0). Xen
>       > >> could actually create it directly by itself, the same way it starts Dom0
>       > >> (see xen/arch/arm/domain_build.c:construct_dom0 and
>       > >> docs/misc/arm/device-tree/booting.txt).
>       > >>
>       > >> The project is about extending the existing device interface to pass an
>       > >> additional kernel, initrd, command line arguments for the second virtual
>       > >> machine. It would also need to include which devices should be assigned
>       > >> to it. In response, Xen should build the second VM the same way it would
>       > >> do normally when done via the toolstack (xl/libxl), but it would happen
>       > >> at boot time, before Dom0 is fully up and running.
>       > >>
>       > >>
>       > >>
>       > >> For the "Share a page in memory from the VM config file" project,
>       > >
>       > > Ops, I forgot to add this description :-)
>       > >
>       > > I was saying, for the "Share a page in memory from the VM config file"
>       > > project, the idea is that we want to share a page in memory between two
>       > > VMs just by adding one line to their VM config files. They should be
>       > > able to communicate with each others straight away by writing at the
>       > > right address in memory. That way, even small embedded systems with no
>       > > xenstore support can still setup a communication channel with each
>       > > others.
>       > >
>       > > Fundamentally, it just requires the xl/libxl toolstack (see tools/xl and
>       > > tools/libxl) to parse a new VM config file option, and in response share
>       > > a page at the specified address, or map a page at a specified address.
>       > > If the memory address is wrong, the toolstack needs to be able to handle
>       > > the failure. Sharing pages and mapping pages in xl/libxl is easy; the
>       > > difficulty of the project is coming up with the right parameter in the
>       > > VM config file so that multiple VMs can share different pages with each
>       > > others. It probably requires the introduction of a "token" to identify
>       > > the page you want to share across multiple VM config files.
>       > >
>       > > For example, Dom1 should be able to share a page with Dom2 and a
>       > > different page with Dom3. It needs to be clear which page is shared with
>       > > which VM from the VM config files.
>       > >
>       > when we create vms using xl create , for example if i am planning create three VMs,
>       >
>       > Dom1, Dom2 and Dom3, because of the page sharing are we imposing any order of
>       > creating VMs.
>       >
>       > I am asking this question to clarify this point, while creation of Dom1 if its
>       > sharing pages with Dom 2 and Dom 3 , should Xen already be aware of Dom2 and Dom3?
>       >
>       > I am referring to following links to understand about mem sharing.
>       >
>       > http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/tests/mem-sharing/memshrtoo
>       > l.c;h=8e5e22b9e95d91f1441d8eb226b64852eca075d5;hb=HEAD
>       > http://xenbits.xen.org/docs/unstable/misc/grant-tables.txt
>       >
>       > I also want to figure out how domains are created and how xl tool parses the file
>       > and passes on the information to domain creation . Let me know if i am thinking in
>       > right direction.
>       >
>       > suggest any resource or work which would help with designing config file options.
>       >
>       > >
>       > >
>       > >> > On Tue, Mar 28, 2017 at 1:38 PM, Stefano Stabellini
>       > >> > <sstabellini@kernel.org> wrote:
>       > >> > > I would also like to take the opportunity to remind you of the upcoming
>       > >> > > deadline for applications submissions, which is the 3rd of April for
>       > >> > > GSoC, see:
>       > >> > >
>       > >> > > http://marc.info/?l=xen-devel&m=149071502330534
>       > >> > >
>       > >> > > The GSoC application system is
>       > >> > > https://summerofcode.withgoogle.com/get-started/.
>       > >> > >
>       > >> > > Please give a look at the Xen Project application template here:
>       > >> > >
>       > >> > > https://wiki.xenproject.org/wiki/GSoC_Student_Application_Template
>       > >> > >
>       > >> > > It also includes an "Implementation Plan", where you have the chance to
>       > >> > > explain the implementation plan for the projects you would like to apply
>       > >> > > for. You can apply for more than one project if you want to.
>       > >> >
>       > >> > Thanks for the reminder Stefano. I will post some questions about my
>       > >> > implementation plan.
>       > >> >
>       > >> > I would like to spend my time fixing the bug but as deadline is
>       > >> > approaching , I would like to know the bare essential expected in the
>       > >> > proposal?
>       > >>
>       > >> It needs to include the basic milestones and how long you estimate it is
>       > >> going to take to complete each of them. More details you add, more
>       > >> you'll show your understanding of the problem.
>       > >>
>       > >>
>       > >> > >
>       > >> > > Thanks,
>       > >> > >
>       > >> > > Stefano
>       > >> > >
>       > >> > >
>       > >> > > On Mon, 27 Mar 2017, Stefano Stabellini wrote:
>       > >> > >> Hello Methuku,
>       > >> > >>
>       > >> > >> It is great to hear that you are interested in working on Xen on ARM.
>       > >> > >> It's good that you already know how to build and install Xen on an ARM
>       > >> > >> board.
>       > >> > >>
>       > >> > >> Do you have serial access to your Nvidia Jetson TK1? If not, I would
>       > >> > >> suggest to setup another test environment based on a different board, or
>       > >> > >> simply use the ARM Foundation Platform which is a free (as in beer)
>       > >> > >> software emulator.
>       > >> > >>
>       > >> > >> In terms of bug fixes, you could give a look at
>       > >> > >>
>       > >> > >> https://xenproject.atlassian.net/projects/XEN/issues
>       > >> > >>
>       > >> > >> Most of the items listed are large projects, but some of them are pretty
>       > >> > >> small, small enough to be a starting point. For example XEN-29 (Add
>       > >> > >> -fstack-protector support to the hypervisor), XEN-30 (Make out-of-tree
>       > >> > >> builds work) or XEN-38 (Xen - Embed .config in Xen binary).
>       > >> >
>       > >> > I  started working on XEN-38 for now. But i am also interested to look
>       > >> > into XEN-30.
>       > >>
>       > >> Be careful that XEN-30 is longer than it looks because there are lots of
>       > >> Makefiles to fix. However, even if you don't convert all Makefiles to
>       > >> support out-of-tree builds but only some, it would still be OK.
>       >
>       > I will start with Xen-38 that would help me in exploring init code. Correct me if i
>       > am wrong.
>       >
>       > I have a few questions and clarifications before proceeding further. I have checked
>       > how config.gz file is generated in linux kernel source.
>       > In linux kernel sources, if CONFIG_IKCONFIG_PROC option is set, .conifg file which
>       > is generated after choosing options with lets say from make menuconfig  is read into
>       > a variable, this way its part of build.
>       >
>       > during init time proc_create service is used to create this file config.gz.
>       > http://lxr.free-electrons.com/source/kernel/configs.c
>       >
>       >
>       > I guess i have to do something similar.
>       >
>       > Questions :
>       >
>       > 1. When Xen is build using the make command, we effectively set XEN_COMPILE_ARCH,
>       > XEN_OS, XEN_TARGET which allow using corresponding .mk file from config folder.
>       > These variable in turn decide what are the config options. I wasnt able to find any
>       > .config. Please direct me to find the file or if i am missing something. 
>       >
>       > 2. Where and how this config file should be accessible to  User once in Dom0. Is the
>       > xen folder created to keep the information about guest domains like proc for process
>       > in linux kernel ? Will that be suitable location to have config file.
>       >
>       > 3. if i assume that i will approach similarly, i have to add services to be called
>       > during init stage. As am not acquainted with code base, i could just grep with
>       > _start or _init or similar strings to find out initialization code. Any
>       > input(function name or filename) to look for will be of great help.
>       >
>       > Best,
>       > Karthik.
>       >
>       > >>
>       > >>
>       > >> > >> Cheers,
>       > >> > >>
>       > >> > >> Stefano
>       > >> > >>
>       > >> > >>
>       > >> > >> On Mon, 27 Mar 2017, Methuku Karthik wrote:
>       > >> > >> > Hi Everyone,
>       > >> > >> >
>       > >> > >> > My name is Karthik. I am a first year graduate student in Embedded Systems
>       > at University of Pennsylvania. I am avid c, c++ and python programmer.I have 4 years
>       > of
>       > >> > >> > work experience as Embedded Software developer at Airbus.
>       > >> > >> >
>       > >> > >> > For the last four months I have been working as a research assistant in
>       > PRECISE lab at the University of Pennsylvania, helping Meng Xu (cc.ed) to evaluate
>       > the
>       > >> > >> > performance of the Xen's RTDS scheduler.
>       > >> > >> >
>       > >> > >> > I'm interested in the following two projects. I'm happy to work on one of
>       > them.
>       > >> > >> > (1) Share a page in memory from the VM config file.
>       > >> > >> > (2)  Xen on ARM: create multiple guests from device tree.
>       > >> > >> >
>       > >> > >> > I have experience in compiling Xen and installing it on ARM board(Nvidia
>       > Jetson TK1). I'm also well equiped in using the xl tool to manage the VMs.
>       > >> > >> >
>       > >> > >> > I noticed that I should contribute some bug fixes to be able to get the
>       > ticket to the Xen GSoC.
>       > >> > >> > Do you have some suggestions on how I should start?
>       > >> > >> > Do you have a list of simple bugs that I can fix?
>       > >> > >> >
>       > >> > >> > I'm very interested in the Xen Project. I want to become a Xen contributor
>       > in the near future.
>       > >> > >> >
>       > >> > >> > Thank you very much for your help!
>       > >> > >> >
>       > >> > >> > Best,
>       > >> > >> > Karthik
>       > >> > >> >
>       > >> > >> >
>       > >> >
>       > >> > Best,
>       > >> > Karthik.
>       > >> >
>       > >>
>       >
>       >
>       >
> 
> 
> 
> 

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GSoc] GSoc Introduction : Xen on ARM: create multiple guests from device tree
  2017-04-04 17:29                 ` Stefano Stabellini
@ 2017-04-06 23:29                   ` Methuku Karthik
  2017-04-07  9:11                     ` Wei Liu
  0 siblings, 1 reply; 15+ messages in thread
From: Methuku Karthik @ 2017-04-06 23:29 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: wei.liu2, Lars.kurt, andrew.cooper3, Dario.faggioli,
	Stefano Stabellini, julien.grall, Meng Xu, xen-devel

[-- Attachment #1: Type: text/plain, Size: 18388 bytes --]

Hi Stefano,

I have used attached bin2c.c convert the contents of .config file to hex.

(echo "static const char xen_config_data[] __attribute__((used)) =
./bin2c.o <xen/.config ; echo ";") > xen_config.h

the above command will generate the header file which will contain the
contents of config file in hex form.

i wrote a tester code to check if i .config is output correctly.

any inputs on makefile modification would be of great help.

Will addition of below rules to makefile suffice
1.Add rule to compile bin2c.c always.
2.add the above mentioned shell command to make file to generate the
header file.
3. which object file should include the header file ?

I am thinking to add bin2c.c file in scripts folder, access .config
file from xen folder to give it as input to bin2.o. and generate
xen_config.h

As you mentioned that it would be nice to add hyper call, where should
the generated xen_config.h file be added and which file should have
the include?

I am attaching bin2c.c file and sample xen_config.h file, with tester
for your reference.

If the procedure seems fine , i will go ahead and change the makefile
accordingly and commit the changes.

On Tue, Apr 4, 2017 at 1:29 PM, Stefano Stabellini
<sstabellini@kernel.org> wrote:
> One more thing: the deadline for microtasks (the patch submission below
> to fix XEN-38) is technically Monday the 10th of April, but in practice
> the patch needs to be sent this week to be able to follow up review
> comments appropriately. Ideally the patch should be already committed by
> Monday the 10th.
>
> On Mon, 3 Apr 2017, Methuku Karthik wrote:
>> Hi Stefano,
>>
>> I have asked questions in inline. Clarification below questions would really help me in contribution. Please look into the questions. I am highlighting them in this mail.
>>
>>  For example, Dom1 should be able to share a page with Dom2 and a
>>   different page with Dom3. It needs to be clear which page is shared with
>> which VM from the VM config files.
>>
>>
>> when we create vms using xl create , for example if i am planning create three VMs,
>>
>> Dom1, Dom2 and Dom3, because of the page sharing are we imposing any order of
>>   creating VMs.
>>
>>   I am asking this question to clarify this point, while creation of Dom1 if its
>>   sharing pages with Dom 2 and Dom 3 , should Xen already be aware of Dom2 and Dom3?
>>
>>   I am referring to following links to understand about mem sharing.
>>
>>   http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/tests/mem-sharing/memshrtoo
>>   l.c;h=8e5e22b9e95d91f1441d8eb226b64852eca075d5;hb=HEAD
>>   http://xenbits.xen.org/docs/unstable/misc/grant-tables.txt
>>
>>   I also want to figure out how domains are created and how xl tool parses the file
>>   and passes on the information to domain creation . Let me know if i am thinking in
>>   right direction.
>>
>>   suggest any resource or work which would help with designing config file options.
>>
>>
>>  I will start with Xen-38 that would help me in exploring init code. Correct me if i
>>   am wrong.
>>
>>   I have a few questions and clarifications before proceeding further. I have checked
>>   how config.gz file is generated in linux kernel source.
>>   In linux kernel sources, if CONFIG_IKCONFIG_PROC option is set, .conifg file which
>>   is generated after choosing options with lets say from make menuconfig  is read into
>>   a variable, this way its part of build.
>>
>>   during init time proc_create service is used to create this file config.gz.
>>   http://lxr.free-electrons.com/source/kernel/configs.c
>>
>>
>>   I guess i have to do something similar.
>>
>>   Questions :
>>
>>   1. When Xen is build using the make command, we effectively set XEN_COMPILE_ARCH,
>>   XEN_OS, XEN_TARGET which allow using corresponding .mk file from config folder.
>>   These variable in turn decide what are the config options. I wasnt able to find any
>>   .config. Please direct me to find the file or if i am missing something.
>>
>>   2. Where and how this config file should be accessible to  User once in Dom0. Is the
>>   xen folder created to keep the information about guest domains like proc for process
>>   in linux kernel ? Will that be suitable location to have config file.
>>
>>   3. if i assume that i will approach similarly, i have to add services to be called
>>   during init stage. As am not acquainted with code base, i could just grep with
>>   _start or _init or similar strings to find out initialization code. Any
>>   input(function name or filename) to look for will be of great help.
>>
>> On Mon, Apr 3, 2017 at 3:35 PM, Stefano Stabellini <sstabellini@kernel.org> wrote:
>>       Thank you! I am looking forward to your contribution on the list! If you
>>       encounter any issues, please let us know.
>>
>>       The code contribution is more important, but if you find the time in the
>>       next few days, it would be nice to add more details to the
>>       implementation plan, such as where the memory gets allocated, whether it
>>       is taken from a VM, and if so, which one. Also what kind of "token"
>>       could be used in the config option and how the toolstack could keep
>>       track of the token - memory page references.
>>
>>       Thanks,
>>
>>       Stefano
>>
>>       On Mon, 3 Apr 2017, Methuku Karthik wrote:
>>       > Hi Stefano,
>>       >
>>       > Thanks for Input. I was not able to spend enough time last couple of weeks due to
>>       > projects. I have received mail from Lars Kurt explaining submission of draft
>>       > proposal and possibility to work on micro tasks.
>>       >
>>       > I have created a draft proposal from with your inputs and what i learnt about
>>       > sharing pages and memory management in Xen, please access it from here
>>       >
>>       > https://docs.google.com/document/d/1xLmR7x4yfCbRgpuefZQNhZ4lAu-6slW0oXPmjnxcnz0/edi
>>       > t#heading=h.1yvc35w6t3fu
>>       >
>>       > I haven't written anything about maintenance. I have included some links i thought
>>       > will be helpful under references and referenced wherever applicable.
>>       >
>>       > Please suggest comments and inputs.
>>       >
>>       > On Tue, Mar 28, 2017 at 8:12 PM, Stefano Stabellini <sstabellini@kernel.org> wrote:
>>       > > CC'ing a couple of maintainers that might have more insights on this
>>       > > project.
>>       > >
>>       > > On Tue, 28 Mar 2017, Stefano Stabellini wrote:
>>       > >> On Tue, 28 Mar 2017, Methuku Karthik wrote:
>>       > >> > Hi Stefano,
>>       > >> >
>>       > >> > Kindly suggest me reading material that could help me understand and
>>       > >> > come up with the proposal.
>>       > >>
>>       > >> Sure! For the "Xen on ARM: create multiple guests from device tree"
>>       > >> project, the idea is that on many embedded systems the user knows how
>>       > >> many guests to create beforehand, and usually it is a small number, like
>>       > >> 2 or 3. Often these guests don't even have any PV frontends, but just a
>>       > >> set of devices assigned to them. An example could be an extremely simple
>>       > >> guest that only accesses one physical device (which is assigned to it at
>>       > >> boot) and prints messages using the debug hypercalls (see
>>       > >> xen/arch/arm/traps.c:do_debug_trap).
>>       > >>
>>       > >> In this scenario, there is no need to wait for Dom0 to boot to create
>>       > >> this second guest (I'll call it Dom1, to distinguish it from Dom0). Xen
>>       > >> could actually create it directly by itself, the same way it starts Dom0
>>       > >> (see xen/arch/arm/domain_build.c:construct_dom0 and
>>       > >> docs/misc/arm/device-tree/booting.txt).
>>       > >>
>>       > >> The project is about extending the existing device interface to pass an
>>       > >> additional kernel, initrd, command line arguments for the second virtual
>>       > >> machine. It would also need to include which devices should be assigned
>>       > >> to it. In response, Xen should build the second VM the same way it would
>>       > >> do normally when done via the toolstack (xl/libxl), but it would happen
>>       > >> at boot time, before Dom0 is fully up and running.
>>       > >>
>>       > >>
>>       > >>
>>       > >> For the "Share a page in memory from the VM config file" project,
>>       > >
>>       > > Ops, I forgot to add this description :-)
>>       > >
>>       > > I was saying, for the "Share a page in memory from the VM config file"
>>       > > project, the idea is that we want to share a page in memory between two
>>       > > VMs just by adding one line to their VM config files. They should be
>>       > > able to communicate with each others straight away by writing at the
>>       > > right address in memory. That way, even small embedded systems with no
>>       > > xenstore support can still setup a communication channel with each
>>       > > others.
>>       > >
>>       > > Fundamentally, it just requires the xl/libxl toolstack (see tools/xl and
>>       > > tools/libxl) to parse a new VM config file option, and in response share
>>       > > a page at the specified address, or map a page at a specified address.
>>       > > If the memory address is wrong, the toolstack needs to be able to handle
>>       > > the failure. Sharing pages and mapping pages in xl/libxl is easy; the
>>       > > difficulty of the project is coming up with the right parameter in the
>>       > > VM config file so that multiple VMs can share different pages with each
>>       > > others. It probably requires the introduction of a "token" to identify
>>       > > the page you want to share across multiple VM config files.
>>       > >
>>       > > For example, Dom1 should be able to share a page with Dom2 and a
>>       > > different page with Dom3. It needs to be clear which page is shared with
>>       > > which VM from the VM config files.
>>       > >
>>       > when we create vms using xl create , for example if i am planning create three VMs,
>>       >
>>       > Dom1, Dom2 and Dom3, because of the page sharing are we imposing any order of
>>       > creating VMs.
>>       >
>>       > I am asking this question to clarify this point, while creation of Dom1 if its
>>       > sharing pages with Dom 2 and Dom 3 , should Xen already be aware of Dom2 and Dom3?
>>       >
>>       > I am referring to following links to understand about mem sharing.
>>       >
>>       > http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/tests/mem-sharing/memshrtoo
>>       > l.c;h=8e5e22b9e95d91f1441d8eb226b64852eca075d5;hb=HEAD
>>       > http://xenbits.xen.org/docs/unstable/misc/grant-tables.txt
>>       >
>>       > I also want to figure out how domains are created and how xl tool parses the file
>>       > and passes on the information to domain creation . Let me know if i am thinking in
>>       > right direction.
>>       >
>>       > suggest any resource or work which would help with designing config file options.
>>       >
>>       > >
>>       > >
>>       > >> > On Tue, Mar 28, 2017 at 1:38 PM, Stefano Stabellini
>>       > >> > <sstabellini@kernel.org> wrote:
>>       > >> > > I would also like to take the opportunity to remind you of the upcoming
>>       > >> > > deadline for applications submissions, which is the 3rd of April for
>>       > >> > > GSoC, see:
>>       > >> > >
>>       > >> > > http://marc.info/?l=xen-devel&m=149071502330534
>>       > >> > >
>>       > >> > > The GSoC application system is
>>       > >> > > https://summerofcode.withgoogle.com/get-started/.
>>       > >> > >
>>       > >> > > Please give a look at the Xen Project application template here:
>>       > >> > >
>>       > >> > > https://wiki.xenproject.org/wiki/GSoC_Student_Application_Template
>>       > >> > >
>>       > >> > > It also includes an "Implementation Plan", where you have the chance to
>>       > >> > > explain the implementation plan for the projects you would like to apply
>>       > >> > > for. You can apply for more than one project if you want to.
>>       > >> >
>>       > >> > Thanks for the reminder Stefano. I will post some questions about my
>>       > >> > implementation plan.
>>       > >> >
>>       > >> > I would like to spend my time fixing the bug but as deadline is
>>       > >> > approaching , I would like to know the bare essential expected in the
>>       > >> > proposal?
>>       > >>
>>       > >> It needs to include the basic milestones and how long you estimate it is
>>       > >> going to take to complete each of them. More details you add, more
>>       > >> you'll show your understanding of the problem.
>>       > >>
>>       > >>
>>       > >> > >
>>       > >> > > Thanks,
>>       > >> > >
>>       > >> > > Stefano
>>       > >> > >
>>       > >> > >
>>       > >> > > On Mon, 27 Mar 2017, Stefano Stabellini wrote:
>>       > >> > >> Hello Methuku,
>>       > >> > >>
>>       > >> > >> It is great to hear that you are interested in working on Xen on ARM.
>>       > >> > >> It's good that you already know how to build and install Xen on an ARM
>>       > >> > >> board.
>>       > >> > >>
>>       > >> > >> Do you have serial access to your Nvidia Jetson TK1? If not, I would
>>       > >> > >> suggest to setup another test environment based on a different board, or
>>       > >> > >> simply use the ARM Foundation Platform which is a free (as in beer)
>>       > >> > >> software emulator.
>>       > >> > >>
>>       > >> > >> In terms of bug fixes, you could give a look at
>>       > >> > >>
>>       > >> > >> https://xenproject.atlassian.net/projects/XEN/issues
>>       > >> > >>
>>       > >> > >> Most of the items listed are large projects, but some of them are pretty
>>       > >> > >> small, small enough to be a starting point. For example XEN-29 (Add
>>       > >> > >> -fstack-protector support to the hypervisor), XEN-30 (Make out-of-tree
>>       > >> > >> builds work) or XEN-38 (Xen - Embed .config in Xen binary).
>>       > >> >
>>       > >> > I  started working on XEN-38 for now. But i am also interested to look
>>       > >> > into XEN-30.
>>       > >>
>>       > >> Be careful that XEN-30 is longer than it looks because there are lots of
>>       > >> Makefiles to fix. However, even if you don't convert all Makefiles to
>>       > >> support out-of-tree builds but only some, it would still be OK.
>>       >
>>       > I will start with Xen-38 that would help me in exploring init code. Correct me if i
>>       > am wrong.
>>       >
>>       > I have a few questions and clarifications before proceeding further. I have checked
>>       > how config.gz file is generated in linux kernel source.
>>       > In linux kernel sources, if CONFIG_IKCONFIG_PROC option is set, .conifg file which
>>       > is generated after choosing options with lets say from make menuconfig  is read into
>>       > a variable, this way its part of build.
>>       >
>>       > during init time proc_create service is used to create this file config.gz.
>>       > http://lxr.free-electrons.com/source/kernel/configs.c
>>       >
>>       >
>>       > I guess i have to do something similar.
>>       >
>>       > Questions :
>>       >
>>       > 1. When Xen is build using the make command, we effectively set XEN_COMPILE_ARCH,
>>       > XEN_OS, XEN_TARGET which allow using corresponding .mk file from config folder.
>>       > These variable in turn decide what are the config options. I wasnt able to find any
>>       > .config. Please direct me to find the file or if i am missing something.
>>       >
>>       > 2. Where and how this config file should be accessible to  User once in Dom0. Is the
>>       > xen folder created to keep the information about guest domains like proc for process
>>       > in linux kernel ? Will that be suitable location to have config file.
>>       >
>>       > 3. if i assume that i will approach similarly, i have to add services to be called
>>       > during init stage. As am not acquainted with code base, i could just grep with
>>       > _start or _init or similar strings to find out initialization code. Any
>>       > input(function name or filename) to look for will be of great help.
>>       >
>>       > Best,
>>       > Karthik.
>>       >
>>       > >>
>>       > >>
>>       > >> > >> Cheers,
>>       > >> > >>
>>       > >> > >> Stefano
>>       > >> > >>
>>       > >> > >>
>>       > >> > >> On Mon, 27 Mar 2017, Methuku Karthik wrote:
>>       > >> > >> > Hi Everyone,
>>       > >> > >> >
>>       > >> > >> > My name is Karthik. I am a first year graduate student in Embedded Systems
>>       > at University of Pennsylvania. I am avid c, c++ and python programmer.I have 4 years
>>       > of
>>       > >> > >> > work experience as Embedded Software developer at Airbus.
>>       > >> > >> >
>>       > >> > >> > For the last four months I have been working as a research assistant in
>>       > PRECISE lab at the University of Pennsylvania, helping Meng Xu (cc.ed) to evaluate
>>       > the
>>       > >> > >> > performance of the Xen's RTDS scheduler.
>>       > >> > >> >
>>       > >> > >> > I'm interested in the following two projects. I'm happy to work on one of
>>       > them.
>>       > >> > >> > (1) Share a page in memory from the VM config file.
>>       > >> > >> > (2)  Xen on ARM: create multiple guests from device tree.
>>       > >> > >> >
>>       > >> > >> > I have experience in compiling Xen and installing it on ARM board(Nvidia
>>       > Jetson TK1). I'm also well equiped in using the xl tool to manage the VMs.
>>       > >> > >> >
>>       > >> > >> > I noticed that I should contribute some bug fixes to be able to get the
>>       > ticket to the Xen GSoC.
>>       > >> > >> > Do you have some suggestions on how I should start?
>>       > >> > >> > Do you have a list of simple bugs that I can fix?
>>       > >> > >> >
>>       > >> > >> > I'm very interested in the Xen Project. I want to become a Xen contributor
>>       > in the near future.
>>       > >> > >> >
>>       > >> > >> > Thank you very much for your help!
>>       > >> > >> >
>>       > >> > >> > Best,
>>       > >> > >> > Karthik
>>       > >> > >> >
>>       > >> > >> >
>>       > >> >
>>       > >> > Best,
>>       > >> > Karthik.
>>       > >> >
>>       > >>
>>       >
>>       >
>>       >
>>
>>
>>
>>

[-- Attachment #2: bin2c.c --]
[-- Type: text/x-csrc, Size: 282 bytes --]

#include <stdlib.h>
#include <stdio.h>

int main(int argc, char *argv[])
{
	int ch,total;

	do {
		printf("\t\"");
		while ((ch = getchar()) != EOF) {
			total++;
			printf("\\x%02x", ch);
			if (total % 16 == 0)
				break;
		}
		printf("\"\n");
	} while (ch != EOF);

	return 0;
}

[-- Attachment #3: tester.c --]
[-- Type: text/x-csrc, Size: 127 bytes --]

#include <iostream>
#include <stdio.h>
#include "xen_config.h"


int main(){

   printf("%s",xen_config_data);
   return 0;
 }

[-- Attachment #4: xen_config.h --]
[-- Type: text/x-chdr, Size: 5795 bytes --]

static const char xen_config_data[] __attribute__((used)) = 
	"\x23\x0a\x23\x20\x41\x75\x74\x6f\x6d\x61\x74\x69\x63\x61\x6c\x6c"
	"\x79\x20\x67\x65\x6e\x65\x72\x61\x74\x65\x64\x20\x66\x69\x6c\x65"
	"\x3b\x20\x44\x4f\x20\x4e\x4f\x54\x20\x45\x44\x49\x54\x2e\x0a\x23"
	"\x20\x58\x65\x6e\x2f\x78\x38\x36\x20\x34\x2e\x39\x2d\x75\x6e\x73"
	"\x74\x61\x62\x6c\x65\x20\x43\x6f\x6e\x66\x69\x67\x75\x72\x61\x74"
	"\x69\x6f\x6e\x0a\x23\x0a\x43\x4f\x4e\x46\x49\x47\x5f\x58\x38\x36"
	"\x5f\x36\x34\x3d\x79\x0a\x43\x4f\x4e\x46\x49\x47\x5f\x58\x38\x36"
	"\x3d\x79\x0a\x43\x4f\x4e\x46\x49\x47\x5f\x41\x52\x43\x48\x5f\x44"
	"\x45\x46\x43\x4f\x4e\x46\x49\x47\x3d\x22\x61\x72\x63\x68\x2f\x78"
	"\x38\x36\x2f\x63\x6f\x6e\x66\x69\x67\x73\x2f\x78\x38\x36\x5f\x36"
	"\x34\x5f\x64\x65\x66\x63\x6f\x6e\x66\x69\x67\x22\x0a\x0a\x23\x0a"
	"\x23\x20\x41\x72\x63\x68\x69\x74\x65\x63\x74\x75\x72\x65\x20\x46"
	"\x65\x61\x74\x75\x72\x65\x73\x0a\x23\x0a\x43\x4f\x4e\x46\x49\x47"
	"\x5f\x4e\x52\x5f\x43\x50\x55\x53\x3d\x32\x35\x36\x0a\x43\x4f\x4e"
	"\x46\x49\x47\x5f\x50\x56\x3d\x79\x0a\x43\x4f\x4e\x46\x49\x47\x5f"
	"\x48\x56\x4d\x3d\x79\x0a\x43\x4f\x4e\x46\x49\x47\x5f\x53\x48\x41"
	"\x44\x4f\x57\x5f\x50\x41\x47\x49\x4e\x47\x3d\x79\x0a\x23\x20\x43"
	"\x4f\x4e\x46\x49\x47\x5f\x42\x49\x47\x4d\x45\x4d\x20\x69\x73\x20"
	"\x6e\x6f\x74\x20\x73\x65\x74\x0a\x43\x4f\x4e\x46\x49\x47\x5f\x48"
	"\x56\x4d\x5f\x46\x45\x50\x3d\x79\x0a\x43\x4f\x4e\x46\x49\x47\x5f"
	"\x54\x42\x4f\x4f\x54\x3d\x79\x0a\x0a\x23\x0a\x23\x20\x43\x6f\x6d"
	"\x6d\x6f\x6e\x20\x46\x65\x61\x74\x75\x72\x65\x73\x0a\x23\x0a\x43"
	"\x4f\x4e\x46\x49\x47\x5f\x43\x4f\x4d\x50\x41\x54\x3d\x79\x0a\x43"
	"\x4f\x4e\x46\x49\x47\x5f\x43\x4f\x52\x45\x5f\x50\x41\x52\x4b\x49"
	"\x4e\x47\x3d\x79\x0a\x43\x4f\x4e\x46\x49\x47\x5f\x48\x41\x53\x5f"
	"\x41\x4c\x54\x45\x52\x4e\x41\x54\x49\x56\x45\x3d\x79\x0a\x43\x4f"
	"\x4e\x46\x49\x47\x5f\x48\x41\x53\x5f\x45\x58\x5f\x54\x41\x42\x4c"
	"\x45\x3d\x79\x0a\x43\x4f\x4e\x46\x49\x47\x5f\x48\x41\x53\x5f\x4d"
	"\x45\x4d\x5f\x41\x43\x43\x45\x53\x53\x3d\x79\x0a\x43\x4f\x4e\x46"
	"\x49\x47\x5f\x48\x41\x53\x5f\x4d\x45\x4d\x5f\x50\x41\x47\x49\x4e"
	"\x47\x3d\x79\x0a\x43\x4f\x4e\x46\x49\x47\x5f\x48\x41\x53\x5f\x4d"
	"\x45\x4d\x5f\x53\x48\x41\x52\x49\x4e\x47\x3d\x79\x0a\x43\x4f\x4e"
	"\x46\x49\x47\x5f\x48\x41\x53\x5f\x50\x44\x58\x3d\x79\x0a\x43\x4f"
	"\x4e\x46\x49\x47\x5f\x48\x41\x53\x5f\x4b\x45\x58\x45\x43\x3d\x79"
	"\x0a\x43\x4f\x4e\x46\x49\x47\x5f\x48\x41\x53\x5f\x47\x44\x42\x53"
	"\x58\x3d\x79\x0a\x43\x4f\x4e\x46\x49\x47\x5f\x48\x41\x53\x5f\x49"
	"\x4f\x50\x4f\x52\x54\x53\x3d\x79\x0a\x43\x4f\x4e\x46\x49\x47\x5f"
	"\x4b\x45\x58\x45\x43\x3d\x79\x0a\x43\x4f\x4e\x46\x49\x47\x5f\x54"
	"\x4d\x45\x4d\x3d\x79\x0a\x43\x4f\x4e\x46\x49\x47\x5f\x58\x45\x4e"
	"\x4f\x50\x52\x4f\x46\x3d\x79\x0a\x23\x20\x43\x4f\x4e\x46\x49\x47"
	"\x5f\x58\x53\x4d\x20\x69\x73\x20\x6e\x6f\x74\x20\x73\x65\x74\x0a"
	"\x43\x4f\x4e\x46\x49\x47\x5f\x53\x43\x48\x45\x44\x5f\x43\x52\x45"
	"\x44\x49\x54\x3d\x79\x0a\x43\x4f\x4e\x46\x49\x47\x5f\x53\x43\x48"
	"\x45\x44\x5f\x43\x52\x45\x44\x49\x54\x32\x3d\x79\x0a\x43\x4f\x4e"
	"\x46\x49\x47\x5f\x53\x43\x48\x45\x44\x5f\x52\x54\x44\x53\x3d\x79"
	"\x0a\x43\x4f\x4e\x46\x49\x47\x5f\x53\x43\x48\x45\x44\x5f\x41\x52"
	"\x49\x4e\x43\x36\x35\x33\x3d\x79\x0a\x43\x4f\x4e\x46\x49\x47\x5f"
	"\x53\x43\x48\x45\x44\x5f\x44\x45\x46\x41\x55\x4c\x54\x3d\x22\x63"
	"\x72\x65\x64\x69\x74\x22\x0a\x43\x4f\x4e\x46\x49\x47\x5f\x43\x52"
	"\x59\x50\x54\x4f\x3d\x79\x0a\x23\x20\x43\x4f\x4e\x46\x49\x47\x5f"
	"\x4c\x49\x56\x45\x50\x41\x54\x43\x48\x20\x69\x73\x20\x6e\x6f\x74"
	"\x20\x73\x65\x74\x0a\x43\x4f\x4e\x46\x49\x47\x5f\x53\x55\x50\x50"
	"\x52\x45\x53\x53\x5f\x44\x55\x50\x4c\x49\x43\x41\x54\x45\x5f\x53"
	"\x59\x4d\x42\x4f\x4c\x5f\x57\x41\x52\x4e\x49\x4e\x47\x53\x3d\x79"
	"\x0a\x43\x4f\x4e\x46\x49\x47\x5f\x43\x4d\x44\x4c\x49\x4e\x45\x3d"
	"\x22\x22\x0a\x0a\x23\x0a\x23\x20\x44\x65\x76\x69\x63\x65\x20\x44"
	"\x72\x69\x76\x65\x72\x73\x0a\x23\x0a\x43\x4f\x4e\x46\x49\x47\x5f"
	"\x41\x43\x50\x49\x3d\x79\x0a\x43\x4f\x4e\x46\x49\x47\x5f\x41\x43"
	"\x50\x49\x5f\x4c\x45\x47\x41\x43\x59\x5f\x54\x41\x42\x4c\x45\x53"
	"\x5f\x4c\x4f\x4f\x4b\x55\x50\x3d\x79\x0a\x43\x4f\x4e\x46\x49\x47"
	"\x5f\x4e\x55\x4d\x41\x3d\x79\x0a\x43\x4f\x4e\x46\x49\x47\x5f\x48"
	"\x41\x53\x5f\x4e\x53\x31\x36\x35\x35\x30\x3d\x79\x0a\x43\x4f\x4e"
	"\x46\x49\x47\x5f\x48\x41\x53\x5f\x45\x48\x43\x49\x3d\x79\x0a\x43"
	"\x4f\x4e\x46\x49\x47\x5f\x48\x41\x53\x5f\x43\x50\x55\x46\x52\x45"
	"\x51\x3d\x79\x0a\x43\x4f\x4e\x46\x49\x47\x5f\x48\x41\x53\x5f\x50"
	"\x41\x53\x53\x54\x48\x52\x4f\x55\x47\x48\x3d\x79\x0a\x43\x4f\x4e"
	"\x46\x49\x47\x5f\x48\x41\x53\x5f\x50\x43\x49\x3d\x79\x0a\x43\x4f"
	"\x4e\x46\x49\x47\x5f\x56\x49\x44\x45\x4f\x3d\x79\x0a\x43\x4f\x4e"
	"\x46\x49\x47\x5f\x56\x47\x41\x3d\x79\x0a\x43\x4f\x4e\x46\x49\x47"
	"\x5f\x44\x45\x46\x43\x4f\x4e\x46\x49\x47\x5f\x4c\x49\x53\x54\x3d"
	"\x22\x24\x41\x52\x43\x48\x5f\x44\x45\x46\x43\x4f\x4e\x46\x49\x47"
	"\x22\x0a\x0a\x23\x0a\x23\x20\x44\x65\x62\x75\x67\x67\x69\x6e\x67"
	"\x20\x4f\x70\x74\x69\x6f\x6e\x73\x0a\x23\x0a\x43\x4f\x4e\x46\x49"
	"\x47\x5f\x44\x45\x42\x55\x47\x3d\x79\x0a\x23\x20\x43\x4f\x4e\x46"
	"\x49\x47\x5f\x43\x52\x41\x53\x48\x5f\x44\x45\x42\x55\x47\x20\x69"
	"\x73\x20\x6e\x6f\x74\x20\x73\x65\x74\x0a\x43\x4f\x4e\x46\x49\x47"
	"\x5f\x46\x52\x41\x4d\x45\x5f\x50\x4f\x49\x4e\x54\x45\x52\x3d\x79"
	"\x0a\x23\x20\x43\x4f\x4e\x46\x49\x47\x5f\x47\x43\x4f\x56\x20\x69"
	"\x73\x20\x6e\x6f\x74\x20\x73\x65\x74\x0a\x23\x20\x43\x4f\x4e\x46"
	"\x49\x47\x5f\x4c\x4f\x43\x4b\x5f\x50\x52\x4f\x46\x49\x4c\x45\x20"
	"\x69\x73\x20\x6e\x6f\x74\x20\x73\x65\x74\x0a\x23\x20\x43\x4f\x4e"
	"\x46\x49\x47\x5f\x50\x45\x52\x46\x5f\x43\x4f\x55\x4e\x54\x45\x52"
	"\x53\x20\x69\x73\x20\x6e\x6f\x74\x20\x73\x65\x74\x0a\x43\x4f\x4e"
	"\x46\x49\x47\x5f\x56\x45\x52\x42\x4f\x53\x45\x5f\x44\x45\x42\x55"
	"\x47\x3d\x79\x0a"
;

[-- Attachment #5: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GSoc] GSoc Introduction : Xen on ARM: create multiple guests from device tree
  2017-04-06 23:29                   ` Methuku Karthik
@ 2017-04-07  9:11                     ` Wei Liu
  2017-04-07 17:20                       ` Stefano Stabellini
  0 siblings, 1 reply; 15+ messages in thread
From: Wei Liu @ 2017-04-07  9:11 UTC (permalink / raw)
  To: Methuku Karthik
  Cc: Stefano Stabellini, wei.liu2, Lars.kurt, andrew.cooper3,
	Dario.faggioli, Stefano Stabellini, julien.grall, Meng Xu,
	xen-devel

On Thu, Apr 06, 2017 at 07:29:05PM -0400, Methuku Karthik wrote:
> Hi Stefano,
> 
> I have used attached bin2c.c convert the contents of .config file to hex.
> 
> (echo "static const char xen_config_data[] __attribute__((used)) =
> ./bin2c.o <xen/.config ; echo ";") > xen_config.h
> 
> the above command will generate the header file which will contain the
> contents of config file in hex form.
> 
> i wrote a tester code to check if i .config is output correctly.
> 
> any inputs on makefile modification would be of great help.
> 
> Will addition of below rules to makefile suffice
> 1.Add rule to compile bin2c.c always.
> 2.add the above mentioned shell command to make file to generate the
> header file.

Why not just fold everything into bin2c?

> 3. which object file should include the header file ?
> 

The file you want to add which contains a hypercall to retrieve the
content.

> I am thinking to add bin2c.c file in scripts folder, access .config
> file from xen folder to give it as input to bin2.o. and generate
> xen_config.h
> 

xen/tools please.  It is hypervisor only tool.

> As you mentioned that it would be nice to add hyper call, where should
> the generated xen_config.h file be added and which file should have
> the include?

Other than the hypercall, I would also suggest putting the config file
into a special section in the elf binary so that it can be retrieved
without running the binary -- not everyone is up for running random
binaries from the internet. :-)

> 
> >>

> #include <stdlib.h>
> #include <stdio.h>
> 
> int main(int argc, char *argv[])
> {
> 	int ch,total;

Space after comma please.

> 
> 	do {
> 		printf("\t\"");
> 		while ((ch = getchar()) != EOF) {
> 			total++;

total is not initialised.

> 			printf("\\x%02x", ch);
> 			if (total % 16 == 0)
> 				break;
> 		}
> 		printf("\"\n");
> 	} while (ch != EOF);

You can simply use one loop here by replacing the "break" with printing
out the newline.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GSoc] GSoc Introduction : Xen on ARM: create multiple guests from device tree
  2017-04-07  9:11                     ` Wei Liu
@ 2017-04-07 17:20                       ` Stefano Stabellini
  0 siblings, 0 replies; 15+ messages in thread
From: Stefano Stabellini @ 2017-04-07 17:20 UTC (permalink / raw)
  To: Wei Liu
  Cc: Stefano Stabellini, Methuku Karthik, Lars.kurt, andrew.cooper3,
	Dario.faggioli, Stefano Stabellini, julien.grall, Meng Xu,
	xen-devel

On Fri, 7 Apr 2017, Wei Liu wrote:
> On Thu, Apr 06, 2017 at 07:29:05PM -0400, Methuku Karthik wrote:
> > Hi Stefano,
> > 
> > I have used attached bin2c.c convert the contents of .config file to hex.
> > 
> > (echo "static const char xen_config_data[] __attribute__((used)) =
> > ./bin2c.o <xen/.config ; echo ";") > xen_config.h
> > 
> > the above command will generate the header file which will contain the
> > contents of config file in hex form.
> > 
> > i wrote a tester code to check if i .config is output correctly.
> > 
> > any inputs on makefile modification would be of great help.
> > 
> > Will addition of below rules to makefile suffice
> > 1.Add rule to compile bin2c.c always.
> > 2.add the above mentioned shell command to make file to generate the
> > header file.
> 
> Why not just fold everything into bin2c?
> 
> > 3. which object file should include the header file ?
> > 
> 
> The file you want to add which contains a hypercall to retrieve the
> content.

I don't have an opinion on which file should be including it. Maybe
xen/common/config.c or xen/common/extra.c? It would be great to have an
hypercall to retrieve it, but for an initial small contribution I think
is OK to skip it and only provide a tool to extract the config from the
binary (see below).


> > I am thinking to add bin2c.c file in scripts folder, access .config
> > file from xen folder to give it as input to bin2.o. and generate
> > xen_config.h
> > 
> 
> xen/tools please.  It is hypervisor only tool.
> 
> > As you mentioned that it would be nice to add hyper call, where should
> > the generated xen_config.h file be added and which file should have
> > the include?
> 
> Other than the hypercall, I would also suggest putting the config file
> into a special section in the elf binary so that it can be retrieved
> without running the binary -- not everyone is up for running random
> binaries from the internet. :-)

Yes, that would be best.


> > 
> > >>
> 
> > #include <stdlib.h>
> > #include <stdio.h>
> > 
> > int main(int argc, char *argv[])
> > {
> > 	int ch,total;
> 
> Space after comma please.
> 
> > 
> > 	do {
> > 		printf("\t\"");
> > 		while ((ch = getchar()) != EOF) {
> > 			total++;
> 
> total is not initialised.
> 
> > 			printf("\\x%02x", ch);
> > 			if (total % 16 == 0)
> > 				break;
> > 		}
> > 		printf("\"\n");
> > 	} while (ch != EOF);
> 
> You can simply use one loop here by replacing the "break" with printing
> out the newline.
> 
> Wei.
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2017-04-07 17:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-27  5:47 [GSoc] GSoc Introduction : Xen on ARM: create multiple guests from device tree Methuku Karthik
2017-03-27 23:43 ` Stefano Stabellini
2017-03-28 17:38   ` Stefano Stabellini
2017-03-28 23:25     ` Methuku Karthik
2017-03-28 23:56       ` Stefano Stabellini
2017-03-29  0:12         ` Stefano Stabellini
2017-04-03 15:43           ` Methuku Karthik
2017-04-03 19:35             ` Stefano Stabellini
2017-04-03 19:56               ` Methuku Karthik
2017-04-03 21:19                 ` Stefano Stabellini
2017-04-03 21:35                   ` Julien Grall
2017-04-04 17:29                 ` Stefano Stabellini
2017-04-06 23:29                   ` Methuku Karthik
2017-04-07  9:11                     ` Wei Liu
2017-04-07 17:20                       ` Stefano Stabellini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.