From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MxAbF-0004OB-VX for qemu-devel@nongnu.org; Sun, 11 Oct 2009 22:25:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MxAbB-0004Na-ST for qemu-devel@nongnu.org; Sun, 11 Oct 2009 22:25:25 -0400 Received: from [199.232.76.173] (port=59892 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MxAbB-0004NX-Mb for qemu-devel@nongnu.org; Sun, 11 Oct 2009 22:25:21 -0400 Received: from mail-bw0-f211.google.com ([209.85.218.211]:48923) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MxAbB-0004pj-8O for qemu-devel@nongnu.org; Sun, 11 Oct 2009 22:25:21 -0400 Received: by bwz7 with SMTP id 7so2993930bwz.34 for ; Sun, 11 Oct 2009 19:25:19 -0700 (PDT) MIME-Version: 1.0 Sender: dustin.kirkland@gmail.com In-Reply-To: <20091011215147.GD22687@defiant.freesoftware.org> References: <20090822135947.GB7505@defiant.freesoftware.org> <20091011215147.GD22687@defiant.freesoftware.org> Date: Sun, 11 Oct 2009 21:25:19 -0500 Message-ID: From: Dustin Kirkland Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: Hot-adding disk on VM List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dbareiro@gmx.net, KVM General , qemu-devel@nongnu.org On Sun, Oct 11, 2009 at 4:51 PM, Daniel Bareiro wro= te: > Hi, all! > > On Saturday, 22 August 2009 10:59:47 -0300, > Daniel Bareiro wrote: > >> According to I see in this document [1], is necessary that is loaded >> two modules in the guest: acpiphp and pci_hotplug. >> >> The pci_hotplug module is loaded. Nevertheless, in spite of existing >> the acpiphp module, cannot be loaded: >> >> chandra:~# lsmod|grep pci_hotplug >> pci_hotplug =A0 =A0 =A0 =A0 =A0 =A023460 =A00 >> >> chandra:~# modprobe acpiphp >> FATAL: Error inserting acpiphp >> (/lib/modules/2.6.26-2-686/kernel/drivers/pci/hotplug/acpiphp.ko): No su= ch device >> >> chandra:~# locate acpiphp | grep 686 >> /lib/modules/2.6.26-2-686/kernel/drivers/pci/hotplug/acpiphp.ko >> /lib/modules/2.6.26-2-686/kernel/drivers/pci/hotplug/acpiphp_ibm.ko >> >> >> Which could be being the problem? > > I was doing other tests this time with Linux 2.6.31.2 compiled by myself > from the sources of kernel.org. This time with loading the acpiphp > module, the pci_hotplug module was loaded automatically without I get > some type of error message. > > central:~# lsmod | grep acpiphp > central:~# > central:~# modprobe acpiphp > central:~# > central:~# lsmod | grep acpiphp > acpiphp =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A022140 =A00 > pci_hotplug =A0 =A0 =A0 =A0 =A0 =A029024 =A01 acpiphp > > > Then, I tried to add a disk of the following way in host: > > (qemu) pci_add auto storage file=3D/dev/vm/central-test,if=3Dvirtio > OK domain 0, bus 0, slot 5, function 0 > > In the guest: > > Oct 11 18:09:01 central kernel: [ =A0833.403875] pci 0000:00:02.0: BAR 6:= bogus alignment [0x0-0x0] flags 0x2 > Oct 11 18:09:01 central kernel: [ =A0833.406337] decode_hpp: Could not ge= t hotplug parameters. Use defaults > Oct 11 18:09:01 central kernel: [ =A0833.430492] virtio-pci 0000:00:05.0:= enabling device (0000 -> 0001) > Oct 11 18:09:01 central kernel: [ =A0833.452268] ACPI: PCI Interrupt Link= [LNKA] enabled at IRQ 10 > Oct 11 18:09:01 central kernel: [ =A0833.454668] virtio-pci 0000:00:05.0:= PCI INT A -> Link[LNKA] -> GSI 10 (level, high) -> IRQ 10 > Oct 11 18:09:01 central kernel: [ =A0833.500051] Clocksource tsc unstable= (delta =3D -148257950 ns) > Oct 11 18:09:01 central kernel: [ =A0833.566755] =A0vda: vda1 > > > Then I attempt to remove the device assuring previously that it is not > being used in guest: > > (qemu) pci_del 5 > > > In the guest: > > Oct 11 18:13:32 central kernel: [ 1104.144179] virtio-pci 0000:00:05.0: P= CI INT A disabled > > > But if I want to add the device again, I get a segmentation fault of the > process that handles this virtual machine: > > (qemu) pci_add auto storage file=3D/dev/vm/central-test,if=3Dvirtio > Connection closed by foreign host. I can actually confirm this behavior. I've been struggling with this for a couple of days now. CC'ing QEMU, as I've discussed this a bit with Anthony Liguori. There's at least two related bugs we've been tracking: * https://bugs.edge.launchpad.net/ubuntu/+source/qemu-kvm/+bug/432154 * https://bugs.edge.launchpad.net/ubuntu/+source/qemu-kvm/+bug/419590 :-Dustin