Re: [Qemu-devel] RFC v2: blockdev_add & friends, brief rationale, QMP docs

2010-06-16 Thread Avi Kivity
On 06/16/2010 02:02 PM, Markus Armbruster wrote: That is true. Maybe we should just ignore the duplication. It's fine to create empty blockdev, insert media, attach device model, even if the device model wants fixed media. Nevertheless, I think my convenience shortcuts make sense.

Re: [Qemu-devel] RFC v2: blockdev_add & friends, brief rationale, QMP docs

2010-06-16 Thread Markus Armbruster
Avi Kivity writes: > On 06/15/2010 05:54 PM, Markus Armbruster wrote: >> Avi Kivity writes: >> >> >>> On 06/15/2010 04:27 PM, Markus Armbruster wrote: >>> > I'm only talking about the interface, not the implementation. > Internal design details shouldn't be exposed

Re: [Qemu-devel] RFC v2: blockdev_add & friends, brief rationale, QMP docs

2010-06-16 Thread Avi Kivity
On 06/15/2010 05:54 PM, Markus Armbruster wrote: Avi Kivity writes: On 06/15/2010 04:27 PM, Markus Armbruster wrote: I'm only talking about the interface, not the implementation. Internal design details shouldn't be exposed. For the implementation, I imagine you can create

Re: [Qemu-devel] RFC v2: blockdev_add & friends, brief rationale, QMP docs

2010-06-15 Thread Markus Armbruster
Avi Kivity writes: > On 06/15/2010 04:27 PM, Markus Armbruster wrote: >> >>> I'm only talking about the interface, not the implementation. >>> Internal design details shouldn't be exposed. >>> >>> For the implementation, I imagine you can create an empty blockdev >>> during guest device creation

Re: [Qemu-devel] RFC v2: blockdev_add & friends, brief rationale, QMP docs

2010-06-15 Thread Avi Kivity
On 06/15/2010 04:27 PM, Markus Armbruster wrote: I'm only talking about the interface, not the implementation. Internal design details shouldn't be exposed. For the implementation, I imagine you can create an empty blockdev during guest device creation and treat blockdev_add/blockdev_del as me

Re: [Qemu-devel] RFC v2: blockdev_add & friends, brief rationale, QMP docs

2010-06-15 Thread Markus Armbruster
Avi Kivity writes: > On 06/15/2010 03:23 PM, Markus Armbruster wrote: >> >>> media_insert/remove seem to duplicate blockdev_add/del. Perhaps we >>> don't need them? >>> >>> To change media, tell the guest device to eject, blockdev_del, >>> blockdev_add, reassociate the guest and host parts. >>>

Re: [Qemu-devel] RFC v2: blockdev_add & friends, brief rationale, QMP docs

2010-06-15 Thread Avi Kivity
On 06/15/2010 03:23 PM, Markus Armbruster wrote: media_insert/remove seem to duplicate blockdev_add/del. Perhaps we don't need them? To change media, tell the guest device to eject, blockdev_del, blockdev_add, reassociate the guest and host parts. Device model code is not prepared to h

Re: [Qemu-devel] RFC v2: blockdev_add & friends, brief rationale, QMP docs

2010-06-15 Thread Markus Armbruster
Avi Kivity writes: > On 06/10/2010 08:45 PM, Markus Armbruster wrote: >> QMP command docs >> >> >> blockdev_add >> >> >> Add host block device. >> >> Arguments: >> >> - "id": the host block device's ID, must be unique (json-string) >> - "format": image format (json-s

Re: [Qemu-devel] RFC v2: blockdev_add & friends, brief rationale, QMP docs

2010-06-15 Thread Avi Kivity
On 06/10/2010 08:45 PM, Markus Armbruster wrote: QMP command docs blockdev_add Add host block device. Arguments: - "id": the host block device's ID, must be unique (json-string) - "format": image format (json-string, optional) - Possible values: "raw", "qcow

[Qemu-devel] RFC v2: blockdev_add & friends, brief rationale, QMP docs

2010-06-10 Thread Markus Armbruster
v2: Cover protocols Split blockdev_change into media_insert and media_remove Option syntax list TODOs Rationale: Why new commands for block devices? == We want a clean separation between host part and guest part. Existing -drive and drive_