qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC v3 10/10] vfio: Add irqfd support in platform devi


From: Alexander Graf
Subject: Re: [Qemu-devel] [RFC v3 10/10] vfio: Add irqfd support in platform device
Date: Wed, 25 Jun 2014 23:35:16 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0


On 02.06.14 09:49, Eric Auger wrote:
This patch aims at optimizing IRQ handling using irqfd framework.
It brings significant performance improvement over "traditional" IRQ
handling introduced in :
"vfio: Add initial IRQ support in platform device".

This new IRQ handling method depends on kernel KVM irqfd/GSI routing
capability.

The IRQ handling method can be dynamically chosen (default is irqfd,
if kernel supports it obviously).  For example to disable irqfd
handling, use:

-device vfio-platform,vfio_device="fff51000.ethernet",\
compat="calxeda/hb-xgmac",mmap-timeout-ms=110,irqfd=false\

Performances are improved for the following reasons:
- eventfds signalled by the VFIO platform driver are handled on
   kernel side by the KVM irqfd framework.
- the end of interrupt(EOI) is trapped at GIC level and not at MMIO
   region level. As a reminder, in traditional IRQ handling QEMU
   assumed the first guest access to a device MMIO region after IRQ
   hit was the IRQ status register reset. This trap was approximate
   and obliged to swap to slow path after IRQ hit. A mmap timer
   mechanism enabled to swap back to fast path after the mmap period
   introducing extra complexity. Now GIC detects the completion of
   the virtual IRQ and signals a resampler eventfd on maintenance
   IRQ. The corresponding handler re-enables the physical IRQ.

Ah, so if you're using irqfd you do unmask the interrupt on EOI. Why not without irqfd? And if the answer is "because it's too difficult" - why support VFIO without irqfd at all then?


Alex




reply via email to

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