From: Michael Tokarev <mjt@tls.msk.ru>
To: kvm-devel <kvm@vger.kernel.org>
Subject: a few words about drive/pci add/remove
Date: Wed, 17 Jun 2009 17:44:15 +0400 [thread overview]
Message-ID: <4A38F32F.1040404@msgid.tls.msk.ru> (raw)
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
next reply other threads:[~2009-06-17 13:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-17 13:44 Michael Tokarev [this message]
2009-06-17 13:57 ` a few words about drive/pci add/remove Mark McLoughlin
2009-06-17 14:28 ` Michael Tokarev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A38F32F.1040404@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox