mirror of
https://github.com/yaelliethy/orchard.git
synced 2026-10-29 18:29:57 +00:00
vmapple: give apple-vm the vmapple compat properties
machine_class_base_init() gives every concrete machine class a fresh compat_props array, so apple-vm did not inherit vmapple's defaults: virtio-pci devices came up transitional (virtio-net as 1af4:1000 instead of 1af4:1041), and the XHCI lost conditional-intr-mapping, which mach_vmapple_init() now also sets directly. Mark disable-legacy optional, as other machines do. The transitional and non-transitional virtio-pci types have no such property, and a non-optional global aborts QEMU when one of them is created, on -M vmapple too. Signed-off-by: awaiiro <332003006+awaiiro@users.noreply.github.com>
This commit is contained in:
parent
67e7287a1e
commit
7bf2fcc75f
1 changed files with 9 additions and 1 deletions
|
|
@ -712,7 +712,8 @@ static const CPUArchIdList *vmapple_possible_cpu_arch_ids(MachineState *ms)
|
|||
}
|
||||
|
||||
static GlobalProperty vmapple_compat_defaults[] = {
|
||||
{ TYPE_VIRTIO_PCI, "disable-legacy", "on" },
|
||||
/* Optional: transitional and non-transitional types have no such property */
|
||||
{ TYPE_VIRTIO_PCI, "disable-legacy", "on", .optional = true },
|
||||
/*
|
||||
* macOS XHCI driver attempts to schedule events onto even rings 1 & 2
|
||||
* even when (as here) there is no MSI(-X) support. Disabling interrupter
|
||||
|
|
@ -803,6 +804,13 @@ static void apple_vm_machine_class_init(ObjectClass *oc, const void *data)
|
|||
/* Parent (vmapple) class_init has already run; override only the CPU. */
|
||||
mc->default_cpu_type = TYPE_APPLE_VM_CPU;
|
||||
mc->desc = "Apple aarch64 Virtual Machine (Orchard, custom CPU)";
|
||||
|
||||
/*
|
||||
* Except compat_props: machine_class_base_init() gives every concrete
|
||||
* machine class a fresh array, so the parent's defaults are not inherited.
|
||||
*/
|
||||
compat_props_add(mc->compat_props, vmapple_compat_defaults,
|
||||
G_N_ELEMENTS(vmapple_compat_defaults));
|
||||
}
|
||||
|
||||
static const TypeInfo apple_vm_machine_info = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue