VirtualBox

Changeset 23702 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 12, 2009 3:28:56 PM (15 years ago)
Author:
vboxsync
Message:

Query VT capabilities from the support driver.

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/HostImpl.cpp

    r23537 r23702  
    167167#endif
    168168    /* Features that can be queried with GetProcessorFeature */
    169     BOOL                    fVTxAMDVSupported,
     169    BOOL                    fVTSupported,
    170170                            fLongModeSupported,
    171                             fPAESupported;
     171                            fPAESupported,
     172                            fNestedPagingSupported;
    172173
    173174    /* 3D hardware acceleration supported? */
     
    247248
    248249    /* Cache the features reported by GetProcessorFeature. */
    249     m->fVTxAMDVSupported = false;
     250    m->fVTSupported = false;
    250251    m->fLongModeSupported = false;
    251252    m->fPAESupported = false;
     253    m->fNestedPagingSupported = false;
    252254
    253255    if (ASMHasCpuId())
     
    278280                int rc = SUPR3QueryVTxSupported();
    279281                if (RT_SUCCESS(rc))
    280                     m->fVTxAMDVSupported = true;
     282                    m->fVTSupported = true;
    281283            }
    282284        }
     
    291293                && (u32FeaturesEDX & X86_CPUID_FEATURE_EDX_FXSR)
    292294               )
    293                 m->fVTxAMDVSupported = true;
    294         }
    295     }
     295                m->fVTSupported = true;
     296        }
     297    }
     298
     299#if 0 /* needs testing */
     300    if (m->fVTSupported)
     301    {
     302        uint32_t u32Caps = 0;
     303
     304        int rc = SUPR3QueryVTCaps(&u32Caps);
     305        if (VBOX_SUCCESS(rc))
     306        {
     307            if (u32Caps & SUPVTCAPS_NESTED_PAGING)
     308                m->fNestedPagingSupported = true;
     309        }
     310        /* else @todo; report BIOS trouble in some way. */
     311    }
     312#endif
    296313
    297314    /* Test for 3D hardware acceleration support */
     
    10251042    {
    10261043        case ProcessorFeature_HWVirtEx:
    1027             *aSupported = m->fVTxAMDVSupported;
     1044            *aSupported = m->fVTSupported;
    10281045            break;
    10291046
     
    10341051        case ProcessorFeature_LongMode:
    10351052            *aSupported = m->fLongModeSupported;
     1053            break;
     1054
     1055        case ProcessorFeature_NestedPaging:
     1056            *aSupported = m->fNestedPagingSupported;
    10361057            break;
    10371058
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r23643 r23702  
    972972  <enum
    973973    name="ProcessorFeature"
    974     uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
     974    uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
    975975  >
    976976    <desc>
     
    981981    <const name="PAE"             value="1"/>
    982982    <const name="LongMode"        value="2"/>
     983    <const name="NestedPaging"    value="3"/>
    983984  </enum>
    984985
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