From: Laszlo Ersek <lersek@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: ben@skyportsystems.com, qemu-devel@nongnu.org, imammedo@redhat.com
Subject: Re: [Qemu-devel] [PATCH v6 0/7] Add support for VM Generation ID
Date: Wed, 15 Feb 2017 21:52:55 +0100 [thread overview]
Message-ID: <e7e9cf57-a5b4-4f2b-36e5-3e08dee70d68@redhat.com> (raw)
In-Reply-To: <20170215220837-mutt-send-email-mst@kernel.org>
On 02/15/17 21:09, Michael S. Tsirkin wrote:
> On Wed, Feb 15, 2017 at 08:47:48PM +0100, Laszlo Ersek wrote:
[snip]
>> For patches #1, #3, #4 and #5:
>>
>> Tested-by: Laszlo Ersek <lersek@redhat.com>
>>
>> I'll soon post the OVMF patches.
>>
>> Thanks!
>> Laszlo
>
>
> How do you feel about Igor's request to change WRITE_POINTER to add
> offset in there, so guest can pass in the address of GUID and
> not start of table? Would that be a lot of work to add?
I think it's doable in practice: simply add a constant from the command
itself, for passing the value back to QEMU, and also for saving the
fw_cfg write commend for S3 resume time.
But, I disagree with it from a design POV.
Igor's point is:
> Math complicates QEMU code though and not only QMEMU but AML code as
> well.
As I understand it, the goal is to push the addition to the firmware
(which is "one place"), rather than having to implement it twice in
QEMU, i.e., in two places ((a) native QEMU logic, (b) AML generator).
Here's my counter-argument:
(a) As I mentioned earlier, assume a complex communication structure
between the guest OS and QEMU. Currently our shared structure consists
of a single field (the GUID), but next time it might contain several fields.
For such a multi-field shared structure, QEMU will have to do manual
offsetting into the guest RAM anyway, for accessing fields F1, F2, and
F3. We will not create three separate WRITE_POINTER commands and let the
firmware calculate and return the absolute GPAs of the fields F1, F2 and
F3. Instead, there will be one WRITE_POINTER command, and QEMU will do
the offsetting manually, minimally for fields F2 and F3.
"src_offset" looks tempting now only because we have a shared structure
with only one field, the GUID at offset 40 decimal.
(b) Regarding the runtime addition in the AML code:
As discussed before, the main reason *now*, for not pointing VGIA (and
other named integer objects) with ADD_POINTER commands directly to
"meaningful" fields, is that OVMF probes the targets of ADD_POINTER
commands for patterns that look like ACPI table headers. And, for the
time being, we want to suppress any mis-recognitions by prepending some
padding.
Igor was right to dislike this, and we agreed that *down the road* we
should add allocation flags, or further allocation commands, to supplant
this kind of heuristics in OVMF. But:
- we don't have time to do it now, plus
- please observe that the runtime addition in AML relates to the
ADD_POINTER and the ALLOCATE commands. It does not relate to
WRITE_POINTER at all.
Whatever we change on WRITE_POINTER will do nothing for suppressing
OVMF's table header probing -- because that is tied to ADD_POINTER
--, therefore WRITE_POINTER tweaks cannot eliminate the "need to add"
in AML.
In summary, I think the proposed WRITE_POINTER modification is
implementable, but I think it will not pay off, because:
(a) for QEMU logic, it will not prove useful as soon as we have a
multi-field shared structure (QEMU will have to add field offsets anyway),
(b) and for eliminating the AML addition (which is a consequence of the
current ADD_POINTER handling in OVMF), it does nothing.
Thanks
Laszlo
next prev parent reply other threads:[~2017-02-15 20:53 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-15 6:15 [Qemu-devel] [PATCH v6 0/7] Add support for VM Generation ID ben
2017-02-15 6:15 ` [Qemu-devel] [PATCH v6 1/7] linker-loader: Add new 'write pointer' command ben
2017-02-15 10:57 ` Igor Mammedov
2017-02-15 14:13 ` Laszlo Ersek
2017-02-15 14:17 ` Laszlo Ersek
2017-02-15 15:22 ` Igor Mammedov
2017-02-15 15:30 ` Michael S. Tsirkin
2017-02-15 15:56 ` Igor Mammedov
2017-02-15 16:39 ` Michael S. Tsirkin
2017-02-15 17:19 ` Laszlo Ersek
2017-02-15 17:43 ` Igor Mammedov
2017-02-15 17:54 ` Ben Warren
2017-02-15 18:06 ` Michael S. Tsirkin
2017-02-15 18:14 ` Ben Warren
2017-02-15 18:35 ` Igor Mammedov
2017-02-15 18:44 ` Ben Warren
2017-02-15 21:09 ` Michael S. Tsirkin
2017-02-15 18:04 ` Michael S. Tsirkin
2017-02-15 18:24 ` Igor Mammedov
2017-02-15 19:14 ` Ben Warren
2017-02-15 19:19 ` Ben Warren
2017-02-16 11:10 ` Igor Mammedov
2017-02-16 15:38 ` Eric Blake
2017-02-15 19:34 ` Michael S. Tsirkin
2017-02-16 8:25 ` Igor Mammedov
2017-02-16 9:49 ` Laszlo Ersek
2017-02-15 6:15 ` [Qemu-devel] [PATCH v6 2/7] docs: VM Generation ID device description ben
2017-02-15 11:07 ` Igor Mammedov
2017-02-15 14:26 ` Laszlo Ersek
2017-02-15 6:15 ` [Qemu-devel] [PATCH v6 3/7] ACPI: Add vmgenid blob storage to the build tables ben
2017-02-15 11:15 ` Igor Mammedov
2017-02-15 14:30 ` Laszlo Ersek
2017-02-16 6:11 ` Ben Warren
2017-02-15 6:15 ` [Qemu-devel] [PATCH v6 4/7] ACPI: Add Virtual Machine Generation ID support ben
2017-02-15 12:19 ` Igor Mammedov
2017-02-15 15:24 ` Laszlo Ersek
2017-02-15 16:07 ` Igor Mammedov
2017-02-15 16:40 ` Michael S. Tsirkin
2017-02-15 17:12 ` Ben Warren
2017-02-16 6:13 ` Ben Warren
2017-02-15 17:11 ` Ben Warren
2017-02-15 6:15 ` [Qemu-devel] [PATCH v6 5/7] qmp/hmp: add query-vm-generation-id and 'info vm-generation-id' commands ben
2017-02-15 15:36 ` Laszlo Ersek
2017-02-16 6:13 ` Ben Warren
2017-02-15 6:15 ` [Qemu-devel] [PATCH v6 6/7] tests: Move reusable ACPI macros into a new header file ben
2017-02-15 12:54 ` Igor Mammedov
2017-02-15 21:35 ` Eric Blake
2017-02-15 21:58 ` Ben Warren
2017-02-15 22:56 ` Eric Blake
2017-02-15 23:05 ` Ben Warren
2017-02-15 6:15 ` [Qemu-devel] [PATCH v6 7/7] tests: Add unit tests for the VM Generation ID feature ben
2017-02-15 13:13 ` Igor Mammedov
2017-02-16 6:15 ` Ben Warren
2017-02-15 19:47 ` [Qemu-devel] [PATCH v6 0/7] Add support for VM Generation ID Laszlo Ersek
2017-02-15 20:09 ` Michael S. Tsirkin
2017-02-15 20:15 ` Ben Warren
2017-02-15 20:52 ` Laszlo Ersek [this message]
2017-02-16 6:10 ` Ben Warren
2017-02-16 9:36 ` Laszlo Ersek
2017-02-16 12:08 ` Igor Mammedov
2017-02-16 13:29 ` Laszlo Ersek
2017-02-16 14:27 ` Igor Mammedov
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=e7e9cf57-a5b4-4f2b-36e5-3e08dee70d68@redhat.com \
--to=lersek@redhat.com \
--cc=ben@skyportsystems.com \
--cc=imammedo@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).