Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Is3Gw-0002pk-Gf for qemu-devel@nongnu.org; Tue, 13 Nov 2007 16:26:14 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Is3Gu-0002ot-Qm for qemu-devel@nongnu.org; Tue, 13 Nov 2007 16:26:13 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Is3Gu-0002om-Ln for qemu-devel@nongnu.org; Tue, 13 Nov 2007 16:26:12 -0500 Received: from gwyn.kn-bremen.de ([212.63.36.242]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Is3Gu-0000H0-4y for qemu-devel@nongnu.org; Tue, 13 Nov 2007 16:26:12 -0500 Received: from saturn.kn-bremen.de (nox@localhost [127.0.0.1]) by saturn.kn-bremen.de (8.13.8/8.13.6) with ESMTP id lADLMmnY019466 for ; Tue, 13 Nov 2007 22:22:48 +0100 (CET) (envelope-from nox@saturn.kn-bremen.de) Received: (from nox@localhost) by saturn.kn-bremen.de (8.13.8/8.13.6/Submit) id lADLMmWu019465 for qemu-devel@nongnu.org; Tue, 13 Nov 2007 22:22:48 +0100 (CET) (envelope-from nox) From: Juergen Lock Date: Tue, 13 Nov 2007 22:22:48 +0100 Message-ID: <20071113212248.GA18957@saturn.kn-bremen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] cdrom disc type - is this patch correct? (unbreaks recent FreeBSD guest's -cdrom access) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi! Yesterday I learned that FreeBSD 7.0-BETA2 guests will no longer read from the emulated cd drive, apparently because of this commit: http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/ata/atapi-cd.c.diff?r1=1.193;r2=1.193.2.1 The following patch file added to the qemu-devel port fixes the issue for me, is it also correct? (making the guest see a dvd in the drive when it is inserted, previously it saw the drive as empty.) The second hunk is already in qemu cvs so remove it if you want to test on that. ISO used for testing: ftp://ftp.freebsd.org:/pub/FreeBSD/ISO-IMAGES-i386/7.0/7.0-BETA2-i386-disc1.iso (test by either selecting fixit->cdrom or by trying to install, just booting it will always work because that goes thru the bios.) Index: qemu/hw/ide.c @@ -1339,6 +1341,8 @@ case 0x2a: cpu_to_ube16(&buf[0], 28 + 6); buf[2] = 0x70; + if (bdrv_is_inserted(s->bs)) + buf[2] = 0x40; buf[3] = 0; buf[4] = 0; buf[5] = 0; @@ -1347,7 +1351,7 @@ buf[8] = 0x2a; buf[9] = 0x12; - buf[10] = 0x00; + buf[10] = 0x08; buf[11] = 0x00; buf[12] = 0x70; Thanx, Juergen