Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3654826imm; Mon, 10 Sep 2018 23:11:28 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbrcRgW4NoR0dfKWiNdVlD8XFzhL+66ciLxx0rTLrzbLKWICNYUIXFCiTF4M2g1OE9p6mH6 X-Received: by 2002:a17:902:7c8c:: with SMTP id y12-v6mr25756948pll.283.1536646288272; Mon, 10 Sep 2018 23:11:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536646288; cv=none; d=google.com; s=arc-20160816; b=y5vk6ZZvErTQbOl1VqcDE53GzeAa1qmwcBdCdpAxShtPgbYjKeIvjSTgzGFaj+Yity nJL2meLleJsmVj7wyxjQbN1hcLluiArjBvRooau3Tsl4ixUtBHKKPm0c+o5WDJrVIgA2 GjAftsOWUooDOBfigN9H+RByGn1ku3MAg1g0E5phEPgrKdCf6tF4+p6u746DIYetdTdf 1MbeAAhHD77aSQ1ZMsS8bivKlZpiPUzVmpSVkm79++f5f6hWT9oISk089WdXCaixztGG zu6dq78NntFeVcLLImN7c4jjuBe3RzCmuwlpPWkuTIZO5pjssJ6mP7oqFB1x6hhZyD6r +sOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=HMDVSZyj3KfEucmx5npIPVkwgSvlwPegZ6wigajHi7E=; b=qFd5w2UT8faVkCQ/DL2GELbPtVCdk6WoyvM2Ae+tKI+cxfYUooZyb2bgtBaV5HLAIS LBOJAm93bqTYXf0vbFrnSbBjQQ4nF+L0D6rm6ofLbcWnHv8gWtHt9ddaXaGiQWPVSV6H My79aiKYZqEN1XiAdBxzI6fsMLqG1s3JicM3ttmuYbAsEKmJSrmnHUjsCKlDh37ep1uF rtZNY2a24jcr+H0Kd8f+xmHovpjx5PfdidjJePEcxfef9eKro59n8+SztGsZSDtqf8/T nIGNmvzZIPeAMCqk5cnfk5WjAleSJLiredlKmhpP5GI+B7MEXW3AUKnyIvzSW1XvB30p O1Zg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u5-v6si19944623pgc.459.2018.09.10.23.11.13; Mon, 10 Sep 2018 23:11:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727644AbeIKLIo (ORCPT + 99 others); Tue, 11 Sep 2018 07:08:44 -0400 Received: from [216.100.252.242] ([216.100.252.242]:38853 "EHLO asmtp.lnxw.com" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726569AbeIKLIn (ORCPT ); Tue, 11 Sep 2018 07:08:43 -0400 X-Greylist: delayed 472 seconds by postgrey-1.27 at vger.kernel.org; Tue, 11 Sep 2018 07:08:43 EDT Received: from [10.21.42.214] ([10.21.42.214]) (authenticated bits=0) by asmtp.lnxw.com (8.13.8/8.13.8) with ESMTP id w8B62jqj009943 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 10 Sep 2018 23:02:47 -0700 Subject: Re: x86/apic: MSI address malformed for "flat" driver To: Thomas Gleixner , Philipp Eppelt Cc: linux-kernel@vger.kernel.org References: From: Cyril Novikov Message-ID: <27bccfd2-0ede-cd3a-2717-741d3dffebdf@lynx.com> Date: Mon, 10 Sep 2018 23:02:46 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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