helios747 Posted March 14, 2017 Share Posted March 14, 2017 EDIT: SEE LAST POST Hello, I've been trying to get OS X functional with UEFI in KVM with the end game of having PCI-E passthrough functional with my Maxwell GPU. I've started this setup in a few tiers which I'll outline just in case something in my setup was wrong. To start with, my problem is as follows: When booting from Clover to macOS, the boot hangs before any Apple logo is shown and I get the following error: !!!! X64 Exception Type - 06(#UD - Invalid Opcode) CPU Apic ID - 00000000 !!!! RIP - 0000000000003CF3, CS - 0000000000000038, RFLAGS - 0000000000010246 RAX - 0000000000003C00, RCX - FFFFFFFFFFFFFFFF, RDX - 000000007EA84D74 RBX - 0000000000003CCB, RSP - 000000007FF7F9A8, RBP - 000000007FF7FA10 RSI - 000000007EA72938, RDI - 000000007D946018 R8 - 000000007EA84C78, R9 - 0000000000000004, R10 - 0000000100000000 R11 - 0000000000000001, R12 - 0000000000000001, R13 - 000000007DCD3D18 R14 - 000000007EA84D74, R15 - 000000007EE4C018 DS - 0000000000000030, ES - 0000000000000030, FS - 0000000000000030 GS - 0000000000000030, SS - 0000000000000030 CR0 - 0000000080000033, CR2 - 0000000000000000, CR3 - 000000007FF1E000 CR4 - 0000000000000668, CR8 - 0000000000000000 DR0 - 0000000000000000, DR1 - 0000000000000000, DR2 - 0000000000000000 DR3 - 0000000000000000, DR6 - 00000000FFFF0FF0, DR7 - 0000000000000400 GDTR - 000000007FF0C698 0000000000000047, LDTR - 0000000000000000 IDTR - 000000007F67B018 0000000000000FFF, TR - 0000000000000000 FXSAVE_STATE - 000000007FF7F600 !!!! Can't find image information. !!!! I don't know what to make of that, it seems so low level to have caused an actual CPU error that I don't even know where to look, so here's my outlined install as well as my libvirt xml 1. Install OS X without clover. Using some seabios based guide as shown here: https://github.com/kholia/OSX-KVM - DONE 2. Convert the seabios install to UEFI+clover by installing clover and installing OVMF for my distro (arch linux) - PARTIALLY DONE. DOESN'T BOOT 3. implement PCI-E device to pass through (Maxwell GPU) - NOT DONE Here's my Clover config.plist - config inspired from https://zllovesuki.git.sx/essays/2016/07/os-x-el-capitan-on-qemu/#ovmf-uefi-approach <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>#DisableDrivers</key> <array> <string>CsmVideoDxe</string> <string>VBoxExt4</string> </array> <key>ACPI</key> <dict> <key>DSDT</key> <dict> <key>Debug</key> <false/> <key>DropOEM_DSM</key> <false/> <key>Fixes</key> <dict> <key>AddPNLF_1000000</key> <true/> <key>DeleteUnused_400000</key> <true/> <key>FIX_ACST_4000000</key> <true/> <key>FIX_ADP1_800000</key> <true/> <key>FIX_RTC_20000</key> <true/> <key>FIX_S3D_2000000</key> <true/> <key>FiX_TMR_40000</key> <true/> <key>FixRegions_10000000</key> <true/> <key>FixSBUS_0080</key> <true/> </dict> <key>ReuseFFFF</key> <false/> </dict> <key>SSDT</key> <dict> <key>DropOem</key> <false/> <key>Generate</key> <false/> </dict> </dict> <key>Boot</key> <dict> <key>Arguments</key> <string>-v</string> <key>Debug</key> <false/> <key>DefaultVolume</key> <string>Untitled</string> <key>Secure</key> <false/> <key>Timeout</key> <integer>5</integer> <key>XMPDetection</key> <false/> </dict> <key>BootGraphics</key> <dict> <key>#DefaultBackgroundColor</key> <string>0xF0F0F0</string> <key>EFILoginHiDPI</key> <integer>1</integer> <key>UIScale</key> <integer>1</integer> </dict> <key>CPU</key> <dict> <key>#BusSpeedkHz</key> <integer>133330</integer> <key>#FrequencyMHz</key> <integer>3140</integer> <key>#HWPEnable</key> <true/> <key>#HWPValue</key> <string>0x30002a01</string> <key>#QPI</key> <integer>4800</integer> <key>#SavingMode</key> <integer>7</integer> <key>#TDP</key> <integer>95</integer> <key>#TurboDisable</key> <true/> <key>#Type</key> <string>0x0201</string> <key>#UseARTFrequency</key> <true/> <key>QEMU</key> <true/> <key>UseARTFrequency</key> <false/> </dict> <key>Devices</key> <dict> <key>#AddProperties</key> <array> <dict> <key>Device</key> <string>NVidia</string> <key>Key</key> <string>AAPL,HasPanel</string> <key>Value</key> <data> AQAAAA== </data> </dict> <dict> <key>Device</key> <string>NVidia</string> <key>Key</key> <string>AAPL,Haslid</string> <key>Value</key> <data> AQAAAA== </data> </dict> </array> <key>#FakeID</key> <dict> <key>#ATI</key> <string>0x67501002</string> <key>#IMEI</key> <string>0x1e208086</string> <key>#IntelGFX</key> <string>0x01268086</string> <key>#LAN</key> <string>0x100E8086</string> <key>#NVidia</key> <string>0x11de10de</string> <key>#SATA</key> <string>0x25628086</string> <key>#WIFI</key> <string>0x431214e4</string> <key>#XHCI</key> <string>0x0</string> </dict> <key>#ForceHPET</key> <false/> <key>#Inject</key> <false/> <key>#Properties</key> <string>7a00000001000000010000006e0000000200000002010c00d041030a0000000001010600001b7fff040028000000500069006e0043006f006e00660069006700750072006100740069006f006e00730000000800000001080100180000006c00610079006f00750074002d00690064000000080000000c000000</string> <key>#SetIntelBacklight</key> <false/> <key>Audio</key> <dict> <key>#Inject</key> <string>0x0887</string> </dict> <key>USB</key> <dict> <key>FixOwnership</key> <false/> <key>Inject</key> <false/> </dict> </dict> <key>GUI</key> <dict> <key>#ConsoleMode</key> <string>0</string> <key>#Custom</key> <dict> <key>Entries</key> <array> <dict> <key>AddArguments</key> <string>-v</string> <key>Arguments</key> <string>Kernel=mach_kernel</string> <key>Disabled</key> <true/> <key>Hidden</key> <false/> <key>Hotkey</key> <string>M</string> <key>InjectKexts</key> <false/> <key>NoCaches</key> <false/> <key>Path</key> <string>\EFI\BOOT\BOOTX64.efi</string> <key>Title</key> <string>MyCustomEntry</string> <key>Type</key> <string>OSXRecovery</string> <key>Volume</key> <string>D68F1885-571C-4441-8DD5-F14803EFEF54</string> </dict> <dict> <key>Hidden</key> <false/> <key>InjectKexts</key> <false/> <key>NoCaches</key> <false/> <key>SubEntries</key> <array> <dict> <key>AddArguments</key> <string>-v</string> <key>Title</key> <string>Boot OS X 10.8.5 (12F36) Mountain Lion in Verbose Mode</string> </dict> </array> <key>Title</key> <string>OS X 10.8.5 (12F36) Mountain Lion</string> <key>Type</key> <string>OSX</string> <key>Volume</key> <string>454794AC-760D-46E8-8F77-D6EB23D2FD32</string> </dict> </array> <key>Legacy</key> <array> <dict> <key>Disabled</key> <true/> <key>Hidden</key> <false/> <key>Hotkey</key> <string>L</string> <key>Title</key> <string>MyLegacyEntry</string> <key>Type</key> <string>Windows</string> <key>Volume</key> <string>89433CD3-21F2-4D3C-95FC-722C48066D3A</string> </dict> </array> <key>Tool</key> <array> <dict> <key>Arguments</key> <string>-b</string> <key>Disabled</key> <false/> <key>Hidden</key> <false/> <key>Hotkey</key> <string>S</string> <key>Path</key> <string>\EFI\CLOVER\TOOLS\Shell64-v1.efi</string> <key>Title</key> <string>MyCustomShell</string> <key>Volume</key> <string>D68F1885-571C-4441-8DD5-F14803EFEF54</string> </dict> </array> </dict> <key>#CustomIcons</key> <false/> <key>#Hide</key> <array> <string>Windows</string> <string>BOOTX64.EFI</string> </array> <key>#Language</key> <string>ru:0</string> <key>#Mouse</key> <dict> <key>Enabled</key> <true/> <key>Mirror</key> <false/> <key>Speed</key> <integer>2</integer> </dict> <key>#Scan</key> <dict> <key>Entries</key> <true/> <key>Legacy</key> <false/> <key>Tool</key> <true/> </dict> <key>#TextOnly</key> <false/> <key>Mouse</key> <dict> <key>DoubleClick</key> <integer>500</integer> <key>Enabled</key> <false/> <key>Mirror</key> <false/> <key>Speed</key> <integer>8</integer> </dict> <key>Scan</key> <true/> <key>ScreenResolution</key> <string>1920x1080</string> <key>Theme</key> <string>embedded</string> </dict> <key>Graphics</key> <dict> <key>#Connectors</key> <array/> <key>#DualLink</key> <integer>0</integer> <key>#FBName</key> <string>Makakakakala</string> <key>#Inject</key> <dict> <key>ATI</key> <true/> <key>Intel</key> <false/> <key>NVidia</key> <false/> </dict> <key>#LoadVBios</key> <false/> <key>#NVCAP</key> <string>04000000000003000C0000000000000A00000000</string> <key>#NvidiaGeneric</key> <true/> <key>#NvidiaSingle</key> <false/> <key>#PatchVBios</key> <false/> <key>#PatchVBiosBytes</key> <array> <dict> <key>Find</key> <data> gAeoAqAF </data> <key>Replace</key> <data> gAeoAjgE </data> </dict> </array> <key>#VRAM</key> <integer>1024</integer> <key>#VideoPorts</key> <integer>2</integer> <key>#display-cfg</key> <string>03010300FFFF0001</string> <key>#ig-platform-id</key> <string>0x01620005</string> <key>EDID</key> <dict> <key>#Custom</key> <data> AP///////wAGECGSAAAAAAASAQOAIRV4CunVmVlTjigmUFQAAAAB AQEBAQEBAQEBAQEBAQEB3iGgcFCEHzAgIFYAS88QAAAY3iGgcFCE HzAgIFYAS88QAAAAAAAA/gBXNjU3RwAxNTRXUDEKAAAA/gAjMz1I ZYSq/wIBCiAgAJo= </data> <key>#Inject</key> <true/> <key>#ProductID</key> <string>0x9221</string> <key>#VendorID</key> <string>0x1006</string> <key>Custom</key> <data> </data> <key>Inject</key> <false/> </dict> <key>Inject</key> <false/> <key>NvidiaSingle</key> <false/> </dict> <key>KernelAndKextPatches</key> <dict> <key>#ATIConnectorsController</key> <string>6000</string> <key>#ATIConnectorsData</key> <string>000400000403000000010000210302040400000014020000000100000000040310000000100000000001000000000001</string> <key>#ATIConnectorsPatch</key> <string>040000001402000000010000000004040004000004030000000100001102010500000000000000000000000000000000</string> <key>#BootPatches</key> <array> <dict> <key>Comment</key> <string>Example</string> <key>Disabled</key> <true/> <key>Find</key> <data> RXh0ZXJuYWw= </data> <key>MatchOS</key> <string>All</string> <key>Replace</key> <data> SW50ZXJuYWw= </data> </dict> </array> <key>#FakeCPUID</key> <string>0x010676</string> <key>#KextsToPatch</key> <array> <dict> <key>Disabled</key> <true/> <key>Find</key> <data> SGVhZHBob25lcwA= </data> <key>Name</key> <string>VoodooHDA</string> <key>Replace</key> <data> VGVsZXBob25lcwA= </data> </dict> <dict> <key>Comment</key> <string>Patch_to_not_load_this_driver</string> <key>Find</key> <string>0x04020000</string> <key>InfoPlistPatch</key> <true/> <key>Name</key> <string>AppleHDAController</string> <key>Replace</key> <string>0x44220000</string> </dict> <dict> <key>Comment</key> <string>Make all drives to be internal</string> <key>Find</key> <data> RXh0ZXJuYWw= </data> <key>Name</key> <string>AppleAHCIPort</string> <key>Replace</key> <data> SW50ZXJuYWw= </data> </dict> <dict> <key>Comment</key> <string>TRIM function for non-Apple SSDs</string> <key>Find</key> <data> QVBQTEUgU1NEAA== </data> <key>Name</key> <string>IOAHCIBlockStorage</string> <key>Replace</key> <data> AAAAAAAAAAAAAA== </data> </dict> <dict> <key>Comment</key> <string>ATI Connector patch new way</string> <key>Disabled</key> <false/> <key>Find</key> <data> AAQAAAQDAAAAAQAAIQMCBAQAAAAUAgAAAAEAAAAABAMQ AAAAEAAAAAABAAAAAAAB </data> <key>MatchOS</key> <string>10.9,10.10,10.11</string> <key>Name</key> <string>AMD6000Controller</string> <key>Replace</key> <data> BAAAABQCAAAAAQAAAAAEBAAEAAAEAwAAAAEAABECAQUA AAAAAAAAAAAAAAAAAAAA </data> </dict> </array> <key>AppleRTC</key> <false/> <key>AsusAICPUPM</key> <false/> <key>Debug</key> <false/> <key>DellSMBIOSPatch</key> <false/> <key>KernelCpu</key> <false/> <key>KernelHaswellE</key> <false/> <key>KernelLapic</key> <false/> <key>KernelPm</key> <false/> </dict> <key>RtVariables</key> <dict> <key>BooterConfig</key> <string>0x28</string> <key>CsrActiveConfig</key> <string>0x67</string> <key>ROM</key> <string>UseMacAddr0</string> </dict> <key>SMBIOS</key> <dict> <key>#BiosReleaseDate</key> <string>05/03/10</string> <key>#BiosVendor</key> <string>Apple Inc.</string> <key>#BiosVersion</key> <string>MB11.88Z.0061.B03.0809221748</string> <key>#Board-ID</key> <string>Mac-F4208CC8</string> <key>#BoardManufacturer</key> <string>Apple Inc.</string> <key>#BoardSerialNumber</key> <string>C02032101R5DC771H</string> <key>#BoardType</key> <integer>10</integer> <key>#BoardVersion</key> <string>Proto1</string> <key>#ChassisAssetTag</key> <string>LatitudeD420</string> <key>#ChassisManufacturer</key> <string>Apple Inc.</string> <key>#ChassisType</key> <integer>16</integer> <key>#Family</key> <string>MacBook</string> <key>#FirmwareFeatures</key> <string>0xC0001403</string> <key>#LocationInChassis</key> <string>MLB</string> <key>#Memory</key> <dict> <key>Channels</key> <integer>2</integer> <key>Modules</key> <array> <dict> <key>Frequency</key> <integer>1333</integer> <key>Part</key> <string>C0001403</string> <key>Serial</key> <string>00001001</string> <key>Size</key> <integer>4096</integer> <key>Slot</key> <integer>0</integer> <key>Type</key> <string>DDR3</string> <key>Vendor</key> <string>Kingston</string> </dict> <dict> <key>Frequency</key> <integer>1333</integer> <key>Part</key> <string>C0001404</string> <key>Serial</key> <string>00001002</string> <key>Size</key> <integer>4096</integer> <key>Slot</key> <integer>2</integer> <key>Type</key> <string>DDR3</string> <key>Vendor</key> <string>Kingston</string> </dict> </array> <key>SlotCount</key> <integer>4</integer> </dict> <key>#Mobile</key> <true/> <key>#PlatformFeature</key> <integer>3</integer> <key>#ProductName</key> <string>MacBook1,1</string> <key>#SerialNumber</key> <string>4H629LYAU9C</string> <key>#Slots</key> <array> <dict> <key>Device</key> <string>ATI</string> <key>ID</key> <integer>1</integer> <key>Name</key> <string>PCIe Slot 0</string> <key>Type</key> <integer>16</integer> </dict> <dict> <key>Device</key> <string>WIFI</string> <key>ID</key> <integer>0</integer> <key>Name</key> <string>Airport</string> <key>Type</key> <integer>1</integer> </dict> </array> <key>#SmUUID</key> <string>00000000-0000-1000-8000-010203040506</string> <key>#Trust</key> <true/> <key>#Version</key> <string>1.0</string> <key>BiosReleaseDate</key> <string>07/02/07</string> <key>BiosVendor</key> <string>Apple Inc.</string> <key>BiosVersion</key> <string>MP21.88Z.007F.B06.0707021348</string> <key>Board-ID</key> <string>Mac-F4208DC8</string> <key>BoardManufacturer</key> <string>Apple Inc.</string> <key>BoardSerialNumber</key> <string>CK827A05XYL</string> <key>BoardType</key> <integer>11</integer> <key>ChassisAssetTag</key> <string>Pro-Enclosure</string> <key>ChassisManufacturer</key> <string>Apple Inc.</string> <key>ChassisType</key> <string>0x06</string> <key>Family</key> <string>Mac Pro</string> <key>LocationInChassis</key> <string>Part Component</string> <key>Manufacturer</key> <string>Apple Inc.</string> <key>Memory</key> <dict> <key>Channels</key> <integer>0</integer> </dict> <key>Mobile</key> <false/> <key>ProductName</key> <string>MacPro2,1</string> <key>SerialNumber</key> <string>CK827A05XYL</string> <key>SmUUID</key> <string>A8439CE5-207B-4D38-8734-F09F726F44E1</string> <key>Trust</key> <false/> <key>Version</key> <string>1.0</string> </dict> <key>SystemParameters</key> <dict> <key>#BacklightLevel</key> <string>0x0501</string> <key>#CustomUUID</key> <string>511CE201-1000-4000-9999-010203040506</string> <key>#NvidiaWeb</key> <false/> <key>InjectKexts</key> <string>Detect</string> <key>InjectSystemID</key> <true/> </dict> </dict> </plist> ^ I don't understand how the extra settings in CPU section got set. Should those be removed? I only enabled "QEMU" CPU mode and here's my libvirt xml that I'm trying to boot with <domain type='kvm'> <name>generic</name> <uuid>0f74159f-d40c-4412-8af6-9922917ca632</uuid> <memory unit='KiB'>8388608</memory> <currentMemory unit='KiB'>8388608</currentMemory> <vcpu placement='static'>4</vcpu> <os> <type arch='x86_64' machine='pc-q35-2.8'>hvm</type> <loader readonly='yes' type='pflash'>/usr/share/ovmf/x64/ovmf_x64.bin</loader> <nvram>/var/lib/libvirt/qemu/nvram/generic_VARS.fd</nvram> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <vmport state='off'/> </features> <cpu mode='custom' match='exact'> <model fallback='allow'>Penryn</model> </cpu> <clock offset='utc'> <timer name='rtc' tickpolicy='catchup'/> <timer name='pit' tickpolicy='delay'/> <timer name='hpet' present='no'/> </clock> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <pm> <suspend-to-mem enabled='no'/> <suspend-to-disk enabled='no'/> </pm> <devices> <emulator>/usr/sbin/qemu-system-x86_64</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/home/anthony/vm/mac.qcow2'/> <target dev='sda' bus='sata'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <controller type='usb' index='0' model='nec-xhci'> <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> </controller> <controller type='sata' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </controller> <controller type='pci' index='0' model='pcie-root'/> <controller type='pci' index='1' model='dmi-to-pci-bridge'> <model name='i82801b11-bridge'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> </controller> <controller type='pci' index='2' model='pci-bridge'> <model name='pci-bridge'/> <target chassisNr='2'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </controller> <controller type='pci' index='3' model='pcie-root-port'> <model name='ioh3420'/> <target chassis='3' port='0x10'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/> </controller> <controller type='pci' index='4' model='pcie-root-port'> <model name='ioh3420'/> <target chassis='4' port='0x11'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/> </controller> <controller type='pci' index='5' model='pcie-root-port'> <model name='ioh3420'/> <target chassis='5' port='0x12'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/> </controller> <interface type='network'> <mac address='52:54:00:03:f4:84'/> <source network='default'/> <model type='e1000'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> </interface> <serial type='pty'> <target port='0'/> </serial> <console type='pty'> <target type='serial' port='0'/> </console> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes'> <listen type='address'/> </graphics> <sound model='ac97'> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/> </sound> <video> <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> </video> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> </memballoon> </devices> </domain> This was XML that was pretty much generated by virt-manager when I created the VM and then I did a few small changes like setting the system to UEFI/OVMF, setting chipset to Q35, and setting USB to USB3. Does anybody know what's wrong? Link to comment https://www.insanelymac.com/forum/topic/321851-solved-issue-booting-uefi-cloverkvmlibvirt-to-macos-10123/ Share on other sites More sharing options...
helios747 Posted March 15, 2017 Author Share Posted March 15, 2017 Progress. I completely removed clover, reinstalled it, and did absolutely nothing to config.plist except add "q35-acpi-dsdt.aml" to the DSDT section in clover configurator, and copy that file to EFI/Clover/ACPI/Origins or whatever the path is. It still hangs, but now I get a line of plusses half way across the console. Investigating this. Alright, figured it out! So, the CPU error was caused by a wonky config.plist. I'm not sure what option it was, but something the above guides have me set in clover screwed it up. However, the "q35-acpi-dsdt.aml" IS REQUIRED. Solved CPU error by: Uninstalling clover, reinstalling, and taking a default generated plist. next, the line of plusses hang. According to google this happens if your system needs to have OsxAptioFix2Drv installed via Clover installer or Clover Configurator. Installing that solved that hang. After that, OS X booted fine. 1 Link to comment https://www.insanelymac.com/forum/topic/321851-solved-issue-booting-uefi-cloverkvmlibvirt-to-macos-10123/#findComment-2384558 Share on other sites More sharing options...
Recommended Posts