All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Does PCI hotplug work with IVSHMEM?
@ 2015-07-21 10:13 Ivano Cerrato
  2015-07-21 16:37 ` Marc-André Lureau
  0 siblings, 1 reply; 7+ messages in thread
From: Ivano Cerrato @ 2015-07-21 10:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Mauricio Vásquez, Fulvio Risso

Dear all,

we're adding dynamically an IVSHMEM device on a VM that is already 
running, but apparently this is not correctly recognized by the Guest OS.
Instead, everything works if we reboot the VM after adding the new 
IVSHMEM device.

This is the list of steps we execute:

1) Launch a new Guest VM with Qemu

2) Create a new IVSHMEM metadata file in the Host

3) Map that file as a new IVSHMEM device in the Guest
    For this step, we use the "device_add" command from Qemu:

      (qemu) device_add ivshmem,size=2048M,shm=fd:/dev/hugepages
           /rtemap_0:0x0:0x40000000:/dev/zero:0x0:0x3fffc000:/var/run
           /.dpdk_ivshmem_metadata_vm_1:0x0:0x4000

4) List the available PCI devices in the Guest with "lshw":

      $ 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=0
          resources: memory:e0000000-e00000ff

5) Reboot the Guest VM and re-do the 'lshw' command:

      $ 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=0
         resources: iomemory:10-f memory:febd0000-febd00ff
               memory:180000000-1ffffffff


It seems to us that, after the reboot, the IVSHMEM is mapped in a 
different way than immediately after plugging it in a running VM 
(compare the output of the line 'resources').

This has the side effect that we can use a DPDK application based on the 
IVSHMEM only in the second case; the DPDK doens't see the shared memory 
in the first case.

Is there any way to force the Guest OS to recognize the new device 
without rebooting? Such as rmmod/insmod or equivalent?

Thank you for your answer,

     Ivano

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

end of thread, other threads:[~2015-08-05 14:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-21 10:13 [Qemu-devel] Does PCI hotplug work with IVSHMEM? Ivano Cerrato
2015-07-21 16:37 ` Marc-André Lureau
2015-07-21 16:42   ` Marc-André Lureau
2015-07-22  5:48   ` Ivano Cerrato
2015-08-04 14:14   ` Ivano Cerrato
2015-08-04 14:21     ` Marc-André Lureau
2015-08-05 14:44       ` Ivano Cerrato

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.