Il 14/09/2014 08:25, Gal Hammer ha scritto: > Hi, > > A two parts patch to add a QEmu support for Microsoft's Virtual Machine > Generation ID device. > > The first one add a new ACPI directive which allow to use a 16-bytes > buffer in an ACPI table. This buffer is for storing the VM's UUID. > > The second is the ACPI tables changes and the actual device. > > Your comment are welcomed. > > Thanks, > > Gal. > > V2: - Remove "-uuid" command line parameter. > - Move device's description from SSDT to DDST table. > - Add new "vmgenid" sysbus device. > > Gal Hammer (2): > i386: Add an ACPI_EXTRACT_NAME_BUFFER16 directive. > i386: Add a Virtual Machine Generation ID device. > > default-configs/i386-softmmu.mak | 1 + > default-configs/x86_64-softmmu.mak | 1 + > hw/i386/acpi-build.c | 23 ++++++++++- > hw/i386/acpi-dsdt.dsl | 37 +++++++++++++++++ > hw/misc/Makefile.objs | 1 + > hw/misc/vmgenid.c | 85 > ++++++++++++++++++++++++++++++++++++++ > include/hw/i386/pc.h | 3 ++ > scripts/acpi_extract.py | 23 +++++++---- > 8 files changed, 163 insertions(+), 11 deletions(-) > create mode 100644 hw/misc/vmgenid.c >
The idea is okay, but the device has to be added to the Q35 DSDT as well. If you just #included a file in the same style as acpi-dsdt-hpet.dsl, you would have a namespace clash between the PIIX and Q35 DSDTs. acpi-dsdt-hpet.dsl can do it because it has no ACPI_EXTRACT directives. I think because of this, it is a bit simpler to add the device optionally to the SSDT, similar to how the TPM is handled. Paolo