From: Eric Blake <eblake@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>, ben@skyportsystems.com
Cc: lersek@redhat.com, qemu-devel@nongnu.org, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH v7 1/8] linker-loader: Add new 'write pointer' command
Date: Thu, 16 Feb 2017 09:48:01 -0600 [thread overview]
Message-ID: <a66b6662-b4d2-c4f2-f14e-2e90d5238e0a@redhat.com> (raw)
In-Reply-To: <20170216104310.7bc059e2@nial.brq.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1505 bytes --]
On 02/16/2017 03:43 AM, Igor Mammedov wrote:
>> +++ b/hw/acpi/bios-linker-loader.c
>> @@ -78,6 +78,21 @@ struct BiosLinkerLoaderEntry {
>> uint32_t length;
>> } cksum;
>>
>> + /*
>> + * COMMAND_WRITE_POINTER - write the fw_cfg file (originating from
>> + * @dest_file) at @wr_pointer.offset, by adding a pointer to
>> + * @src_offset within the table originating from @src_file.
>> + * 1,2,4 or 8 byte unsigned addition is used depending on
>> + * @wr_pointer.size.
>> + */
>> + struct {
>> + char dest_file[BIOS_LINKER_LOADER_FILESZ];
>> + char src_file[BIOS_LINKER_LOADER_FILESZ];
>> + uint32_t dst_offset;
>> + uint32_t src_offset;
>> + uint8_t size;
>> + } wr_pointer;
>> +
>> /* padding */
>> char pad[124];
> Shouldn't padding be reduced by 4 bytes to keep
> sizeof(BiosLinkerLoaderEntry) the same as before patch,
> so that old bios would be able to skip this unknown command
> and read the next at the right offset?
No, because you are in the middle of a union rather than a struct (the
outer BiosLinkerLoaderEntry struct size is determined by the largest
member of the union, which is 'char pad[124]'; the new wr_pointer
addition to the union does not change the size of the union).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2017-02-16 15:48 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-16 6:18 [Qemu-devel] [PATCH v7 0/8] Add support for VM Generation ID ben
2017-02-16 6:18 ` [Qemu-devel] [PATCH v7 1/8] linker-loader: Add new 'write pointer' command ben
2017-02-16 9:43 ` Igor Mammedov
2017-02-16 14:43 ` Michael S. Tsirkin
2017-02-16 15:48 ` Eric Blake [this message]
2017-02-16 17:01 ` Laszlo Ersek
2017-02-16 17:04 ` Ben Warren
2017-02-16 6:18 ` [Qemu-devel] [PATCH v7 2/8] docs: VM Generation ID device description ben
2017-02-16 6:18 ` [Qemu-devel] [PATCH v7 3/8] ACPI: Add vmgenid blob storage to the build tables ben
2017-02-16 17:05 ` Laszlo Ersek
2017-02-16 6:18 ` [Qemu-devel] [PATCH v7 4/8] ACPI: Add Virtual Machine Generation ID support ben
2017-02-16 9:56 ` Igor Mammedov
2017-02-16 18:32 ` Ben Warren
2017-02-16 19:03 ` Laszlo Ersek
2017-02-16 19:05 ` Ben Warren
2017-02-16 17:11 ` Laszlo Ersek
2017-02-16 6:18 ` [Qemu-devel] [PATCH v7 5/8] qmp/hmp: add query-vm-generation-id and 'info vm-generation-id' commands ben
2017-02-16 17:13 ` Laszlo Ersek
2017-02-16 6:18 ` [Qemu-devel] [PATCH v7 6/8] tests: Move reusable ACPI code into a utility file ben
2017-02-16 6:18 ` [Qemu-devel] [PATCH v7 7/8] tests: Add unit tests for the VM Generation ID feature ben
2017-02-16 10:36 ` Igor Mammedov
2017-02-16 17:05 ` Ben Warren
2017-02-16 6:18 ` [Qemu-devel] [PATCH v7 8/8] MAINTAINERS: Add VM Generation ID entry ben
2017-02-16 10:44 ` Laszlo Ersek
2017-02-16 14:29 ` [Qemu-devel] [PATCH v7 0/8] Add support for VM Generation ID Igor Mammedov
2017-02-16 14:50 ` Ben Warren
2017-02-16 20:55 ` Laszlo Ersek
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=a66b6662-b4d2-c4f2-f14e-2e90d5238e0a@redhat.com \
--to=eblake@redhat.com \
--cc=ben@skyportsystems.com \
--cc=imammedo@redhat.com \
--cc=lersek@redhat.com \
--cc=mst@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).