Hi Jan,
I have a couple more questions on serial device (UART) allocation. If I
have two serial devices, ttyS0 (IRQ4 w/address 0x3f8) and ttyS1(IRQ3
w/address 0x2f8). Is the setup below the correct way to allocate ttyS0 to
the root linux and the ttyS1 to a non-root linux guest?
// .irq chips array in the root config
.irqchips = {
{
.address = 0xfec00000,
.id = 0x1f0ff,
.pin_bitmap = {
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
},
},
//.irq chips array in the guest config
.irqchips = {
{
.address = 0xfec00000,
.id = 0x1f0ff,
.pin_bitmap = { 0x00008 }, /*remap ttyS1 to the linux guest, root keeps
ttyS0 */
},
//.pio_bitmap root (keep ttyS0, lose ttyS1)
.pio_bitmap = {
[ 0x2f8/8 ... 0x2ff/8] = -1, /* serial2 */
[ 0x3f8/8 ... 0x3ff/8] = 0, /* serial1 */
},
//.pio_bitmap guest (keep ttyS1, lost ttyS0)
.pio_bitmap = {
[ 0x2f8/8 ... 0x2ff/8] = -1, /* serial2 */
[ 0x3f8/8 ... 0x3ff/8] = 0, /* serial1 */
},
Also, is there any way to prevent the non-root from trying to probe against
ttyS0 at startup and causing a memory access violation? I'm aware of the
8250.nr_uarts=1, but it seems to default to enumerating ttyS0.
Thanks again for all of your help,
Wayne
On Wed, Jun 19, 2019 at 12:24 PM Jan Kiszka <[email protected]> wrote:
> On 19.06.19 18:15, Wayne wrote:
> > Hi Jan:
> >
> > I figured out my problem with Jailhouse throwing the "Cannot allocate
> memory"
> > error when trying to create a guest cell with more than 200MB RAM. I
> had to
> > increase my hypervisor memory size from 6MB to 64MB. Now I can unpack
> my larger
>
> Ah, makes sense. You should see the allocation stats after each major
> operation
> on the Jailhouse console. Forgot to point to that out because I thought we
> weren't that tight but rather had another problem that caused excessive
> memory need.
>
> > root initramfs (~70MB) successfully, but now that falls into the dracut
> > emergency shell too. This appears to be occurring when the kernel tries
> to
> > pivot/switch to the "real" root filesystem.
>
> Yeah, dracut won't give you a "real" system without much more work.
>
> >
> > I can boot into a real kernel prompt with your rootfs.cpio, but I really
> would
> > like to be running a copy of the full root linux....just with the
> filesystem
> > being entirely in the ramdisk. Any thoughts on how to accomplish this?
> It
> > seems like buildroot can generate images based on busybox, with the ash
> shell.
> > I really would like bash support.
> >
>
> You should achieve that by packing a regular rootfs into a cpio.
>
> Jan
>
> > Thanks for all of your help getting to this point,
> > Wayne
> >
> > On Tue, Jun 18, 2019 at 1:09 PM Wayne <[email protected]
> > <mailto:[email protected]>> wrote:
> >
> > Jan:
> >
> > To summarize:
> > 1. My smaller guest initramfs (~30MB) unpacks properly, but then
> falls into
> > the dracut emergency shell. Now that i'm using minicom it no longer
> scrolls
> > repeatedly. I still can't get to a proper kernel login prompt.
> > 2. My larger root initramfs (~70MB) fails to unpack, and also
> jailhouse
> > fails to create the guest if I attempt to allocate more memory.
> > 3. I can get to the kernel login prompt (and login successfully) if
> I use
> > your rootfs.cpio binary. This option so far is the most promising.
> >
> > Thanks for your assistance,
> > Wayne
> >
> > On Tue, Jun 18, 2019 at 12:01 PM Jan Kiszka <[email protected]
> > <mailto:[email protected]>> wrote:
> >
> > On 18.06.19 17:48, Wayne wrote:
> > > Jan/Ralf:
> > >
> > > Ok, with the rootfs.cpio you just provided I can see the
> following on
> > my serial
> > > port:
> > >
> > > Welcome to Buildroot
> > > jailhouse login:
> > >
> > > So that's progress. Is there a default user name and
> password to use to
> > > complete the login? That would point to the problem being
> booting
> > against my
> > > initramfs files.
> >
> > "root" without password is the login.
> >
> > >
> > > Also, the issue where my serial output scrolled continuously
> was due
> > to the
> > > capture method. I switched to minicom and no longer see that
> occur.
> >
> > OK, consistent sign. Then we are back to a size issue, not a
> format
> > problem: You
> > larger image is too large, but enlarging the inmate does not
> work. If it
> > would,
> > your larger image will likely boot as well.
> >
> > >
> > > Any further thoughts on why jailhouse fails to load the guest
> when I
> > set the
> > > memory region greater than 200MB?
> >
> > I need to analyze your config, maybe try it out.
> >
> > Jan
> >
> > --
> > Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> > Corporate Competence Center Embedded Linux
> >
>
> --
> 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jailhouse-dev/CA%2B%2BKhc0Fxz3NKS5p0ApbTtos5j5GtuJzBOJ%2B4jT31faXn7fbrw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.