qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] device_del


From: Alex Williamson
Subject: Re: [Qemu-devel] device_del
Date: Wed, 18 May 2016 09:38:52 -0600

On Wed, 18 May 2016 10:13:56 -0500
Bret Ketchum <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]