From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: qemu-devel@nongnu.org, ehabkost@redhat.com, mst@redhat.com,
jan.kiszka@web.de, pbonzini@redhat.com, imammedo@redhat.com,
davidkiarie4@gmail.com, rth@twiddle.net
Subject: Re: [Qemu-devel] [PATCH] intel_iommu: add "eim" property
Date: Thu, 11 Aug 2016 17:44:16 +0200 [thread overview]
Message-ID: <20160811154416.GC10637@potion> (raw)
In-Reply-To: <1470922183-22873-1-git-send-email-peterx@redhat.com>
2016-08-11 21:29+0800, Peter Xu:
> Adding one extra property for intel-iommu device to decide whether we
> should support EIM bit for IR.
>
> Now we are throwing high 24 bits of dest_id away directly. This will
> cause interrupt issues with guests that:
>
> - enabled x2apic with cluster mode
> - have more than 16 vcpus (so will have more than 1 cluster)
Good catch, it is a problem starting at 9 VCPUs, because that one is
already "0x100" and we truncate to 8 bits ...
> Let's make xapic the default one, and for the brave people who would
> like to try EIM and know the side effects, we can do it by explicitly
> enabling EIM using:
This might bite us: users cannot easily tell when EIM is sane, so eim=on
is going to be a hazard even after some KVM/QEMU has it fixed.
I'd make make eim=on fail when logical x2APIC is broken.
Right now, we can allow eim=on if maximal APIC ID < 8, because physical
0xffffffff gets truncated to 0xff and is still interpreted as a
broadcast thanks to the quirk.
Logical 0xff gets misinterpreted as a broadcast, but it would address
all APICs anyway and KVM's lowest-priority works for broadcast too, so
it is fine to do so. Not very wise, though. :)
> -device intel-iommu,intremap=on,eim=on
>
> Even after we have x2apic support, it'll still be good if we can provide
> a way to switch xapic/x2apic from QEMU side for e.g. debugging purpose,
> which is an alternative for tuning guest kernel boot parameters.
>
> We can switch the default to "on" after x2apic fully supported.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
> This will have small conflict with Radim's patches to selectively
> enable EIM. I can do a rebase when needed.
This patch made me realize that broadcast quirk is not enough, so I'll
do v2 on top of this.
next prev parent reply other threads:[~2016-08-11 15:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-11 13:29 [Qemu-devel] [PATCH] intel_iommu: add "eim" property Peter Xu
2016-08-11 15:44 ` Radim Krčmář [this message]
2016-08-12 9:29 ` Peter Xu
2016-08-12 8:34 ` Paolo Bonzini
2016-08-12 9:22 ` Peter Xu
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=20160811154416.GC10637@potion \
--to=rkrcmar@redhat.com \
--cc=davidkiarie4@gmail.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=jan.kiszka@web.de \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.