Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4281557iob; Sun, 8 May 2022 08:09:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHSqKwGbDv+FxzmwdHPj3bQYOqymxNqcTxpQYloJzEtrgbU+0iPuo2GilgbuE+CiA1EQ2H X-Received: by 2002:a17:907:7dac:b0:6f3:be1f:af39 with SMTP id oz44-20020a1709077dac00b006f3be1faf39mr10963587ejc.467.1652022550838; Sun, 08 May 2022 08:09:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652022550; cv=none; d=google.com; s=arc-20160816; b=UI1uIqG9kAJ2h0GsRSxgPrVe+oUfFA8odB8msBamQKedjv+YQt9+1AFmYc/VZRtjA8 urOOnBjAuy6O7Vn/AoY/zFr4AtbUPvz+QEo6+YFcUmJ6pz4/IcQNuLD7MPfB0u2pazmx jEaTyCduSIaeQmVUDMd9Mngp7DgBg6q4vGVXIibR5gXGJdfdY/LRFsL9fJ3DoqRQv5JR FUsyM5HnA7fapTwl1wob5N2mdB9cRBctYhhQqmbUIA7wHVxEwrcNuXWD27bSdV8ODctN GtCQG+mbl3zBBMsY2eOzBL/l8Xhx6C0Ui7mGFzMixdxWa/9lPW1AhDICs/r7KfciGR7f /Zpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=MVppxWloPHGJWVXPfoL2Mp1gCDmCbq5jYvkOUctTPwE=; b=lk0yN8GRtZVEGUkYWFVVZsf00ZfiJUccdEFT1g6tKclV2d5oxZUippo3Q8U/z7eJQ1 KAQFQHic4te4ATln3Z62/UTrPwRQhiQ2NplHPWq8V7ANqk5fA0wZJBgJd8ZNzwePVrxg 8s4n501QlK6ku7WHvY09zqacvMBmdfP22gLt4J8HA0yG9bbkjv3B2tRRrJfsXQrL2eOu MTqZ34/avZP8dfK+YrDUh//GCkPV5RH50jP4Vrl+kS1OhTIqepUnaqvvrMKLyQQR7xuO Y9S1/vhlkVQnoC8/8Z5bhJczbPh7Kq1ih+L+54i0IDGuOKv0gAkSJ64tedUNGBUyHVJX Lg+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zS7mT4GO; dkim=neutral (no key) header.i=@linutronix.de header.b=5wkuYkNH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g9-20020a056402090900b0042618047da2si353800edz.131.2022.05.08.08.08.43; Sun, 08 May 2022 08:09:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zS7mT4GO; dkim=neutral (no key) header.i=@linutronix.de header.b=5wkuYkNH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1391078AbiEFUJY (ORCPT + 99 others); Fri, 6 May 2022 16:09:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352661AbiEFUJW (ORCPT ); Fri, 6 May 2022 16:09:22 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D24913E9D for ; Fri, 6 May 2022 13:05:36 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1651867535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MVppxWloPHGJWVXPfoL2Mp1gCDmCbq5jYvkOUctTPwE=; b=zS7mT4GOFbktfGjTiNzsOezexuL61fgcFzjZlZAaPH7GPyJ2Q7bJAFEDsyscoPuCfFVQXy MQv9fxTolSCsKtYLSyZInAmifCbsge2rcmwRurq4fs6letvqkFnJbaTyhjCsRTPV60X6uE rinuSxovZT2eQZmTTINCqVtTXoHEFIdOgI1zfPR/KL1VUfVwn2fIFHM766ozhigodnfH5s jReDujbvbA2//EkDSTXQNLuOihMxNNQNvdzlCmWip8r6V8GGcekFaYq43MM8Slzjs9F8uF PGtWQGOFlmpNWcrTP2AzpuqH8ZoMSNTnNEko3cwpIKeOk6ve9AbhRkGjDS/MIg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1651867535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MVppxWloPHGJWVXPfoL2Mp1gCDmCbq5jYvkOUctTPwE=; b=5wkuYkNHIkwqACUXoQDb2h1xfBOD4wVbdnhxKNW06YuXNMEFHsj/QnO9X2mOg3FHRYYiy1 G0NPRPNdhl+hS1AA== To: Ricardo Neri , x86@kernel.org Cc: Tony Luck , Andi Kleen , Stephane Eranian , Andrew Morton , Joerg Roedel , Suravee Suthikulpanit , David Woodhouse , Lu Baolu , Nicholas Piggin , "Ravi V. Shankar" , Ricardo Neri , iommu@lists.linux-foundation.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Ricardo Neri Subject: Re: [PATCH v6 03/29] x86/apic/msi: Set the delivery mode individually for each IRQ In-Reply-To: <20220506000008.30892-4-ricardo.neri-calderon@linux.intel.com> References: <20220506000008.30892-1-ricardo.neri-calderon@linux.intel.com> <20220506000008.30892-4-ricardo.neri-calderon@linux.intel.com> Date: Fri, 06 May 2022 22:05:34 +0200 Message-ID: <8735hmh1f5.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 05 2022 at 16:59, Ricardo Neri wrote: > There are no restrictions in hardware to set MSI messages with its > own delivery mode. "messages with its own" ? Plural/singular confusion. > Use the mode specified in the provided IRQ hardware > configuration data. Since most of the IRQs are configured to use the > delivery mode of the APIC driver in use (set in all of them to > APIC_DELIVERY_MODE_FIXED), the only functional changes are where > IRQs are configured to use a specific delivery mode. This does not parse. There are no functional changes due to this patch and there is no point talking about functional changes in subsequent patches here. > Changing the utility function __irq_msi_compose_msg() takes care of > implementing the change in the in the local APIC, PCI-MSI, and DMAR-MSI in the in the > irq_chips. > > The IO-APIC irq_chip configures the entries in the interrupt redirection > table using the delivery mode specified in the corresponding MSI message. > Since the MSI message is composed by a higher irq_chip in the hierarchy, > it does not need to be updated. The point is that updating __irq_msi_compose_msg() covers _all_ MSI consumers including IO-APIC. I had to read that changelog 3 times to make sense of it. Something like this perhaps: "x86/apic/msi: Use the delivery mode from irq_cfg for message composition irq_cfg provides a delivery mode for each interrupt. Use it instead of the hardcoded APIC_DELIVERY_MODE_FIXED. This allows to compose messages for NMI delivery mode which is required to implement a HPET based NMI watchdog. No functional change as the default delivery mode is set to APIC_DELIVERY_MODE_FIXED." Thanks, tglx