Page 1 of 3 1 2 3 LastLast
Results 1 to 20 of 47

Thread: Enable VT on the Mac Mini.

  1. #1

    Default Enable VT on the Mac Mini.

    We've been using VT (for our own experiments) on the Mac Mini for a while. It is simple to enable, and involves modifying the EFI Setup variable. Potentially this modification can be made via the kernel API used by the nvram utility under Mac OS X, but we use an EFI utility.

    The solution is to change byte 0xe7 of the Setup variable from 0 to 1. This causes the firmware to configure the ia32_feature_control MSR with value 5. After you change the variable, you must reboot via a hard reset (since the MSR is a write-once register). I had to unplug my machine from the power supply to clear the prior contents of my MSR.

    Here is our EFI utility. We build it under the GNU environment, and I load it using the rEFIt boot loader on a USB stick. From our experience, it doesn't interfere with the BootCamp firmware update. We observed that Parallels Workstation successfully detects VT on the Mini.

    **** Use at your own risk! *****

    #include <efi.h>
    #include <efilib.h>

    EFI_BOOT_SERVICES *BS;
    EFI_RUNTIME_SERVICES *RS;
    EFI_HANDLE IMAGE;

    EFI_GUID guid_apple = // 4DFBBAAB-1392-4FDE-ABB8-C41CC5AD7D5D
    {0x4DFBBAAB, 0x1392, 0x4FDE, {0xAB, 0xB8, 0xC4, 0x1C, 0xC5, 0xAD, 0x7D, 0x5D}};

    EFI_STATUS
    efi_main( EFI_HANDLE image, EFI_SYSTEM_TABLE *system_table )
    {
    EFI_STATUS status;
    UINT32 attr = 0;
    unsigned char data[0xfe];
    UINTN data_size = sizeof(data);

    BS = system_table->BootServices;
    RS = system_table->RuntimeServices;
    IMAGE = image;

    InitializeLib( image, system_table ); // Initialize the EFI library.

    status = RS->GetVariable( L"Setup", &guid_apple, &attr, &data_size, data );
    if( status == EFI_SUCCESS ) {
    data[0xe7] = 1;
    status = RS->SetVariable( L"Setup", &guid_apple, attr, data_size, data )
    ;
    if( status != EFI_SUCCESS )
    Print( L"failure changing variable\n" );
    }

    BS->Exit( image, status, 0, NULL );
    return status;
    }


    -Joshua

    P.S. The Mac Mini is awesome. And EFI is so nice.



  2. #2
    Kilo Poster
    Join Date
    Apr 2006
    Posts
    19

    Default

    Awesome post!

    Thanks!



  3. #3

    Default

    what you said was mostly gibberish to me (sounded good tho!!)

    Im sure the guys here
    http://forum.parallels.com/thread85.html

    would love to hear about it.
    The thread has had neary 7000 hits!!

    Matt :-)



  4. #4
    Kilo Poster
    Join Date
    Apr 2006
    Posts
    12

    Default

    Has anyone tried this. Also, can you pass on a binary version. I program on a PC but I am a MacOS newbie so I am not quite up on compiling etc.



  5. #5

    Default binaries

    Note that you should be able to build the EFI utilities under Windows and VC++ with Intel's EFI kit; you don't need to use the GNU environment.

    I've attached two binaries:

    vmx-var-set.efi - enables VT support.
    vmx-var-reset.efi - restores the firmware to its original condition

    I copy the binaries to my flash stick that has the rEFIt boot loader. I boot with the rEFIt boot loader, and execute vmx-var-set by dropping to the command line (which behaves like DOS). So just type 'vmx-var-set' at the command line to execute it. Alternatively, you may be able to execute it from rEFIt's boot menu.

    Use at your own risk!!

    http://i30www.ira.uka.de/~joshua/vmx.zip

    -Joshua
    Attached Files Attached Files
    Last edited by Andrew @ Parallels; Apr 27, 2006 at 11:10 AM.



  6. #6
    Kilo Poster
    Join Date
    Apr 2006
    Location
    Madison, WI
    Posts
    67

    Default

    This still doesn't explain why some minis seem to spontaneously enable (or disable) VT...
    Dave Schroeder
    University of Wisconsin - Madison
    das@doit.wisc.edu
    http://das.doit.wisc.edu



  7. #7
    Kilo Poster
    Join Date
    Apr 2006
    Location
    Austin, TX
    Posts
    17

    Default

    It would be nice to have a detailed tutorial on how to run this binary, including information on how to setup the rEFIt boot loader. Also, would like to see indepedent confirmation that this works. And hopefully the setting does stick. I have a Mac Mini (duo) and VT is not enabled on my machine at the moment. .

    ..Al



  8. #8

    Default

    Why cant I download your binaries? I have a registered forum account...



  9. #9

    Default

    Hi there, mac newbie here. I'd like to confirm the above binaries worked on my 2 day old, freshly recieved compusa shipment Mac Mini. VT-x worked for a while, then stopped working. I did the above steps and it worked. Let me see if I can lay it out a little more concisely:

    0. Don't know if it's related, but i set it so that my mac mini does not go to sleep, ever.
    1. Download the rEFIt dmg file at: http://prdownloads.sourceforge.net/r...5.dmg?download
    2. Open the DMG file and read the instructions inside the file. i followed the section for "installing on a disk volume" and installed it on "macintosh HD"
    3. Extract the binary above (efi.zip) into the "macintosh HD"
    4. Reboot
    5. On the new refit boot menu, select the console and type in vmx-var-set.efi
    6. Type in exit, that should bring you back to the boot menu
    7. Boot into OSX, and parallels should support VT-x

    The setting has survived two reboots now. I'm wondering if I can now uninstall refit ... if anyone knows if that would a) be ok and b) how i would go about doing that, it would be great!!

    Thanks, everyone, for the input on this aggravating issue! --Bill



  10. #10

    Default

    why cant i download that file



  11. #11
    Kilo Poster
    Join Date
    Apr 2006
    Posts
    14

    Default

    Does this not work?

    Uninstalling rEFIt
    To get rid of rEFIt, open the “Startup Disk” preference pane and select “Mac OS X” as the operating system to boot. This will re-bless your Mac OS X volume and instruct the firmware to boot from it. After this, you can remove the “efi” folder.



  12. #12
    Kilo Poster
    Join Date
    Apr 2006
    Posts
    14

    Default

    OK, I can confirm failure with Mac Mini Intel Core Solo. Bummer...

    It doesn't work.



  13. #13
    Kilo Poster
    Join Date
    Apr 2006
    Posts
    14

    Default

    OK, this is WEIRD. After giving up, then setting OS X as the default startup and then restarting. IT WORKS!!!!! Scratch the previous post. Apparently with some voodoo, the Intel Mac Mini solo core DOES support VT and XP is very quick.



  14. #14

    Default

    Don't forget that you need a hard CPU reset after running the utility. Thus you must power off the machine, let it sit there without power for a few seconds, and then turn it back on. Otherwise the CPU retains its old configuration with VT disabled.



  15. #15

    Default

    I don't know. I can't download it either. I'm logged in:

    Welcome, rthelen.
    You last visited: Today at 05:44 PM
    When I click on the vmx.zip link I get the message:

    You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:

    You are not logged in. Fill in the form at the bottom of this page and try again.

    You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?

    If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
    Is there something else I have to do to access this file?



  16. #16
    Kilo Poster
    Join Date
    Apr 2006
    Posts
    14

    Default

    If you had email enabled I could email it to you.



  17. #17

    Default

    Thanks, Stompbox. :)

    I tried the 'reload' button on my browser and the file downloaded. I hadn't tried it earlier because I figured that a PHP based web page wouldn't cache. But, apparently the 'sorry' web page was cached (in my browser).



  18. #18
    Kilo Poster
    Join Date
    Apr 2006
    Posts
    14

    Default

    Quote Originally Posted by rthelen
    Thanks, Stompbox. :)

    I tried the 'reload' button on my browser and the file downloaded. I hadn't tried it earlier because I figured that a PHP based web page wouldn't cache. But, apparently the 'sorry' web page was cached (in my browser).
    Cool!

    I did omit the hard restart of the mini. I missed it when I read about this. Instead, I chose OS X as the startup OS and it started working (and has worked since then).

    Perhaps others can do what I did and it might work for them.

    BTW: If you put "vmx-var-set.efi " right on the root of "Macintosh HD" then it can be chosen as a startup option when holding down the option key at boot. I tried that as well as the command line. After that I chose OS X as the startup OS in startup disk and it started working for me.
    Last edited by stompbox; Apr 17, 2006 at 02:37 AM.



  19. #19

    Default

    tried the vmx-var-set.efi util method above off of a usb stick with REFIt.

    My parallels beta 3 reports software mode 0 sometimes and other times software mode 2. I don't know what either means and can not tell if vt is enabled or not. Also I tried vtxcheck but that fails with:

    kextload: extension /Users/billm/Desktop/vtx-check/MacOS/vtxcheck.kext is not authentic (check ownership and permissions)



  20. #20

    Default this worked for me

    Just thought I'd chime in and say that I was able to re-enable the VTX support using this method on my core duo mac mini. Here are the steps I took:

    1. downloaded rEFIt (from previously mentioned url)
    2. used Disk Utility to convert the rEFIt disk image to a read/write disk image
    3. unzipped the vmx.zip file and copied the vmx folder to the new read/write rEFIt disk image
    4. burned my modified rEFIt disk image to a cd-rw
    5. restarted the computer and held down alt/option until the EFI menu came up
    6. selected the rEFIt item
    7. selected the "shell" item from the rEFIt menu
    8. typed "fs0:" to get to the cd-rw drive (if this isn't your cd, try "fs1:" or "fs2:" etc..)
    9. typed "cd vmx" to get into the vmx directory
    10. typed "vmx-var-set.efi", which ran and gave me back the prompt. Apparently it only outputs any messages if there is a problem...
    11. typed "exit"
    12. turned off the computer and unplugged it for a few seconds
    13. plugged it back in and booted up, then started parallels and booted my win2k pro vm .. after it booted, the parallels' "about" dialog showed that vtx was enabled and running

    Thanks Joshua!



Page 1 of 3 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •