From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZH8cl-0007Q0-TV for qemu-devel@nongnu.org; Mon, 20 Jul 2015 06:48:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZH8ch-0001xb-Pu for qemu-devel@nongnu.org; Mon, 20 Jul 2015 06:48:43 -0400 Date: Mon, 20 Jul 2015 11:48:33 +0100 From: Stefan Hajnoczi Message-ID: <20150720104833.GB12675@stefanha-thinkpad.redhat.com> References: <99ECAD58-C9CC-4780-B63C-AF975AECCED6@gmail.com> <20150717134101.GE6572@stefanha-thinkpad.redhat.com> <6226AC11-BD4A-4FC2-90DD-CA40305FFC9A@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3lcZGd9BuhuYXNfi" Content-Disposition: inline In-Reply-To: <6226AC11-BD4A-4FC2-90DD-CA40305FFC9A@gmail.com> Subject: Re: [Qemu-devel] [PATCH v2] raw-posix.c: Make physical devices usable in QEMU under Mac OS X host List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Programmingkid Cc: Laurent Vivier , Peter Maydell , qemu-devel qemu-devel , Qemu-block --3lcZGd9BuhuYXNfi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 17, 2015 at 03:24:34PM -0400, Programmingkid wrote: >=20 > On Jul 17, 2015, at 9:41 AM, Stefan Hajnoczi wrote: >=20 > > On Thu, Jul 16, 2015 at 04:46:07PM -0400, Programmingkid wrote: > >> @@ -2014,7 +2015,9 @@ kern_return_t GetBSDPath( io_iterator_t mediaIte= rator, char *bsdPath, CFIndex ma > >> if ( bsdPathAsCFString ) { > >> size_t devPathLength; > >> strcpy( bsdPath, _PATH_DEV ); > >> - strcat( bsdPath, "r" ); > >> + if (flags & BDRV_O_NOCACHE) { > >> + strcat(bsdPath, "r"); > >> + } > >> devPathLength =3D strlen( bsdPath ); > >> if ( CFStringGetCString( bsdPathAsCFString, bsdPath + devP= athLength, maxPathSize - devPathLength, kCFStringEncodingASCII ) ) { > >> kernResult =3D KERN_SUCCESS; > >=20 > > Is this the fix that makes CD-ROM passthrough work for you? > >=20 > > Does the guest boot successfully when you do: > >=20 > > -drive if=3Dide,media=3Dcdrom,cache=3Dnone,file=3D/dev/cdrom >=20 > The guest fails during the boot process with the above command line.=20 That means the issue you originally hit hasn't been solved yet. Take a look at s->needs_alignment and raw_probe_alignment(). In the -drive cache=3Dnone case raw-posix needs to detect the correct alignment (probably= 2 KB for CD-ROMs). Stefan --3lcZGd9BuhuYXNfi Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVrNIBAAoJEJykq7OBq3PISAYIAMKszXz2oPcCrqikH/R1XlQK 6Mg4KRji2qe4R7U4yjb/i4nb0vvUkRq6KtZcZ9FHP7huIPRVGjzG+ooCnvsEd185 MGRGrt1nQO0kj1Q1HMJS25NS18KpR6zD/Eeb/IkQHvl0T8dNfFZ1eEVwkY53imK8 jrK6X59tMmDX2epPtdonP56bApeOqHIVTBvKsnB205t2MsSqm8tULJOQ+R1gIHD6 Z59r8apQTWLIh4SJEiJd7VnHq8LzMpzEeF2JlqxV4OJ4v6J9j9kOJA5Sn3gOp1lz hqAoLRmZJY1DyjERjwq8r9Fm7KfE6wKRgJzBnJJ+FfHRRsXWWYigrm9lG+Rz46I= =PNvL -----END PGP SIGNATURE----- --3lcZGd9BuhuYXNfi--