From owner-freebsd-current Sun Mar 5 5:23: 7 2000 Delivered-To: freebsd-current@freebsd.org Received: from quack.kfu.com (quack.kfu.com [170.1.70.2]) by hub.freebsd.org (Postfix) with ESMTP id 0008137B9A9; Sun, 5 Mar 2000 05:23:02 -0800 (PST) (envelope-from nsayer@quack.kfu.com) Received: from icarus.kfu.com (icarus.kfu.com [170.1.70.17]) by quack.kfu.com (8.9.2/8.9.3) with ESMTP id FAA58584; Sun, 5 Mar 2000 05:22:52 -0800 (PST) (envelope-from nsayer@quack.kfu.com) Received: from quack.kfu.com by icarus.kfu.com with ESMTP (8.9.3//ident-1.0) id FAA01257; Sun, 5 Mar 2000 05:22:51 -0800 (PST) Message-ID: <38C25FAB.1680D620@quack.kfu.com> Date: Sun, 05 Mar 2000 13:22:51 +0000 From: Nick Sayer Reply-To: freebsd-emulation@freebsd.org X-Mailer: Mozilla 4.7 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Andrew Atrens , freebsd-emulation@freebsd.org, freebsd-current@freebsd.org Subject: Re: VMWare 2.0R broken - linux ioctl(13, 1260, *) not implemented References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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-current" in the body of the message