[Qemu-devel] [RFC PATCH 2/4] qmp/hmp: Add getfd_file monitor command

2012-05-21 Thread Corey Bryant
This patch provides support for the getfd_file monitor command. This command will allow passing of a filename and its corresponding file descriptor to a guest via the monitor. This command could be followed, for example, by a drive_add command to hot attach a disk drive. Signed-off-by: Corey Brya

Re: [Qemu-devel] [RFC PATCH 2/4] qmp/hmp: Add getfd_file monitor command

2012-05-21 Thread Eric Blake
On 05/21/2012 02:19 PM, Corey Bryant wrote: > This patch provides support for the getfd_file monitor command. > This command will allow passing of a filename and its corresponding > file descriptor to a guest via the monitor. This command could be > followed, for example, by a drive_add command to

Re: [Qemu-devel] [RFC PATCH 2/4] qmp/hmp: Add getfd_file monitor command

2012-05-22 Thread Stefan Hajnoczi
On Mon, May 21, 2012 at 9:19 PM, Corey Bryant wrote: I think Eric has raised the main questions about duplicating getfd and rules regarding canonical file names (QEMU mashes filenames together if the backing filename is relative!). > +    if (qemu_isdigit(filename[0])) { > +        qerror_report(

Re: [Qemu-devel] [RFC PATCH 2/4] qmp/hmp: Add getfd_file monitor command

2012-05-22 Thread Corey Bryant
On 05/21/2012 05:48 PM, Eric Blake wrote: On 05/21/2012 02:19 PM, Corey Bryant wrote: This patch provides support for the getfd_file monitor command. This command will allow passing of a filename and its corresponding file descriptor to a guest via the monitor. This command could be followed,

Re: [Qemu-devel] [RFC PATCH 2/4] qmp/hmp: Add getfd_file monitor command

2012-05-22 Thread Corey Bryant
On 05/22/2012 05:18 AM, Stefan Hajnoczi wrote: On Mon, May 21, 2012 at 9:19 PM, Corey Bryant wrote: I think Eric has raised the main questions about duplicating getfd and rules regarding canonical file names (QEMU mashes filenames together if the backing filename is relative!). Ok, good so

Re: [Qemu-devel] [RFC PATCH 2/4] qmp/hmp: Add getfd_file monitor command

2012-05-22 Thread Luiz Capitulino
On Tue, 22 May 2012 10:18:22 +0100 Stefan Hajnoczi wrote: > QMP commands should be added to qapi-schema.json as described in > docs/writing-qmp-commands.txt. Looks like there's consensus on dropping this patch and enhancing getfd to return the fd number. This would require to first convert getfd

Re: [Qemu-devel] [RFC PATCH 2/4] qmp/hmp: Add getfd_file monitor command

2012-05-22 Thread Corey Bryant
On 05/22/2012 03:06 PM, Luiz Capitulino wrote: On Tue, 22 May 2012 10:18:22 +0100 Stefan Hajnoczi wrote: QMP commands should be added to qapi-schema.json as described in docs/writing-qmp-commands.txt. Looks like there's consensus on dropping this patch and enhancing getfd to return the fd

Re: [Qemu-devel] [RFC PATCH 2/4] qmp/hmp: Add getfd_file monitor command

2012-05-22 Thread Luiz Capitulino
On Tue, 22 May 2012 16:02:19 -0400 Corey Bryant wrote: > > But there's a small problem. Today getfd commands are closely tied to the > > Monitor. In Anthony's development tree, the getfd commands are tied to the > > new QMP server's session support. > > > > Asking you to integrate the new QMP ser

Re: [Qemu-devel] [RFC PATCH 2/4] qmp/hmp: Add getfd_file monitor command

2012-05-22 Thread Corey Bryant
On 05/22/2012 04:26 PM, Luiz Capitulino wrote: On Tue, 22 May 2012 16:02:19 -0400 Corey Bryant wrote: But there's a small problem. Today getfd commands are closely tied to the Monitor. In Anthony's development tree, the getfd commands are tied to the new QMP server's session support. Asking

Re: [Qemu-devel] [RFC PATCH 2/4] qmp/hmp: Add getfd_file monitor command

2012-05-23 Thread Luiz Capitulino
On Tue, 22 May 2012 18:34:19 -0400 Corey Bryant wrote: > On 05/22/2012 04:26 PM, Luiz Capitulino wrote: > > On Tue, 22 May 2012 16:02:19 -0400 > > Corey Bryant wrote: > > > >>> But there's a small problem. Today getfd commands are closely tied to the > >>> Monitor. In Anthony's development tree,

Re: [Qemu-devel] [RFC PATCH 2/4] qmp/hmp: Add getfd_file monitor command

2012-05-23 Thread Corey Bryant
On 05/23/2012 09:33 AM, Luiz Capitulino wrote: On Tue, 22 May 2012 18:34:19 -0400 Corey Bryant wrote: On 05/22/2012 04:26 PM, Luiz Capitulino wrote: On Tue, 22 May 2012 16:02:19 -0400 Corey Bryant wrote: But there's a small problem. Today getfd commands are closely tied to the Monitor.