Skip to contentSkip to conversation

isa-applesmc: provide OSK forwarding on Apple hosts

PATCH Superseded Vladislav Yaroshchuk 1 participant 1 message Nov 5, 2021

v6 of 10 Superseded Latest is v10 →

lore
Share & tools
lore
#0 lore raw

PATCH v6 1/1 isa-applesmc: provide OSK forwarding on Apple hosts

On Apple hosts we can read AppleSMC OSK key directly from host's SMC and forward this value to QEMU Guest.

New property 'host_osk_only' added:
-device isa-applesmc,hostosk=on
The property is set to 'on' by default for machine version > 6.1

Apple licence allows use and run up to two additional copies or instances of macOS operating system within virtual operating system environments on each Apple-branded computer that is already running the Apple Software, for purposes of:
- software development
- testing during software development
- using macOS Server
- personal, non-commercial use

Guest macOS requires AppleSMC with correct OSK. The most legal way to pass it to the Guest is to forward the key from host SMC without any value exposion.

Based on https://web.archive.org/web/20200103161737/osxbook.com/book/bonus/chapter7/tpmdrmmyth/

---
 hw/core/machine.c  |   1 +
 hw/misc/applesmc.c | 115 ++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 114 insertions(+), 2 deletions(-)
hw/core/machine.c +1 -0
index 948b3d9524..9f711b7447 100644
@@ -39,6 +39,7 @@
 
 GlobalProperty hw_compat_6_1[] = {
     { "vhost-user-vsock-device", "seqpacket", "off" },
+    { "isa-applesmc", "hostosk", "off" }
 };
 const size_t hw_compat_6_1_len = G_N_ELEMENTS(hw_compat_6_1);
 
hw/misc/applesmc.c +113 -2

146 lines not on this page · raw message

Signature · 1 line
2.23.0