linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cyril Novikov <cnovikov@lynx.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Philipp Eppelt <philipp.eppelt@kernkonzept.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: x86/apic: MSI address malformed for "flat" driver
Date: Mon, 10 Sep 2018 23:02:46 -0700	[thread overview]
Message-ID: <27bccfd2-0ede-cd3a-2717-741d3dffebdf@lynx.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1809072012310.1402@nanos.tec.linutronix.de>

On 9/7/2018 12:11 PM, Thomas Gleixner wrote:
> On Thu, 6 Sep 2018, Philipp Eppelt wrote:
>>
>> The "flat" driver defines the MSI addressing scheme to be used as
>> logical addressing in flat mode. The MSI msg address is composed
>> accordingly, but sets MSI_ADDR_REDIRECTION_CPU which is a zero at bit[3].
> 
> Correct. That's what it means:
> 
>    * When RH is 0, the interrupt is directed to the processor listed in the
>      Destination ID field.
> 
> So for DM:
> 
>    * If RH is 0, then the DM bit is ignored and the message is sent ahead
>      independent of whether the physical or logical destination mode is
>      used.
> 
> which is means that the delivery does not do any magic redirections,
> because the Redirection Hint is off. If RH is set, then the delivery can
> redirect according to the rules in the DM section. We are not using that
> because we want targeted single CPU delivery.
> 
> The interpretation of the DID field is purely depending on the local APIC
> itself by matching the APIC ID against the DID field. And the local APIC ID
> of CPU0 is 1 << 0, i.e. 0x1 which matches the MSI message you see.

I believe you are wrong here and the local APIC ID of CPU0 is 0.

processor       : 0
vendor_id       : GenuineIntel
...
physical id     : 0
siblings        : 8
core id         : 0
cpu cores       : 4
apicid          : 0

The fact that the code works means that DM is not ignored when RH is 0. 
In other words, RH=0 DM=1 means logical destination mode.

--
Cyril

  reply	other threads:[~2018-09-11  6:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-06  9:22 x86/apic: MSI address malformed for "flat" driver Philipp Eppelt
2018-09-07 19:11 ` Thomas Gleixner
2018-09-11  6:02   ` Cyril Novikov [this message]
2018-09-11 12:29     ` Thomas Gleixner
2018-10-01 14:24       ` Philipp Eppelt

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=27bccfd2-0ede-cd3a-2717-741d3dffebdf@lynx.com \
    --to=cnovikov@lynx.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=philipp.eppelt@kernkonzept.com \
    --cc=tglx@linutronix.de \
    /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).