[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/3] hw/nvme: use KVM irqfd when available
From: |
Jinhao Fan |
Subject: |
Re: [PATCH v2 2/3] hw/nvme: use KVM irqfd when available |
Date: |
Sat, 27 Aug 2022 00:04:23 +0800 |
at 11:34 PM, Keith Busch <kbusch@kernel.org> wrote:
> On Fri, Aug 26, 2022 at 11:12:04PM +0800, Jinhao Fan wrote:
>> Use KVM's irqfd to send interrupts when possible. This approach is
>> thread safe. Moreover, it does not have the inter-thread communication
>> overhead of plain event notifiers since handler callback are called
>> in the same system call as irqfd write.
>>
>> Signed-off-by: Jinhao Fan <fanjinhao21s@ict.ac.cn>
>> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
>
> No idea what's going on here... This one is causing the following assert
> failure with --enable-kvm:
>
> qemu-system-x86_64: ../accel/kvm/kvm-all.c:1781: kvm_irqchip_commit_routes:
> Assertion `ret == 0' failed.
My intuition is that if irq-eventfd is off we shouldn’t call
kvm_irqchip_commit_routes(). Probably we missed some check here.
> I find it calls KVM_SET_GSI_ROUTING ioctl with gsi set to KVM_IRQ_ROUTING_MSI,
> and linux kernel returns EINVAL in that case. It's never set that way without
> this patch. Am I the only one seeing this?