aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/shutdown.c
Commit message (Collapse)AuthorAgeFilesLines
* x86: machine_restart() must not call acpi_dmar_reinstate() twiceJan Beulich2013-09-131-2/+3
| | | | | | | | | | | | | | .. as that function is not idempotent (it always alters the table checksum). The (generally) duplicate call was a result from it being made before machine_restart() re-invoking itself on the boot CPU. Considering that no problem arose so far from the table corruption I doubt that we need to restore the correct table signature on the reboot path in general. The only case I can see this as potentially necessary is the tboot one, hence do the call just in that case. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86: remove references to unimplemented BIOS reboot optionMatt Wilson2013-08-301-25/+17
| | | | | | | | | The BIOS reboot option was never implemented for x86_64, and retaining it is somewhat false advertising. Signed-off-by: Matt Wilson <msw@amazon.com> Acked-by: Keir Fraser <keir@xen.org> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
* watchdog: Move watchdog from being x86 specific to common codeAndrew Cooper2013-08-131-1/+1
| | | | | | | | | | | | | | | Augment watchdog_setup() to be able to possibly return an error, and introduce watchdog_enabled() as a better alternative to knowing the architectures internal details. This patch does not change the x86 implementaion, beyond making it compile. For header files, some includes of xen/nmi.h were only for the watchdog functions, so are replaced rather than adding an extra include of xen/watchdog.h Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* x86: Restore reboot quirks by DMI, fix reboot on a number of systemsBen Guthro2013-07-041-0/+365
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following patch ports the functionality following changeset from Linux (from 2008) to xen: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=14d7ca5c It implements an additional reboot quirk to do a PCI reset via port CF9. This also restores some code dropped in the x86_32 target removal (changeset 5d1181a5ea5e0f11d481a94b16ed00d883f9726e) which sets some quirks based on DMI matching. This will add reboot quirks on the following systems that are known to be necessary on Linux: Dell E520 Dell PowerEdge 1300 Dell PowerEdge 300 Dell OptiPlex 745 Dell OptiPlex 745 Dell OptiPlex 745 Dell OptiPlex 330 Dell OptiPlex 360 Dell OptiPlex 760 Dell PowerEdge 2400 Dell Precision T5400 Dell Precision T7400 HP Compaq Laptop Dell XPS710 Dell DXP061 Sony VGN-Z540N ASUS P4S800 Acer Aspire One A110 Apple MacBook5 Apple MacBookPro5 Apple Macmini3,1 Apple iMac9,1 Dell Latitude E6320 Dell Latitude E5420 Dell Latitude E6220 Dell Latitude E6420 Dell OptiPlex 990 Dell OptiPlex 990 Dell Latitude E6520 Dell OptiPlex 790 Dell OptiPlex 990 Dell OptiPlex 390 Dell Latitude E6320 Dell Latitude E6420 Dell Latitude E6520 I clearly have not been able to test on all of these systems. It does fix rebooting on the Dell 790, and should *not* change the reboot paths of systems not on this DMI match list. Signed-off-by: Ben Guthro <benjamin.guthro@citrix.com> Use driver_data, thus requiring only a single handler function. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org Acked-by: Ben Guthro <benjamin.guthro@citrix.com>
* Fix emacs local variable block to use correct C style variable.David Vrabel2013-02-211-1/+1
| | | | | | | The emacs variable to set the C style from a local variable block is c-file-style, not c-set-style. Signed-off-by: David Vrabel <david.vrabel@citrix.com
* x86: move watchdog declarations from config.h to nmi.hJan Beulich2013-02-151-0/+1
| | | | | | | They don't belong into the former. 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-197/+1
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* x86-64/EFI: don't call EfiResetSystem() from machine_halt()Jan Beulich2011-07-191-1/+0
| | | | | | | | | c/s 23615:d19e77844267 was a little too eager in adding calls to EFI runtime services: machine_halt() doesn't really want to power off the machine, but that's what EfiResetSystem(EfiResetShutdown, ...) (called through efi_halt_system()) does. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86-64: EFI runtime codeJan Beulich2011-06-281-0/+4
| | | | | | | | | | | | | | | | | | | This allows Dom0 access to all suitable EFI runtime services. The actual calls into EFI are done in "physical" mode, as entering virtual mode has been determined to be incompatible with kexec (EFI's SetVirtualAddressMap() can be called only once, and hence the secondary kernel can't establish its mappings). ("Physical" mode here being quoted because this is a mode with paging enabled [otherwise 64-bit mode wouldn't work] but all mappings being 1:1.) Open issue (not preventing this from being committed imo): Page (and perhaps other) faults occuring while calling runtime functions in the context of a hypercall don't get handled correctly (they don't even seem to reach do_page_fault()). I'm intending to investigate this further. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* vtd: Reinstate ACPI DMAR on system shutdown or S3/S4/S5.Keir Fraser2010-12-171-0/+2
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* x86: acpi: Fix reboot attempt sequence.Keir Fraser2010-12-101-1/+1
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* x86 acpi: Follow Windows behaviour more closely during reset.Keir Fraser2010-12-101-5/+16
| | | | | | | | | | | This follows some changes proposed for upstream Linux: 1. Do not check the FADT reset register size/offset 2. Try ACPI poking twice during our reset attempt sequence Hopefully this will help us reset reliably on a wider range of platforms. Signed-off-by: Keir Fraser <keir@xen.org>
* x86: restore handling of "reboot=no"Keir Fraser2010-09-151-1/+4
| | | | | | | Somewhere between 3.2 and 3.3 this got dropped (as I noticed on a [rarely used] box that didn't crash on me since then). Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86: Do not include apic.h/io_apic.h from asm/smp.hKeir Fraser2010-06-111-0/+1
| | | | | | ...and fix up the ensuing fall-out of implicit dependencies Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: Force !in_irq() in machine_restart().Keir Fraser2010-06-071-0/+7
| | | | | | | Various function we may call assert this fact. We just want to restart the system. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Remove unused 'retry' parameter from on_selected_cpus() etc.Keir Fraser2009-05-271-2/+2
| | | | | | | Remove the unused "retry" parameter of on_selected_cpus(), on_each_cpu(), smp_call_function(), and smp_call_function_single(). Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Pass cpumasks by reference always.Keir Fraser2009-05-271-1/+1
| | | | | | | | | | | | | 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>
* x86: Relax spinlock checks during shutdown or S3.Keir Fraser2009-03-011-0/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: Actually mdelay() in machine_restart().Keir Fraser2008-08-051-0/+2
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Delay 5 seconds on reboot *after* stopping all CPUs.Keir Fraser2008-08-041-3/+8
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: machine_halt() forcibly re-enables IRQs as it may be called fromKeir Fraser2008-06-121-0/+1
| | | | | panic() which itself may be called in an IRQ-safe critical section. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86/64: Fix build.Keir Fraser2008-06-101-2/+0
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: Default ACPI reboot method.Keir Fraser2008-06-101-89/+104
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: Support x2APIC mode.Keir Fraser2008-05-011-1/+1
| | | | Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* Intel(R) Trusted Execution Technology (Intel(R) TXT) support for Xen.Keir Fraser2007-10-301-0/+14
| | | | Signed-off-by: Joseph Cihula <joseph.cihula@intel.com>
* x86: Use halt() macro instead of direct HLT asm.kfraser@localhost.localdomain2007-09-111-3/+4
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* x86: Cleanup system restart code, and wait 10ms for APs to offline.kfraser@localhost.localdomain2007-09-101-7/+1
| | | | | Signed-off-by: Joseph Cihula <joseph.cihula@intel.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* Change prototype of machine_restart to void machine_restart(void).kfraser@localhost.localdomain2007-09-101-1/+1
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* x86: Various cleanups around CR4 handling, cpu_possible_map, and VMX ↵kfraser@localhost.localdomain2007-07-121-1/+1
| | | | | | initialisation. Signed-off-by: Keir Fraser <keir@xensource.com>
* Fix xen build on NetBSD.kfraser@localhost.localdomain2007-05-301-1/+1
| | | | | From: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Clean up shutdown handling and ignore opt_noreboot if dom0kaf24@firebug.cl.cam.ac.uk2006-08-071-13/+4
| | | | | | | | | | 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>
* Clean up compiler.h to define a few more things and updatekaf24@firebug.cl.cam.ac.uk2006-05-011-1/+1
| | | | | | | for gcc4. Signed-off-by: Keir Fraser <keir@xensource.com>
* A few functions should be static in shutdown.c.kaf24@firebug.cl.cam.ac.uk2006-05-011-2/+2
| | | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Occasionally large smp machines fail to reboot properly and die underkaf24@firebug.cl.cam.ac.uk2006-04-271-1/+3
| | | | | | | | | | an IPI storm of smp_call_function() to machine_reboot. Only the boot processor needs to run machine_restart, so send an IPI to CPU0. Original patch by: Ryan Harper <ryanh@us.ibm.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* Use machine_halt() where it makes sense, to halt all processorskaf24@firebug.cl.cam.ac.uk2006-04-061-1/+1
| | | | | | | | rather than just the current one. Signed-off-by: Keir Fraser <keir@xensource.com>
* We had reports of reboot not working on certain machines (specificallykaf24@firebug.cl.cam.ac.uk2006-04-041-0/+342
Compaq/HP notebooks), where Linux already has code to deal with that. Apparently that code was either deleted during the original port or got added to Linux after the original port was done. Anyway, this patch adds the respective Linux code (slightly adjusted) to deal with the same systems in Xen. From: Jan Beulich Signed-off-by: Keir Fraser <keir@xensource.com>