Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 05 Mar 2000 13:22:51 +0000
From:      Nick Sayer <nsayer@quack.kfu.com>
To:        Andrew Atrens <atrens@nortelnetworks.com>, freebsd-emulation@freebsd.org, freebsd-current@freebsd.org
Subject:   Re: VMWare 2.0R broken - linux ioctl(13, 1260, *) not implemented
Message-ID:  <38C25FAB.1680D620@quack.kfu.com>
References:  <Pine.BSF.4.21.0003050107440.4211-100000@hcarp00g.ca.nortel.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Andrew Atrens wrote:
> 
> A missing (not implemented) linux ioctl is breaking VMWare 2.0 -
> 
> > linux: 'ioctl' fd=13, cmd=1260 ('^R',96) not implemented

I implemented this ioctl. It's not as hard as you think. You do a
DIOCGDINFO and return d_secperunit. But unfortunately, when I
did this, a warning went away from the vmware log file, but vmware
_still_ segfaulted immediately after, so I think there's more to it.

Fortunately, this only affects raw disks. Virtual ones still work.
I would attach my implementation for the missing ioctl below, but
I can't find it. I send a copy to Marcel, but I I lost mine in my
latest cvsup. :-(

In the meantime, you can still fetch build 438 (I think), which is
one of the 2.0 betas. It doesn't have this problem. Take a look at
the freebsd-emulation mailing list archive.

> 
> After rummaging around in the 2.3 kernel, I found the following in
> `linux/include/linux/fs.h':
> 
> /* the read-only stuff doesn't really belong here, but any other place is
>    probably as bad and I don't want to create yet another include file. */
> 
> #define BLKROSET   _IO(0x12,93) /* set device read-only (0 = read-write) */
> #define BLKROGET   _IO(0x12,94) /* get read-only status (0 = read_write) */
> #define BLKRRPART  _IO(0x12,95) /* re-read partition table */
> #define BLKGETSIZE _IO(0x12,96) /* return device size */
> #define BLKFLSBUF  _IO(0x12,97) /* flush buffer cache */
> #define BLKRASET   _IO(0x12,98) /* Set read ahead for block device */
> #define BLKRAGET   _IO(0x12,99) /* get current read ahead setting */
> #define BLKFRASET  _IO(0x12,100)/* set filesystem (mm/filemap.c) read-ahead */
> #define BLKFRAGET  _IO(0x12,101)/* get filesystem  (mm/filemap.c) read-ahead */
> #define BLKSECTSET _IO(0x12,102)/* set max sectors per request (ll_rw_blk.c) */
> #define BLKSECTGET _IO(0x12,103)/* get max sectors per request (ll_rw_blk.c) */
> #define BLKSSZGET  _IO(0x12,104)/* get block device sector size */
> 
> So it looks like BLKGETSIZE is the missing ioctl.
> 
> I'm not sure how to fix this, because well, we don't have block devices,
> the ATA driver doesn't support ioctls _or_ have a useful psize attribute
> in its cdevsw struct.
> 
> I naively thought I could use fstat() then devsw() to map the file
> descriptor to a device, and then interrogate the device's psize. But that
> goofy attempt just resulted in a kernel panic. :) Please don't dis me on
> how stupid that was - instead tell me what I should do :)
> 
> Seriously though, any help y'all could provide would be greatly
> appreciated. :)
> 
> Andrew.
> 
> --
> 
> +--
> | Andrew Atrens                 Nortel Networks, Ottawa, Canada. |
> | All opinions expressed are my own,  not those of any employer. |
>                                                                --+
>  Berkeley had what we called "copycenter", which is "take it down
>  to the copy center and make as many copies as you want".
>                  -- Kirk McKusick
> +--                                                           --+
>  Bill Gates is a white Persian cat and a monocle away from becoming
>  another James Bond villain. "No Mr Bond, I expect you to upgrade."
>                  -- Dennis Miller
> +--                                                           --+
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-current" in the body of the message


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-emulation" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38C25FAB.1680D620>