[9fans] lguest port broken due to some change in last 6 months;any ideas? - Plan9

This is a discussion on [9fans] lguest port broken due to some change in last 6 months;any ideas? - Plan9 ; There were a number of changes in the kernel last 6 months, I just recently did a pull and the lguest port is screwed. I spent part of today fixing things and catching up, and am now stuck in the ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: [9fans] lguest port broken due to some change in last 6 months;any ideas?

  1. [9fans] lguest port broken due to some change in last 6 months;any ideas?

    There were a number of changes in the kernel last 6 months, I just
    recently did a pull and the lguest port is screwed. I spent part of
    today fixing things and catching up, and am now stuck in the first
    taskswitch.

    Symptoms are odd. It dies in the first call to gotolabel.

    But here is the output from some prints:
    mmuswitch done return to 0xc01508de
    port/proc.c goto label c0470008 (pc c01013b3, sp c0059778)

    That pc is init0; the SP is good, previously allocated in newproc().
    Next line after this is from lguest program. Lguest says this:
    lguest: Bad address 0xc0012c01 (gpte 01008200)

    The gpte is the pte that the lguest kernel code found for that address.

    eh? c0012c01? It makes not a lot of sense, that's not word aligned, as
    it should be for accesses to cpu0pdb.
    And ... it dies in gotolabel here:
    TEXT gotolabel(SB), $1
    MOVL label+0(FP), AX
    MOVL 0(AX), SP /* restore sp */
    MOVL 4(AX), AX /* put return pc on the stack */
    MOVL AX, 0(SP)
    MOVL $1, AX /* return 1 */
    DIE DIE DIE
    RET

    as determined by me putting calls to lguest crash, line by line. Yep,
    it dies on an immediate move to AX.

    I'm thinking I'm overwriting code somehow. Anybody has ideas on how to
    debug this, let me know. I've had lots of weird problems on these
    lguest ports but this one takes the cake.

    oh yeah I have fixed the port with the new bits in memory.c, l.s, etc.
    for handling 8 MB of initial mappings.

    ron


  2. Re: [9fans] lguest port broken due to some change in last 6 months;any ideas?

    Hi,
    I have tried to run the lguest port on a 2.6.25 kernel, with not much luck. I guess i was successful in setting the thing up, as

    > There were a number of changes in the kernel last 6 months, I just
    > recently did a pull and the lguest port is screwed. I spent part of
    > today fixing things and catching up, and am now stuck in the first
    > taskswitch.
    >
    > Symptoms are odd. It dies in the first call to gotolabel.
    >
    > But here is the output from some prints:
    > mmuswitch done return to 0xc01508de
    > port/proc.c goto label c0470008 (pc c01013b3, sp c0059778)
    >
    > That pc is init0; the SP is good, previously allocated in newproc().
    > Next line after this is from lguest program. Lguest says this:
    > lguest: Bad address 0xc0012c01 (gpte 01008200)

    my kernel dies with the same error, different address though. The kernel starts:
    "hello squidboymach0init"
    then it finds a console, echo's to it:
    "Found a console! try output!
    ============================== hi there ========================"
    but then the last few lines are:
    "lgv reset done
    findlgv net0, @2
    Config: 0: 0x0 0xff 0x6 0x1d 0x1 0xd7
    found one enet ctlr
    Jiggering address
    #l0: lg: 10lguest: bad read address 0xc0012044 len 4"
    looks very much like the error you described.
    Is there any outlook for this to be fixed, i would be really happy to be able to have a plan9 cpu server and whatnot on my machine.
    9vx doesn't work for me for this reason.

    >
    > The gpte is the pte that the lguest kernel code found for that address.
    >
    > eh? c0012c01? It makes not a lot of sense, that's not word aligned, as
    > it should be for accesses to cpu0pdb.
    > And ... it dies in gotolabel here:
    > TEXT gotolabel(SB), $1
    > MOVL label+0(FP), AX
    > MOVL 0(AX), SP /* restore sp */
    > MOVL 4(AX), AX /* put return pc on the stack */
    > MOVL AX, 0(SP)
    > MOVL $1, AX /* return 1 */
    > DIE DIE DIE
    > RET
    >
    > as determined by me putting calls to lguest crash, line by line. Yep,
    > it dies on an immediate move to AX.
    >
    > I'm thinking I'm overwriting code somehow. Anybody has ideas on how to
    > debug this, let me know. I've had lots of weird problems on these
    > lguest ports but this one takes the cake.
    >
    > oh yeah I have fixed the port with the new bits in memory.c, l.s, etc.
    > for handling 8 MB of initial mappings.
    >
    > ron
    >


    Thanks,
    John


  3. Re: [9fans] lguest port broken due to some change in last 6 months;any ideas?

    it's fixed for me, the new code is on sources or so I recall. I just
    ran it yesterday.

    Someone else reported a problem, I don't have time to work on it until
    next week.

    thanks

    ron


  4. Re: [9fans] lguest port broken due to some change in last 6 months;any ideas?

    note that you really need to run latest now, e.g. 2.6.25 with the
    newest lguest port.

    ron


  5. Re: [9fans] lguest port broken due to some change in last 6 months;any ideas?

    could you please clear out how this should work?
    I have my own compiled kernel, with the following options:
    # zcat /proc/config.gz | 9 grep -i '(lguest|virtio)'
    CONFIG_LGUEST_GUEST=y
    CONFIG_NET_9P_VIRTIO=m
    CONFIG_VIRTIO_BLK=m
    CONFIG_VIRTIO_NET=m
    CONFIG_VIRTIO_CONSOLE=y
    CONFIG_LGUEST=m
    CONFIG_VIRTIO=y
    CONFIG_VIRTIO_RING=y
    CONFIG_VIRTIO_PCI=m
    CONFIG_VIRTIO_BALLOON=m

    I run it in the following way:
    modprobe lg syscall_vector=64
    ...../Documentation/lguest/lguest --tunnet 192.168.19.2 --block thx9.img 256 9lguestcpu.elf 'venti=#S/sd00/arenas;bootdisk=local!#S/sd00/fossil;bootargs=local!#S/sd00/fossil'

    As I said, the kernel does boot, but fails at the network bits, i think. With kernel 9lguestcpu.elf it says:
    #l0: lg: lguest: bad read address 0xc0012044 len 4

    And with 9lguestcpu.2.6.25.elf:
    #l0: lg: 1Segmentation fault

    I think i got everything. I use the lguest i compiled in linux/Documentation/lguest, I use the 9lguestcpu.elf kernel from your contrib. is that all? I have an image that works. Also, i can't compile the kernel from 9vx, though i do use the lguest script to set up a proper namespace for it.
    cd src/lguest25
    mk
    8a $AFLAGS plan9l.s
    mk: no recipe to make 'il.8' in directory /usr/johnny/src/lguest/src/lguest25

    So i guess i am doing something wrong?

    Thanks

    John



    On Fri, 25 Jul 2008 08:16:13 -0700
    "ron minnich" wrote:

    > note that you really need to run latest now, e.g. 2.6.25 with the
    > newest lguest port.
    >
    > ron
    >



+ Reply to Thread