Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-08 Thread Programmingkid
On Jul 8, 2015, at 9:11 AM, Kevin Wolf wrote: > Am 08.07.2015 um 14:56 hat Programmingkid geschrieben: >> >> On Jul 8, 2015, at 7:01 AM, Kevin Wolf wrote: >> >>> Am 08.07.2015 um 12:47 hat Laurent Vivier geschrieben: On 08/07/2015 12:31, Kevin Wolf wrote: > Am 02.07.2015 um

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-08 Thread Kevin Wolf
Am 08.07.2015 um 14:56 hat Programmingkid geschrieben: > > On Jul 8, 2015, at 7:01 AM, Kevin Wolf wrote: > > > Am 08.07.2015 um 12:47 hat Laurent Vivier geschrieben: > >> > >> > >> On 08/07/2015 12:31, Kevin Wolf wrote: > >>> Am 02.07.2015 um 16:18 hat Laurent Vivier geschrieben: > >

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-08 Thread Laurent Vivier
On 08/07/2015 13:01, Kevin Wolf wrote: > Am 08.07.2015 um 12:47 hat Laurent Vivier geschrieben: >> >> >> On 08/07/2015 12:31, Kevin Wolf wrote: >>> Am 02.07.2015 um 16:18 hat Laurent Vivier geschrieben: On 02/07/2015 16:03, Paolo Bonzini wrote: > > > On 02/07/2015 15:58

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-08 Thread Programmingkid
On Jul 8, 2015, at 7:01 AM, Kevin Wolf wrote: > Am 08.07.2015 um 12:47 hat Laurent Vivier geschrieben: >> >> >> On 08/07/2015 12:31, Kevin Wolf wrote: >>> Am 02.07.2015 um 16:18 hat Laurent Vivier geschrieben: On 02/07/2015 16:03, Paolo Bonzini wrote: > > > On 02/

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-08 Thread Kevin Wolf
Am 08.07.2015 um 12:47 hat Laurent Vivier geschrieben: > > > On 08/07/2015 12:31, Kevin Wolf wrote: > > Am 02.07.2015 um 16:18 hat Laurent Vivier geschrieben: > >> > >> > >> On 02/07/2015 16:03, Paolo Bonzini wrote: > >>> > >>> > >>> On 02/07/2015 15:58, Laurent Vivier wrote: > Since any /de

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-08 Thread Laurent Vivier
On 08/07/2015 12:31, Kevin Wolf wrote: > Am 02.07.2015 um 16:18 hat Laurent Vivier geschrieben: >> >> >> On 02/07/2015 16:03, Paolo Bonzini wrote: >>> >>> >>> On 02/07/2015 15:58, Laurent Vivier wrote: Since any /dev entry can be treated as a raw disk image, it is worth noting which dev

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-08 Thread Kevin Wolf
Am 02.07.2015 um 16:18 hat Laurent Vivier geschrieben: > > > On 02/07/2015 16:03, Paolo Bonzini wrote: > > > > > > On 02/07/2015 15:58, Laurent Vivier wrote: > >> Since any /dev entry can be treated as a raw disk image, it is worth > >> noting which devices can be accessed when and how. /dev/rd

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-07 Thread Stefan Hajnoczi
On Mon, Jul 6, 2015 at 4:58 PM, Programmingkid wrote: > Quick question, In order to use a real cdrom in buffered mode (/dev/disk1s0), > QEMU would have to unmount the cdrom from the desktop. Is unmounting the > cdrom in the hdev_open() function ok? . I am making a version 3 of the cdrom > patch

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-02 Thread Programmingkid
On Jul 2, 2015, at 10:33 AM, Laurent Vivier wrote: > > > On 02/07/2015 16:20, Paolo Bonzini wrote: >> >> >> On 02/07/2015 16:18, Laurent Vivier wrote: > I'm okay with doing the simple thing, but it needs a comment for > non-BSDers. >>> So, what we have to do, in our case, for MacOS X

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-02 Thread Paolo Bonzini
On 02/07/2015 16:18, Laurent Vivier wrote: >> > I'm okay with doing the simple thing, but it needs a comment for >> > non-BSDers. > So, what we have to do, in our case, for MacOS X cdrom, is something like: > > ... GetBSDPath ... > ... > if (flags & BDRV_O_NOCACHE) { > strcat(bsdPat

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-02 Thread Laurent Vivier
On 02/07/2015 16:20, Paolo Bonzini wrote: > > > On 02/07/2015 16:18, Laurent Vivier wrote: I'm okay with doing the simple thing, but it needs a comment for non-BSDers. >> So, what we have to do, in our case, for MacOS X cdrom, is something like: >> >> ... GetBSDPath ... >> ... >>

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-02 Thread Laurent Vivier
On 02/07/2015 16:03, Paolo Bonzini wrote: > > > On 02/07/2015 15:58, Laurent Vivier wrote: >> Since any /dev entry can be treated as a raw disk image, it is worth >> noting which devices can be accessed when and how. /dev/rdisk nodes are >> character-special devices, but are "raw" in the BSD se

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-02 Thread Paolo Bonzini
On 02/07/2015 15:58, Laurent Vivier wrote: > Since any /dev entry can be treated as a raw disk image, it is worth > noting which devices can be accessed when and how. /dev/rdisk nodes are > character-special devices, but are "raw" in the BSD sense and force > block-aligned I/O. They are closer to

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-02 Thread Laurent Vivier
On 02/07/2015 15:47, Paolo Bonzini wrote: > > > On 02/07/2015 14:24, Laurent Vivier wrote: >> >> #ifdef __FreeBSD__ >> if (S_ISCHR(st.st_mode)) { >> /* >> * The file is a char device (disk), which on FreeBSD isn't behind >> * a pager, so force all requests to be al

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-02 Thread Paolo Bonzini
On 02/07/2015 14:24, Laurent Vivier wrote: > > #ifdef __FreeBSD__ > if (S_ISCHR(st.st_mode)) { > /* > * The file is a char device (disk), which on FreeBSD isn't behind > * a pager, so force all requests to be aligned. This is needed > * so QEMU makes sure a

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-02 Thread Laurent Vivier
On 02/07/2015 13:14, Stefan Hajnoczi wrote: > On Wed, Jul 1, 2015 at 11:13 PM, Programmingkid > wrote: >> Fix real cdrom access in Mac OS X so it can be used in QEMU. >> It simply removes the r from a device file's name. This >> allows for a real cdrom to be accessible to the guest. >> It has be

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-02 Thread Stefan Hajnoczi
On Wed, Jul 1, 2015 at 11:13 PM, Programmingkid wrote: > Fix real cdrom access in Mac OS X so it can be used in QEMU. > It simply removes the r from a device file's name. This > allows for a real cdrom to be accessible to the guest. > It has been successfully tested with a Windows XP guest > in qe

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-02 Thread Paolo Bonzini
On 02/07/2015 09:39, Laurent Vivier wrote: > This code seems to be a cut'n'paste of an Apple example (bad...): > > https://developer.apple.com/library/mac/samplecode/CDROMSample/Listings/CDROMSample_CDROMSample_c.html > > Without this interesting comment: > > Add "r" before the BSD node na

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-02 Thread Laurent Vivier
On 02/07/2015 09:18, Paolo Bonzini wrote: > > > On 02/07/2015 00:13, Programmingkid wrote: >> Fix real cdrom access in Mac OS X so it can be used in QEMU. >> It simply removes the r from a device file's name. This >> allows for a real cdrom to be accessible to the guest. >> It has been successf

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-02 Thread Paolo Bonzini
On 02/07/2015 00:13, Programmingkid wrote: > Fix real cdrom access in Mac OS X so it can be used in QEMU. > It simply removes the r from a device file's name. This > allows for a real cdrom to be accessible to the guest. > It has been successfully tested with a Windows XP guest > in qemu-system-i

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-01 Thread M A
On Jul 1, 2015, at 6:13 PM, Programmingkid wrote: > Fix real cdrom access in Mac OS X so it can be used in QEMU. > It simply removes the r from a device file's name. This > allows for a real cdrom to be accessible to the guest. > It has been successfully tested with a Windows XP guest > in qemu-s

[Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-01 Thread Programmingkid
Fix real cdrom access in Mac OS X so it can be used in QEMU. It simply removes the r from a device file's name. This allows for a real cdrom to be accessible to the guest. It has been successfully tested with a Windows XP guest in qemu-system-i386. The qemu-system-ppc emulator doesn't quit anymore,