Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp186701iob; Mon, 2 May 2022 16:37:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5oxaiwjY2d7GfmU5wDAQG3KLTJkEO8l30yDkOGxzD1fLifRIquMAmEfB7ADAcsSej8HbQ X-Received: by 2002:a17:90b:350a:b0:1dc:69bc:e04 with SMTP id ls10-20020a17090b350a00b001dc69bc0e04mr1730201pjb.18.1651534652500; Mon, 02 May 2022 16:37:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651534652; cv=none; d=google.com; s=arc-20160816; b=R/wM1WRQFWKM4tg2BslRMfb04+izl8jCiM66QTDdqEpq6X4HVSbat5esf1MdJ2kVvD DYZkGYVPpVXeWiK6UJPO2iyCY34+CN2UN2/mQdDPm1N56wok7HqQmmWfIxt9OtJXvGql AwXKk/+6TSOiKhI1z+jlro2lXQzNS5CSWOrlyPfSHiYo4cvfn9ennhl4DGQMw2AtULAX dJWC1WGaflzO25g2b/R0jRU64QZUQqEXsw6DAKbIGOLTtA8LS3cu8JVrqJWEH9vUskeP uJaLdH6Ld3lM76VslX6qUKCAMH3rCcsstG/85J7EW4QBtyR+qHJc/nfvTw0anKi9qP42 1QIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=Btm8cdhggXjho6O0WPgq4RkAAi9zylcOI/eBifzYWp8=; b=fTnOaRPbFe7h2nR2fkFuu4SYfXnUw/xIAhKWsskQY0cuncZbW+dAWkW6vwzXYq+gpB EaKWnxmTGcwOJ+TstQejHVEVKNRRUHD2lbTKjgTVLD6aIcE5zopYgq1fgEHghnIYagw2 J3IylhTGryogd9lblFRuZQk8bqrdOaCfPmeZuV8ELdooWWf0BEIi+fKaxqpMRBiCoC3c V/HARtfJeNWPJFaJ8abxQgEDSdDJQTRFurXCPcGn4zeeboWatxtis0li3OrZ9KIP3Dq9 p/v6lw56Pgxq/tozalO8o4nfXIEBWGfcDhE+9KsQCoxF8f1TG6JQtxdkpKhI+XI8752J Ur8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=WLK3Z36j; dkim=neutral (no key) header.i=@linutronix.de; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id n6-20020a170903110600b00153b2d1652csi17511745plh.308.2022.05.02.16.37.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 16:37:32 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=WLK3Z36j; dkim=neutral (no key) header.i=@linutronix.de; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C3CA4286C0; Mon, 2 May 2022 16:37:26 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243332AbiEAIQF (ORCPT + 99 others); Sun, 1 May 2022 04:16:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229632AbiEAIQD (ORCPT ); Sun, 1 May 2022 04:16:03 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AA131402A; Sun, 1 May 2022 01:12:39 -0700 (PDT) Date: Sun, 01 May 2022 08:12:36 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1651392757; h=from:from:sender:sender:reply-to: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: in-reply-to:in-reply-to:references:references; bh=Btm8cdhggXjho6O0WPgq4RkAAi9zylcOI/eBifzYWp8=; b=WLK3Z36jq0QkP6HqWQgymJ+5w6nepgQbmdC4B5mau7rLZJjyyBC12c+ADWi3ALCCoEityh 9eQnaq4ASKphRUnPu5MTnOaWL3mwiFoSbvuB0Yj30ij3pHQax/vbsHjGE3fTpOW9qnjw6y DHnz55tZKuHP4MbKyxtLHeDpP8vv7D/tiqedJ3ZNm0YCYFdpcK+1c1JUqYBvtQcGrnURZ2 sB+gkxJ+LXaFFYdm+bN1iY4cpaP9V1DlZaolPuvBHBlSvcpTWBXetQ8xS0lh7VgA+6PjhC N0tFfedGbZvA3AtLNwZkqJn16qquyZzNzHkfyaiQSf2GmL7SFUdDrSFbb+3Fbw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1651392757; h=from:from:sender:sender:reply-to: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: in-reply-to:in-reply-to:references:references; bh=Btm8cdhggXjho6O0WPgq4RkAAi9zylcOI/eBifzYWp8=; b=eeGr6Yw/+j0xBR79JMNk1GCZz/kWWvkfLK/C4b0J2vxmG+Dq5rtg0ScHm4/RMH4N+s8RU5 LCvv3xTQOuFeBjBg== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/urgent] x86/pci/xen: Disable PCI/MSI[-X] masking for XEN_HVM guests Cc: Jeremi Piotrowski , Dusty Mabe , Salvatore Bonaccorso , Thomas Gleixner , Noah Meyerhans , stable@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <87tuaduxj5.ffs@tglx> References: <87tuaduxj5.ffs@tglx> MIME-Version: 1.0 Message-ID: <165139275608.4207.16060979873182920732.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 7e0815b3e09986d2fe651199363e135b9358132a Gitweb: https://git.kernel.org/tip/7e0815b3e09986d2fe651199363e135b9358132a Author: Thomas Gleixner AuthorDate: Thu, 28 Apr 2022 15:50:54 +02:00 Committer: Thomas Gleixner CommitterDate: Fri, 29 Apr 2022 14:37:39 +02:00 x86/pci/xen: Disable PCI/MSI[-X] masking for XEN_HVM guests When a XEN_HVM guest uses the XEN PIRQ/Eventchannel mechanism, then PCI/MSI[-X] masking is solely controlled by the hypervisor, but contrary to XEN_PV guests this does not disable PCI/MSI[-X] masking in the PCI/MSI layer. This can lead to a situation where the PCI/MSI layer masks an MSI[-X] interrupt and the hypervisor grants the write despite the fact that it already requested the interrupt. As a consequence interrupt delivery on the affected device is not happening ever. Set pci_msi_ignore_mask to prevent that like it's done for XEN_PV guests already. Fixes: 809f9267bbab ("xen: map MSIs into pirqs") Reported-by: Jeremi Piotrowski Reported-by: Dusty Mabe Reported-by: Salvatore Bonaccorso Signed-off-by: Thomas Gleixner Tested-by: Noah Meyerhans Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/87tuaduxj5.ffs@tglx --- arch/x86/pci/xen.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c index 9bb1e29..b94f727 100644 --- a/arch/x86/pci/xen.c +++ b/arch/x86/pci/xen.c @@ -467,7 +467,6 @@ static __init void xen_setup_pci_msi(void) else xen_msi_ops.setup_msi_irqs = xen_setup_msi_irqs; xen_msi_ops.teardown_msi_irqs = xen_pv_teardown_msi_irqs; - pci_msi_ignore_mask = 1; } else if (xen_hvm_domain()) { xen_msi_ops.setup_msi_irqs = xen_hvm_setup_msi_irqs; xen_msi_ops.teardown_msi_irqs = xen_teardown_msi_irqs; @@ -481,6 +480,11 @@ static __init void xen_setup_pci_msi(void) * in allocating the native domain and never use it. */ x86_init.irqs.create_pci_msi_domain = xen_create_pci_msi_domain; + /* + * With XEN PIRQ/Eventchannels in use PCI/MSI[-X] masking is solely + * controlled by the hypervisor. + */ + pci_msi_ignore_mask = 1; } #else /* CONFIG_PCI_MSI */