Re: [PATCH] Use BIOS reboot on Toshiba Portege 4000



On Tue, Nov 04, 2008 at 03:22:30AM -0800, Eric W. Biederman wrote:
Avi Kivity <avi@xxxxxxxxxx> writes:

Eric W. Biederman wrote:
I think we are confusing two issues here.

- Ordinary machine_restart which happens to call emergency_restart.
And is proceeded by machine_shutdown.

- And emergency_restart itself.

To some extent I would be a lot happier if Alt-sysrq-r did what
was necessary to get into a context where it can call machine_restart
or even better kernel_restart().
emergency_restart() is a nice idea but is broken by design.



Isn't emergency_restart() equivalent to kexec()? Both start from indeterminite
conditions.

Good point. That is a reasonable direction to evolve it on x86.
Similar to and sharing some of the same code as the kexec on panic path.

We may need to separate out emergency_restart from the normal clean
restart to make that happen. It would be pointless and silly to be
sending NMI at other cpus for example if we have cleanly shut them
down already.

When pulling the NMI stuff to the reboot code, I've just hit this issue:
currently, machine_ops.emergency_restart has two possible semantics:

- The function that should be called to immediately reboot the machine,
after the cleanup done by machine_restart()
- The function that should be called to reboot the machine when we are
on a possibly inconsistent state (and will do the vmx-disabling
stuff)

Currently we don't do anything special on emergency_restart() case,
so both cases are equivalent. But now we will need to differentiate
both cases.


...all this work because VMX breaks the good old reset lines. :\

--
Eduardo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [2.6.25-rc5-mm1] BUG: spinlock bad magic early during boot
    ... Can we use kexec for this? ... the "kexec reboot around busted hw"-trick ... So your broken machine reboots with some fix, ... Is the first fix _and_ the custom DSDT ...
    (Linux-Kernel)
  • Re: Booting error
    ... Reboot code used to be different to Start code as the BIOS skipped things it ... Backup the secondary hard drive before doing this. ... Either the motherboard or hard disk (or ...
    (microsoft.public.windowsxp.newusers)
  • [announce] kexec 2.6.7-v2 and kexec-tools-1.95
    ... The kexec patch has been updated a bit (but this is still diffed ... to reboot or using sysvinit reboot (with patch ... GameCube patch (Albert Herranz) ...
    (Linux-Kernel)
  • Re: ALSA, snd_intel8x0m and kexec() dont work together (2.6.13-rc3-git4 and 2.6.13-rc3-git3)
    ... > Is kexec supposed to be transparent to all the subsystems, or does ALSA ... current kernel, ... It is like a reboot but it ...
    (Linux-Kernel)
  • Re: kexec documentation
    ... | see manual of reboot for more explanation. ... Why is it that the kexec mechanism does not work on the basis of when ... the new kernel image to switch to is loaded, it be marked to be used ... in lieu of entering the firmware to reset and start a boot loader. ...
    (comp.os.linux.development.system)