Statistics
| Branch: | Revision:

root / hw / device-hotplug.c @ 56fe6408

History | View | Annotate | Download (1.5 kB)

# Date Author Comment
319ae529 01/31/2011 12:59 pm Markus Armbruster

blockdev: Fix drive_add for drives without media

Watch this:

(qemu) drive_add 0 if=none
(qemu) info block
none0: type=hd removable=0 [not inserted]
(qemu) drive_del none0
Segmentation fault (core dumped)

add_init_drive() is confused about drive_init()'s failure modes, and...

2292ddae 01/31/2011 11:59 am Markus Armbruster

blockdev: Make drive_add() take explicit type, index parameters

Before, type & index were hidden in printf-like fmt, ... parameters,
which get expanded into an option string. Rather inconvenient for
uses later in this series.

New IF_DEFAULT to ask for the machine's default interface. Before,...

2446333c 08/24/2010 06:22 pm Blue Swirl

Rearrange block headers

Changing block.h or blockdev.h resulted in recompiling most objects.

Move DriveInfo typedef and BlockInterfaceType enum definitions
to qemu-common.h and rearrange blockdev.h use to decrease churn.

Signed-off-by: Blue Swirl <>

666daa68 06/04/2010 04:20 pm Markus Armbruster

blockdev: Collect block device code in new blockdev.c

Anything that moves hundreds of lines out of vl.c can't be all bad.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

a803cb8e 06/04/2010 12:43 pm Markus Armbruster

blockdev: Hide QEMUMachine from drive_init()

To pave the way for moving it out of vl.c.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

9ad4531e 10/27/2009 07:28 pm Gerd Hoffmann

kill dead nic unplug code.

Cleanup on unplug happens via qdev->exit() callback now.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

56a14938 10/05/2009 05:32 pm Gerd Hoffmann

drive cleanup fixes.

Changes: * drive_uninit() wants a DriveInfo now. * drive_uninit() also calls bdrv_delete(),
so callers don't need to do that. * drive_uninit() calls are moved over to the ->exit()
callbacks, destroy_bdrvs() is zapped. * setting bdrv->private is not needed any more as the...

72cf2d4f 09/12/2009 10:36 am Blue Swirl

Fix sys-queue.h conflict for good

Problem: Our file sys-queue.h is a copy of the BSD file, but there are
some additions and it's not entirely compatible. Because of that, there have
been conflicts with system headers on BSD systems. Some hacks have been
introduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...

751c6a17 07/27/2009 10:08 pm Gerd Hoffmann

kill drives_table

First step cleaning up the drives handling. This one does nothing but
removing drives_table[], still it became seriously big.

drive_get_index() is gone and is replaced by drives_get() which hands
out DriveInfo pointers instead of a table index. This needs adaption in...

3b0ba927 07/27/2009 10:08 pm Gerd Hoffmann

kill drives_opt

cleanup pretty simliar to the drives_table removal patch:
- drop the table and make a linked list out of it.
- pass around struct pointers instead of table indices.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

9dfd7c7a 07/27/2009 10:08 pm Gerd Hoffmann

switch -drive to QemuOpts.

Demo QemuOpts in action ;)

Implementing a alternative way to specify the filename should be
just a few lines of code now once we decided how the cmd line syntax
should look like.

Signed-off-by: Gerd Hoffmann <>...

ae50b274 07/10/2009 12:58 am Mark McLoughlin

Don't leak VLANClientState on PCI hot remove

destroy_nic() requires that NICInfo::private by a PCIDevice pointer,
but then goes on to require that the same pointer matches
VLANClientState::opaque.

That is no longer the case for virtio-net since qdev and wasn't...

9a40611c 02/26/2009 06:40 pm aliguori

fix pci net hot-remove (Marcelo Tosatti)

Missing brackets, doh.

Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6645 c046a42c-6fe2-441c-8c8c-71466251a162

6f338c34 02/11/2009 05:21 pm aliguori

qemu: PCI device, disk and host network hot-add / hot-remove (Marcelo Tosatti)

Add monitor command to hot-add PCI devices (nic and storage).

Syntax is:

pci_add pci_addr=[[<domain>:]<bus>:]<slot> nic|storage params

It returns the domain, bus and slot for the newly added device on success....