[9fans] patch for installation in vmware - Plan9

This is a discussion on [9fans] patch for installation in vmware - Plan9 ; Hello all, I proposed a patch which turns off hw acceleration for vga if you boot in VMware. But now I find out that it is necessary to do the same in installation tree. So, if anybody can, please, correct ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: [9fans] patch for installation in vmware

  1. [9fans] patch for installation in vmware

    Hello all,

    I proposed a patch which turns off hw acceleration for vga if you boot
    in VMware.
    But now I find out that it is necessary to do the same in installation tree.
    So, if anybody can, please, correct this file /386/bin/aux/vmware on
    installation CD (add 1 line):

    #!/bin/rc

    if(aux/isvmware -s){
    echo hwaccel off >'#v/vgactl' <-- add this command
    echo -n off >'#P/i8253timerset'
    for(i in '#S'/sd??)
    if(test -f $i/ctl)
    echo dma on >$i/ctl
    }



    Thanks
    and have a nice day.

    Antonin


  2. Re: [9fans] patch for installation in vmware

    On 7/18/08, Antonin Vecera wrote:
    > I proposed a patch which turns off hw acceleration for vga if you boot
    > in VMware.
    > But now I find out that it is necessary to do the same in installation tree.
    > So, if anybody can, please, correct this file /386/bin/aux/vmware on
    > installation CD (add 1 line):


    The file you're looking for seems to be /sys/lib/dist/pc/sub/vmware

    > #!/bin/rc
    >
    > if(aux/isvmware -s){
    > echo hwaccel off >'#v/vgactl' <-- add this command
    > echo -n off >'#P/i8253timerset'
    > for(i in '#S'/sd??)
    > if(test -f $i/ctl)
    > echo dma on >$i/ctl
    > }


    I think it would be good to place the for-loop in a "if(~ $dmamode
    yes)" as well.

    Greetings, Sander.


  3. Re: [9fans] patch for installation in vmware

    > I think it would be good to place the for-loop
    > in a "if(~ $dmamode yes)" as well.


    I don't see the point of that one. If you're running
    vmware, you want dma on, no? Otherwise the disk
    is very slow.

    Russ



  4. Re: [9fans] patch for installation in vmware

    On 7/19/08, Russ Cox wrote:
    >> I think it would be good to place the for-loop
    >> in a "if(~ $dmamode yes)" as well.

    >
    > I don't see the point of that one. If you're running
    > vmware, you want dma on, no? Otherwise the disk
    > is very slow.


    Well, the "use DMA for ide drives[yes]: " question already defaults to
    "yes", so by default dma will be on. Currently, when the user answers
    "no" to this question in vmware, dma will still be on regardless. I
    think it either should be off when the user explicitly requests this,
    or the question shouldn't be asked at all (for vmware). However,
    aux/vmware is run from termrc before the "use DMA for ide drives[yes]:
    " question is asked, so some stuff may have to be moved around if we
    want dma to be on or aff according to the user's reply.

    Greetings, Sander.


  5. Re: [9fans] patch for installation in vmware

    On 7/19/08, Sander van Dijk wrote:
    > I think it either should be off when the user explicitly requests this,
    > or the question shouldn't be asked at all (for vmware).


    Unless of course, this is one of those cases where "when a vmware user
    says no, he really means yes".
    Anyway, since I'm not a vmware user myself, I'm not comfortable
    sending in a patch (as I've no way to test it), so I hope someone else
    will.

    Greetings, Sander.


  6. Re: [9fans] patch for installation in vmware

    I thought I had submitted a patch for this a while ago (which as
    accepted), but maybe I missed the installer. In any case, using
    patch(1) will have a better chance of getting in.

    Peace and best wishes

    uriel

    On Fri, Jul 18, 2008 at 10:07 PM, Antonin Vecera
    wrote:
    > Hello all,
    >
    > I proposed a patch which turns off hw acceleration for vga if you boot
    > in VMware.
    > But now I find out that it is necessary to do the same in installation tree.
    > So, if anybody can, please, correct this file /386/bin/aux/vmware on
    > installation CD (add 1 line):
    >
    > #!/bin/rc
    >
    > if(aux/isvmware -s){
    > echo hwaccel off >'#v/vgactl' <-- add this command
    > echo -n off >'#P/i8253timerset'
    > for(i in '#S'/sd??)
    > if(test -f $i/ctl)
    > echo dma on >$i/ctl
    > }
    >
    >
    >
    > Thanks
    > and have a nice day.
    >
    > Antonin
    >
    >



  7. Re: [9fans] patch for installation in vmware

    On 7/20/08, Uriel wrote:
    > I thought I had submitted a patch for this a while ago (which as
    > accepted), but maybe I missed the installer. In any case, using
    > patch(1) will have a better chance of getting in.


    I believe the best solution would be to change /sys/lib/dist/pc/sub/vmware from

    #!/bin/rc

    if(aux/isvmware -s){
    echo -n off >'#P/i8253timerset'
    for(i in '#S'/sd??)
    if(test -f $i/ctl)
    echo dma on >$i/ctl
    }

    to

    if(aux/isvmware -s){
    echo -n off >'#P/i8253timerset'
    echo hwaccel off >'#v/vgactl'
    }

    That is, add the line that disables hardware acceleration, and remove the lines that set dma on (this is handled by /sys/lib/dist/pc/sub/termrc already).

    I do have one question though: when setting dma on, /sys/lib/dist/pc/sub/termrc iterates over /dev/sd*/ctl, while /sys/lib/dist/pc/sub/vmware iterates over '#S'/sd??; is there a specific reason vmware needs to use '#S' rather than /dev? (Or to formulate the question a bit different: I'd expect that '#S' is bound to /dev at that point regardless of whether we're using vmware or not; is this correct?)

    Greetings, Sander.


+ Reply to Thread