* [Qemu-devel] Hotplug handler
@ 2018-10-03 16:50 Sameeh Jubran
2018-10-04 11:20 ` Igor Mammedov
0 siblings, 1 reply; 5+ messages in thread
From: Sameeh Jubran @ 2018-10-03 16:50 UTC (permalink / raw)
To: QEMU Developers
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!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Hotplug handler
2018-10-03 16:50 [Qemu-devel] Hotplug handler Sameeh Jubran
@ 2018-10-04 11:20 ` Igor Mammedov
2018-10-07 9:52 ` Sameeh Jubran
0 siblings, 1 reply; 5+ messages in thread
From: Igor Mammedov @ 2018-10-04 11:20 UTC (permalink / raw)
To: Sameeh Jubran; +Cc: QEMU Developers
On Wed, 3 Oct 2018 19:50:58 +0300
Sameeh Jubran <sameeh@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?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Hotplug handler
2018-10-04 11:20 ` Igor Mammedov
@ 2018-10-07 9:52 ` Sameeh Jubran
2018-10-08 8:28 ` Igor Mammedov
0 siblings, 1 reply; 5+ messages in thread
From: Sameeh Jubran @ 2018-10-07 9:52 UTC (permalink / raw)
To: imammedo; +Cc: QEMU Developers
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
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 <imammedo@redhat.com> wrote:
> On Wed, 3 Oct 2018 19:50:58 +0300
> Sameeh Jubran <sameeh@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 <https://il.linkedin.com/pub/sameeh-jubran/87/747/a8a>*
*Software Engineer @ Daynix <http://www.daynix.com>.*
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Hotplug handler
2018-10-07 9:52 ` Sameeh Jubran
@ 2018-10-08 8:28 ` Igor Mammedov
2018-10-08 10:44 ` Sameeh Jubran
0 siblings, 1 reply; 5+ messages in thread
From: Igor Mammedov @ 2018-10-08 8:28 UTC (permalink / raw)
To: Sameeh Jubran; +Cc: QEMU Developers
On Sun, 7 Oct 2018 12:52:11 +0300
Sameeh Jubran <sameeh@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 <imammedo@redhat.com> wrote:
>
> > On Wed, 3 Oct 2018 19:50:58 +0300
> > Sameeh Jubran <sameeh@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?
> >
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Hotplug handler
2018-10-08 8:28 ` Igor Mammedov
@ 2018-10-08 10:44 ` Sameeh Jubran
0 siblings, 0 replies; 5+ messages in thread
From: Sameeh Jubran @ 2018-10-08 10:44 UTC (permalink / raw)
To: imammedo; +Cc: QEMU Developers
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 <imammedo@redhat.com> wrote:
>
> On Sun, 7 Oct 2018 12:52:11 +0300
> Sameeh Jubran <sameeh@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 <imammedo@redhat.com> wrote:
> >
> > > On Wed, 3 Oct 2018 19:50:58 +0300
> > > Sameeh Jubran <sameeh@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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-10-08 10:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-03 16:50 [Qemu-devel] Hotplug handler Sameeh Jubran
2018-10-04 11:20 ` Igor Mammedov
2018-10-07 9:52 ` Sameeh Jubran
2018-10-08 8:28 ` Igor Mammedov
2018-10-08 10:44 ` Sameeh Jubran
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.