9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] patch for installation in vmware
@ 2008-07-18 20:07 Antonin Vecera
  2008-07-19  7:30 ` Sander van Dijk
  2008-07-20 12:55 ` Uriel
  0 siblings, 2 replies; 7+ messages in thread
From: Antonin Vecera @ 2008-07-18 20:07 UTC (permalink / raw)
  To: 9fans

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] patch for installation in vmware
  2008-07-18 20:07 [9fans] patch for installation in vmware Antonin Vecera
@ 2008-07-19  7:30 ` Sander van Dijk
  2008-07-19 13:50   ` Russ Cox
  2008-07-20 12:55 ` Uriel
  1 sibling, 1 reply; 7+ messages in thread
From: Sander van Dijk @ 2008-07-19  7:30 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 7/18/08, Antonin Vecera <antonin.vecera@gmail.com> 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.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] patch for installation in vmware
  2008-07-19  7:30 ` Sander van Dijk
@ 2008-07-19 13:50   ` Russ Cox
  2008-07-19 15:48     ` Sander van Dijk
  0 siblings, 1 reply; 7+ messages in thread
From: Russ Cox @ 2008-07-19 13:50 UTC (permalink / raw)
  To: 9fans

> 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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] patch for installation in vmware
  2008-07-19 13:50   ` Russ Cox
@ 2008-07-19 15:48     ` Sander van Dijk
  2008-07-20  8:11       ` Sander van Dijk
  0 siblings, 1 reply; 7+ messages in thread
From: Sander van Dijk @ 2008-07-19 15:48 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 7/19/08, Russ Cox <rsc@swtch.com> 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.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] patch for installation in vmware
  2008-07-19 15:48     ` Sander van Dijk
@ 2008-07-20  8:11       ` Sander van Dijk
  0 siblings, 0 replies; 7+ messages in thread
From: Sander van Dijk @ 2008-07-20  8:11 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 7/19/08, Sander van Dijk <a.h.vandijk@gmail.com> 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.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] patch for installation in vmware
  2008-07-18 20:07 [9fans] patch for installation in vmware Antonin Vecera
  2008-07-19  7:30 ` Sander van Dijk
@ 2008-07-20 12:55 ` Uriel
  2008-07-23  9:43   ` Sander van Dijk
  1 sibling, 1 reply; 7+ messages in thread
From: Uriel @ 2008-07-20 12:55 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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
<antonin.vecera@gmail.com> 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
>
>



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] patch for installation in vmware
  2008-07-20 12:55 ` Uriel
@ 2008-07-23  9:43   ` Sander van Dijk
  0 siblings, 0 replies; 7+ messages in thread
From: Sander van Dijk @ 2008-07-23  9:43 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 7/20/08, Uriel <uriel99@gmail.com> 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.



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-07-23  9:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-18 20:07 [9fans] patch for installation in vmware Antonin Vecera
2008-07-19  7:30 ` Sander van Dijk
2008-07-19 13:50   ` Russ Cox
2008-07-19 15:48     ` Sander van Dijk
2008-07-20  8:11       ` Sander van Dijk
2008-07-20 12:55 ` Uriel
2008-07-23  9:43   ` Sander van Dijk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).