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-next>] [day] [month] [year] [list]
Message-id: <5357D07C.5080407@scalemp.com>
Date:	Wed, 23 Apr 2014 17:38:52 +0300
From:	Oren Twaig <oren@...lemp.com>
To:	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
	Andi Kleen <ak@...ux.intel.com>
Cc:	linux-kernel@...r.kernel.org,
	"Shai Fultheim (Shai@...leMP.com)" <Shai@...lemp.com>
Subject: [PATCH] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore

Set all inclusive vector allocation domain only if interrupt routing is 
set to ignore. When in comply mode, vector allocation behavior isn't 
changed.

Signed-off-by: Oren Twaig <oren@...lemp.com>
Acked-by: Shai Fultheim <shai@...lemp.com>
---
diff --git a/arch/x86/kernel/vsmp_64.c b/arch/x86/kernel/vsmp_64.c
index f6584a9..60a195d 100644
--- a/arch/x86/kernel/vsmp_64.c
+++ b/arch/x86/kernel/vsmp_64.c
@@ -27,6 +27,9 @@
  #define TOPOLOGY_REGISTER_OFFSET 0x10

  #if defined CONFIG_PCI && defined CONFIG_PARAVIRT
+
+static int irc = 1;
+
  /*
   * Interrupt control on vSMPowered systems:
   * ~AC is a shadow of IF.  If IF is 'on' AC should be 'off'
@@ -101,6 +104,10 @@ static void __init set_vsmp_pv_ops(void)
  #ifdef CONFIG_SMP
      if (cap & ctl & BIT(8)) {
          ctl &= ~BIT(8);
+
+        /* Interrupt routing set to ignore */
+        irc = 0;
+
  #ifdef CONFIG_PROC_FS
          /* Don't let users change irq affinity via procfs */
          no_irq_affinity = 1;
@@ -218,7 +225,9 @@ static void vsmp_apic_post_init(void)
  {
      /* need to update phys_pkg_id */
      apic->phys_pkg_id = apicid_phys_pkg_id;
-    apic->vector_allocation_domain = fill_vector_allocation_domain;
+
+    if (!irc)
+        apic->vector_allocation_domain = fill_vector_allocation_domain;
  }

  void __init vsmp_init(void)


---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

--
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