Re: Issue with large inmates on TX2

2018-11-05 Thread Luca Cuomo
Ok, i'll try to move  some virtual address in order to avoid overlapping.
Thanks for the moment.
I'll let you know.

Il giorno lun 5 nov 2018 alle ore 11:31 Jan Kiszka 
ha scritto:

> On 05.11.18 11:25, Luca Cuomo wrote:
> >   .mem_regions = {
> >   /* UART */ {
> >   .phys_start = 0x310,
> >   .virt_start = 0x310,
> >   .size = 0x2,
> >   .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
> >   JAILHOUSE_MEM_IO |
> JAILHOUSE_MEM_ROOTSHARED,
> >   },
> >   /* RAM */ {
> >   .phys_start = 0x26d00,
> >   .virt_start = 0,
> >   .size = 0x400,
> >   .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
> >   JAILHOUSE_MEM_EXECUTE |
> JAILHOUSE_MEM_LOADABLE,
> >   },
>
> Now I see it: Your memory regions is overlapping the UART region in
> guest-physical address space. That's why we tend to split that for the
> Linux
> cells into two regions, having only a tiny boot-up region at address 0.
>
> Jan
>
> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> Corporate Competence Center Embedded Linux
>


-- 
Luca Cuomo.
Software Engineer

Evidence Srl
Via Carducci 56
56010 S.Giuliano Terme - Pisa - Italy
Phone:  +39 050 99 11 122
Mail: l.cu...@evidence.eu.com
Web: http://www.evidence.eu.com

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jailhouse-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Issue with large inmates on TX2

2018-11-05 Thread Jan Kiszka

On 05.11.18 11:25, Luca Cuomo wrote:

.mem_regions = {
/* UART */ {
.phys_start = 0x310,
.virt_start = 0x310,
.size = 0x2,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_IO | JAILHOUSE_MEM_ROOTSHARED,
},
/* RAM */ {
.phys_start = 0x26d00,
.virt_start = 0,
.size = 0x400,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_LOADABLE,
},


Now I see it: Your memory regions is overlapping the UART region in 
guest-physical address space. That's why we tend to split that for the Linux 
cells into two regions, having only a tiny boot-up region at address 0.


Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

--
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jailhouse-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Issue with large inmates on TX2

2018-11-05 Thread Luca Cuomo
The version was alread at v0.10
(commit  f596aa7355bc2134650544bdf1e13f1f55d3f2fc).
While porting the cell from v0.9.1, i forgot to add console configuration
in the inmate. Now i've added it but the behaviour is the same.



Il giorno lun 5 nov 2018 alle ore 10:57 Jan Kiszka 
ha scritto:

> What's your Jailhouse version? Seems it's not the last release because you
> are
> not defining the console of the non-root cell. Please update Jailhouse
> first,
> specifically due to
>
> https://github.com/siemens/jailhouse/commit/932556921b07121e6ce19573ba3efa97615a41ff
> .
>
> Jan
>
> On 05.11.18 10:49, Luca Cuomo wrote:
> > Of course,
> >
> > Il giorno lun 5 nov 2018 alle ore 09:40 Jan Kiszka <
> jan.kis...@siemens.com
> > > ha scritto:
> >
> > On 05.11.18 09:22, Luca Cuomo wrote:
> >  > Hi Jan,
> >  > Il giorno mer 31 ott 2018 alle ore 19:23 Jan Kiszka
> > mailto:jan.kis...@siemens.com>
> >  > >>
> ha scritto:
> >  >
> >  > On 31.10.18 16:42, Luca Cuomo wrote:
> >  >  > Dear all,
> >  >  >
> >  >  > we've encountered an issue when running inmates with more
> than 32
> > MB of RAM
> >  >  > (e.g. 64 MB) on Jetson TX2.
> >  >  >
> >  >  > We've tried using the Linux kernel 4.16.7 Vanilla, the
> latest
> > version of
> >  >  > jailhouse (v0.10) and gic-demo.
> >  >  >
> >  >  > We've attached a JTAG debugger and we've seen that the
> inmate is
> > running but
> >  >  > there are two problems:
> >  >  >   - No output is sent to the serial console
> >  >  >   - No interrupts arrives to the cell (checked with both
> cell
> > stats and the
> >  >  > checking the program counter)
> >  >  >
> >  >  > No error messages on the Jailhouse console nor on the
> dmesg.
> >  >  >
> >  >  > Is anybody able of running large inmates ?
> >  >  >
> >  >
> >  > What did you change? The cell configurations? The image size
> you load
> > (larger
> >  > initrd etc.)?
> >  >
> >  > Maybe there is an issue with the loader
> (jailhouse-cell-linux) in
> > calculating
> >  > where to put things. Try playing with the
> --kernel-decomp-factor in
> > case you
> >  > increased the size of the loaded images.
> >  >
> >  > The kernel attributes i described are referred to the system
> kernel (root
> > cell).
> >  > I've no tried a linux inmate  but a simple bare metal demo which
> doesn't work
> >  > when the RAM in the .cell is 64MB. I've updated the map_range
> call on the
> > RAM
> >  > in  mem.c indeed.
> >
> > Can you share your configs, or even just the diff to the upstream
> configs?
> >
> > Jan
> >
> > --
> > Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> > Corporate Competence Center Embedded Linux
> >
> >
> >
> > --
> > Luca Cuomo.
> > Software Engineer
> >
> > Evidence Srl
> > Via Carducci 56
> > 56010 S.Giuliano Terme - Pisa - Italy
> > Phone:  +39 050 99 11 122
> > Mail: l.cu...@evidence.eu.com 
> > Web:http://www.evidence.eu.com 
>
> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> Corporate Competence Center Embedded Linux
>


-- 
Luca Cuomo.
Software Engineer

Evidence Srl
Via Carducci 56
56010 S.Giuliano Terme - Pisa - Italy
Phone:  +39 050 99 11 122
Mail: l.cu...@evidence.eu.com
Web: http://www.evidence.eu.com

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jailhouse-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
/*
 * Jailhouse, a Linux-based partitioning hypervisor
 *
 * Configuration for gic-demo or uart-demo inmate on Nvidia Jetson TX2:
 * 1 CPU, 64 MB RAM, serial port 0
 */

#include 
#include 

#define ARRAY_SIZE(a) sizeof(a) / sizeof(a[0])

struct {
	struct jailhouse_cell_desc cell;
	__u64 cpus[1];
	struct jailhouse_memory mem_regions[4];
	struct jailhouse_irqchip irqchips[2];
} __attribute__((packed)) config = {
	.cell = {
		.signature = JAILHOUSE_CELL_DESC_SIGNATURE,
		.revision = JAILHOUSE_CONFIG_REVISION,
		.name = "jetson-tx2-demo",
		.flags = JAILHOUSE_CELL_PASSIVE_COMMREG,

		.cpu_set_size = sizeof(config.cpus),
		.num_memory_regions = ARRAY_SIZE(config.mem_regions),
		.num_irqchips = ARRAY_SIZE(config.irqchips),
		.vpci_irq_base = 300,

	.console = {
.address = 0x310,
.type = JAILHOUSE_CON_TYPE_8250,
.flags = JAILHOUSE_CON_ACCESS_MMIO |
 JAILHOUSE_CON_REGDIST_4,
},


	},

	.cpus = {
		0x1,
	},

	.mem_regions = {
		/* UART */ {
			.phys_start = 

Re: Issue with large inmates on TX2

2018-11-05 Thread Jan Kiszka
What's your Jailhouse version? Seems it's not the last release because you are 
not defining the console of the non-root cell. Please update Jailhouse first, 
specifically due to 
https://github.com/siemens/jailhouse/commit/932556921b07121e6ce19573ba3efa97615a41ff.


Jan

On 05.11.18 10:49, Luca Cuomo wrote:

Of course,

Il giorno lun 5 nov 2018 alle ore 09:40 Jan Kiszka > ha scritto:


On 05.11.18 09:22, Luca Cuomo wrote:
 > Hi Jan,
 > Il giorno mer 31 ott 2018 alle ore 19:23 Jan Kiszka
mailto:jan.kis...@siemens.com>
 > >> ha 
scritto:
 >
 >     On 31.10.18 16:42, Luca Cuomo wrote:
 >      > Dear all,
 >      >
 >      > we've encountered an issue when running inmates with more than 32
MB of RAM
 >      > (e.g. 64 MB) on Jetson TX2.
 >      >
 >      > We've tried using the Linux kernel 4.16.7 Vanilla, the latest
version of
 >      > jailhouse (v0.10) and gic-demo.
 >      >
 >      > We've attached a JTAG debugger and we've seen that the inmate is
running but
 >      > there are two problems:
 >      >   - No output is sent to the serial console
 >      >   - No interrupts arrives to the cell (checked with both cell
stats and the
 >      > checking the program counter)
 >      >
 >      > No error messages on the Jailhouse console nor on the dmesg.
 >      >
 >      > Is anybody able of running large inmates ?
 >      >
 >
 >     What did you change? The cell configurations? The image size you load
(larger
 >     initrd etc.)?
 >
 >     Maybe there is an issue with the loader (jailhouse-cell-linux) in
calculating
 >     where to put things. Try playing with the --kernel-decomp-factor in
case you
 >     increased the size of the loaded images.
 >
 > The kernel attributes i described are referred to the system kernel (root
cell).
 > I've no tried a linux inmate  but a simple bare metal demo which doesn't 
work
 > when the RAM in the .cell is 64MB. I've updated the map_range call on the
RAM
 > in  mem.c indeed.

Can you share your configs, or even just the diff to the upstream configs?

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE

Corporate Competence Center Embedded Linux



--
Luca Cuomo.
Software Engineer

Evidence Srl
Via Carducci 56
56010 S.Giuliano Terme - Pisa - Italy
Phone:  +39 050 99 11 122
Mail: l.cu...@evidence.eu.com 
Web:http://www.evidence.eu.com 


--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

--
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jailhouse-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Issue with large inmates on TX2

2018-11-05 Thread Luca Cuomo
Of course,

Il giorno lun 5 nov 2018 alle ore 09:40 Jan Kiszka 
ha scritto:

> On 05.11.18 09:22, Luca Cuomo wrote:
> > Hi Jan,
> > Il giorno mer 31 ott 2018 alle ore 19:23 Jan Kiszka <
> jan.kis...@siemens.com
> > > ha scritto:
> >
> > On 31.10.18 16:42, Luca Cuomo wrote:
> >  > Dear all,
> >  >
> >  > we've encountered an issue when running inmates with more than 32
> MB of RAM
> >  > (e.g. 64 MB) on Jetson TX2.
> >  >
> >  > We've tried using the Linux kernel 4.16.7 Vanilla, the latest
> version of
> >  > jailhouse (v0.10) and gic-demo.
> >  >
> >  > We've attached a JTAG debugger and we've seen that the inmate is
> running but
> >  > there are two problems:
> >  >   - No output is sent to the serial console
> >  >   - No interrupts arrives to the cell (checked with both cell
> stats and the
> >  > checking the program counter)
> >  >
> >  > No error messages on the Jailhouse console nor on the dmesg.
> >  >
> >  > Is anybody able of running large inmates ?
> >  >
> >
> > What did you change? The cell configurations? The image size you
> load (larger
> > initrd etc.)?
> >
> > Maybe there is an issue with the loader (jailhouse-cell-linux) in
> calculating
> > where to put things. Try playing with the --kernel-decomp-factor in
> case you
> > increased the size of the loaded images.
> >
> > The kernel attributes i described are referred to the system kernel
> (root cell).
> > I've no tried a linux inmate  but a simple bare metal demo which doesn't
> work
> > when the RAM in the .cell is 64MB. I've updated the map_range call on
> the RAM
> > in  mem.c indeed.
>
> Can you share your configs, or even just the diff to the upstream configs?
>
> Jan
>
> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> Corporate Competence Center Embedded Linux
>


-- 
Luca Cuomo.
Software Engineer

Evidence Srl
Via Carducci 56
56010 S.Giuliano Terme - Pisa - Italy
Phone:  +39 050 99 11 122
Mail: l.cu...@evidence.eu.com
Web: http://www.evidence.eu.com

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jailhouse-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
/*
 * Jailhouse, a Linux-based partitioning hypervisor
 *
 * Configuration for Jailhouse Jetson TX2 board
 *
 * Copyright (C) 2018 Evidence Srl
 *
 * Authors:
 *  Claudio Scordino 
 *  Luca Cuomo 
 *
 *
 * NOTE: Add "mem=7808M vmalloc=512M" to the kernel command line.
 *
 *	2:7800: inmate (size: 400: = 64 MB)
 *	2:7100: hypervisor (size: 400: = 64 MB)
 *
 */

#include 
#include 

#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))

struct {
	struct jailhouse_system header;
	__u64 cpus[1];
	struct jailhouse_memory mem_regions[64];
	struct jailhouse_irqchip irqchips[3];
} __attribute__((packed)) config = {
	.header = {
		.signature = JAILHOUSE_SYSTEM_SIGNATURE,
		.revision = JAILHOUSE_CONFIG_REVISION,
		.hypervisor_memory = {
			.phys_start = 0x27100,
			.size = 0x400,
		},
		.debug_console = {
			.address = 0x310,
			.size = 0x1,
			.type = JAILHOUSE_CON_TYPE_8250,
			.flags = JAILHOUSE_CON_ACCESS_MMIO |
 JAILHOUSE_CON_REGDIST_4,
		},

		.platform_info = {
			/* .pci_mmconfig_base is fixed; if you change it,
 update the value in inmates/lib/arm-common/pci.c
 (PCI_CFG_BASE) and regenerate the inmate library*/
.pci_mmconfig_base = 0x4000, 
.pci_mmconfig_end_bus = 0x0,
.pci_is_virtual = 1,

			.arm = {
.gicd_base = 0x03881000,
.gicc_base = 0x03882000,
.gich_base = 0x03884000,
.gicv_base = 0x03886000,
.gic_version = 2,
.maintenance_irq = 25,
			}
		},
		.root_cell = {
			.name = "jetson-tx2-root",
			.cpu_set_size = sizeof(config.cpus),
			.num_memory_regions = ARRAY_SIZE(config.mem_regions),
			.num_irqchips = ARRAY_SIZE(config.irqchips),
			.vpci_irq_base = 288,
		},
	},

	.cpus = {
		0x39,
	},


	.mem_regions = {
		/* BPMP_ATCM */ {
.phys_start = 0x,
.virt_start = 0x,
.size = 0x4,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE,
},

		/* MISC */ {
.phys_start = 0x0010,
.virt_start = 0x0010,
.size = 0x1,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE,
},

		/* AXIP2P */ {
			.phys_start = 0x0210,
			.virt_start = 0x0210,
			.size = 0x10,
			.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |

Re: Issue with large inmates on TX2

2018-11-05 Thread Jan Kiszka

On 05.11.18 09:22, Luca Cuomo wrote:

Hi Jan,
Il giorno mer 31 ott 2018 alle ore 19:23 Jan Kiszka > ha scritto:


On 31.10.18 16:42, Luca Cuomo wrote:
 > Dear all,
 >
 > we've encountered an issue when running inmates with more than 32 MB of 
RAM
 > (e.g. 64 MB) on Jetson TX2.
 >
 > We've tried using the Linux kernel 4.16.7 Vanilla, the latest version of
 > jailhouse (v0.10) and gic-demo.
 >
 > We've attached a JTAG debugger and we've seen that the inmate is running 
but
 > there are two problems:
 >   - No output is sent to the serial console
 >   - No interrupts arrives to the cell (checked with both cell stats and 
the
 > checking the program counter)
 >
 > No error messages on the Jailhouse console nor on the dmesg.
 >
 > Is anybody able of running large inmates ?
 >

What did you change? The cell configurations? The image size you load 
(larger
initrd etc.)?

Maybe there is an issue with the loader (jailhouse-cell-linux) in 
calculating
where to put things. Try playing with the --kernel-decomp-factor in case you
increased the size of the loaded images.

The kernel attributes i described are referred to the system kernel (root cell). 
I've no tried a linux inmate  but a simple bare metal demo which doesn't work
when the RAM in the .cell is 64MB. I've updated the map_range call on the RAM 
in  mem.c indeed.


Can you share your configs, or even just the diff to the upstream configs?

Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

--
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jailhouse-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Issue with large inmates on TX2

2018-11-05 Thread Luca Cuomo
Hi Jan,
Il giorno mer 31 ott 2018 alle ore 19:23 Jan Kiszka 
ha scritto:

> On 31.10.18 16:42, Luca Cuomo wrote:
> > Dear all,
> >
> > we've encountered an issue when running inmates with more than 32 MB of
> RAM
> > (e.g. 64 MB) on Jetson TX2.
> >
> > We've tried using the Linux kernel 4.16.7 Vanilla, the latest version of
> > jailhouse (v0.10) and gic-demo.
> >
> > We've attached a JTAG debugger and we've seen that the inmate is running
> but
> > there are two problems:
> >   - No output is sent to the serial console
> >   - No interrupts arrives to the cell (checked with both cell stats and
> the
> > checking the program counter)
> >
> > No error messages on the Jailhouse console nor on the dmesg.
> >
> > Is anybody able of running large inmates ?
> >
>
> What did you change? The cell configurations? The image size you load
> (larger
> initrd etc.)?
>
> Maybe there is an issue with the loader (jailhouse-cell-linux) in
> calculating
> where to put things. Try playing with the --kernel-decomp-factor in case
> you
> increased the size of the loaded images.
>
> The kernel attributes i described are referred to the system kernel (root
cell). I've no tried a linux inmate  but a simple bare metal demo which
doesn't work
when the RAM in the .cell is 64MB. I've updated the map_range call on the
RAM in  mem.c indeed.

Jan
>
> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> Corporate Competence Center Embedded Linux
>

Regards,

-- 
Luca Cuomo.
Software Engineer

Evidence Srl
Via Carducci 56
56010 S.Giuliano Terme - Pisa - Italy
Phone:  +39 050 99 11 122
Mail: l.cu...@evidence.eu.com
Web: http://www.evidence.eu.com

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jailhouse-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Issue with large inmates on TX2

2018-10-31 Thread Jan Kiszka

On 31.10.18 16:42, Luca Cuomo wrote:

Dear all,

we've encountered an issue when running inmates with more than 32 MB of RAM 
(e.g. 64 MB) on Jetson TX2.


We've tried using the Linux kernel 4.16.7 Vanilla, the latest version of 
jailhouse (v0.10) and gic-demo.


We've attached a JTAG debugger and we've seen that the inmate is running but 
there are two problems:

  - No output is sent to the serial console
  - No interrupts arrives to the cell (checked with both cell stats and the 
checking the program counter)


No error messages on the Jailhouse console nor on the dmesg.

Is anybody able of running large inmates ?



What did you change? The cell configurations? The image size you load (larger 
initrd etc.)?


Maybe there is an issue with the loader (jailhouse-cell-linux) in calculating 
where to put things. Try playing with the --kernel-decomp-factor in case you 
increased the size of the loaded images.


Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

--
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jailhouse-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.