mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-22 15:38:36 -07:00
Apple defines a new "vmapple" machine type as part of its proprietary
macOS Virtualization.Framework vmm. This machine type is similar to the
virt one, but with subtle differences in base devices, a few special
vmapple device additions and a vastly different boot chain.
This patch reimplements this machine type in QEMU. To use it, you
have to have a readily installed version of macOS for VMApple,
run on macOS with -accel hvf, pass the Virtualization.Framework
boot rom (AVPBooter) in via -bios, pass the aux and root volume as pflash
and pass aux and root volume as virtio drives. In addition, you also
need to find the machine UUID and pass that as -M vmapple,uuid= parameter:
$ qemu-system-aarch64 -accel hvf -M vmapple,uuid=0x1234 -m 4G \
-bios /System/Library/Frameworks/Virtualization.framework/Versions/A/Resources/AVPBooter.vmapple2.bin
-drive file=aux,if=pflash,format=raw \
-drive file=root,if=pflash,format=raw \
-drive file=aux,if=none,id=aux,format=raw \
-device vmapple-virtio-blk-pci,variant=aux,drive=aux \
-drive file=root,if=none,id=root,format=raw \
-device vmapple-virtio-blk-pci,variant=root,drive=root
With all these in place, you should be able to see macOS booting
successfully.
Known issues:
- Currently only macOS 12 guests are supported. The boot process for
13+ will need further investigation and adjustment.
Signed-off-by: Alexander Graf <graf@amazon.com>
Co-authored-by: Phil Dennis-Jordan <phil@philjordan.eu>
Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Tested-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-ID: <20241223221645.29911-15-phil@philjordan.eu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
34 lines
619 B
Text
34 lines
619 B
Text
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
config VMAPPLE_AES
|
|
bool
|
|
|
|
config VMAPPLE_BDIF
|
|
bool
|
|
|
|
config VMAPPLE_CFG
|
|
bool
|
|
|
|
config VMAPPLE_VIRTIO_BLK
|
|
bool
|
|
|
|
config VMAPPLE
|
|
bool
|
|
depends on ARM
|
|
depends on HVF
|
|
default y if ARM
|
|
imply PCI_DEVICES
|
|
select ARM_GICV3
|
|
select PLATFORM_BUS
|
|
select PCI_EXPRESS
|
|
select PCI_EXPRESS_GENERIC_BRIDGE
|
|
select PL011 # UART
|
|
select PL031 # RTC
|
|
select PL061 # GPIO
|
|
select GPIO_PWR
|
|
select PVPANIC_MMIO
|
|
select VMAPPLE_AES
|
|
select VMAPPLE_BDIF
|
|
select VMAPPLE_CFG
|
|
select MAC_PVG_MMIO
|
|
select VMAPPLE_VIRTIO_BLK
|