commit | 93ddefbc3c909bb6c3b76086f1dfc8ad98dd3725 | [log] [tgz] |
---|---|---|
author | Pedro Tôrres <t0rr3sp3dr0@gmail.com> | Mon Oct 04 10:46:37 2021 +0200 |
committer | Paolo Bonzini <pbonzini@redhat.com> | Tue Oct 05 13:10:29 2021 +0200 |
tree | 6035dad0048cf37b7a421ebe1ca10ad18432dd5b | |
parent | c0c2d319d6714517cc4e0332edf99f2fccaa9442 [diff] |
hw/misc: applesmc: use host osk as default on macs When running on a Mac, QEMU is able to get the host OSK and use it as the default value for the AppleSMC device. The OSK query operation doesn't require administrator privileges and can be executed by any user on the system. This patch is based on open-source code from Apple, just like the implementation from VirtualBox. Apple: https://opensource.apple.com/source/IOKitUser/IOKitUser-647.6.13/pwr_mgt.subproj/IOPMLibPrivate.c https://opensource.apple.com/source/PowerManagement/PowerManagement-637.60.1/pmconfigd/PrivateLib.c VirtualBox: https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Devices/EFI/DevSmc.cpp#L516 Signed-off-by: Pedro Tôrres <t0rr3sp3dr0@gmail.com>