Received: from eggs.gnu.org ([2001:4830:134:3::10]:36325) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9MEm-0003m9-NF for qemu-devel@nongnu.org; Sun, 28 Jun 2015 19:43:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9MEj-0004tv-Ga for qemu-devel@nongnu.org; Sun, 28 Jun 2015 19:43:48 -0400 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Programmingkid In-Reply-To: Date: Sun, 28 Jun 2015 19:43:40 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <02818C70-4409-48F8-8776-0AB917B5A39F@gmail.com> References: <3B3C7431-1003-4AAA-90AF-0E1A154DFBE2@gmail.com> <5589A026.5020800@redhat.com> <455CF92B-58FA-446D-9EB0-42661C23B739@gmail.com> <87pp4kxos3.fsf@blackfin.pond.sub.org> <7B989F99-B95C-4D53-AA2D-29B87634D2BB@gmail.com> <558C22BD.1020404@redhat.com> <558C2852.3050102@redhat.com> <47B5E901-9CCD-4737-A5F2-B790EBEF941A@gmail.com> Subject: Re: [Qemu-devel] [PATCH] block.c: fix real cdrom detection List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Laurent Vivier , Kevin Wolf , Qemu-block , Markus Armbruster , qemu-devel qemu-devel , Paolo Bonzini On Jun 25, 2015, at 2:01 PM, Peter Maydell wrote: > On 25 June 2015 at 18:56, Programmingkid = wrote: >> Nice to hear from you again Laurent. The only way a solution in >> hdev_open() would work is if it could prevent find_image_format() >> from executing. Otherwise find_image_format() would just quit QEMU >> with an error. >=20 > The question you should be asking is "what is Linux doing for > raw CDROM devices that is different, such that it works there > but doesn't work on OSX?". >=20 > It would also be helpful to know which is the case that doesn't > work. Does QEMU fail in all cases, or only if the cdrom drive is > empty, or only if there's a disk in the drive? QEMU fails if the cdrom is specified "-cdrom /dev/cdrom", and there is = no cd in the drive.=20 QEMU also fails with a real cdrom in the drive.=20 >=20 > My initial suspicion is that we need OSX support in raw-posix.c > for handling the host CDROM specially -- note that Linux and > FreeBSD register a bdrv_host_cdrom with an is_inserted > function. The is_inserted function wouldn't make a difference.=20 I did follow the execution of QEMU from find_image_format(). When = bdrv_co_io_em() is called, it returns -22. This is where things appear = to start to go wrong.=