microvm.c (66577e9e1caee48c6ebc1a2161b5d9857fcde8b3) | microvm.c (a5c80ab847dada26137461e534f75bb9bcb85a89) |
---|---|
1/* 2 * Copyright (c) 2018 Intel Corporation 3 * Copyright (c) 2019 Red Hat, Inc. 4 * 5 * This program is free software; you can redistribute it and/or modify it 6 * under the terms and conditions of the GNU General Public License, 7 * version 2 or later, as published by the Free Software Foundation. 8 * --- 375 unchanged lines hidden (view full) --- 384 * 385 * Yes, this is a hack, but one that heavily improves the UX without 386 * introducing any significant issues. 387 */ 388 cmdline = g_strdup(machine->kernel_cmdline); 389 bus = sysbus_get_default(); 390 QTAILQ_FOREACH(kid, &bus->children, sibling) { 391 DeviceState *dev = kid->child; | 1/* 2 * Copyright (c) 2018 Intel Corporation 3 * Copyright (c) 2019 Red Hat, Inc. 4 * 5 * This program is free software; you can redistribute it and/or modify it 6 * under the terms and conditions of the GNU General Public License, 7 * version 2 or later, as published by the Free Software Foundation. 8 * --- 375 unchanged lines hidden (view full) --- 384 * 385 * Yes, this is a hack, but one that heavily improves the UX without 386 * introducing any significant issues. 387 */ 388 cmdline = g_strdup(machine->kernel_cmdline); 389 bus = sysbus_get_default(); 390 QTAILQ_FOREACH(kid, &bus->children, sibling) { 391 DeviceState *dev = kid->child; |
392 ObjectClass *class = object_get_class(OBJECT(dev)); | |
393 | 392 |
394 if (class == object_class_by_name(TYPE_VIRTIO_MMIO)) { | 393 if (object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_MMIO)) { |
395 VirtIOMMIOProxy *mmio = VIRTIO_MMIO(OBJECT(dev)); 396 VirtioBusState *mmio_virtio_bus = &mmio->bus; 397 BusState *mmio_bus = &mmio_virtio_bus->parent_obj; 398 399 if (!QTAILQ_EMPTY(&mmio_bus->children)) { 400 gchar *mmio_cmdline = microvm_get_mmio_cmdline 401 (mmio_bus->name, mms->virtio_irq_base); 402 if (mmio_cmdline) { --- 332 unchanged lines hidden --- | 394 VirtIOMMIOProxy *mmio = VIRTIO_MMIO(OBJECT(dev)); 395 VirtioBusState *mmio_virtio_bus = &mmio->bus; 396 BusState *mmio_bus = &mmio_virtio_bus->parent_obj; 397 398 if (!QTAILQ_EMPTY(&mmio_bus->children)) { 399 gchar *mmio_cmdline = microvm_get_mmio_cmdline 400 (mmio_bus->name, mms->virtio_irq_base); 401 if (mmio_cmdline) { --- 332 unchanged lines hidden --- |