VirtualBox

Ignore:
Timestamp:
Apr 9, 2016 11:45:55 PM (9 years ago)
Author:
vboxsync
Message:

VMM,Devices,Main: Implemented soft/warm reset for shutdown status codes 05h, 09h and 0Ah.

This is a shot at adjusting our VM reset handling to handle the ancient way of
getting a 286 out of protected mode and back to real mode. Our exiting reset
code (XXXR3Reset, PDMDEVREG::pfnReset, and so on) is doing a cold reset of the
system and then some additional device & memory initialization that the firmware
is usually responsible for doing. When the guest triggers a reset via the
keyboard controller, system control port A, CPU triple fault, and possibly ACPI,
only the CPU is supposed to be reset. The BIOS would then decide whether memory
and devices needed resetting as well, or if the resetter justed wanted to get out
protected mode and resume executing some real mode code pointed to by 467h.

  • New states SOFT_RESETTING and SOFT_RESETTING_LS. The latter returns to RUNNING_LS, not SUSPENDED_LS like for hard reset.
  • Added a firmware interface so the VMM/PDM can ask it whether we're supposed to do a hard reset or a soft(/warm) one.
  • Implemented firmware interface for the PC BIOS (but not EFI). It indicates soft(/warm) reset when CMOS[0xf] is 5, 9 or 10.
  • Moved the CMOS[0xf] resetting from the RTC device to the PC BIOS since it's firmware thing, not RTC.
  • Added a flag parameter to PDMDevHlpVMReset for specifying the source of the reset operation. One class of sources (GIM) will always trigger hard resets, whereas the others will check with the firmware first.
  • Added PDMR3GetResetInfo for query the flags passed to PDMDevHlpVMReset and for asking the firmware whether it's a hard or soft reset. The latter, however, is only done if only CPU 0 is active. Systems with more than one CPU in a state other than EMSTATE_WAIT_SIPI status will always be hard reset.
  • Added internal VMR3ResetFF and VMR3ResetTripleFault APIs for handling the VM_FF_RESET and VINF_EM_TRIPLE_FAULT conditions.
  • Added PMDR3ResetSoft and had it call pfnSoftReset (which is now defined).

Warning! Major PDM_DEVHLPR3_VERSION change, minor PDM_DEVREG_VERSION change.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r59996 r60404  
    33033303    switch (enmVMState)
    33043304    {
     3305        case VMSTATE_RUNNING:
    33053306        case VMSTATE_RESETTING:
    3306         case VMSTATE_RUNNING:
     3307        case VMSTATE_SOFT_RESETTING:
    33073308        {
    33083309            LogFlowFunc(("Suspending the VM...\n"));
     
    65556556        case VMSTATE_RESETTING:
    65566557        case VMSTATE_RESETTING_LS:
     6558        case VMSTATE_SOFT_RESETTING:
     6559        case VMSTATE_SOFT_RESETTING_LS:
    65576560        case VMSTATE_DEBUGGING:
    65586561        case VMSTATE_DEBUGGING_LS:
     
    83468349
    83478350        case VMSTATE_RESETTING:
     8351        /** @todo shouldn't VMSTATE_RESETTING_LS be here?   */
    83488352        {
    83498353#ifdef VBOX_WITH_GUEST_PROPS
     
    83538357            break;
    83548358        }
     8359
     8360        case VMSTATE_SOFT_RESETTING:
     8361        case VMSTATE_SOFT_RESETTING_LS:
     8362            /* Shouldn't do anything here! */
     8363            break;
    83558364
    83568365        case VMSTATE_SUSPENDED:
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette