Paolo Bonzini <pbonz...@redhat.com> writes: > Il 12/08/2014 10:02, Gal Hammer ha scritto: >> Hi, >> >> On 10/08/2014 20:22, Paolo Bonzini wrote: >> >>> Il 10/08/2014 13:32, Gal Hammer ha scritto: >>>> Based on Microsoft's sepecifications (paper can be dowloaded from >>>> http://go.microsoft.com/fwlink/?LinkId=260709), add a device >>>> description to the SSDT ACPI table. >>>> >>>> The GUID is set using a new "-vmgenid" command line parameter. >>>> >>>> Signed-off-by: Gal Hammer <gham...@redhat.com> >>>> --- >>>> hw/i386/acpi-build.c | 23 +++++++++++++++++++++++ >>>> hw/i386/ssdt-misc.dsl | 33 +++++++++++++++++++++++++++++++++ >>>> qemu-options.hx | 9 +++++++++ >>>> vl.c | 11 +++++++++++ >>>> 4 files changed, 76 insertions(+) >>> >>> Please make this a new device (like pvpanic), instead of adding a new >>> command-line option. >> >> There is a problem with this request. I don't want to use ISA because it >> is obsolete, PCI is overkill for such a device and a SYSBUS (like HPET) >> device doesn't effect the command line options. >> >> Did I miss something in SYSBUS and that's was the reason it didn't >> appear in the "-device ?" list? > > For a sysbus device, you can override the > cannot_instantiate_with_device_add_yet field of DeviceClass in your > class_init function.
Correct. Sysbus devices are not available with device_add / -device by default, because to actually work, they commonly require code to connect them to other devices. A sysbus device that doesn't need such connections can be made available with device_add / -device in the way Paolo described. [...]