From: Kunkun Jiang <jiangkunkun@huawei.com>
To: Marc Zyngier <maz@kernel.org>, <dongli.zhang@oracle.com>,
<cohuck@redhat.com>, <jasowang@redhat.com>, <stefanha@redhat.com>,
<mst@redhat.com>
Cc: Oliver Upton <oliver.upton@linux.dev>,
James Morse <james.morse@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Zenghui Yu <yuzenghui@huawei.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>, Gavin Shan <gshan@redhat.com>,
Jean-Philippe Brucker <jean-philippe@linaro.org>,
"open list:IRQCHIP DRIVERS" <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>, <kvmarm@lists.linux.dev>,
<wanghaibin.wang@huawei.com>
Subject: Re: [RFC PATCH] KVM: arm/arm64: GICv4: Support shared VLPI
Date: Wed, 8 Nov 2023 17:45:51 +0800 [thread overview]
Message-ID: <952bd5dc-dd20-acc3-d77e-c9b14e5728d3@huawei.com> (raw)
In-Reply-To: <86edh228xx.wl-maz@kernel.org>
Hi Marc,
On 2023/11/6 23:33, Marc Zyngier wrote:
> On Mon, 06 Nov 2023 14:59:01 +0000,
> Kunkun Jiang <jiangkunkun@huawei.com> wrote:
>> The virtio-pci driver write entry1-6
>> massage.data in the msix-table and trap to QEMU for processing. The
>> massage.data is as follow:
>>> entry-0 0
>>> entry-1 1
>>> entry-2 1
>>> entry-3 1
>>> entry-4 1
>>> entry-5 1
>>> entry-6 1
> Urgh... is vp_modern_queue_vector() used in your configuration? This
> is ... terrible.
I encountered this problem using the 4.19 version kernel, but not the
5.10 version. This vp_modern_queue_vector() function does not exist
in 4.19, but it uses 'vp_iowrite16(msix_vec, &cfg->queue_msix_vector)',
the same as vp_modern_queue_vector().
In the past two days, I learned about the virtio driver and made some
new discoveries. When 'num_queues' is greater than maxcpus, it will
fall back into MSI-X with one shared for queues. The two patches[1],
submitted by Dongli, limits the number of hw queues used by
virtio-blk/virtio-scsi by 'nr_cpu_ids'. The two patches were merged
in 5.1-rc2. And the patch related virtio-blk was merged into the 4.19
stable branch.The patch related virtio-scsi was not merged.
[1]
https://lore.kernel.org/all/1553682995-5682-1-git-send-email-dongli.zhang@oracle.com/
This is the earliest discussion.
https://lore.kernel.org/all/e4afe4c5-0262-4500-aeec-60f30734b4fc@default/
I don't know if there are other circumstances that would cause it to
fall back into MSI-X with one shared for queues. At least the hack
method is possible.
> I wonder if PCIe actually allows this sort of thing.
Do you think the virtio driver should be modified?
> In any case, this sort of behaviour breaks so many thing in KVM's
> implementation that I'd recommend you disable GICv4 until we have a
> good solution for that.
There seems to be no restriction in the GIC specification that multiple
host irqs cannot be mapped to the same vlpi. Or maybe I didn't notice.
Do you think there are any risks?
GICv3 does not have this issue, but is this configuration legal?
Thanks,
Kunkun Jiang
next prev parent reply other threads:[~2023-11-08 9:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-02 14:35 Kunkun Jiang
2023-11-04 10:29 ` Marc Zyngier
2023-11-06 15:33 ` Kunkun Jiang
[not found] ` <1fb8353e-e9c4-2570-c2ca-ec537c18ac4d@huawei.com>
2023-11-06 15:33 ` Marc Zyngier
2023-11-08 9:45 ` Kunkun Jiang [this message]
2023-12-02 12:20 ` Marc Zyngier
2023-12-04 8:39 ` Jason Wang
2023-12-04 8:47 ` Jason Wang
2023-12-04 9:00 ` Marc Zyngier
2023-12-04 9:06 ` Jason Wang
2023-12-04 8:52 ` Marc Zyngier
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=952bd5dc-dd20-acc3-d77e-c9b14e5728d3@huawei.com \
--to=jiangkunkun@huawei.com \
--cc=catalin.marinas@arm.com \
--cc=cohuck@redhat.com \
--cc=dongli.zhang@oracle.com \
--cc=gshan@redhat.com \
--cc=james.morse@arm.com \
--cc=jasowang@redhat.com \
--cc=jean-philippe@linaro.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=mst@redhat.com \
--cc=oliver.upton@linux.dev \
--cc=stefanha@redhat.com \
--cc=suzuki.poulose@arm.com \
--cc=wanghaibin.wang@huawei.com \
--cc=will@kernel.org \
--cc=yuzenghui@huawei.com \
/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
all inboxes | Powered by JetHome®