From: Paolo Bonzini <pbonzini@redhat.com>
To: Phil Dennis-Jordan <phil@philjordan.eu>,
"Michael S. Tsirkin" <mst@redhat.com>,
Igor Mammedov <imammedo@redhat.com>,
Richard Henderson <rth@twiddle.net>,
Eduardo Habkost <ehabkost@redhat.com>,
qemu-devel@nongnu.org, Laszlo Ersek <lersek@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3 0/2] hw/i386: Update FADT to Revision 3 (ACPI 2.0)
Date: Fri, 21 Apr 2017 11:42:13 +0200 [thread overview]
Message-ID: <9ba2d971-8527-7d50-8df2-51f1703e3269@redhat.com> (raw)
In-Reply-To: <1489558827-28971-1-git-send-email-phil@philjordan.eu>
On 15/03/2017 07:20, Phil Dennis-Jordan wrote:
> This updates the FADT generated for x86/64 machine types from
> Revision 1 to 3. (Based on ACPI standard 2.0 instead of 1.0) As
> previously, the goal is to make running macOS/OS X guests smoother.
> With a Rev1 FADT, rebooting such a guest doesn't work, as the OS uses
> the reset register information from the FADT. Switching to a Rev3
> (ACPI 2.0) FADT solves this problem.
>
> The previous discussion of this raised a bunch of points, which I'll
> address/clarify here as well:
>
> 1. No runtime option. The preference was expressed that we try to
> stay backwards-compatible with legacy guests as opposed to adding a
> runtime option for different APCI versions. ACPI 2.0/FADT Rev3 is the
> minimum version required for exposing the reset register, and it is
> also backwards-compatible with 1.0/Rev1, so that seemed a good
> version to target.
>
> 2. Legacy guest testing. I've tested this successfully (no apparent regressions) with:
> * Windows XP x86 (both "pc" and "q35" machine types, the latter using -device piix4-ide)
> * Windows 7, both 32-bit and 64-bit editions
> * Windows 10 x64
> * Fedora 7 x86 Live image
> * Fedora 25 x86_64 Live image
> * Ubuntu 10.04.4 AMD64 Live image
> Any other specific OSes and versions I should check?
>
>
> 3. 64-bit and 32-bit pointer fields.
>
> Only very recent versions of the ACPI spec (6.1 and various errata of
> 5.1 and 6.0) are clear about mutual exclusion of the FADT's 32-bit and
> 64-bit variants of pointers to tables and registers. The 2.0 version
> simply states "This is a required field" for both PM1a_EVT_BLK and
> X_PM1a_EVT_BLK, for example, although it does also state for the former
> that "This field is superseded in ACPI 2.0 by the X_PM1a_EVT_BLK field."
> No requirement is specified explicitly for the DSDT and X_DSDT fields.
>
> In practice, I have found that Windows 10 will fail to boot with a
> Rev3 FADT unless BOTH the 32-bit and 64-bit variants are filled. The
> exception is X_FIRMWARE_CTRL, which is the first to be explicitly marked
> as mutually exclusive with FIRMWARE_CTRL in an ACPI spec - with a
> preference for FIRMWARE_CTRL if the pointer fits in a 32-bit field.
> Satisfying Windows 10 in this way does not contradict the 2.0
> specification, and it also complies with the 1.0 standard for the fields
> which Rev1 of the FADT already has, so that's what I've gone with in the
> implementation.
>
> The only problem is that upstream OVMF cannot deal with multiple
> pointers to the same table in the linker commands. This turns out to be
> a bug in OVMF/EDK2[1], and I am submitting a separate patch to EDK2 to
> fix that problem. The fix for a second issue where OVMF would rewrite
> the FADT so the DSDT is erroneously set to 0 has already been
> upstreamed.[2] I don't see a workaround to this other than fixing the
> OVMF code.
>
> 4. i440FX vs Q35
>
> Both machine types have the reset register, and it's at the same I/O
> port. To illustrate/document this, the second patch in the series
> adds a build-time assertion that this is indeed so.
Queued for 2.10, thanks.
Paolo
next prev parent reply other threads:[~2017-04-21 9:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-15 6:20 [Qemu-devel] [PATCH v3 0/2] hw/i386: Update FADT to Revision 3 (ACPI 2.0) Phil Dennis-Jordan
2017-03-15 6:20 ` [Qemu-devel] [PATCH v3 1/2] hw/i386: Use Rev3 FADT (ACPI 2.0) instead of Rev1 to improve guest OS support Phil Dennis-Jordan
2017-03-15 6:20 ` [Qemu-devel] [PATCH v3 2/2] hw/i386: Build-time assertion on pc/q35 reset register being identical Phil Dennis-Jordan
2017-03-15 14:17 ` [Qemu-devel] [PATCH v3 0/2] hw/i386: Update FADT to Revision 3 (ACPI 2.0) Michael S. Tsirkin
2017-04-21 9:43 ` Paolo Bonzini
2017-03-16 12:43 ` Laszlo Ersek
2017-03-16 14:27 ` Michael S. Tsirkin
2017-04-21 9:42 ` Paolo Bonzini [this message]
[not found] <mailman.59002.1489587913.22740.qemu-devel@nongnu.org>
2017-03-15 15:27 ` G 3
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=9ba2d971-8527-7d50-8df2-51f1703e3269@redhat.com \
--to=pbonzini@redhat.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=lersek@redhat.com \
--cc=mst@redhat.com \
--cc=phil@philjordan.eu \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).