Thanks for your help, turns out that the hotlpug is set by piix4 after the devices are realized. On Mon, Oct 8, 2018 at 11:28 AM Igor Mammedov <imamm...@redhat.com> wrote: > > On Sun, 7 Oct 2018 12:52:11 +0300 > Sameeh Jubran <sam...@daynix.com> wrote: > > > This is the command line. All of the devices are wired to pci.0, there is > > no pci bridge. > > > > According to this, Integrated Endpoints are not hot-pluggable. However I > > can still use device_del to delete a device and device_add to add e1000 > > with no issues. > > https://github.com/qemu/qemu/blob/master/docs/pcie.txt#L37 > Your CLI is using default 'pc' machine so it's conventional PCI (not PCI-E), > with that CLI for a device plugged into pci.0 bus you should get piix4_pm as > hotplug handler (ACPI is used on pci.0 as default). > To troubleshoot your issue, you might look at code that's > using following symbols: > > use_acpi_pci_hotplug > piix4_update_bus_hotplug > piix4_device_plug_cb > piix4_device_unplug_request_cb > > > > > qemu-system-x86_64 \ > > -device > > e1000,netdev=hostnet0,mac=56:cc:c1:01:cc:21,id=cc1_71,primary=cc1_72 \ > > -netdev > > tap,vhost=on,id=hostnet1,script=world_bridge_standalone.sh,downscript=no,ifname=cc1_72,queues=4 > > \ > > -device > > virtio-net,host_mtu=1500,netdev=hostnet1,mac=56:cc:c1:04:2c:21,id=cc1_72,vectors=10,mq=on,standby=cc1_71 > > \ > > -netdev > > tap,id=hostnet0,script=world_bridge_standalone.sh,downscript=no,ifname=cc1_71 > > \ > > -enable-kvm \ > > -name netkvm \ > > -m 1000M \ > > -snapshot \ > > -smp 4 \ > > -drive file=windows_10_enterprise_x64_netkvm_dev.qcow2,if=ide,id=drivex \ > > -global PIIX4_PM.disable_s3=0 \ > > -global PIIX4_PM.disable_s4=0 \ > > -usbdevice tablet \ > > -vga qxl \ > > -spice port=6110,disable-ticketing \ > > -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x7 > > \ > > -chardev spicevmc,name=vdagent,id=vdagent \ > > -device > > virtserialport,nr=1,bus=virtio-serial0.0,chardev=vdagent,name=com.redhat.spice.0 > > \ > > -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 \ > > -device virtio-serial \ > > -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 \ > > -monitor stdio > > > > > > On Thu, Oct 4, 2018 at 2:20 PM Igor Mammedov <imamm...@redhat.com> wrote: > > > > > On Wed, 3 Oct 2018 19:50:58 +0300 > > > Sameeh Jubran <sam...@daynix.com> wrote: > > > > > > > Hi all, > > > > > > > > I am trying to get the hotplug handler of a pci device in Qemu using > > > > "qdev_get_hotplug_handler" function. This function simply tries to get > > > > the hotplug handler from the parent bus. For some reason it's always > > > > null. Why it is not initialized? > > > > > > > > Thanks! > > > > > > > > > > what's used qemu command line? > > > > > > > >
-- Respectfully, Sameeh Jubran Linkedin Software Engineer @ Daynix.