From: Paolo Bonzini <pbonzini@redhat.com>
To: David Woodhouse <dwmw2@infradead.org>,
qemu-devel <qemu-devel@nongnu.org>
Cc: x86 <x86@kernel.org>, kvm <kvm@vger.kernel.org>
Subject: Re: [PATCH] target/i386: Support up to 32768 CPUs without IRQ remapping
Date: Mon, 19 Oct 2020 15:55:30 +0200 [thread overview]
Message-ID: <4d820db0-be0d-d47d-7a8a-874fb481a2ce@redhat.com> (raw)
In-Reply-To: <c337e15dec18e291399b294823dccbdb63976a38.camel@infradead.org>
On 19/10/20 14:21, David Woodhouse wrote:
> On Thu, 2020-10-08 at 09:53 +0200, Paolo Bonzini wrote:
>> I think you're not
>> handling that correctly for CPUs >255, so after all we _do_ need some
>> kernel support.
>
> I think that works out OK.
>
> In QEMU's ioapic_update_kvm_routes() it calls ioapic_entry_parse()
> which generates the actual "bus" MSI with the extended dest ID in bits
> 11-5 of the address.
>
> That MSI message is passed to kvm_irqchip_update_msi_route() which
> passes it through translation — which does interrupt remapping and
> shifting the ext bits up into ->address_hi as the KVM X2APIC API
> expects.
>
> So when the kernel's kvm_scan_ioapic_routes() goes looking,
> kvm_set_msi_irq() fills 'irq' in with the correct dest_id, and
> kvm_apic_match_dest() does the right thing.
>
> No?
Yeah, that seems fine.
> As far as I can tell, we *do* have a QEMU bug — not related to the ext
> dest ID — because for MSIs of assigned devices we don't update the KVM
> IRQ routing table when the Interrupt Remapping IEC cache is flushed.
> So... it'll hit the tip.git tree and thus linux-next as soon as Linus
> releases 5.10-rc1, and it'll then get merged into 5.11-rc1 and be in
> the 5.11 release.
>
> At which of those three points in time would you be happy to merge it
> to QEMU? If it's either of the latter two, maybe it *is* worth doing a
> patch which *only* reserves the feature bit, and trying to slip it into
> 5.10?
It would be 5.11-rc1 because of the KVM_FEATURE_MSI_EXT_DEST_ID
definition which would not be in your patch but rather synchronized from
the Linux tree by scripts/update-linux-headers.sh.
If you send me the doc patch any time before 5.10-rc7, it will be in 5.10.
Paolo
next prev parent reply other threads:[~2020-10-19 13:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-05 14:18 [PATCH] target/i386: Support up to 32768 CPUs without IRQ remapping David Woodhouse
2020-10-07 12:24 ` David Woodhouse
2020-10-08 6:56 ` Paolo Bonzini
2020-10-08 7:29 ` David Woodhouse
2020-10-08 7:53 ` Paolo Bonzini
2020-10-19 12:21 ` David Woodhouse
2020-10-19 13:55 ` Paolo Bonzini [this message]
2020-10-19 14:55 ` [PATCH] x86/kvm: Reserve KVM_FEATURE_MSI_EXT_DEST_ID David Woodhouse
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=4d820db0-be0d-d47d-7a8a-874fb481a2ce@redhat.com \
--to=pbonzini@redhat.com \
--cc=dwmw2@infradead.org \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=x86@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).