Update Manual to support irregular cpu topology assignment

1. Add description of irregular cpu topology assignment
2. Include Lilu/WEG/AppleALC and enabled by default
3. Add VirtualSMC and remove apple smc device in xml
4. Add more description in manual
feature/opencore-0.5.8
Leoyzen 4 years ago
parent 79ce631d7a
commit d78b27e1ab

File diff suppressed because it is too large Load Diff

@ -0,0 +1,81 @@
<?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>BuildMachineOSBuild</key>
<string>18E226</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>Lilu</string>
<key>CFBundleIdentifier</key>
<string>as.vit9696.Lilu</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Lilu</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>1.4.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.4.2</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>10E1001</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>18E219</string>
<key>DTSDKName</key>
<string>macosx10.14</string>
<key>DTXcode</key>
<string>1020</string>
<key>DTXcodeBuild</key>
<string>10E1001</string>
<key>IOKitPersonalities</key>
<dict>
<key>as.vit9696.Lilu</key>
<dict>
<key>CFBundleIdentifier</key>
<string>as.vit9696.Lilu</string>
<key>IOClass</key>
<string>Lilu</string>
<key>IOMatchCategory</key>
<string>Lilu</string>
<key>IOProviderClass</key>
<string>IOResources</string>
<key>IOResourceMatch</key>
<string>IOKit</string>
</dict>
</dict>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2016-2018 vit9696. All rights reserved.</string>
<key>OSBundleCompatibleVersion</key>
<string>1.2.0</string>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.kpi.bsd</key>
<string>12.0.0</string>
<key>com.apple.kpi.dsep</key>
<string>12.0.0</string>
<key>com.apple.kpi.iokit</key>
<string>12.0.0</string>
<key>com.apple.kpi.libkern</key>
<string>12.0.0</string>
<key>com.apple.kpi.mach</key>
<string>12.0.0</string>
<key>com.apple.kpi.unsupported</key>
<string>12.0.0</string>
</dict>
<key>OSBundleRequired</key>
<string>Root</string>
</dict>
</plist>

@ -0,0 +1,410 @@
<?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>BuildMachineOSBuild</key>
<string>18E226</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>VirtualSMC</string>
<key>CFBundleIdentifier</key>
<string>as.vit9696.VirtualSMC</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>VirtualSMC</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>1.1.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.1.1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>10E1001</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>18E219</string>
<key>DTSDKName</key>
<string>macosx10.14</string>
<key>DTXcode</key>
<string>1020</string>
<key>DTXcodeBuild</key>
<string>10E1001</string>
<key>IOKitPersonalities</key>
<dict>
<key>as.vit9696.VirtualSMC</key>
<dict>
<key>CFBundleIdentifier</key>
<string>as.vit9696.VirtualSMC</string>
<key>IOClass</key>
<string>VirtualSMC</string>
<key>IODeviceMemory</key>
<array>
<array>
<dict>
<key>address</key>
<integer>768</integer>
<key>length</key>
<integer>32</integer>
</dict>
</array>
<array>
<dict>
<key>address</key>
<integer>4277141504</integer>
<key>length</key>
<integer>65536</integer>
</dict>
</array>
</array>
<key>IOInterruptControllers</key>
<array>
<string>io-apic-0</string>
</array>
<key>IOInterruptSpecifiers</key>
<array>
<data>
BgAAAAAAAAA=
</data>
</array>
<key>IOMatchCategory</key>
<string>IOACPIPlatformDevice</string>
<key>IOName</key>
<string>SMC</string>
<key>IOProbeScore</key>
<integer>60000</integer>
<key>IOProviderClass</key>
<string>AppleACPIPlatformExpert</string>
<key>Keystore</key>
<dict>
<key>Generic</key>
<array>
<dict>
<key>attr</key>
<data>
iA==
</data>
<key>comment</key>
<string>Total fan number, this should be put to a plugin</string>
<key>name</key>
<data>
Rk51bQ==
</data>
<key>type</key>
<data>
dWk4IA==
</data>
<key>value</key>
<data>
AA==
</data>
</dict>
<dict>
<key>attr</key>
<data>
gA==
</data>
<key>comment</key>
<string>CPU plimit</string>
<key>name</key>
<data>
TVNUYw==
</data>
<key>type</key>
<data>
dWk4IA==
</data>
<key>value</key>
<data>
AA==
</data>
</dict>
<dict>
<key>attr</key>
<data>
gA==
</data>
<key>comment</key>
<string>FAN plimit (supposedly)</string>
<key>name</key>
<data>
TVNUZg==
</data>
<key>type</key>
<data>
dWk4IA==
</data>
<key>value</key>
<data>
AA==
</data>
</dict>
<dict>
<key>attr</key>
<data>
gA==
</data>
<key>comment</key>
<string>Memory plimit</string>
<key>name</key>
<data>
TVNUbQ==
</data>
<key>type</key>
<data>
dWk4IA==
</data>
<key>value</key>
<data>
AA==
</data>
</dict>
<dict>
<key>attr</key>
<data>
gA==
</data>
<key>comment</key>
<string>This should be 1 on laptops, and is overriden by sensors</string>
<key>name</key>
<data>
QkFUUA==
</data>
<key>type</key>
<data>
ZmxhZw==
</data>
<key>value</key>
<data>
AA==
</data>
</dict>
<dict>
<key>attr</key>
<data>
gA==
</data>
<key>comment</key>
<string>Only MacPros have custom illumination controllers</string>
<key>name</key>
<data>
THNOTQ==
</data>
<key>type</key>
<data>
dWk4IA==
</data>
<key>value</key>
<data>
AA==
</data>
</dict>
</array>
<key>GenericDesktopV1</key>
<array/>
<key>GenericDesktopV2</key>
<array/>
<key>GenericLaptopV1</key>
<array/>
<key>GenericLaptopV2</key>
<array/>
<key>GenericV1</key>
<array>
<dict>
<key>attr</key>
<data>
gA==
</data>
<key>comment</key>
<string>GPU plimit</string>
<key>name</key>
<data>
TVNUZw==
</data>
<key>type</key>
<data>
dWk4IA==
</data>
<key>value</key>
<data>
AA==
</data>
</dict>
</array>
<key>GenericV2</key>
<array>
<dict>
<key>attr</key>
<data>
gA==
</data>
<key>comment</key>
<string>E plimit (???)</string>
<key>name</key>
<data>
TVNUZQ==
</data>
<key>type</key>
<data>
dWk4IA==
</data>
<key>value</key>
<data>
AA==
</data>
</dict>
<dict>
<key>attr</key>
<data>
gA==
</data>
<key>comment</key>
<string>I plimit (???)</string>
<key>name</key>
<data>
TVNUaQ==
</data>
<key>type</key>
<data>
dWk4IA==
</data>
<key>value</key>
<data>
AA==
</data>
</dict>
<dict>
<key>attr</key>
<data>
gA==
</data>
<key>comment</key>
<string>J plimit (???)</string>
<key>name</key>
<data>
TVNUag==
</data>
<key>type</key>
<data>
dWk4IA==
</data>
<key>value</key>
<data>
AA==
</data>
</dict>
</array>
</dict>
<key>ModelInfo</key>
<dict>
<key>GenericV1</key>
<dict>
<key>branch</key>
<data>
ajUyAAAAAAA=
</data>
<key>hwname</key>
<data>
c21jLXBpa2V0b24A
</data>
<key>platform</key>
<data>
ajUyAAAAAAA=
</data>
<key>rev</key>
<data>
AXQPAAAE
</data>
<key>revfb</key>
<data>
AXQPAAAE
</data>
<key>revfu</key>
<data>
AXQPAAAE
</data>
</dict>
<key>GenericV2</key>
<dict>
<key>branch</key>
<data>
ajUyAAAAAAA=
</data>
<key>hwname</key>
<data>
c21jLWh1cm9ucml2ZXIA
</data>
<key>platform</key>
<data>
ajUyAAAAAAA=
</data>
<key>rev</key>
<data>
AigPAAAH
</data>
<key>revfb</key>
<data>
AigPAAAH
</data>
<key>revfu</key>
<data>
AigPAAAH
</data>
</dict>
<key>GenericV3</key>
<dict>
<key>hwname</key>
<data>
c21jLWh1cm9ucml2ZXIA
</data>
<key>platform</key>
<data>
ajUyAAAAAAA=
</data>
</dict>
</dict>
<key>_STA</key>
<integer>11</integer>
<key>name</key>
<data>
QVBQMDAwMQA=
</data>
</dict>
</dict>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2017 vit9696. All rights reserved.</string>
<key>OSBundleCompatibleVersion</key>
<string>1.0</string>
<key>OSBundleLibraries</key>
<dict>
<key>as.vit9696.Lilu</key>
<string>1.2.0</string>
<key>com.apple.iokit.IOACPIFamily</key>
<string>1.0.0d1</string>
<key>com.apple.kpi.bsd</key>
<string>12.0.0</string>
<key>com.apple.kpi.dsep</key>
<string>12.0.0</string>
<key>com.apple.kpi.iokit</key>
<string>12.0.0</string>
<key>com.apple.kpi.libkern</key>
<string>12.0.0</string>
<key>com.apple.kpi.mach</key>
<string>12.0.0</string>
<key>com.apple.kpi.unsupported</key>
<string>12.0.0</string>
</dict>
<key>OSBundleRequired</key>
<string>Root</string>
</dict>
</plist>

@ -0,0 +1,102 @@
<?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>BuildMachineOSBuild</key>
<string>18E226</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>WhateverGreen</string>
<key>CFBundleIdentifier</key>
<string>as.vit9696.WhateverGreen</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>WhateverGreen</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>1.3.7</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.3.7</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>10E1001</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>18E219</string>
<key>DTSDKName</key>
<string>macosx10.14</string>
<key>DTXcode</key>
<string>1020</string>
<key>DTXcodeBuild</key>
<string>10E1001</string>
<key>IOKitPersonalities</key>
<dict>
<key>NVHDAEnabler</key>
<dict>
<key>CFBundleIdentifier</key>
<string>as.vit9696.WhateverGreen</string>
<key>IOClass</key>
<string>NVHDAEnabler</string>
<key>IOMatchCategory</key>
<string>IOFramebuffer</string>
<key>IOPCIClassMatch</key>
<string>0x03000000&amp;0xff000000</string>
<key>IOPCIMatch</key>
<string>0x000010de&amp;0x0000ffff</string>
<key>IOProbeScore</key>
<integer>300000</integer>
<key>IOProviderClass</key>
<string>IOPCIDevice</string>
</dict>
<key>as.vit9696.WhateverGreen</key>
<dict>
<key>CFBundleIdentifier</key>
<string>as.vit9696.WhateverGreen</string>
<key>IOClass</key>
<string>WhateverGreen</string>
<key>IOMatchCategory</key>
<string>WhateverGreen</string>
<key>IOProviderClass</key>
<string>IOResources</string>
<key>IOResourceMatch</key>
<string>IOKit</string>
</dict>
</dict>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2018 vit9696. All rights reserved.</string>
<key>OSBundleCompatibleVersion</key>
<string>1.0</string>
<key>OSBundleLibraries</key>
<dict>
<key>as.vit9696.Lilu</key>
<string>1.2.0</string>
<key>com.apple.iokit.IOPCIFamily</key>
<string>1.0.0b1</string>
<key>com.apple.kpi.bsd</key>
<string>12.0.0</string>
<key>com.apple.kpi.dsep</key>
<string>12.0.0</string>
<key>com.apple.kpi.iokit</key>
<string>12.0.0</string>
<key>com.apple.kpi.libkern</key>
<string>12.0.0</string>
<key>com.apple.kpi.mach</key>
<string>12.0.0</string>
<key>com.apple.kpi.unsupported</key>
<string>12.0.0</string>
</dict>
<key>OSBundleRequired</key>
<string>Root</string>
</dict>
</plist>

@ -207,7 +207,7 @@
<key>Comment</key>
<string></string>
<key>Enabled</key>
<false/>
<true/>
<key>ExecutablePath</key>
<string>Contents/MacOS/Lilu</string>
<key>MaxKernel</key>
@ -217,13 +217,29 @@
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>BundlePath</key>
<string>VirtualSMC.kext</string>
<key>Comment</key>
<string></string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
<string>Contents/MacOS/VirtualSMC</string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>BundlePath</key>
<string>WhateverGreen.kext</string>
<key>Comment</key>
<string></string>
<key>Enabled</key>
<false/>
<true/>
<key>ExecutablePath</key>
<string>Contents/MacOS/WhateverGreen</string>
<key>MaxKernel</key>
@ -239,7 +255,7 @@
<key>Comment</key>
<string></string>
<key>Enabled</key>
<false/>
<true/>
<key>ExecutablePath</key>
<string>Contents/MacOS/AppleALC</string>
<key>MaxKernel</key>

@ -1,5 +1,7 @@
# KVM-Opencore
Opencore Configuration of KVM Hackintosh with tweaks
Opencore Configuration of KVM Hackintosh with tweaks.
We propose best practice for KVM users.
# Status
@ -32,17 +34,21 @@ Opencore Configuration of KVM Hackintosh with tweaks
# Usage
1. Download the repository and put the EFI under your EFI disk
2. Download latest Lilu/WhatEverGreen/AppleALC and put them into kext folder, also add them to config.plist
# Tips
# Manual
## Libvirt XML
See more in [libvirt.xml](https://github.com/Leoyzen/KVM-Opencore/blob/master/libvirt.xml).
## SMBios
Comparing with normal hackintosh setup, we only have limited choices here(because we don't have iGPU)
Comparing with normal hackintosh setup, we have only limited choices here(because we don't have an iGPU).
* iMacPro1,1(Prefer)
* MacPro7,1
## CPU
You have two options to choose: Penryn, Passthrough
### Penryn
Penryn is the safest choice in Hackintosh VM, it is classic, and Apple wrote native code to support it.
### Models Selection
You have three options to choose: Penryn, Passthrough, Emulating Model.
#### Penryn
Penryn is the safest choice in Hackintosh VM, it is classic, similar with virtualized enviroment, and Apple wrote native code to support it.
But we should do something to make it work more than that:
1. You should passthrough some important cpuid features which don't included in Penryn Model, such as:
@ -55,19 +61,60 @@ But we should do something to make it work more than that:
* kvm=on: QEMU use it to expose Hypervisor leaf node, which MacOS use it to determine the invtsc frequency from hypervisor node.
* ~~vmware-cpu-freq=on~~: no more need, QEMU enabled it by default.
2. Add patch(from AMD-Vanilla) to support leaf7 cpuid features support
* otherwise App won't use some important feature like AVX
* otherwise Apple won't use some important feature like AVX
* can be check with `sysctl -a|grep machdep.cpu.leaf7_features` to see whether AVX/AVX2 is included.
__NOTES__: Topology/Hyper-Threading is working well with Penryn, but you can't not use odd num(like 3/5/7 and greater than 8) cores.
### Passthrough
We can't use topology when using cpu passthrough, detail/discussion can be found in issues.
So remove the line(`<topology sockets='1' cores='4' threads='2'/>`) from your libvirt xml.
#### Passthrough
#### Intel
If you are using most recent generation Intel CPU(newer than Penryn), then you can just just passthrough you cpu type with `mode='host-passthrough'`.
If you are using most recent generation Intel CPU(newer than Penryn), then you can just passthrough your cpu type with `mode='host-passthrough'`.
##### AMD
You can passthrough amd process too, but with [AMD-Vanilla patches](https://github.com/AMD-OSX/AMD_Vanilla) like bare metal hackintosh.
#### AMD
You can passthrough amd process too, but with AMD-Vanilla patches like bare metal hackintosh.
### Other Notes about CPU
#### Irregular Topology
If you wanna assign an irregular topology (like 3-cores/6-threads or 5-cores/5-threads), you should fake a topology, otherwise you will get a kernel panic.
Details can be found [here](https://github.com/Leoyzen/KVM-Opencore/issues/1).
```xml
<!-- Example cpu topology defination with 3-cores/6-threads -->
<vcpu placement='static' current='6'>8</vcpu>
<vcpus>
<vcpu id='0' enabled='yes' hotpluggable='no' order='1'/>
<vcpu id='1' enabled='yes' hotpluggable='yes' order='2'/>
<vcpu id='2' enabled='yes' hotpluggable='yes' order='3'/>
<vcpu id='3' enabled='yes' hotpluggable='yes' order='4'/>
<vcpu id='4' enabled='yes' hotpluggable='yes' order='5'/>
<vcpu id='5' enabled='yes' hotpluggable='yes' order='6'/>
<!-- Fake two cores but disabled. -->
<vcpu id='6' enabled='no' hotpluggable='yes'/>
<vcpu id='7' enabled='no' hotpluggable='yes'/>
</vcpus>
<cputune>
<vcpupin vcpu='0' cpuset='6'/>
<vcpupin vcpu='1' cpuset='14'/>
<vcpupin vcpu='2' cpuset='7'/>
<vcpupin vcpu='3' cpuset='15'/>
<vcpupin vcpu='4' cpuset='5'/>
<vcpupin vcpu='5' cpuset='13'/>
</cputune>
<cpu mode='host-passthrough' check='none'>
<topology sockets='1' cores='4' threads='2'/>
</cpu>
```
#### Unknown CPU Name
If you find unknown cpu model in you system info, you can change it by specify the ProcessorType in SMBios Section of config.plist.
Choices can be found in [here](https://github.com/acidanthera/EfiPkg/blob/master/Include/IndustryStandard/AppleSmBios.h).
Example, if you have or emulate a skylake-server processor, you can use 0x0F01(Xeon-W):
```
// <0F01> 08 cores Intel Xeon W Intel Xeon W
// <0F01> 10 cores Intel Xeon W Intel Xeon W
// <0F01> 14 cores Intel Xeon W Intel Xeon W
// <0F01> 18 cores Intel Xeon W Intel Xeon W
```
Notes, the cores should be matched too, or you can fake some disable cores to match the topology.
Then you can specify 3841(0x0F01 in decimal) in ProcessorType section.
## GPU
GPU passthrough is a good way to gain smooth experience in MacOS.If you do so, make sure you doing things right.
@ -94,7 +141,8 @@ __You have to make sure you put the gfx and graphic audio in the same bus but di
If you did it right, then there is no much differeces between VM and normal setup procedure, just adding Lilu/WEG/AppleALC then the Metal/H264/H265 HW/HDMI Audio will work well in most case.
## USB
We use EHC/UHC from qemu now(XHCI(nec/qemu) can't be recognized by MacOS now).USB port mapping(EHC) and USB Power injection(with fake EC ioreg) already included.
We use EHC/UHC from qemu now(XHCI(nec/qemu) can't be recognized by MacOS now).
USB port mapping(EHC) and USB Power injection(with fake EC ioreg) are already included in config.plist.
# Known Problems/Help
see issues.

@ -10,21 +10,32 @@
<memoryBacking>
<nosharepages/>
</memoryBacking>
<vcpu placement='static'>8</vcpu>
<!-- If you wanna passthrough all 8-cores, change current='6' to current='8' -->
<vcpu placement='static' current='6'>8</vcpu>
<iothreads>1</iothreads>
<vcpus>
<vcpu id='0' enabled='yes' hotpluggable='no' order='1'/>
<vcpu id='1' enabled='yes' hotpluggable='yes' order='2'/>
<vcpu id='2' enabled='yes' hotpluggable='yes' order='3'/>
<vcpu id='3' enabled='yes' hotpluggable='yes' order='4'/>
<vcpu id='4' enabled='yes' hotpluggable='yes' order='5'/>
<vcpu id='5' enabled='yes' hotpluggable='yes' order='5'/>
<!-- If you wanna passthrough all 8-cores, enable 6/7 two vcpus -->
<vcpu id='6' enabled='no' hotpluggable='yes' order='6'/>
<vcpu id='7' enabled='no' hotpluggable='yes' order='7'/>
</vcpus>
<cputune>
<vcpupin vcpu='0' cpuset='4'/>
<vcpupin vcpu='1' cpuset='12'/>
<vcpupin vcpu='2' cpuset='5'/>
<vcpupin vcpu='3' cpuset='13'/>
<vcpupin vcpu='4' cpuset='6'/>
<vcpupin vcpu='5' cpuset='14'/>
<vcpupin vcpu='6' cpuset='7'/>
<vcpupin vcpu='7' cpuset='15'/>
<iothreadpin iothread='1' cpuset='0,8'/>
<vcpupin vcpu='0' cpuset='0'/>
<vcpupin vcpu='1' cpuset='6'/>
<vcpupin vcpu='2' cpuset='1'/>
<vcpupin vcpu='3' cpuset='7'/>
<vcpupin vcpu='4' cpuset='2'/>
<vcpupin vcpu='5' cpuset='8'/>
<iothreadpin iothread='1' cpuset='3,9'/>
</cputune>
<os>
<type arch='x86_64' machine='pc-q35-4.2'>hvm</type>
<!-- We don't need patched OVMF anymore when using latest Opencore, stock one is okay -->
<loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
<nvram>/etc/libvirt/qemu/nvram/4450a55c-1669-da0e-d0bd-3ab45fef0398_VARS-pure-efi.fd</nvram>
<boot dev='hd'/>
@ -33,7 +44,10 @@
<acpi/>
<apic/>
</features>
<cpu mode='host-passthrough' check='none'/>
<cpu mode='host-passthrough' check='none'>
<!-- If you wanna passthrough all 8-cores, change cores to 4 -->
<topology sockets='1' cores='3' threads='2'/>
</cpu>
<clock offset='utc'>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='pit' tickpolicy='delay'/>
@ -115,6 +129,7 @@
<master startport='4'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
</controller>
<!-- Make sure you put your nic in bus 0x0 and slot 0x0y(y is numeric), this will make nic built-in and apple-store work-->
<interface type='bridge'>
<mac address='52:54:00:3e:21:a2'/>
<source bridge='br0.100'/>
@ -133,9 +148,24 @@
<target type='virtio' name='org.qemu.guest_agent.0'/>
<address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<hostdev mode='subsystem' type='pci' managed='yes'>
<input type='tablet' bus='usb'>
<alias name='input0'/>
<address type='usb' bus='0' port='1'/>
</input>
<!-- Mouse sets to usb will make unexpected behaviors when using VNC, so we use ps2 here.-->
<input type='mouse' bus='ps2'>
<alias name='input1'/>
</input>
<!-- This is required to make Keyboard work during installation when using VNC -->
<input type='keyboard' bus='usb'>
<alias name='input2'/>
<address type='usb' bus='0' port='3'/>
</input>
<input type='keyboard' bus='ps2'>
<alias name='input3'/>
</input>
<!-- If you wanna passthrough GPU, make sure the gfx and audio are in the same bus (like 0x01) but different function (0x00 and 0x01)-->
<!-- <hostdev mode='subsystem' type='pci' managed='yes'>
<driver name='vfio'/>
<source>
<address domain='0x0000' bus='0x2d' slot='0x00' function='0x0'/>
@ -149,13 +179,23 @@
<address domain='0x0000' bus='0x2d' slot='0x00' function='0x1'/>
</source>
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x1'/>
</hostdev>
</hostdev> -->
<!-- If you wanna passthrough onboard audio(like 30:00.4), make sure you put it in bus 0x00 and slot 0x0y(y is numeric), otherwise AppleALC won't recognized it -->
<!-- <hostdev mode='subsystem' type='pci' managed='yes'>
<driver name='vfio'/>
<source>
<address domain='0x0000' bus='0x30' slot='0x00' function='0x4'/>
</source>
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
</hostdev> -->
<memballoon model='none'/>
</devices>
<qemu:commandline>
<qemu:arg value='-device'/>
<qemu:arg value='isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc'/>
<qemu:arg value='-cpu'/>
<qemu:arg value='Penryn,vendor=GenuineIntel,+hypervisor,+invtsc,kvm=on,+fma,+avx,+avx2,+aes,+ssse3,+sse4_2,+popcnt,+sse4a,+bmi1,+bmi2'/>
<!-- If you wanna use cpu host-passthrough mode, uncomments below-->
<!-- <qemu:arg value='host,vendor=GenuineIntel,+hypervisor,+invtsc,kvm=on,+fma,+avx,+avx2,+aes,+ssse3,+sse4_2,+popcnt,+sse4a,+bmi1,+bmi2'/> -->
<!-- If you wanna use cpu emulating mode like Skylake-Server, uncomments below-->
<!-- <qemu:arg value='Skylake-Server,vendor=GenuineIntel,+hypervisor,+invtsc,kvm=on,+fma,+avx,+avx2,+aes,+ssse3,+sse4_2,+popcnt,+sse4a,+bmi1,+bmi2'/> -->
</qemu:commandline>
</domain>

Loading…
Cancel
Save