From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52564) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHATB-0004Nc-7b for qemu-devel@nongnu.org; Mon, 20 Jul 2015 08:46:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZHATA-00020h-3T for qemu-devel@nongnu.org; Mon, 20 Jul 2015 08:46:57 -0400 Message-ID: <55ACEDB7.7060004@redhat.com> Date: Mon, 20 Jul 2015 14:46:47 +0200 From: Laurent Vivier MIME-Version: 1.0 References: <99ECAD58-C9CC-4780-B63C-AF975AECCED6@gmail.com> <20150717134101.GE6572@stefanha-thinkpad.redhat.com> <6226AC11-BD4A-4FC2-90DD-CA40305FFC9A@gmail.com> <20150720104833.GB12675@stefanha-thinkpad.redhat.com> In-Reply-To: <20150720104833.GB12675@stefanha-thinkpad.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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: Stefan Hajnoczi , Programmingkid Cc: Peter Maydell , qemu-devel qemu-devel , Qemu-block -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 20/07/2015 12:48, Stefan Hajnoczi wrote: > On Fri, Jul 17, 2015 at 03:24:34PM -0400, Programmingkid wrote: >> >> On Jul 17, 2015, at 9:41 AM, Stefan Hajnoczi wrote: >> >>> On Thu, Jul 16, 2015 at 04:46:07PM -0400, Programmingkid >>> wrote: >>>> @@ -2014,7 +2015,9 @@ kern_return_t GetBSDPath( io_iterator_t >>>> mediaIterator, 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 = strlen( >>>> bsdPath ); if ( CFStringGetCString( bsdPathAsCFString, >>>> bsdPath + devPathLength, maxPathSize - devPathLength, >>>> kCFStringEncodingASCII ) ) { kernResult = KERN_SUCCESS; >>> >>> Is this the fix that makes CD-ROM passthrough work for you? >>> >>> Does the guest boot successfully when you do: >>> >>> -drive if=ide,media=cdrom,cache=none,file=/dev/cdrom >> >> The guest fails during the boot process with the above command >> line. > > 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=none case raw-posix needs to detect the correct > alignment (probably 2 KB for CD-ROMs). As raw_open_common() sets needs_alignment to true on BDRV_O_NOCACHE (cache="none") and raw_probe_alignment() detects alignment if needs_alignment is true, I don't understand why it doesn't work. Could you explain ? Laurent -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlWs7bcACgkQNKT2yavzbFMxIwCcCPYXvcSZTnjp7UVQBUVLAj6K iY0An2l1ttpVEb9bZP+VEakuU75X/Zd7 =S83F -----END PGP SIGNATURE-----