aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/genapic
Commit message (Collapse)AuthorAgeFilesLines
* x86/apic: remove DMI checks in bigsmp driver for obsolete systemsMatt Wilson2013-08-301-9/+0
| | | | | | | | | The DMI checks that force the use of the bigsmp APIC driver are for systems that are no longer supported by Xen (32-bit x86). Signed-off-by: Matt Wilson <msw@amazon.com> Acked-by: Keir Fraser <keir@xen.org> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
* x86/apic: remove Summit supportMatt Wilson2013-08-273-30/+0
| | | | | | | | IBM's Summit chipset was only used for 32-bit only Intel ccNUMA and IA-64 machines, neither of which are supported by Xen anymore. Signed-off-by: Matt Wilson <msw@amazon.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
* x86: use cpumask_any() in mask-to-APIC-ID conversionsJan Beulich2013-08-232-2/+2
| | | | | | | | This is to avoid picking CPU0 for almost any such operation, resulting in very uneven distribution of interrupt load. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* honor ACPI v4 FADT flagsJan Beulich2013-02-222-4/+14
| | | | | | | | | | | | | | - force use of physical APIC mode if indicated so (as we don't support xAPIC cluster mode, the respective flag is taken to force physical mode too) - don't use MSI if indicated so (implies no IOMMU) Both can be overridden on the command line, for the MSI case this at once adds a new command line option allowing to turn off PCI MSI (IOMMU and HPET are unaffected by this). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86/x2apic: properly implement cluster modeJan Beulich2012-11-081-15/+127
| | | | | | | | | | So far, cluster mode was just an alternative implementation of physical mode: Allowing only single CPU interrupt targets, and sending IPIs to each target CPU separately. Take advantage of what cluster mode really can do in that regard. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86: make cpu_2_logical_apicid private to x2apic codeJan Beulich2012-11-081-4/+5
| | | | | | | | ... as it in fact is only being used there. While moving it, also make it a per-CPU variable rather than a NR_CPUS-sized array. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* xen: Remove x86_32 build target.Keir Fraser2012-09-121-12/+0
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* eliminate first_cpu() etcJan Beulich2011-11-081-1/+1
| | | | | | | | This includes the conversion from for_each_cpu_mask() to for_each-cpu(). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
* eliminate cpus_xyz()Jan Beulich2011-11-081-1/+1
| | | | | | Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
* x86/apic: record local APIC state on bootAndrew Cooper2011-06-141-0/+2
| | | | | | | | | | Xen does not store the boot local APIC state which leads to problems when shutting down for a kexec jump. This patch records the boot state so we can return to the boot state when kexecing. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Keir Fraser <keir@xen.org> Acked-by: Jan Beulich <jbeulich@novell.com>
* x86: APIC cleanupJan Beulich2011-03-092-8/+4
| | | | | | | Remove unused and pointless bits from APIC handling code. Move some data items into .data.read_mostly. Adjust some types. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86: cleanup mpparse.cJan Beulich2011-03-091-1/+0
| | | | | | | | Remove unused and pointless bits from mpparse.c (and other files where they are related to it). Of what remains, move whatever possible into .init.*, and some data items into .data.read_mostly. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* ix86: re-do permanent disabling of x2apicKeir Fraser2011-02-101-0/+12
| | | | | | | | Move logic into check_x2apic_preenabled() (to make sure generic_apic_probe() doesn't see genapic already set). Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Keir Fraser <keir@xen.org>
* x86: restore x2apic pre-enabled check logicKeir Fraser2011-01-112-2/+23
| | | | | | | | | | | | | c/s 22475 removed the early checking without replacement, neglecting the fact that x2apic_enabled must be set early for APIC register accesses done during second stage ACPI table parsing (rooted at acpi_boot_init()) to work correctly. Without this, particularly determination of the boot CPU won't work, resulting in an attempt to bring up that CPU again as a secondary one (which fails). Restore the functionality, now calling it from generic_apic_probe(). Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86: a little bit of genapic cleanupKeir Fraser2010-12-242-33/+13
| | | | | | | Eliminate redundancy among the individual handler functions, and mark init-only functions as such. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Use bool_t for various boolean variablesKeir Fraser2010-12-241-1/+1
| | | | | | | | | | | ... decreasing cache footprint. As a prerequisite this requires making cmdline_parse() a little more flexible. Also remove a few variables altogether, and adjust sections annotations for several others. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Keir Fraser <keir@xen.org>
* x86: adjust x2apic section placementKeir Fraser2010-12-151-2/+2
| | | | Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86: x2apic: Large cleanupKeir Fraser2010-12-091-56/+42
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* x86/IRQ: pass CPU masks by reference rather than by value in more placesKeir Fraser2010-12-012-20/+20
| | | | | | Additionally simplify operations on them in a few cases. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Rename irq_cfg->domain to irq_cfg->cpu_maskKeir Fraser2010-08-302-3/+3
| | | | | From: Sheng Yang <sheng.yang@intel.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x2APIC: improve enabling logicKeir Fraser2010-07-051-0/+19
| | | | | | | | | | | | | | This patch masks PIC and IOAPIC RTE's before x2APIC enabling, unmask and restore them after x2APIC enabling. It also really enables interrupt remapping before x2APIC enabling instead of just checking interrupt remapping setting. This patch also handles all x2APIC configuration including BIOS settings and command line settings. Especially, it handles that BIOS hands over in x2APIC mode (when there is apic id > 255). It checks if x2APIC is already enabled by BIOS. If already enabled, it will disable interrupt remapping and queued invalidation first, then enable them again. Signed-off-by: Weidong Han <weidong.han@intel.com>
* x86: send_IPI_mask() ignores offline CPUs in given cpumask.Keir Fraser2010-06-291-24/+18
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: Do not include apic.h/io_apic.h from asm/smp.hKeir Fraser2010-06-114-0/+7
| | | | | | ...and fix up the ensuing fall-out of implicit dependencies Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* apic: clean up msr handlingKeir Fraser2010-06-111-4/+10
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* x86: fix dom0 S3 when x2apic is used.Keir Fraser2010-03-181-4/+4
| | | | | | | | | | | | 1) Some variables and functions in xen/arch/x86/genapic/x2apic.c should not be marked with __init* as they will be used during s3 resume; 2) In do_suspend_lowlevel -> restore_rest_processor_state -> mcheck_init, lapic is accessed, but x2apic hasn't been re-enabled yet (x2apic is re-enabled() in device_power_up -> lapic_resume). The patch moves mcheck_init to a later place. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* Miscellaneous data placement adjustmentsKeir Fraser2009-10-285-12/+13
| | | | | | | Make various data items const or __read_mostly where possible/reasonable. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Scattered code arrangement cleanups.Keir Fraser2009-10-071-1/+2
| | | | | | | | - remove redundant declarations - add/move prototypes to headers - move things where they belong to Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* Cleanup: Make local functions static and remove unused functions.Keir Fraser2009-09-301-2/+2
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* Add the support of x2apic logical cluster mode.Keir Fraser2009-09-071-10/+52
| | | | | | | | Add a xen boolean parameter 'x2apic'. Add a xen boolean parameter 'x2apic_phys'(by default, we use logical cluster mode). Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* vt-d: enhance the support of Interrupt Remapping EIM and x2APICKeir Fraser2009-09-071-2/+0
| | | | | | | | | | | | | | 1) Clear Interrupt Remapping(IR) unit's CFI (Compatibility Format Interrupt) to enhance security; 2) Move the iommu_setup() ahead and put it before we begin to use IOAPIC so we can make sure after we enable Interrupt Remapping, the later IOAPIC (and MSI) initialization would setup IOAPIC RTEs (and MSI) with remappable format; 3) Enable x2APIC only when all VT-d engines support IR with EIM (Extended Interrupt Mode). EIM enables external devices to deliver interrupts to logical processor with >8-bit APIC ID. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* x86: Implement per-cpu vector for xen hypervisorKeir Fraser2009-08-192-6/+18
| | | | | | | | | | | | | | | Since Xen and Linux has big differece in code base, it is very hard to port Linux's patch and apply it to Xen directly, so this patch only adopts core logic of Linux, and make it work for Xen. Key changes: 1. vector allocation algorithm 2. all IRQ chips' set_affinity logic 3. IRQ migration when cpu hot remove. 4. Break assumptions which depend on global vector policy. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
* Pass cpumasks by reference always.Keir Fraser2009-05-271-3/+4
| | | | | | | | | | | | | Rather than passing cpumasks by value in all cases (which is problematic for large NR_CPUS configurations), pass them 'by reference' (i.e. through a pointer to a const cpumask). On x86 this changes send_IPI_mask() to always only send IPIs to remote CPUs (meaning any caller needing to handle the current CPU as well has to do so on its own). Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x2apic: Clean up send_IPI_mask_x2apic() and add a memory barrier.Keir Fraser2008-09-251-9/+14
| | | | | | | | | | | | | The barrier is required to prevent the WRMSR from executing before the processor has written synchronising data to be received by remote CPUs. At the same time remove needless wmb() from on_selected_cpus(). We now assume send_IPI_mask() is a sufficient compiler and CPU memory barrier. Original patch by Kevin Tian <kevin.tian@intel.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: Support x2APIC mode.Keir Fraser2008-05-014-1/+83
| | | | Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* es7000: Remove the bulk of the ES7000 specific code from Xen.kfraser@localhost.localdomain2007-08-035-175/+7
| | | | | | | On the Unisys ES7000-One, Xen now uses the bigsmp APIC driver. This patch has been tested on the ES7000 and a commodity box. Signed-off-by: Raj Subrahmanian <raj.subrahmanian@unisys.com>
* Simplify Unisys ES7000 code in light of the fact we do not supportkfraser@localhost.localdomain2007-07-102-316/+22
| | | | | | legacy boxes with very non-standard APIC setup. From: Raj Subrahmanian <raj.subrahmanian@unisys.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* ES7000: Fix ES7000-specific APIC code.Keir Fraser2007-06-151-2/+2
| | | | Signed-off-by: Raj Subrahmanian <raj.subrahmanian@unisys.com>
* Whitespace clean-ups. shand@kneesaa.uk.xensource.com2006-08-163-4/+4
| | | | | Signed-off-by: Steven Hand <steven@xensource.com>
* [XEN] Clean up shutdown handling and ignore opt_noreboot if dom0kaf24@firebug.cl.cam.ac.uk2006-08-071-1/+0
| | | | | | | | | | shuts down cleanly. The option is intended only to retain information on the local console in case of a crash. Based on a patch from Muli Ben-Yehuda <muli@il.ibm.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* While other aspects of the system configuration may still bekaf24@firebug.cl.cam.ac.uk2006-04-251-6/+10
| | | | | | | | controlled by the outcome of the table scan, if apic= was given on the command line its effect should not be overridden here. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Clean up build system some more. No need to explicitlykaf24@firebug.cl.cam.ac.uk2006-04-051-4/+0
| | | | | | | | include Rules.mk/Post.mk all over the place. Signed-off-by: Keir Fraser <keir@xensource.com>
* Simplify the Xen genapic code. Many genapic hooks have beenkaf24@firebug.cl.cam.ac.uk2006-04-046-16/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | replaced with unconditional static 'sane' implementations. Functions relating to interrupt/IPI delivery have been grouped into two sets: physical delivery and logical-flat delivery. All subarchitectures use physical delivery except the basic default subarchitecture. The main behavioural changes are: 1. Summit no longer uses logical-clustered delivery mode 2. Physical mode no longer makes any pretence to set the LDR sanely. We never deliver interrupts in logical mode so this really should not matter. 3. Sanity checking of phys_cpu_present_map is enabled for all subarchitectures. Really we should have a sane set of APIC IDs in the system, as we rely on them for physical delivery mode. 4. We enable 'bigsmp' mode on any system with more than eight CPUs. The previous xAPIC check was unnecessary, since our bigsmp mode uses physical delivery, not logical-clustered. This all obviously needs testing on some big systems. Signed-off-by: Keir Fraser <keir@xensource.com>
* Clean up subarch 'mach-foo' header files. No need forkaf24@firebug.cl.cam.ac.uk2006-04-035-22/+20
| | | | | | | | subarch apicdef.h and ipi.h can be much simplified. Signed-off-by: Keir Fraser <keir@xensource.com>
* Remove send_IPI_all, send_IPI_allbutself and send_IPI_selfkaf24@firebug.cl.cam.ac.uk2006-04-031-18/+0
| | | | | | | | | | shortcutting IPI functions. They're either unused or used so frequently that we may as well simplify things and always use send_IPI_mask. Signed-off-by: Keir Fraser <keir@xensource.com>
* Fix a bug, and also fixes the build with some gcc4 versions.kaf24@firebug.cl.cam.ac.uk2006-03-211-1/+1
| | | | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Upgrade genapic code to 2.6.16-rc6 codebase. Remove entries fromkaf24@firebug.cl.cam.ac.uk2006-03-203-30/+60
| | | | | | | | | genapic structure that Xen does not require (mostly because we do not support Visual Workstation nor IBM/Sequent NUMA-Q). Signed-off-by: Keir Fraser <keir@xensource.com>
* Move arch/x86 to new build system.kaf24@firebug.cl.cam.ac.uk2006-03-191-0/+10
| | | | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Intel systems with more than 8 CPUs require that the APIC is configuredkaf24@firebug.cl.cam.ac.uk2005-11-232-2/+24
| | | | | | | | | | | | | | in clustered mode with the apic=bigsmp kernel parameter. This patch does the APIC mode selection automatically without needing to manually specify the kernel paremeter. (KAF note: I see the patch is also present in Linux 2.6.14.2) Signed-off-by: Nitin Kamble <nitin.a.kamble@intel.com> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org>
* Here is a patch to enable Xen to run on a Unisys ES7000 x86_64 system.kaf24@firebug.cl.cam.ac.uk2005-07-211-2/+14
| | | | | Signed-off-by: Aravindh Puthiyaparambil <aravindh.puthiyaparambil@unisys.com>
* bitkeeper revision 1.1653 (429f7931iJ8kgS9qBlBbtyY9irorQA)cl349@firebug.cl.cam.ac.uk2005-06-024-0/+4
| | | | | | | Many files: More include cleanups towards "include where it's used". Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>