From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42522) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cdssu-00023F-8p for qemu-devel@nongnu.org; Wed, 15 Feb 2017 01:16:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cdssq-0007Cv-6m for qemu-devel@nongnu.org; Wed, 15 Feb 2017 01:16:12 -0500 Received: from mail-pg0-x22c.google.com ([2607:f8b0:400e:c05::22c]:33426) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cdssp-0007Cf-Ts for qemu-devel@nongnu.org; Wed, 15 Feb 2017 01:16:08 -0500 Received: by mail-pg0-x22c.google.com with SMTP id 204so34130504pge.0 for ; Tue, 14 Feb 2017 22:16:06 -0800 (PST) From: ben@skyportsystems.com Date: Tue, 14 Feb 2017 22:15:42 -0800 Message-Id: Subject: [Qemu-devel] [PATCH v6 0/7] Add support for VM Generation ID List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: lersek@redhat.com, mst@redhat.com, imammedo@redhat.com, Ben Warren From: Ben Warren This patch set adds support for passing a GUID to Windows guests. It is a re-implementation of previous patch sets written by Igor Mammedov et al, but this time passing the GUID data as a fw_cfg blob. This patch set has dependencies on new guest functionality, in particular the support for a new linker-loader command and the ability to write back data to QEMU over a DMA link. Work is in flight in both SeaBIOS and OVMF to support this. v5->v6: - Rebased to top of tree. - Changed device from sysbus to a simple device. This removed the need for adding dynamic sysbus support to pc_piix boards. - Removed patch that introduced QWORD patching of AML. - Removed ability to set GUID via QMP/HMP. - Improved comments/documentation in code. v4->v5: - Added significantly more detail to the documentation. - Replaced the previously-implemented linker-loader command with a new one: "write pointer". This allows writing the guest address of a fw_cfg blob back to an arbitrary offset in a writeable fw_cfg file visible to QEMU. This will require support in SeaBIOS and OVMF (ongoing). - Fixed endianness issues throughout. - Several styling cleanups. v3->v4: - Rebased to top of tree. - Re-added document patch that was accidentally dropped from the last revision. - Added VMState functionality so that VGIA is restored properly. - Added Unit tests v2->v3: - Added second writeable fw_cfg for storing the VM Generaiton ID address. This uses a new linker-loader command for instructing the guest to write back the allocated address. A patch for SeaBIOS has been submitted (https://www.seabios.org/pipermail/seabios/2017-January/011079.html) and the resulting binary will need to be pulled into QEMU once accepted. - Setting VM Generation ID by command line or qmp/hmp now accepts an "auto" value, whereby QEMU generates a random GUID. - Incorporated review comments from v2 mainly around code styling and AML syntax - Changed to use the E05 ACPI event instead of E00 v1->v2: - Removed "changed" boolean parameter as it is unneeded - Added ACPI Notify logic - Style changes to pass checkpatch.pl - Added support for dynamic sysbus to pc_piix boards This patch set adds support for passing a GUID to Windows guests. It is a re-implementation of previous patch sets written by Igor Mammedov et al, but this time passing the GUID data as a fw_cfg blob. This patch set has dependencies on new guest functionality, in particular the support for a new linker-loader command and the ability to write back data to QEMU over a DMA link. Work is in flight in both SeaBIOS and OVMF to support this. v5->v6: - Rebased to top of tree. - Changed device from sysbus to a simple device. This removed the need for adding dynamic sysbus support to pc_piix boards. - Removed patch that introduced QWORD patching of AML. - Removed ability to set GUID via QMP/HMP. - Improved comments/documentation in code. v4->v5: - Added significantly more detail to the documentation. - Replaced the previously-implemented linker-loader command with a new one: "write pointer". This allows writing the guest address of a fw_cfg blob back to an arbitrary offset in a writeable fw_cfg file visible to QEMU. This will require support in SeaBIOS and OVMF (ongoing). - Fixed endianness issues throughout. - Several styling cleanups. v3->v4: - Rebased to top of tree. - Re-added document patch that was accidentally dropped from the last revision. - Added VMState functionality so that VGIA is restored properly. - Added Unit tests v2->v3: - Added second writeable fw_cfg for storing the VM Generaiton ID address. This uses a new linker-loader command for instructing the guest to write back the allocated address. A patch for SeaBIOS has been submitted (https://www.seabios.org/pipermail/seabios/2017-January/011079.html) and the resulting binary will need to be pulled into QEMU once accepted. - Setting VM Generation ID by command line or qmp/hmp now accepts an "auto" value, whereby QEMU generates a random GUID. - Incorporated review comments from v2 mainly around code styling and AML syntax - Changed to use the E05 ACPI event instead of E00 v1->v2: - Removed "changed" boolean parameter as it is unneeded - Added ACPI Notify logic - Style changes to pass checkpatch.pl - Added support for dynamic sysbus to pc_piix boards Ben Warren (6): linker-loader: Add new 'write pointer' command docs: VM Generation ID device description ACPI: Add vmgenid blob storage to the build tables ACPI: Add Virtual Machine Generation ID support tests: Move reusable ACPI macros into a new header file tests: Add unit tests for the VM Generation ID feature Igor Mammedov (1): qmp/hmp: add query-vm-generation-id and 'info vm-generation-id' commands default-configs/i386-softmmu.mak | 1 + default-configs/x86_64-softmmu.mak | 1 + docs/specs/vmgenid.txt | 245 +++++++++++++++++++++++++++++++++ hmp-commands-info.hx | 13 ++ hmp.c | 9 ++ hmp.h | 1 + hw/acpi/Makefile.objs | 1 + hw/acpi/aml-build.c | 2 + hw/acpi/bios-linker-loader.c | 58 +++++++- hw/acpi/vmgenid.c | 253 +++++++++++++++++++++++++++++++++++ hw/i386/acpi-build.c | 16 +++ include/hw/acpi/acpi_dev_interface.h | 1 + include/hw/acpi/aml-build.h | 1 + include/hw/acpi/bios-linker-loader.h | 6 + include/hw/acpi/vmgenid.h | 35 +++++ qapi-schema.json | 20 +++ stubs/Makefile.objs | 1 + stubs/vmgenid.c | 8 ++ tests/Makefile.include | 2 + tests/acpi-utils.h | 75 +++++++++++ tests/bios-tables-test.c | 72 +--------- tests/vmgenid-test.c | 195 +++++++++++++++++++++++++++ 22 files changed, 942 insertions(+), 74 deletions(-) create mode 100644 docs/specs/vmgenid.txt create mode 100644 hw/acpi/vmgenid.c create mode 100644 include/hw/acpi/vmgenid.h create mode 100644 stubs/vmgenid.c create mode 100644 tests/acpi-utils.h create mode 100644 tests/vmgenid-test.c -- 2.7.4