lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-d75f152fc389cdd73a6c17f1247fce9052fd579c@git.kernel.org>
Date:	Fri, 12 Jun 2015 02:50:05 -0700
From:	tip-bot for Feng Wu <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	mingo@...nel.org, tglx@...utronix.de, linux-kernel@...r.kernel.org,
	feng.wu@...el.com, David.Woodhouse@...el.com,
	jiang.liu@...ux.intel.com, joro@...tes.org, hpa@...or.com
Subject: [tip:x86/apic] iommu, x86: Avoid migrating VT-d posted interrupts

Commit-ID:  d75f152fc389cdd73a6c17f1247fce9052fd579c
Gitweb:     http://git.kernel.org/tip/d75f152fc389cdd73a6c17f1247fce9052fd579c
Author:     Feng Wu <feng.wu@...el.com>
AuthorDate: Tue, 9 Jun 2015 13:20:33 +0800
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Fri, 12 Jun 2015 11:33:52 +0200

iommu, x86: Avoid migrating VT-d posted interrupts

When the interrupt is configured in posted mode, the destination of
the interrupt is set in the Posted-Interrupts Descriptor and the
migration of these interrupts happens during vCPU scheduling.

We still update the cached irte, which will be used when changing back
to remapping mode, but we avoid writing the table entry as this would
overwrite the posted mode entry.

Signed-off-by: Feng Wu <feng.wu@...el.com>
Reviewed-by: Jiang Liu <jiang.liu@...ux.intel.com>
Reviewed-by: Thomas Gleixner <tglx@...utronix.de>
Acked-by: David Woodhouse <David.Woodhouse@...el.com>
Acked-by: Joerg Roedel <joro@...tes.org>
Cc: iommu@...ts.linux-foundation.org
Cc: dwmw2@...radead.org
Link: http://lkml.kernel.org/r/1433827237-3382-7-git-send-email-feng.wu@intel.com
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
 drivers/iommu/intel_irq_remapping.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c
index 68bce0a..3bcb459 100644
--- a/drivers/iommu/intel_irq_remapping.c
+++ b/drivers/iommu/intel_irq_remapping.c
@@ -1003,7 +1003,10 @@ intel_ir_set_affinity(struct irq_data *data, const struct cpumask *mask,
 	 */
 	irte->vector = cfg->vector;
 	irte->dest_id = IRTE_DEST(cfg->dest_apicid);
-	modify_irte(&ir_data->irq_2_iommu, irte);
+
+	/* Update the hardware only if the interrupt is in remapped mode. */
+	if (ir_data->irq_2_iommu.mode == IRQ_REMAPPING)
+		modify_irte(&ir_data->irq_2_iommu, irte);
 
 	/*
 	 * After this point, all the interrupts will start arriving
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ