RE: ioctl function not completing and hypervisor output
Hi, I was reading through jailhouse installation once again and I stumbled upon a particular webpage (written in mandarin): https://ntuoss.hackpad.com/ep/pad/static/8pZYOyoSbQh which shows how to configure FreeRTOS for x86 environment. On the same page it shows some problems while enabling the root cell in QEMU (qemu-vm.cell) and by looking at the hypervisor output it seems like it is freezing furthermore it says that when QEMU was started , the ram was 4G and once it was put was to 1G the error went away, I am not sure if I am getting it right as I just used google translate to understand what's going on and tried to tell you the best I could however this does look like a memory map issue and if I am not wrong if jailhouse enabling shows up an error there could be many reasons (CPU configurations, I/O ports and so on) including memory also, what is going on here and how can I check this on my system? Regards, Swaraj Dube. -Original Message- From: jailhouse-dev@googlegroups.com [mailto:jailhouse-dev@googlegroups.com] On Behalf Of Jan Kiszka Sent: Wednesday, July 20, 2016 4:59 PM To: Dube, Swaraj <swaraj.d...@intel.com>; Valentine Sinitsyn <valentine.sinit...@gmail.com>; Jailhouse <jailhouse-dev@googlegroups.com> Cc: Hii, Roland King Guan <roland.king.guan@intel.com> Subject: Re: ioctl function not completing and hypervisor output On 2016-07-20 10:48, Dube, Swaraj wrote: > Hi Jan, > > I have discussed that matter with my team and we need to get clearance from > the management about passing out the addresses and stuff but my target > platform is the Intel Apollo lake SoC, you may have information about this > however I will try to see and pass you the most information possible about > all what you asked for. Meanwhile I am trying to install the 'setserial' > package on my target and see if ttyS2 (my UART output) is fully functioning > or not. If it helps: We can do this information exchange also offlist, based on exiting NDAs between Siemens and Intel. Regards, Jan -- Siemens AG, Corporate Technology, CT RDA ITP 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. -- 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: ioctl function not completing and hypervisor output
Hi Jan, I think that seems to be fine, will get back to you. Regards, Swaraj Dube. -Original Message- From: jailhouse-dev@googlegroups.com [mailto:jailhouse-dev@googlegroups.com] On Behalf Of Jan Kiszka Sent: Wednesday, July 20, 2016 4:59 PM To: Dube, Swaraj <swaraj.d...@intel.com>; Valentine Sinitsyn <valentine.sinit...@gmail.com>; Jailhouse <jailhouse-dev@googlegroups.com> Cc: Hii, Roland King Guan <roland.king.guan@intel.com> Subject: Re: ioctl function not completing and hypervisor output On 2016-07-20 10:48, Dube, Swaraj wrote: > Hi Jan, > > I have discussed that matter with my team and we need to get clearance from > the management about passing out the addresses and stuff but my target > platform is the Intel Apollo lake SoC, you may have information about this > however I will try to see and pass you the most information possible about > all what you asked for. Meanwhile I am trying to install the 'setserial' > package on my target and see if ttyS2 (my UART output) is fully functioning > or not. If it helps: We can do this information exchange also offlist, based on exiting NDAs between Siemens and Intel. Regards, Jan -- Siemens AG, Corporate Technology, CT RDA ITP 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. -- 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: ioctl function not completing and hypervisor output
On 2016-07-20 10:48, Dube, Swaraj wrote: > Hi Jan, > > I have discussed that matter with my team and we need to get clearance from > the management about passing out the addresses and stuff but my target > platform is the Intel Apollo lake SoC, you may have information about this > however I will try to see and pass you the most information possible about > all what you asked for. Meanwhile I am trying to install the 'setserial' > package on my target and see if ttyS2 (my UART output) is fully functioning > or not. If it helps: We can do this information exchange also offlist, based on exiting NDAs between Siemens and Intel. Regards, Jan -- Siemens AG, Corporate Technology, CT RDA ITP 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: ioctl function not completing and hypervisor output
On 2016-07-19 04:37, Dube, Swaraj wrote: > Hi Jan, > > I had a discussion with my team regarding the board specs but before that we > believe there are some things that are missing or incorrect in myboard.c > (generated C file using jailhouse-config-create) especially after reading the > article LJ-article-04-2015.txt and other related topics. So for now we have > one of our BIOS engineers checking that file with respect to our target > platform however I would like your take on this : yes you may not know much > about our target platform but still what areas do you think in general need > to be modified in order to get close to a 100% correct configuration file. The first step for bringing up a board under Jailhouse is ensuring that that the UART (or the VGA console) works. Only after that a real analysis of the configuration makes sense because, again, you are stepping in the dark regarding what goes wrong from the hypervisor point of view. Jan -- Siemens AG, Corporate Technology, CT RDA ITP 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: ioctl function not completing and hypervisor output
I totally agree with you here, just give me some time to gather relevant information about my target. Regards, Swaraj Dube. -Original Message- From: Jan Kiszka [mailto:jan.kis...@siemens.com] Sent: Friday, July 15, 2016 1:39 PM To: Dube, Swaraj <swaraj.d...@intel.com>; Valentine Sinitsyn <valentine.sinit...@gmail.com>; Jailhouse <jailhouse-dev@googlegroups.com> Cc: Hii, Roland King Guan <roland.king.guan@intel.com> Subject: Re: ioctl function not completing and hypervisor output On 2016-07-15 13:32, Dube, Swaraj wrote: > I used the command : "dmesg | grep ttyS2" as that is the serial port on my > board, it shows the MMIO address at 0x9222e000 however when I add that to > debug_console.phys_start(originally 0x3f8) in my configs/myboard.c (attached) > , I still get the same error(cpu stalls and no hypervisor output :( ), again > as I said I think there needs something else to be configured in this file as > I don't think it is made up in a way such that it will get support from the > hardware( board attached to my laptop ) especially the I/O else I am unsure > of what to change now in order to get this root cell running because I do not > get any error message when the program looks for firmware and checks for > memory allocated for jailhouse in the jailhouse_cmd_enable(); function , > jailhouse.ko is also loaded properly (checked using 'lsmod' command ), > intel_iommu is off during jailhouse enable so I think the error has to be > incorrect configuration file given that all of you do not find any problem > with my OS , make and kernel version I specified in the first post on this > topic. > > Few things to clarify: during boot up of my board, the very last message I > see is ttyS2 - failed to request DMA , should that be a problem? , there is > no need for an ssh to get hypervisor output right since I am suing > USB-Serial, yes for VGA we need but not for USB-Serial right? , Any questions > you have in mind regarding my CPU configuration? Do you have some specification about your target platform to share? Datasheets etc.? We are stepping too much in the dark here to give helpful advices. Jan > > Regards, > Swaraj Dube. > > -Original Message- > From: jailhouse-dev@googlegroups.com > [mailto:jailhouse-dev@googlegroups.com] On Behalf Of Valentine > Sinitsyn > Sent: Thursday, July 14, 2016 5:23 PM > To: Dube, Swaraj <swaraj.d...@intel.com>; Jan Kiszka > <jan.kis...@siemens.com>; Jailhouse <jailhouse-dev@googlegroups.com> > Cc: Hii, Roland King Guan <roland.king.guan@intel.com> > Subject: Re: ioctl function not completing and hypervisor output > > On 14.07.2016 14:16, Dube, Swaraj wrote: >> Hi, >> >> I just got to know that the board I am using uses MMIO, I will have to >> confirm the base addresses in config/myboard.c with the team in that case >> however should that be a problem? > IIRC debug port setting has no effect on MMIO. But I vaguely recall the > details of how we handle this in Jailhouse; you'd have to check in > arch/dbg-write.c. > > Valentine > >> >> Regards, >> Swaraj Dube. >> >> -Original Message- >> From: Valentine Sinitsyn [mailto:valentine.sinit...@gmail.com] >> Sent: Thursday, July 14, 2016 3:21 PM >> To: Dube, Swaraj <swaraj.d...@intel.com>; Jan Kiszka >> <jan.kis...@siemens.com>; Jailhouse <jailhouse-dev@googlegroups.com> >> Subject: Re: ioctl function not completing and hypervisor output >> >> Hi, >> >> On 14.07.2016 11:02, Dube, Swaraj wrote: >>> Hi, >>> >>> Sounds like a good idea, firstly Valentine has a good point I also think >>> there is something wrong with the I/O port access (if not then something >>> else in the I/O) so I changed debug_console.phys_start points from 0x3f8 to >>> 0x3e8 in my configs/myboard.c and then make again to obtain a new >>> myboard.cell file as I am using ttyS2 (I checked this in my >>> /boot/EFI/BOOT/grub.cfg) and it's standard address is 0x3e8 but is that >>> it?, I think I may have to change something else in myboard.c but I am >>> unsure of what to change if any. >>> >>> I turned CPU 1 offline and tried enabling jailhouse and I get an Invalid >>> argument error for JAILHOUSE_ENABLE obviously due to the return of -EINVAL >>> from jailhouse_cmd_enable() function from driver/main.c due to the if >>> conditions set but still no hypervisor output, I just see the printf(); >>> messages I manually created, I then read about the article contributed by >>> valentine on understanding the jailhouse hypervis
Re: ioctl function not completing and hypervisor output
On 2016-07-15 13:32, Dube, Swaraj wrote: > I used the command : "dmesg | grep ttyS2" as that is the serial port on my > board, it shows the MMIO address at 0x9222e000 however when I add that to > debug_console.phys_start(originally 0x3f8) in my configs/myboard.c (attached) > , I still get the same error(cpu stalls and no hypervisor output :( ), again > as I said I think there needs something else to be configured in this file as > I don't think it is made up in a way such that it will get support from the > hardware( board attached to my laptop ) especially the I/O else I am unsure > of what to change now in order to get this root cell running because I do not > get any error message when the program looks for firmware and checks for > memory allocated for jailhouse in the jailhouse_cmd_enable(); function , > jailhouse.ko is also loaded properly (checked using 'lsmod' command ), > intel_iommu is off during jailhouse enable so I think the error has to be > incorrect configuration file given that all of you do not find any problem > with my OS , make and kernel version I specified in the first post on this > topic. > > Few things to clarify: during boot up of my board, the very last message I > see is ttyS2 - failed to request DMA , should that be a problem? , there is > no need for an ssh to get hypervisor output right since I am suing > USB-Serial, yes for VGA we need but not for USB-Serial right? , Any questions > you have in mind regarding my CPU configuration? Do you have some specification about your target platform to share? Datasheets etc.? We are stepping too much in the dark here to give helpful advices. Jan > > Regards, > Swaraj Dube. > > -Original Message- > From: jailhouse-dev@googlegroups.com [mailto:jailhouse-dev@googlegroups.com] > On Behalf Of Valentine Sinitsyn > Sent: Thursday, July 14, 2016 5:23 PM > To: Dube, Swaraj <swaraj.d...@intel.com>; Jan Kiszka > <jan.kis...@siemens.com>; Jailhouse <jailhouse-dev@googlegroups.com> > Cc: Hii, Roland King Guan <roland.king.guan@intel.com> > Subject: Re: ioctl function not completing and hypervisor output > > On 14.07.2016 14:16, Dube, Swaraj wrote: >> Hi, >> >> I just got to know that the board I am using uses MMIO, I will have to >> confirm the base addresses in config/myboard.c with the team in that case >> however should that be a problem? > IIRC debug port setting has no effect on MMIO. But I vaguely recall the > details of how we handle this in Jailhouse; you'd have to check in > arch/dbg-write.c. > > Valentine > >> >> Regards, >> Swaraj Dube. >> >> -Original Message- >> From: Valentine Sinitsyn [mailto:valentine.sinit...@gmail.com] >> Sent: Thursday, July 14, 2016 3:21 PM >> To: Dube, Swaraj <swaraj.d...@intel.com>; Jan Kiszka >> <jan.kis...@siemens.com>; Jailhouse <jailhouse-dev@googlegroups.com> >> Subject: Re: ioctl function not completing and hypervisor output >> >> Hi, >> >> On 14.07.2016 11:02, Dube, Swaraj wrote: >>> Hi, >>> >>> Sounds like a good idea, firstly Valentine has a good point I also think >>> there is something wrong with the I/O port access (if not then something >>> else in the I/O) so I changed debug_console.phys_start points from 0x3f8 to >>> 0x3e8 in my configs/myboard.c and then make again to obtain a new >>> myboard.cell file as I am using ttyS2 (I checked this in my >>> /boot/EFI/BOOT/grub.cfg) and it's standard address is 0x3e8 but is that >>> it?, I think I may have to change something else in myboard.c but I am >>> unsure of what to change if any. >>> >>> I turned CPU 1 offline and tried enabling jailhouse and I get an Invalid >>> argument error for JAILHOUSE_ENABLE obviously due to the return of -EINVAL >>> from jailhouse_cmd_enable() function from driver/main.c due to the if >>> conditions set but still no hypervisor output, I just see the printf(); >>> messages I manually created, I then read about the article contributed by >>> valentine on understanding the jailhouse hypervisor: >>> https://lwn.net/Articles/578295/ that explains about the role of the >>> functions and how calls are made. I realize that my program is not entering >>> the entry(); or init_early(); function in hypervisor/setup.c file as this >>> is the file which seems to be printing out the hypervisor output , may be >>> the system is crashing before that ? , may be the information about the IO >>> in configs/myboard.c still incorrect (my suspect) , Any suggestions? >> If hav
RE: ioctl function not completing and hypervisor output
I used the command : "dmesg | grep ttyS2" as that is the serial port on my board, it shows the MMIO address at 0x9222e000 however when I add that to debug_console.phys_start(originally 0x3f8) in my configs/myboard.c (attached) , I still get the same error(cpu stalls and no hypervisor output :( ), again as I said I think there needs something else to be configured in this file as I don't think it is made up in a way such that it will get support from the hardware( board attached to my laptop ) especially the I/O else I am unsure of what to change now in order to get this root cell running because I do not get any error message when the program looks for firmware and checks for memory allocated for jailhouse in the jailhouse_cmd_enable(); function , jailhouse.ko is also loaded properly (checked using 'lsmod' command ), intel_iommu is off during jailhouse enable so I think the error has to be incorrect configuration file given that all of you do not find any problem with my OS , make and kernel version I specified in the first post on this topic. Few things to clarify: during boot up of my board, the very last message I see is ttyS2 - failed to request DMA , should that be a problem? , there is no need for an ssh to get hypervisor output right since I am suing USB-Serial, yes for VGA we need but not for USB-Serial right? , Any questions you have in mind regarding my CPU configuration? Regards, Swaraj Dube. -Original Message- From: jailhouse-dev@googlegroups.com [mailto:jailhouse-dev@googlegroups.com] On Behalf Of Valentine Sinitsyn Sent: Thursday, July 14, 2016 5:23 PM To: Dube, Swaraj <swaraj.d...@intel.com>; Jan Kiszka <jan.kis...@siemens.com>; Jailhouse <jailhouse-dev@googlegroups.com> Cc: Hii, Roland King Guan <roland.king.guan....@intel.com> Subject: Re: ioctl function not completing and hypervisor output On 14.07.2016 14:16, Dube, Swaraj wrote: > Hi, > > I just got to know that the board I am using uses MMIO, I will have to > confirm the base addresses in config/myboard.c with the team in that case > however should that be a problem? IIRC debug port setting has no effect on MMIO. But I vaguely recall the details of how we handle this in Jailhouse; you'd have to check in arch/dbg-write.c. Valentine > > Regards, > Swaraj Dube. > > -Original Message- > From: Valentine Sinitsyn [mailto:valentine.sinit...@gmail.com] > Sent: Thursday, July 14, 2016 3:21 PM > To: Dube, Swaraj <swaraj.d...@intel.com>; Jan Kiszka > <jan.kis...@siemens.com>; Jailhouse <jailhouse-dev@googlegroups.com> > Subject: Re: ioctl function not completing and hypervisor output > > Hi, > > On 14.07.2016 11:02, Dube, Swaraj wrote: >> Hi, >> >> Sounds like a good idea, firstly Valentine has a good point I also think >> there is something wrong with the I/O port access (if not then something >> else in the I/O) so I changed debug_console.phys_start points from 0x3f8 to >> 0x3e8 in my configs/myboard.c and then make again to obtain a new >> myboard.cell file as I am using ttyS2 (I checked this in my >> /boot/EFI/BOOT/grub.cfg) and it's standard address is 0x3e8 but is that it?, >> I think I may have to change something else in myboard.c but I am unsure of >> what to change if any. >> >> I turned CPU 1 offline and tried enabling jailhouse and I get an Invalid >> argument error for JAILHOUSE_ENABLE obviously due to the return of -EINVAL >> from jailhouse_cmd_enable() function from driver/main.c due to the if >> conditions set but still no hypervisor output, I just see the printf(); >> messages I manually created, I then read about the article contributed by >> valentine on understanding the jailhouse hypervisor: >> https://lwn.net/Articles/578295/ that explains about the role of the >> functions and how calls are made. I realize that my program is not entering >> the entry(); or init_early(); function in hypervisor/setup.c file as this is >> the file which seems to be printing out the hypervisor output , may be the >> system is crashing before that ? , may be the information about the IO in >> configs/myboard.c still incorrect (my suspect) , Any suggestions? > If having debug port wrong is really the culprit, check your BIOS/UEFI. > Often you may view/change I/O ports for COMx there. > > Valentine > >> >> Regards, >> Swaraj Dube. >> >> -Original Message- >> From: Jan Kiszka [mailto:jan.kis...@siemens.com] >> Sent: Wednesday, July 13, 2016 11:15 PM >> To: Dube, Swaraj <swaraj.d...@intel.com>; Valentine Sinitsyn >> <valentine.sinit...@gmail.com>; Jailhouse >> <jailhouse-dev@googlegroups.com> >> Subject: Re: ioctl function not co
Re: ioctl function not completing and hypervisor output
On 14.07.2016 14:16, Dube, Swaraj wrote: Hi, I just got to know that the board I am using uses MMIO, I will have to confirm the base addresses in config/myboard.c with the team in that case however should that be a problem? IIRC debug port setting has no effect on MMIO. But I vaguely recall the details of how we handle this in Jailhouse; you'd have to check in arch/dbg-write.c. Valentine Regards, Swaraj Dube. -Original Message- From: Valentine Sinitsyn [mailto:valentine.sinit...@gmail.com] Sent: Thursday, July 14, 2016 3:21 PM To: Dube, Swaraj <swaraj.d...@intel.com>; Jan Kiszka <jan.kis...@siemens.com>; Jailhouse <jailhouse-dev@googlegroups.com> Subject: Re: ioctl function not completing and hypervisor output Hi, On 14.07.2016 11:02, Dube, Swaraj wrote: Hi, Sounds like a good idea, firstly Valentine has a good point I also think there is something wrong with the I/O port access (if not then something else in the I/O) so I changed debug_console.phys_start points from 0x3f8 to 0x3e8 in my configs/myboard.c and then make again to obtain a new myboard.cell file as I am using ttyS2 (I checked this in my /boot/EFI/BOOT/grub.cfg) and it's standard address is 0x3e8 but is that it?, I think I may have to change something else in myboard.c but I am unsure of what to change if any. I turned CPU 1 offline and tried enabling jailhouse and I get an Invalid argument error for JAILHOUSE_ENABLE obviously due to the return of -EINVAL from jailhouse_cmd_enable() function from driver/main.c due to the if conditions set but still no hypervisor output, I just see the printf(); messages I manually created, I then read about the article contributed by valentine on understanding the jailhouse hypervisor: https://lwn.net/Articles/578295/ that explains about the role of the functions and how calls are made. I realize that my program is not entering the entry(); or init_early(); function in hypervisor/setup.c file as this is the file which seems to be printing out the hypervisor output , may be the system is crashing before that ? , may be the information about the IO in configs/myboard.c still incorrect (my suspect) , Any suggestions? If having debug port wrong is really the culprit, check your BIOS/UEFI. Often you may view/change I/O ports for COMx there. Valentine Regards, Swaraj Dube. -Original Message- From: Jan Kiszka [mailto:jan.kis...@siemens.com] Sent: Wednesday, July 13, 2016 11:15 PM To: Dube, Swaraj <swaraj.d...@intel.com>; Valentine Sinitsyn <valentine.sinit...@gmail.com>; Jailhouse <jailhouse-dev@googlegroups.com> Subject: Re: ioctl function not completing and hypervisor output On 2016-07-13 18:07, Dube, Swaraj wrote: Hi, Thanks for the reply, I think what you are referring to is the COM right , I read about it, COM1-4 having I/O port addresses 0x3f8 , 0x2f8 , 0x3e8 and 0x2e8 respectively . Currently debug_console.phys_start in my configs/myboard.c points to the address 0x3f8 which should be of standard COM1 whereas I am using COM5 so I'll try finding the address of COM5, hope I am getting it right, kindly correct me if I am getting it wrong. If you want to debug the UART output of Jailhouse without crashing your system every time: Take one of the configured cores offline (echo 0 > /sys/devices/system/cpu/cpu1/online) before calling jailhouse enable. That will make the hypervisor fail gracefully with -EINVAL, but you will see messages of it trying to enable the remaining CPUs - provided we do not crash even earlier in the setup. Jan -- Siemens AG, Corporate Technology, CT RDA ITP 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: ioctl function not completing and hypervisor output
Hi, Sounds like a good idea, firstly Valentine has a good point I also think there is something wrong with the I/O port access (if not then something else in the I/O) so I changed debug_console.phys_start points from 0x3f8 to 0x3e8 in my configs/myboard.c and then make again to obtain a new myboard.cell file as I am using ttyS2 (I checked this in my /boot/EFI/BOOT/grub.cfg) and it's standard address is 0x3e8 but is that it?, I think I may have to change something else in myboard.c but I am unsure of what to change if any. I turned CPU 1 offline and tried enabling jailhouse and I get an Invalid argument error for JAILHOUSE_ENABLE obviously due to the return of -EINVAL from jailhouse_cmd_enable() function from driver/main.c due to the if conditions set but still no hypervisor output, I just see the printf(); messages I manually created, I then read about the article contributed by valentine on understanding the jailhouse hypervisor: https://lwn.net/Articles/578295/ that explains about the role of the functions and how calls are made. I realize that my program is not entering the entry(); or init_early(); function in hypervisor/setup.c file as this is the file which seems to be printing out the hypervisor output , may be the system is crashing before that ? , may be the information about the IO in configs/myboard.c still incorrect (my suspect) , Any suggestions? Regards, Swaraj Dube. -Original Message- From: Jan Kiszka [mailto:jan.kis...@siemens.com] Sent: Wednesday, July 13, 2016 11:15 PM To: Dube, Swaraj <swaraj.d...@intel.com>; Valentine Sinitsyn <valentine.sinit...@gmail.com>; Jailhouse <jailhouse-dev@googlegroups.com> Subject: Re: ioctl function not completing and hypervisor output On 2016-07-13 18:07, Dube, Swaraj wrote: > Hi, > > Thanks for the reply, I think what you are referring to is the COM right , I > read about it, COM1-4 having I/O port addresses 0x3f8 , 0x2f8 , 0x3e8 and > 0x2e8 respectively . Currently debug_console.phys_start in my > configs/myboard.c points to the address 0x3f8 which should be of standard > COM1 whereas I am using COM5 so I'll try finding the address of COM5, hope I > am getting it right, kindly correct me if I am getting it wrong. If you want to debug the UART output of Jailhouse without crashing your system every time: Take one of the configured cores offline (echo 0 > /sys/devices/system/cpu/cpu1/online) before calling jailhouse enable. That will make the hypervisor fail gracefully with -EINVAL, but you will see messages of it trying to enable the remaining CPUs - provided we do not crash even earlier in the setup. Jan -- Siemens AG, Corporate Technology, CT RDA ITP 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: ioctl function not completing and hypervisor output
Hi, Thanks for the reply, I think what you are referring to is the COM right , I read about it, COM1-4 having I/O port addresses 0x3f8 , 0x2f8 , 0x3e8 and 0x2e8 respectively . Currently debug_console.phys_start in my configs/myboard.c points to the address 0x3f8 which should be of standard COM1 whereas I am using COM5 so I'll try finding the address of COM5, hope I am getting it right, kindly correct me if I am getting it wrong. Regards, Swaraj Dube. -Original Message- From: Valentine Sinitsyn [mailto:valentine.sinit...@gmail.com] Sent: Wednesday, July 13, 2016 3:04 PM To: Dube, Swaraj <swaraj.d...@intel.com>; Jailhouse <jailhouse-dev@googlegroups.com> Subject: Re: ioctl function not completing and hypervisor output Hi, On 13.07.2016 08:43, swaraj.d...@intel.com wrote: > Hi, > > So I have been trying to start the root cell on my board which has lead to > CPU stall and sometimes kernel panics (can't predict which one might occur) > so I inspected the following files and added printf(""); commands to see > where exactly the program hangs: > > 1. driver/main.c -> in the function static int jailhouse_cmd_enable(struct > jailhouse_system __user *arg){} is where it seems to be checking the > hypervisor image and checking the memory and right before terminating the > function using return 0; there is the line that says pr_info("The Jailhouse > is opening.\n"); , because i can see this message on my tera term so I think > all the steps required to start the jailhouse are fine. > > 2. tools/jailhouse.c (enable_function.PNG) -> As it can be seen from the > screenshot I have manually added printf(); commands to find out where exactly > the program hangs the output looks like: > [] first point > [] second point > [] third point > [] The Jailhouse is opening. > > After this comes the stall error or the kernel panics which from the code > means that the line "err = ioctl(fd, JAILHOUSE_ENABLE, config);" is not being > executed completely because I do not see printf(); messages after that line. > > My kernel : 4.1.13apollolake > OS: Poky 2.0 (jethro) > make version : GNU Make 4.1 (all running on my board) > > I have read through the other topics regarding/close to this issue in the > mailing list and I realized that the problem could be : root cell config not > 100% correct or CPU configurations perhaps I/O port access, At this stage it > is very important to get the hypervisor output so I setup the serial port > connection in my Tera term however I still get the kernel dump and not the > hypervisor output. I have attached the steps I have done so far > (short_steps.txt serial_port_setup.PNG cable_connection.jpg) to reduce the > length of this email. Any advice will be appreciated. You mean, you get the kernel dump in your serial console? Perhaps you'd want to disable or redirect this. Anyway, please check that debug_console.phys_start points to the correct I/O port. Valentine > > Regards, > Swaraj Dube. > -- 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: ioctl function not completing and hypervisor output
Hi, On 13.07.2016 08:43, swaraj.d...@intel.com wrote: Hi, So I have been trying to start the root cell on my board which has lead to CPU stall and sometimes kernel panics (can't predict which one might occur) so I inspected the following files and added printf(""); commands to see where exactly the program hangs: 1. driver/main.c -> in the function static int jailhouse_cmd_enable(struct jailhouse_system __user *arg){} is where it seems to be checking the hypervisor image and checking the memory and right before terminating the function using return 0; there is the line that says pr_info("The Jailhouse is opening.\n"); , because i can see this message on my tera term so I think all the steps required to start the jailhouse are fine. 2. tools/jailhouse.c (enable_function.PNG) -> As it can be seen from the screenshot I have manually added printf(); commands to find out where exactly the program hangs the output looks like: [] first point [] second point [] third point [] The Jailhouse is opening. After this comes the stall error or the kernel panics which from the code means that the line "err = ioctl(fd, JAILHOUSE_ENABLE, config);" is not being executed completely because I do not see printf(); messages after that line. My kernel : 4.1.13apollolake OS: Poky 2.0 (jethro) make version : GNU Make 4.1 (all running on my board) I have read through the other topics regarding/close to this issue in the mailing list and I realized that the problem could be : root cell config not 100% correct or CPU configurations perhaps I/O port access, At this stage it is very important to get the hypervisor output so I setup the serial port connection in my Tera term however I still get the kernel dump and not the hypervisor output. I have attached the steps I have done so far (short_steps.txt serial_port_setup.PNG cable_connection.jpg) to reduce the length of this email. Any advice will be appreciated. You mean, you get the kernel dump in your serial console? Perhaps you'd want to disable or redirect this. Anyway, please check that debug_console.phys_start points to the correct I/O port. Valentine Regards, Swaraj Dube. -- 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.