qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] device_del
@ 2016-05-18 15:13 Bret Ketchum
  2016-05-18 15:38 ` Alex Williamson
  0 siblings, 1 reply; 2+ messages in thread
From: Bret Ketchum @ 2016-05-18 15:13 UTC (permalink / raw)
  To: qemu-devel

    Should device_del work with a vfio device and qemu-2.3? I
configure a pass-through device in a q35 machine:

-device ioh3420,slot=3,bus=pcie.0,addr=1b.0,port=3,chassis=3,multifunction=on,id=root.1
\
-device vfio-pci,host=84:00.0,bus=root.1,addr=00.0,rombar=0,id=SAS.2

   And try to delete the device through the monitor:

virsh qemu-monitor-command scos --hmp --cmd 'device_del SAS.2'

    There are not complaints but the device did not go away:

        bus: root.1
          type PCIE
          dev: vfio-pci, id "SAS.2"
            host = "0000:84:00.0"
            x-intx-mmap-timeout-ms = 1100 (0x44c)
            x-vga = false
            x-req = true
            bootindex = -1 (0xffffffffffffffff)
            x-mmap = true
            addr = 00.0
            romfile = ""
            rombar = 0 (0x0)
            multifunction = false
            command_serr_enable = true
            class SAS controller, addr 04:00.0, pci id 1000:0097 (sub 1028:1fbd)
            bar 0: i/o at 0x5000 [0x50ff]
            bar 1: mem at 0xfe640000 [0xfe64ffff]
            bar 3: mem at 0xfe600000 [0xfe63ffff]

    Or is this a job for object_del?

    Thanks in advance....


    Bret

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

* Re: [Qemu-devel] device_del
  2016-05-18 15:13 [Qemu-devel] device_del Bret Ketchum
@ 2016-05-18 15:38 ` Alex Williamson
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Williamson @ 2016-05-18 15:38 UTC (permalink / raw)
  To: Bret Ketchum; +Cc: qemu-devel

On Wed, 18 May 2016 10:13:56 -0500
Bret Ketchum <bcketchum@gmail.com> wrote:

>     Should device_del work with a vfio device and qemu-2.3? I
> configure a pass-through device in a q35 machine:
> 
> -device ioh3420,slot=3,bus=pcie.0,addr=1b.0,port=3,chassis=3,multifunction=on,id=root.1
> \
> -device vfio-pci,host=84:00.0,bus=root.1,addr=00.0,rombar=0,id=SAS.2
> 
>    And try to delete the device through the monitor:
> 
> virsh qemu-monitor-command scos --hmp --cmd 'device_del SAS.2'
> 
>     There are not complaints but the device did not go away:
> 
>         bus: root.1
>           type PCIE
>           dev: vfio-pci, id "SAS.2"
>             host = "0000:84:00.0"
>             x-intx-mmap-timeout-ms = 1100 (0x44c)
>             x-vga = false
>             x-req = true
>             bootindex = -1 (0xffffffffffffffff)
>             x-mmap = true
>             addr = 00.0
>             romfile = ""
>             rombar = 0 (0x0)
>             multifunction = false
>             command_serr_enable = true
>             class SAS controller, addr 04:00.0, pci id 1000:0097 (sub 1028:1fbd)
>             bar 0: i/o at 0x5000 [0x50ff]
>             bar 1: mem at 0xfe640000 [0xfe64ffff]
>             bar 3: mem at 0xfe600000 [0xfe63ffff]
> 
>     Or is this a job for object_del?

It should work, but PCI hot-unplug is a cooperative process with the
guest.  If PCI hotplug is not supported on the root port or the guest
does not eject the device, nothing happens, much like you're seeing.
So you might first try ejecting the device from the guest to see if it
gets unplugged that way.  Thanks,

Alex

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

end of thread, other threads:[~2016-05-18 15:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-18 15:13 [Qemu-devel] device_del Bret Ketchum
2016-05-18 15:38 ` Alex Williamson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).