qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] SR-IOV PF reset and QEMU VFs VFIO passthrough


From: Don Dutile
Subject: Re: [Qemu-devel] SR-IOV PF reset and QEMU VFs VFIO passthrough
Date: Mon, 03 Jun 2013 14:41:04 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.11) Gecko/20121116 Thunderbird/10.0.11

On 06/01/2013 08:13 AM, Benoît Canet wrote:

Hello,

I may have soon the PF driver of an SR-IOV card to code and make work with
QEMU/KVM so I have the following questions.

In an AMD64 setup where QEMU use VFIO to passthrough the VFs of an SR-IOV card
to a guest will the consequences of a PF FLR be handled fine by QEMU and the
guest ?

the reset occurs long before the device is passed to the guest.

I read that pci_reset_function would call pci_restore_state restoring the SR-IOV
configuration after the reset of the PF.

correct.

The ways the hardware work means that the VFs would disappear and reappear in a
short lapse of time.

Not sure your definitiion of 'disappear'.  If you mean: if I had another thread
poking at the device, the device would appear to be removed, then come back (if 
os
poking hasn't crashed from the device's lack of response).
If you mean the VF gets entirely removed from the PCI tree, then no.
A pci reset != hot unplug/plug.  The device remains in the device tree.

Will these events be handled by the kernel pci hotplug code ?

'these events' ??? -- which events....
FLR is currently done by libvirt & qemu/vfio to ensure assigned devices are 
quiesced
as they are switched from host->guest domain, and guest->(back-to-)host domain.

Given that the PF driver restore the PF config space after the reset will /sys
The PF driver doesn't do the config space restore -- it's done in PCI core code.

files used by QEMU disappear and reappear messing the QEMU VFIO passthrough or
As stated above, the devices don't disappear from the device tree, so they don't
get removed/added to the /sys(/bus/pci/...) files.

will it goes smoothly ?

it goes smoothly today.... :-/

Best regards

Benoît Canet





reply via email to

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