qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] VFIO and scheduled SR-IOV cards


From: Benoît Canet
Subject: [Qemu-devel] VFIO and scheduled SR-IOV cards
Date: Mon, 3 Jun 2013 18:33:05 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hello,

I plan to write a PF driver for an SR-IOV card and make the VFs work with QEMU's
VFIO passthrough so I am asking the following design question before trying to
write and push code.

After SR-IOV being enabled on this hardware only one VF function can be active
at a given time.

The PF host kernel driver is acting as a scheduler.
It switch every few milliseconds which VF is the current active function while
disabling the others VFs.

One consequence of how the hardware works is that the MMR regions of the
switched off VFs must be unmapped and their io access should block until the VF
is switched on again.

Each IOMMU map/unmap should be done in less than 100ns.

As the kernel iommu module is being called by the VFIO driver the PF driver
cannot interface with it.

Currently the only interface of the VFIO code is for the userland QEMU process
and I fear that notifying QEMU that it should do the unmap/block would take more
than 100ns.

Also blocking the IO access in QEMU under the BQL would freeze QEMU.

Do you have and idea on how to write this required map and block/unmap feature ?

Best regards

Benoît Canet



reply via email to

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