VirtualBox

Changeset 102977 in vbox for trunk/src/VBox/VMM/VMMR3/EM.cpp


Ignore:
Timestamp:
Jan 19, 2024 11:11:30 PM (12 months ago)
Author:
vboxsync
Message:

VMM/IEM: Implemented generic fallback for misaligned x86 locking that is not compatible with the host. Using the existing split-lock solution with VINF_EM_EMULATE_SPLIT_LOCK from bugref:10052. We keep ignoring the 'lock' prefix in the recompiler for single CPU VMs (now also on amd64 hosts). bugref:10547

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/EM.cpp

    r102949 r102977  
    706706#endif /* LOG_ENABLED || VBOX_STRICT */
    707707
    708 
    709708#if !defined(VBOX_VMM_TARGET_ARMV8)
     709
    710710/**
    711711 * Handle pending ring-3 I/O port write.
     
    851851    return VMMR3EmtRendezvous(pVM, VMMEMTRENDEZVOUS_FLAGS_TYPE_ALL_AT_ONCE, emR3ExecuteSplitLockInstructionRendezvous, pVCpu);
    852852}
     853
    853854#endif /* VBOX_VMM_TARGET_ARMV8 */
    854 
    855855
    856856/**
     
    893893                        rc = VINF_EM_DBG_STEPPED;
    894894                }
     895#ifndef VBOX_VMM_TARGET_ARMV8
     896                if (rc != VINF_EM_EMULATE_SPLIT_LOCK)
     897                { /* likely */ }
     898                else
     899                {
     900                    rc = emR3ExecuteSplitLockInstruction(pVM, pVCpu);
     901                    if (rc == VINF_SUCCESS || rc == VINF_EM_RESCHEDULE)
     902                        rc = VINF_EM_DBG_STEPPED;
     903                }
     904#endif
    895905                break;
    896906
     
    11161126        if (rcStrict != VINF_SUCCESS)
    11171127        {
     1128#ifndef VBOX_VMM_TARGET_ARMV8
     1129            if (rcStrict == VINF_EM_EMULATE_SPLIT_LOCK)
     1130                rcStrict = emR3ExecuteSplitLockInstruction(pVM, pVCpu);
     1131#endif
     1132            if (rcStrict != VINF_SUCCESS)
     1133            {
    11181134#if 0
    1119             if (RT_LIKELY(rcStrict >= VINF_EM_FIRST && rcStrict <= VINF_EM_LAST))
     1135                if (RT_LIKELY(rcStrict >= VINF_EM_FIRST && rcStrict <= VINF_EM_LAST))
     1136                    break;
     1137                /* Fatal error: */
     1138#endif
    11201139                break;
    1121             /* Fatal error: */
    1122 #endif
    1123             break;
     1140            }
    11241141        }
    11251142
     
    25562573                    else if (rc == VINF_SUCCESS)
    25572574                        rc = VINF_EM_RESCHEDULE; /* Need to check whether we can run in HM or NEM again. */
     2575#ifndef VBOX_VMM_TARGET_ARMV8
     2576                    if (rc != VINF_EM_EMULATE_SPLIT_LOCK)
     2577                    { /* likely */ }
     2578                    else
     2579                        rc = VBOXSTRICTRC_TODO(emR3ExecuteSplitLockInstruction(pVM, pVCpu));
     2580#endif
    25582581                    fFFDone = false;
    25592582                    break;
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