From: Alex Williamson <alex.williamson@redhat.com>
To: Bret Ketchum <bcketchum@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] device_del
Date: Wed, 18 May 2016 09:38:52 -0600 [thread overview]
Message-ID: <20160518093852.62e3154a@t450s.home> (raw)
In-Reply-To: <CAGm6yaRS1=DunXdbSUJezNP1yGzpybQg6Kv0xcxEvWMzPa47Og@mail.gmail.com>
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
prev parent reply other threads:[~2016-05-18 15:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-18 15:13 [Qemu-devel] device_del Bret Ketchum
2016-05-18 15:38 ` Alex Williamson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160518093852.62e3154a@t450s.home \
--to=alex.williamson@redhat.com \
--cc=bcketchum@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).