|
@@ -271,6 +271,17 @@ static void create_fdt(VirtMachineState *vms)
|
|
qemu_fdt_setprop_cell(fdt, "/", "#size-cells", 0x2);
|
|
qemu_fdt_setprop_cell(fdt, "/", "#size-cells", 0x2);
|
|
qemu_fdt_setprop_string(fdt, "/", "model", "linux,dummy-virt");
|
|
qemu_fdt_setprop_string(fdt, "/", "model", "linux,dummy-virt");
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * For QEMU, all DMA is coherent. Advertising this in the root node
|
|
|
|
+ * has two benefits:
|
|
|
|
+ *
|
|
|
|
+ * - It avoids potential bugs where we forget to mark a DMA
|
|
|
|
+ * capable device as being dma-coherent
|
|
|
|
+ * - It avoids spurious warnings from the Linux kernel about
|
|
|
|
+ * devices which can't do DMA at all
|
|
|
|
+ */
|
|
|
|
+ qemu_fdt_setprop(fdt, "/", "dma-coherent", NULL, 0);
|
|
|
|
+
|
|
/* /chosen must exist for load_dtb to fill in necessary properties later */
|
|
/* /chosen must exist for load_dtb to fill in necessary properties later */
|
|
qemu_fdt_add_subnode(fdt, "/chosen");
|
|
qemu_fdt_add_subnode(fdt, "/chosen");
|
|
if (vms->dtb_randomness) {
|
|
if (vms->dtb_randomness) {
|