All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: ben@skyportsystems.com
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v4 4/9] ACPI: Add Virtual Machine Generation ID support
Date: Wed, 25 Jan 2017 15:00:23 +0100	[thread overview]
Message-ID: <09603363-b148-ec6c-8cca-74758af722ff@redhat.com> (raw)
In-Reply-To: <be3cd2b4-9a33-5c2c-902a-8a5967518348@redhat.com>

On 01/25/17 11:04, Laszlo Ersek wrote:

> (7) The blob constructed in this function, as a GArray, should be the
> exact same object that is later linked into fw_cfg, via acpi_setup() -->
> vmgenid_add_fw_cfg().
> 
> Currently, the blob is allocated here under the variable "guid", and
> passed to bios_linker_loader_alloc_ret_addr(). That results in the
> creation of a new BiosLinkerFileEntry object, with the "blob" field
> being set to "guid".
> 
> However, in vmgenid_add_fw_cfg(), the VmGenIdState.guid.data field is
> linked into fw_cfg. This is incorrect, those objects are independent,
> but they should be the same.
> 
> Here's how to implement it:
> 
> * Add the field
> 
>     GArray *vmgenid
> 
>   to the "AcpiBuildTables" structure in "include/hw/acpi/aml-build.h",
>   under the "tcpalog" field.
> 
> * Extend the acpi_build_tables_init() and acpi_build_tables_cleanup()
>   functions in "hw/acpi/aml-build.c", so that the new field is
>   initialized and released.

In acpi_build_tables_cleanup(), the line you need is

    g_array_free(tables->vmgenid, mfre);

similarly to "tcpalog".

> 
> * In the acpi_build() function, pass "tables->vmgenid" to
>   vmgenid_build_acpi(). This will require the a new parameter for the
>   latter function.
> 
> * In vmgenid_build_acpi(), construct the blob as described under (5)
>   and (6).
> 
> * In the acpi_setup() function, pass "tables.vmgenid" to
>   vmgenid_add_fw_cfg(). (Again, new function parameter is necessary.)
> 
> * In vmgenid_add_fw_cfg(), link "tables.vmgenid->data" into fw_cfg, not
>   VmGenIdState.guid.data.

Thanks
Laszlo

  reply	other threads:[~2017-01-25 14:00 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25  1:43 [Qemu-devel] [PATCH v4 0/9] Add support for VM Generation ID ben
2017-01-25  1:43 ` [Qemu-devel] [PATCH v4 1/9] ACPI: Add a function for building named qword entries ben
2017-01-25  3:55   ` Laszlo Ersek
2017-01-25 17:36     ` Ben Warren
2017-01-25 18:35       ` Michael S. Tsirkin
2017-01-26  0:48         ` Laszlo Ersek
2017-01-26  5:35           ` Ben Warren
2017-01-26  8:21             ` Laszlo Ersek
2017-01-26 15:20           ` Michael S. Tsirkin
2017-01-26 17:43             ` Laszlo Ersek
2017-01-26 18:15               ` Michael S. Tsirkin
2017-01-26 18:25                 ` Laszlo Ersek
2017-01-26 18:59                   ` Michael S. Tsirkin
2017-01-27  3:20                     ` Laszlo Ersek
2017-01-27 14:18                     ` Kevin O'Connor
2017-01-27 14:46                       ` Laszlo Ersek
2017-01-27 15:43                         ` Kevin O'Connor
2017-01-27 16:12                           ` Laszlo Ersek
2017-01-27 18:19                             ` Ben Warren
2017-01-30 12:07                               ` Laszlo Ersek
2017-01-30 20:28                           ` Michael S. Tsirkin
2017-01-31  9:51                             ` Igor Mammedov
2017-01-31 21:39                               ` Michael S. Tsirkin
2017-02-01 11:46                                 ` Igor Mammedov
2017-02-01 17:55                                   ` Michael S. Tsirkin
2017-01-25  1:43 ` [Qemu-devel] [PATCH v4 2/9] linker-loader: Add new 'allocate and return address' cmd ben
2017-01-25  4:30   ` Laszlo Ersek
2017-01-25 13:03   ` Laszlo Ersek
2017-01-25  1:43 ` [Qemu-devel] [PATCH v4 3/9] docs: VM Generation ID device description ben
2017-01-25  5:29   ` Laszlo Ersek
2017-01-25  1:43 ` [Qemu-devel] [PATCH v4 4/9] ACPI: Add Virtual Machine Generation ID support ben
2017-01-25 10:04   ` Laszlo Ersek
2017-01-25 14:00     ` Laszlo Ersek [this message]
2017-01-25  1:43 ` [Qemu-devel] [PATCH v4 5/9] qmp/hmp: add query-vm-generation-id and 'info vm-generation-id' commands ben
2017-01-25  1:43 ` [Qemu-devel] [PATCH v4 6/9] qmp/hmp: add set-vm-generation-id commands ben
2017-01-25  1:43 ` [Qemu-devel] [PATCH v4 7/9] PC: Support dynamic sysbus on pc_i440fx ben
2017-01-25 10:09   ` Laszlo Ersek
2017-01-25  1:43 ` [Qemu-devel] [PATCH v4 8/9] tests: Move reusable ACPI macros into a new header file ben
2017-01-25  1:43 ` [Qemu-devel] [PATCH v4 9/9] tests: Add unit tests for the VM Generation ID feature ben

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=09603363-b148-ec6c-8cca-74758af722ff@redhat.com \
    --to=lersek@redhat.com \
    --cc=ben@skyportsystems.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.