[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55FAE395.4000008@redhat.com>
Date: Thu, 17 Sep 2015 18:00:21 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Radim Krčmář <rkrcmar@...hat.com>
Cc: "Wu, Feng" <feng.wu@...el.com>,
"alex.williamson@...hat.com" <alex.williamson@...hat.com>,
"joro@...tes.org" <joro@...tes.org>,
"mtosatti@...hat.com" <mtosatti@...hat.com>,
"eric.auger@...aro.org" <eric.auger@...aro.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v8 03/13] KVM: Define a new interface
kvm_intr_is_single_vcpu()
On 17/09/2015 17:58, Radim Krčmář wrote:
> For interrupts from MSI and IOxAPIC:
> - Flat logical interrupts are delivered as if we had natural
> (CPU0<->bit0, CPU1<->bit1, ...) flat logical xAPIC for first 8 VCPUs.
> - Cluster logical doesn't work much, it's interpreted like flat logical.
> I didn't care about xAPIC cluster because Linux, the sole user of our
> paravirtualized x2APIC, doesn't configure it.
>
> I'll paste kvm_apic_mda() source for better explanation:
>
> static u32 kvm_apic_mda(unsigned int dest_id, struct kvm_lapic *source,
> struct kvm_lapic *target)
> {
> bool ipi = source != NULL;
> bool x2apic_mda = apic_x2apic_mode(ipi ? source : target);
>
> if (!ipi && dest_id == APIC_BROADCAST && x2apic_mda)
> return X2APIC_BROADCAST;
>
> return x2apic_mda ? dest_id : SET_APIC_DEST_FIELD(dest_id);
> }
>
> MSI/IOxAPIC interrupt means that source is NULL and if the target is in
> x2APIC mode, the original 'dest_id' is returned as mda => a flat logical
> xAPIC to 0x0f will get interpreted as (cluster) logical x2APIC 0xf in
> kvm_apic_match_logical_addr().
> xAPIC address are only 8 bit long so they always get delivered to x2APIC
> cluster 0, where first 16 bits work like xAPIC flat logical mode.
Ok, I was wondering whether this was the correct interpretation. Thanks!
Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists