Received: from eggs.gnu.org ([2001:4830:134:3::10]:54978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMczH-0001sR-53 for qemu-devel@nongnu.org; Tue, 04 Aug 2015 10:14:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZMczB-0003MT-KW for qemu-devel@nongnu.org; Tue, 04 Aug 2015 10:14:39 -0400 Received: from fm1nodo5.polito.it ([130.192.180.13]:54188) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMczB-0003Lr-9q for qemu-devel@nongnu.org; Tue, 04 Aug 2015 10:14:33 -0400 Message-ID: <55C0C8C5.2030900@polito.it> Date: Tue, 04 Aug 2015 16:14:29 +0200 From: Ivano Cerrato MIME-Version: 1.0 References: <55AE1B42.5040306@polito.it> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Does PCI hotplug work with IVSHMEM? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Cc: =?UTF-8?B?TWF1cmljaW8gVsOhc3F1ZXo=?= , Fulvio Risso , QEMU Hi Marc-Andr=C3=A9, all, even with 1G hugepages, we are not able to hotplug an ivshmem device. =20 The outputs we get are the following: * In qemu monitor: $info qtree ...... dev: ivshmem, id "" chardev =3D size =3D "2048M" vectors =3D 1 ioeventfd =3D off msi =3D on shm =3D "fd" role =3D use64 =3D 1 addr =3D 04.0 romfile =3D rombar =3D 1 multifunction =3D off command_serr_enable =3D on class RAM controller, addr 00:04.0, pci id 1af4:1110 (sub=20 1af4:1100) bar 0: mem at 0xe0000000 [0xe00000ff] bar 2: mem at 0xffffffffffffffff [0x7ffffffe] * In the guest: $sudo lshw .... *-memory UNCLAIMED description: RAM memory product: Virtio Inter-VM shared memory vendor: Red Hat, Inc physical id: 4 bus info: pci@0000:00:04.0 version: 00 width: 64 bits clock: 33MHz (30.3ns) configuration: latency=3D0 resources: memory:e0000000-e00000ff $dmesg .... [ 18.365599] pci 0000:00:04.0: [1af4:1110] type 00 class 0x050= 000 [ 18.365657] pci 0000:00:04.0: reg 0x10: [mem=20 0x00000000-0x000000ff] [ 18.365746] pci 0000:00:04.0: reg 0x18: [mem=20 0x00000000-0x7fffffff 64bit pref] [ 18.366002] pci 0000:00:04.0: BAR 2: can't assign mem pref=20 (size 0x80000000) [ 18.366005] pci 0000:00:04.0: BAR 0: assigned [mem=20 0xe0000000-0xe00000ff] [ 18.366739] ACPI: Error installing CMOS-RTC region handler [ 18.366876] pci 0000:00:00.0: no hotplug settings from platfo= rm [ 18.366877] pci 0000:00:00.0: using default PCI settings [ 18.366900] pci 0000:00:01.0: no hotplug settings from platfo= rm [ 18.366901] pci 0000:00:01.0: using default PCI settings [ 18.366923] ata_piix 0000:00:01.1: no hotplug settings from=20 platform [ 18.366924] ata_piix 0000:00:01.1: using default PCI settings [ 18.366945] piix4_smbus 0000:00:01.3: no hotplug settings=20 from platform [ 18.366946] piix4_smbus 0000:00:01.3: using default PCI setti= ngs [ 18.366967] cirrus 0000:00:02.0: no hotplug settings from=20 platform [ 18.366968] cirrus 0000:00:02.0: using default PCI settings [ 18.366989] 8139cp 0000:00:03.0: no hotplug settings from=20 platform [ 18.366990] 8139cp 0000:00:03.0: using default PCI settings [ 18.367011] pci 0000:00:04.0: no hotplug settings from platfo= rm [ 18.367012] pci 0000:00:04.0: using default PCI settings The host is running the Linux kernel 1.13.0-43-generic, while the guest=20 runs the kernel 3.12.0-rc1 . Instead, the QEMU version is the 1.6.2 with the patch for DPDK. Any help would be really appreciated. Thank you in advance, Ivano Il 21/07/2015 18:37, Marc-Andr=C3=A9 Lureau ha scritto: > Hi > > On Tue, Jul 21, 2015 at 12:13 PM, Ivano Cerrato wrote: >> Is there any way to force the Guest OS to recognize the new device wit= hout >> rebooting? Such as rmmod/insmod or equivalent? > This can be observed in qemu monitor too, info qtree: > > dev: ivshmem, id "" > chardev =3D "" > size =3D "2048M" > vectors =3D 1 (0x1) > ioeventfd =3D false > msi =3D true > shm =3D "foo" > role =3D "" > use64 =3D 1 (0x1) > addr =3D 05.0 > romfile =3D "" > rombar =3D 1 (0x1) > multifunction =3D false > command_serr_enable =3D true > class RAM controller, addr 00:05.0, pci id 1af4:1110 (sub 1af4= :1100) > bar 0: mem at 0x40000000 [0x400000ff] > bar 2: mem at 0xffffffffffffffff [0x7ffffffe] > > Check dmesg, it fails to allocate for me, but with 1G it works (f22 > x86_64). I don't know what's the reason behind it. > > Note that it's not safe to do hotplug with ivshmem (it may assert in > various ways), I proposed a patch series a few weeks ago, I am going > to send an updated version soon. >