public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* a few words about drive/pci add/remove
@ 2009-06-17 13:44 Michael Tokarev
  2009-06-17 13:57 ` Mark McLoughlin
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Tokarev @ 2009-06-17 13:44 UTC (permalink / raw)
  To: kvm-devel

I tried drive hot add/remove today.

And immediately had a few.. issues.
qemu-kvm-0.10.5.

First of all, there are several "definitions"
of drive_add and several others in `help'
monitor command output:

This one appears to be real:
drive_add pci_addr=[[<domain>:]<bus>:]<slot>
[file=file][,if=type][,bus=n]
[,unit=m][,media=d][index=i]
[,cyls=c,heads=h,secs=s[,trans=t]]
[snapshot=on|off][,cache=on|off] -- add drive to PCI storage controller

And this, a few lines below it, is "fake":
drive_add pcibus pcidevfn [file=file][,if=type][,bus=n]
[,unit=m][,media=d][index=i]
[,cyls=c,heads=h,secs=s[,trans=t]]

Note also the "cache" argument is not the same
as it is for -drive command-line argument.


Ok, so trying the first option (after looking
at the source and after noticing the first correct
form), I realized it does not work.  Or at least
I can't get it to work.  It either says the PCI
slot mentioned is in use (when specifying
pci_addr=<slot> which is present in the guest),
or that the given slot does not exists.

Ok, so I discovered also pci_add.  That one worked,
and I've got new pci device in guest which recognized
it nicely.

Now, after realizing I added the wrong file ;), I
tried to remove it -- and got an instant warning
in the guest:

WARNING: at drivers/base/core.c:122 device_release+0x5f/0x70()
Device 'virtio8' does not have a release() function, it is broken and must be fixed.
Modules linked in: acpiphp dock pci_hotplug xfs e1000 button ext3 jbd mbcache virtio_blk virtio_net virtio_pci virtio_ring virtio
Pid: 39, comm: kacpi_notify Tainted: G S        2.6.27-i686smp #2.6.27.25
  [<c012b11f>] warn_slowpath+0x6f/0xa0
  [<c0110030>] generic_set_mtrr+0x50/0x110
  [<c011fd2e>] __wake_up+0x3e/0x60
  [<c01d2195>] release_sysfs_dirent+0x45/0xb0
  [<c01d23e1>] sysfs_addrm_finish+0x1b1/0x1f0
  [<c01d2447>] remove_dir+0x27/0x40
  [<c01d24cf>] sysfs_remove_dir+0x5f/0x70
...
  [<f880a44d>] virtio_pci_remove+0x11/0x4c [virtio_pci]
...

When trying to re-add another (right this time) drive
the same way (using pci_addr=auto), the guest crashed.

JFYI for now.

Thanks.

/mjt

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-06-17 14:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-17 13:44 a few words about drive/pci add/remove Michael Tokarev
2009-06-17 13:57 ` Mark McLoughlin
2009-06-17 14:28   ` Michael Tokarev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox