On Friday, July 6, 2018 at 4:29:37 PM UTC+5:30, J. Kiszka wrote:
> On 2018-07-06 09:39, anilapp...@gmail.com wrote:
> > On Thursday, July 5, 2018 at 7:59:49 PM UTC+5:30, J. Kiszka wrote:
> >> On 2018-07-05 14:24, anilapp...@gmail.com wrote:
> >>> On Wednesday, June 27, 2018 at 11:03:19 PM UTC+5:30, J. Kiszka wrote:
> >>>> On 2018-06-27 19:21, anilapp...@gmail.com wrote:
> >>>>> On Tuesday, June 26, 2018 at 2:55:36 PM UTC+5:30, J. Kiszka wrote:
> >>>>>> On 2018-06-26 09:16, anilapp...@gmail.com wrote:
> >>>>>>> On Monday, June 25, 2018 at 9:27:11 PM UTC+5:30, J. Kiszka wrote:
> >>>>>>>> On 2018-06-25 15:09, anilapp...@gmail.com wrote:
> >>>>>>>>> Please find the error log and config file
> >>>>>>>>> Error Log:
> >>>>>>>>> ------------
> >>>>>>>>> [root@beast jailhouse]# jailhouse cell linux 
> >>>>>>>>> configs/x86/6gb-non-rootcell.cell ../images/bzImage-redhawk -i 
> >>>>>>>>> ../images/initrd-full.img -c "console=ttyS0,115200 8250.nr_uarts=1"
> >>>>>>>>>
> >>>>>>>>> Traceback (most recent call last):
> >>>>>>>>>   File "/usr/local/libexec/jailhouse/jailhouse-cell-linux", line 
> >>>>>>>>> 859, in <module>
> >>>>>>>>>     cell = JailhouseCell(config)
> >>>>>>>>>   File "/usr/local/libexec/jailhouse/jailhouse-cell-linux", line 
> >>>>>>>>> 780, in __init__
> >>>>>>>>>     raise e
> >>>>>>>>> IOError: [Errno 22] Invalid argument
> >>>>>>>>>
> >>>>>>>>> This is what i added in non-root-cell config
> >>>>>>>>> ---------------------------------------------
> >>>>>>>>>
> >>>>>>>>>     /* high RAM - 1 */ {
> >>>>>>>>>                         .phys_start = 0x404100000,
> >>>>>>>>>                         .virt_start = 0x00200000,
> >>>>>>>>>                         .size = 0x60000000,
> >>>>>>>>>                         .flags = JAILHOUSE_MEM_READ | 
> >>>>>>>>> JAILHOUSE_MEM_WRITE |
> >>>>>>>>>                                 JAILHOUSE_MEM_EXECUTE | 
> >>>>>>>>> JAILHOUSE_MEM_DMA |
> >>>>>>>>>                                 JAILHOUSE_MEM_LOADABLE,
> >>>>>>>>>                 },
> >>>>>>>>>                 /* high RAM - 2 */ {
> >>>>>>>>>                         .phys_start = 0x464100000,
> >>>>>>>>>                         .virt_start = 0x100000000,
> >>>>>>>>>                         .size = 0x60000000,
> >>>>>>>>>                         .flags = JAILHOUSE_MEM_READ | 
> >>>>>>>>> JAILHOUSE_MEM_WRITE |
> >>>>>>>>>                                 JAILHOUSE_MEM_EXECUTE | 
> >>>>>>>>> JAILHOUSE_MEM_DMA |
> >>>>>>>>>                                 JAILHOUSE_MEM_LOADABLE,
> >>>>>>>>>                 },
> >>>>>>>>>                 /* high RAM - 3*/ {
> >>>>>>>>>                         .phys_start = 0x4C4100000,
> >>>>>>>>>                         .virt_start = 0x180000000,
> >>>>>>>>>                         .size = 0x60000000,
> >>>>>>>>>                         .flags = JAILHOUSE_MEM_READ | 
> >>>>>>>>> JAILHOUSE_MEM_WRITE |
> >>>>>>>>>                                 JAILHOUSE_MEM_EXECUTE | 
> >>>>>>>>> JAILHOUSE_MEM_DMA |
> >>>>>>>>>                                 JAILHOUSE_MEM_LOADABLE,
> >>>>>>>>>                 },
> >>>>>>>>>
> >>>>>>>>> I have attached my non-root cell config can you please take a look 
> >>>>>>>>> at once.
> >>>>>>>>
> >>>>>>>> And the very same command line with the very same binaries loads and
> >>>>>>>> runs the kernel when you just leave out that last memory region?
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> Please also write out the config that "cell linux" generates:
> >>>>>>>>
> >>>>>>>> jailhouse cell linux configs/x86/6gb-non-rootcell.cell ../images \
> >>>>>>>>     /bzImage-redhawk -i ../images/initrd-full.img \
> >>>>>>>>     -c "console=ttyS0,115200 8250.nr_uarts=1" -w boot.config
> >>>>>>>>
> >>>>>>>> Interesting is the output of the command as it lists the individual 
> >>>>>>>> load
> >>>>>>>> steps to be executed, specifically the target addresses.
> >>>>>>>>
> >>>>>>>> Jan
> >>>>>>>>
> >>>>>>>> -- 
> >>>>>>>> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> >>>>>>>> Corporate Competence Center Embedded Linux
> >>>>>>>
> >>>>>>> Hi Jan,
> >>>>>>> Yes, If I leave out the last memory region every thing work. But if I 
> >>>>>>> include this region we are getting above error from the tool( 
> >>>>>>> jailhouse cell-linux).
> >>>>>>>
> >>>>>>> I run below command to get individual load steps. In both cases it 
> >>>>>>> shows same
> >>>>>>> addresses.
> >>>>>>>
> >>>>>>> jailhouse cell linux configs/x86/6gb-non-rootcell.cell 
> >>>>>>> ../images/bzImage-redhawk -i ../images/initrd-full.img -c 
> >>>>>>> "console=ttyS0,115200 8250.nr_uarts=1" -w boot.conf 
> >>>>>>> Boot parameters written. Start Linux with the following commands 
> >>>>>>> (adjusting paths as needed):
> >>>>>>>
> >>>>>>> jailhouse cell create configs/x86/6gb-non-rootcell.cell
> >>>>>>> jailhouse cell load non-rootcell-1 linux-loader.bin -a 0x0 
> >>>>>>> ../images/bzImage-redhawk -a 0xffba00 ../images/initrd-full.img -a 
> >>>>>>> 0x63f5000 boot.conf -a 0x1000
> >>>>>>> jailhouse cell start non-rootcell-1
> >>>>>>
> >>>>>> OK, this may be revealing some hidden bug in the core. We need to dig
> >>>>>> into the details now:
> >>>>>>
> >>>>>> Could you break up the cell load command line into the three artifacts
> >>>>>> to find out which of them fail?
> >>>>
> >>>> Already tried this?
> >>>>
> >>>>>>
> >>>>>> The next step would then be instrumenting the driver to find out where
> >>>>>> it returns EINVAL, and which test fails there. I'm currently not seeing
> >>>>>> the reason.
> >>>>
> >>>> And then this?
> >>>>
> >>>>>>
> >>>>>> I assume that there is no suspicious output on the hypervisor console,
> >>>>>> right? Did you build the hypervisor with "#define CONFIG_TRACE_ERROR 1"
> >>>>>> in include/jailhouse/config.h? If not, worth a try to see if the
> >>>>>> hypervisor is rejecting the request.
> >>>>> I added this macro but I didn't see any difference in logs on jailhouse
> >>>>> console. Am I missing any thing?
> >>>>
> >>>> No, this may just mean that the error is raised already by the Linux
> >>>> kernel driver and not by the hypervisor.
> >>>>
> >>>>>
> >>>>>>
> >>>>>> Also, I assume that your initrd is of "moderate" size, not more than
> >>>>>> maybe some dozens of MB, right?
> >>>>> Yes, At present our initrd is  ~500MB but our requirement is to support
> >>>>> till 6GB
> >>>>
> >>>> OK, this is not "some dozens" but significantly more. May trigger
> >>>> corner-case bugs in the code as likely no one tested such image sizes so
> >>>> far.
> >>>>
> >>>> Jan
> >>>>
> >>>> -- 
> >>>> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> >>>> Corporate Competence Center Embedded Linux
> >>>
> >>> Jan,
> >>> we got struck with loading non rootcell. we are trying to break up the 
> >>> cell load command line into articrafts to find where it is failing to load
> >>> we are able to run cell create by running below commmad.
> >>>
> >>> [root@beast jailhouse]# jailhouse cell create 
> >>> configs/x86/6gb-non-rootcell.cell
> >>>
> >>> but while running cell load command, we are getting invalid argument error
> >>> below is the command that we are trying for cell load.
> >>>
> >>> [root@beast jailhouse]# jailhouse cell load non-rootcell-1 
> >>> inmates/tools/x86/linux-loader.bin -a 0xf0000 ../images/bzImage-redhawk 
> >>> -a 0x1fc200 ../images/initrd-full.img -a 0xf5000 
> >>>
> >>> JAILHOUSE_CELL_LOAD: Invalid argument
> >>>
> >>
> >> Where did you get the addresses from? They will not work, e.g. the
> >> initrd would overwrite the kernel (unless it's smaller than 1M).
> >>
> >> Jan
> >>
> >> -- 
> >> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> >> Corporate Competence Center Embedded Linux
> > 
> > Jan,
> > I followed these below link to load the non-root cell,
> > 
> > https://groups.google.com/forum/#!searchin/jailhouse-dev/jailhouse$20cell$20load$20for$20x86|sort:date/jailhouse-dev/vJn4oiyvcu4/mhsH8CsJBwAJ
> > 
> > Based on the above link i am giving the addresses to load non-root cell.
> > Now i am using below command to load the non-root cell, 
> > 
> > jailhouse cell load non-rootcell-1 inmates/tools/x86/linux-loader.bin -s 
> > "console=ttyS0,115200 8250.nr_uarts=1" -a 0x100 ../images/bzImage-redhawk 
> > -a 0x1000000 ../images/initrd-full.img -a 0x8000000
> > 
> 
> You are missing the configuration blob that "jailhouse cell linux"
> creates. It's been written out on -w, and it has to match with the
> addresses you load things at.
> 
> Also note that the kernel command line is part of that not blob. The
> command line you specified above targets the linux-loader.bin, but that
> one does not use it.
> 
> What I was asking you is to load the blobs that "jailhouse cell linux
> ... -w config.blob" lists at the addresses it specifies, but just as
> separate "jailhouse cell load" commands. This way we will find out which
> if the load operations are rejected.
> 
> Next, you can further dig into the failing load by instrumenting the
> driver with printk to find the spot where it rejects the request - and
> to print the parameters that lead to the rejection. That would be
> systematic analysis.
> 
> Jan
> -- 
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> Corporate Competence Center Embedded Linux

Hi jan,
Have one more question. I asked configuration to support more than 2gb non 
rootcell and this is the config you suggested.
/* high RAM - 1 */ { 
                         .phys_start = 0x404100000, 
                         .virt_start = 0x00200000, 
                         .size = 0x60000000, 
                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | 
                                 JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA | 
                                 JAILHOUSE_MEM_LOADABLE, 
                 }, 
                 /* high RAM - 2 */ { 
                         .phys_start = 0x464100000, 
                         .virt_start = 0x100000000, 
                         .size = 0x60000000, 
                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | 
                                 JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA | 
                                 JAILHOUSE_MEM_LOADABLE, 
                 }, 
                /* high RAM - 3*/ { 
                         .phys_start = 0x4C4100000, 
                         .virt_start = 0x180000000, 
                         .size = 0x60000000, 
                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | 
                                 JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA | 
                                 JAILHOUSE_MEM_LOADABLE, 
                 }, 

I want to know why we have to give virtual start addresses as .virt_start = 
0x00200000 in the first chunk followed by .virt_start = 0x100000000 in
second chunk.
Regards,
Anil 

-- 
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.

Reply via email to