From patchwork Wed Jul 21 19:11:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 12391965 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 808F5C12002 for ; Wed, 21 Jul 2021 19:28:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 606D76120D for ; Wed, 21 Jul 2021 19:28:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240071AbhGUSro (ORCPT ); Wed, 21 Jul 2021 14:47:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237196AbhGUSrn (ORCPT ); Wed, 21 Jul 2021 14:47:43 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A520C061575; Wed, 21 Jul 2021 12:28:19 -0700 (PDT) Message-Id: <20210721191126.274946280@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1626895698; 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: content-transfer-encoding:content-transfer-encoding; bh=dPPCs41If+VY2/qjy0QKxbaMgdjt6bNnqmwa5lYy4KM=; b=coWNqA4ca7VsXJh5hVoDbN/BR0PFGtxCfdm1T+ut9BCaPumN1KVCi2QX9H56c8PWfNbP/z YyP8TiOpWDbUg8AdHSK2E900RN6bLRZlTrLG+KUTd71LrYBmAhwSObh4jlGquvVqBAyujW AF44wDCfqBAoObRGcdyQO3wDogQOkLA1Xt6235aL0JIrkMruSpsEuPzElh2tMyiUscRzIN OZW3TwiLKqIokeOEXgSveyImkGZcq5xZBwLDX8icpdCk8xAVRSi/7Bix7arheGo2CdluXM wTfWDYTeaCJyBXm6peeusx/n7mVRhm473HoFUFNcyqGlJm7pqdr3Bcp109RX4w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1626895698; 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: content-transfer-encoding:content-transfer-encoding; bh=dPPCs41If+VY2/qjy0QKxbaMgdjt6bNnqmwa5lYy4KM=; b=3G6tiagdiwK1YmDo+isfRZDk4MQlfTdaCrUensxLJJdBPKHkroDbUH6E7Yi3EHH/faXCcm F8ehG32/9L665rDQ== Date: Wed, 21 Jul 2021 21:11:26 +0200 From: Thomas Gleixner To: LKML Cc: Alex Williamson , "Raj, Ashok" , "David S. Miller" , Bjorn Helgaas , linux-pci@vger.kernel.org, Kevin Tian , Marc Zyngier , Ingo Molnar , x86@kernel.org Subject: [patch 0/8] PCI/MSI, x86: Cure a couple of inconsistencies MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org A recent discussion about the PCI/MSI management for virtio unearthed a violation of the MSI-X specification vs. writing the MSI-X message: under certain circumstances the entry is written without being masked. While looking at that and the related violation of the x86 non-remapped interrupt affinity mechanism a few other issues were discovered by inspection. The following series addresses these. Note this does not fix the virtio issue, but while staring at the above problems I came up with a plan to address this. I'm still trying to convince myself that I can get away without sprinkling locking all over the place, so don't hold your breath that this will materialize tomorrow. The series is also available from git: git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git irq/msi Thanks, tglx Reviewed-by: Marc Zyngier Acked-by: Bjorn Helgaas for the PCI pieces. --- arch/x86/kernel/apic/io_apic.c | 6 +- arch/x86/kernel/apic/msi.c | 11 +++- arch/x86/kernel/hpet.c | 2 drivers/pci/msi.c | 98 +++++++++++++++++++++++++++-------------- include/linux/irq.h | 2 kernel/irq/chip.c | 5 +- 6 files changed, 85 insertions(+), 39 deletions(-)