isa-applesmc: provide OSK forwarding on Apple hosts
PATCH v9 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 'hostosk' property is added:
* -device isa-applesmc,hostosk=on
The property is set to 'on' by default for machine version > 6.2
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 | 4 +- hw/misc/applesmc.c | 127 +++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 126 insertions(+), 5 deletions(-)
hw/core/machine.c +3 -1
@@ -37,7 +37,9 @@#include "hw/virtio/virtio.h" #include "hw/virtio/virtio-pci.h" -GlobalProperty hw_compat_7_0[] = {}; +GlobalProperty hw_compat_7_0[] = { + {"isa-applesmc" ,"hostosk" ,"off" } +};const size_t hw_compat_7_0_len =G_N_ELEMENTS (hw_compat_7_0);GlobalProperty hw_compat_6_2[] = {
hw/misc/applesmc.c +123 -4
170 lines not on this page · raw message
Signature · 1 line
2.34.1.vfs.0.0