VirtualBox

Changeset 80815 in vbox


Ignore:
Timestamp:
Sep 16, 2019 9:22:23 AM (5 years ago)
Author:
vboxsync
Message:

VMM: "guest hypervisor" -> "nested hypervisor".

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/HMVMXAll.cpp

    r80813 r80815  
    12321232
    12331233/**
    1234  * Notification callback for when the guest hypervisor's current VMCS is loaded or
     1234 * Notification callback for when the nested hypervisor's current VMCS is loaded or
    12351235 * changed outside VMX R0 code (e.g. in IEM).
    12361236 *
    1237  * This need -not- be called for modifications to the guest hypervisor's current
     1237 * This need -not- be called for modifications to the nested hypervisor's current
    12381238 * VMCS when the guest is in VMX non-root mode as VMCS shadowing is not applicable
    12391239 * there.
     
    12491249
    12501250    /*
    1251      * Make sure we need to copy the guest hypervisor's current VMCS into the shadow VMCS
     1251     * Make sure we need to copy the nested hypervisor's current VMCS into the shadow VMCS
    12521252     * on the next guest VM-entry.
    12531253     */
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r80810 r80815  
    937937 *
    938938 * @remarks When executing a nested-guest, this will not remove any of the specified
    939  *          controls if the guest hypervisor has set any one of them.
     939 *          controls if the nested hypervisor has set any one of them.
    940940 */
    941941static void hmR0VmxRemoveProcCtlsVmcs(PVMCPUCC pVCpu, PVMXTRANSIENT pVmxTransient, uint32_t uProcCtls)
     
    46614661             * For nested-guests, the "IA-32e mode guest" control we initialize with what is
    46624662             * required to get the nested-guest working with hardware-assisted VMX execution.
    4663              * It depends on the nested-guest's IA32_EFER.LMA bit. Remember, a guest hypervisor
     4663             * It depends on the nested-guest's IA32_EFER.LMA bit. Remember, a nested hypervisor
    46644664             * can skip intercepting changes to the EFER MSR. This is why it it needs to be done
    46654665             * here rather than while merging the guest VMCS controls.
     
    52575257        {
    52585258            /*
    5259              * If the guest hypervisor has loaded a current VMCS and is in VMX root mode,
    5260              * copy the guest hypervisor's current VMCS into the shadow VMCS and enable
     5259             * If the nested hypervisor has loaded a current VMCS and is in VMX root mode,
     5260             * copy the nested hypervisor's current VMCS into the shadow VMCS and enable
    52615261             * VMCS shadowing to skip intercepting some or all VMREAD/VMWRITE VM-exits.
    52625262             *
     
    52745274
    52755275                /*
    5276                  * For performance reasons, also check if the guest hypervisor's current VMCS
     5276                 * For performance reasons, also check if the nested hypervisor's current VMCS
    52775277                 * was newly loaded or modified before copying it to the shadow VMCS.
    52785278                 */
     
    54425442             * With nested-guests, we may have extended the guest/host mask here since we
    54435443             * merged in the outer guest's mask. Thus, the merged mask can include more bits
    5444              * (to read from the nested-guest CR0 read-shadow) than the guest hypervisor
     5444             * (to read from the nested-guest CR0 read-shadow) than the nested hypervisor
    54455445             * originally supplied. We must copy those bits from the nested-guest CR0 into
    54465446             * the nested-guest CR0 read-shadow.
     
    56105610         * merged in the outer guest's mask, see hmR0VmxMergeVmcsNested). This means, the
    56115611         * mask can include more bits (to read from the nested-guest CR4 read-shadow) than
    5612          * the guest hypervisor originally supplied. Thus, we should, in essence, copy
     5612         * the nested hypervisor originally supplied. Thus, we should, in essence, copy
    56135613         * those bits from the nested-guest CR4 into the nested-guest CR4 read-shadow.
    56145614         */
     
    98529852     *
    98539853     *   - We would need to perform VMREADs with interrupts disabled and is orders of
    9854      *     magnitude worse when we run as a guest hypervisor without VMCS shadowing
     9854     *     magnitude worse when we run as a nested hypervisor without VMCS shadowing
    98559855     *     supported by the host hypervisor.
    98569856     *
     
    99129912     *       MSR bitmap in this case.
    99139913     *
    9914      *       The guest hypervisor may also switch whether it uses MSR bitmaps for
     9914     *       The nested hypervisor may also switch whether it uses MSR bitmaps for
    99159915     *       each VM-entry, hence initializing it once per-VM while setting up the
    99169916     *       nested-guest VMCS is not sufficient.
     
    99409940 * this function is never called.
    99419941 *
    9942  * For nested-guests since the guest hypervisor provides these controls on every
     9942 * For nested-guests since the nested hypervisor provides these controls on every
    99439943 * nested-guest VM-entry and could potentially change them everytime we need to
    99449944 * merge them before every nested-guest VM-entry.
     
    99909990     * These controls contains state that depends on the nested-guest state (primarily
    99919991     * EFER MSR) and is thus not constant between VMLAUNCH/VMRESUME and the nested-guest
    9992      * VM-exit. Although the guest hypervisor cannot change it, we need to in order to
     9992     * VM-exit. Although the nested hypervisor cannot change it, we need to in order to
    99939993     * properly continue executing the nested-guest if the EFER MSR changes but does not
    99949994     * cause a nested-guest VM-exits.
     
    99969996     * VM-exit controls:
    99979997     * These controls specify the host state on return. We cannot use the controls from
    9998      * the guest hypervisor state as is as it would contain the guest state rather than
     9998     * the nested hypervisor state as is as it would contain the guest state rather than
    99999999     * the host state. Since the host state is subject to change (e.g. preemption, trips
    1000010000     * to ring-3, longjmp and rescheduling to a different host CPU) they are not constant
     
    1001110011     * VM-exit MSR-load areas:
    1001210012     * This must contain the real host MSRs with hardware-assisted VMX execution. Hence, we
    10013      * can entirely ignore what the guest hypervisor wants to load here.
     10013     * can entirely ignore what the nested hypervisor wants to load here.
    1001410014     */
    1001510015
     
    1007110071     * I/O Bitmap.
    1007210072     *
    10073      * We do not use the I/O bitmap that may be provided by the guest hypervisor as we always
     10073     * We do not use the I/O bitmap that may be provided by the nested hypervisor as we always
    1007410074     * intercept all I/O port accesses.
    1007510075     */
     
    1015010150        /*
    1015110151         * We must make sure CR8 reads/write must cause VM-exits when TPR shadowing is not
    10152          * used by the guest hypervisor. Preventing MMIO accesses to the physical APIC will
     10152         * used by the nested hypervisor. Preventing MMIO accesses to the physical APIC will
    1015310153         * be taken care of by EPT/shadow paging.
    1015410154         */
     
    1263312633        /*
    1263412634         * Instructions that cause VM-exits unconditionally or the condition is
    12635          * always is taken solely from the guest hypervisor (meaning if the VM-exit
     12635         * always is taken solely from the nested hypervisor (meaning if the VM-exit
    1263612636         * happens, it's guaranteed to be a nested-guest VM-exit).
    1263712637         *
     
    1264612646        case VMX_EXIT_VMRESUME:
    1264712647        case VMX_EXIT_VMXOFF:
    12648         case VMX_EXIT_ENCLS:              /* Condition specified solely by guest hypervisor. */
     12648        case VMX_EXIT_ENCLS:              /* Condition specified solely by nested hypervisor. */
    1264912649        case VMX_EXIT_VMFUNC:
    1265012650            return hmR0VmxExitInstrNested(pVCpu, pVmxTransient);
     
    1265212652        /*
    1265312653         * Instructions that cause VM-exits unconditionally or the condition is
    12654          * always is taken solely from the guest hypervisor (meaning if the VM-exit
     12654         * always is taken solely from the nested hypervisor (meaning if the VM-exit
    1265512655         * happens, it's guaranteed to be a nested-guest VM-exit).
    1265612656         *
     
    1267112671        case VMX_EXIT_VMPTRST:
    1267212672        case VMX_EXIT_VMXON:
    12673         case VMX_EXIT_GDTR_IDTR_ACCESS:   /* Condition specified solely by guest hypervisor. */
     12673        case VMX_EXIT_GDTR_IDTR_ACCESS:   /* Condition specified solely by nested hypervisor. */
    1267412674        case VMX_EXIT_LDTR_TR_ACCESS:
    1267512675        case VMX_EXIT_RDRAND:
  • trunk/src/VBox/VMM/VMMR3/EM.cpp

    r80812 r80815  
    16521652{
    16531653#ifdef VBOX_WITH_NESTED_HWVIRT_SVM
    1654     /* Handle the physical interrupt intercept (can be masked by the guest hypervisor). */
     1654    /* Handle the physical interrupt intercept (can be masked by the nested hypervisor). */
    16551655    if (CPUMIsGuestSvmCtrlInterceptSet(pVCpu, &pVCpu->cpum.GstCtx, SVM_CTRL_INTERCEPT_INTR))
    16561656    {
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