From: Isaku Yamahata <isaku.yamahata@gmail.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: isaku.yamahata@intel.com, berrange@redhat.com, mst@redhat.com,
f4bug@amsat.org, qemu-devel@nongnu.org, reinoud@NetBSD.org,
pbonzini@redhat.com, isaku.yamahata@gmail.com
Subject: Re: [PATCH for-6.0] x86:acpi:piix4: reinitialize PM1.CNT on reset
Date: Tue, 16 Mar 2021 13:56:03 -0700 [thread overview]
Message-ID: <20210316205603.GA1037316@private.email.ne.jp> (raw)
In-Reply-To: <20210316202956.3041128-1-imammedo@redhat.com>
The fix itself looks good to me for the reported issue.
Should more registers be reset in theory?
But it would cause other issues.
i.e.
acpi_pm1_evt_reset(&s->ar);
acpi_pm_tmr_reset(&s->ar);
acpi_gpe_reset(&s->ar);
Reviewed-by: Isaku Yamahata <isaku.yamahata@intel.com>
Thanks,
On Tue, Mar 16, 2021 at 04:29:56PM -0400,
Igor Mammedov <imammedo@redhat.com> wrote:
> Commit 6be8cf56bc8b made sure that SCI is enabled in PM1.CNT
> on reset in acpi_only mode by modifying acpi_pm1_cnt_reset() and
> that worked for q35 as expected.
>
> The function was introduced by commit
> eaba51c573a (acpi, acpi_piix, vt82c686: factor out PM1_CNT logic)
> that forgot to actually call it at piix4 reset time and as result
> SCI_EN wasn't set as was expected by 6be8cf56bc8b in acpi_only mode.
>
> So Windows crashes when it notices that SCI_EN is not set and FADT is
> not providing information about how to enable it anymore.
> Reproducer:
> qemu-system-x86_64 -enable-kvm -M pc-i440fx-6.0,smm=off -cdrom any_windows_10x64.iso
>
> Fix it by calling acpi_pm1_cnt_reset() at piix4 reset time.
>
> Fixes: 6be8cf56bc8b (acpi/core: always set SCI_EN when SMM isn't supported)
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> ---
> CC: isaku.yamahata@intel.com
> CC: mst@redhat.com
> CC: reinoud@NetBSD.org
> CC: isaku.yamahata@gmail.com
> CC: berrange@redhat.com
> CC: pbonzini@redhat.com
> CC: f4bug@amsat.org
> ---
> hw/acpi/piix4.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
> index 1efc0ded9f..7cab438015 100644
> --- a/hw/acpi/piix4.c
> +++ b/hw/acpi/piix4.c
> @@ -325,6 +325,7 @@ static void piix4_pm_reset(DeviceState *dev)
> /* Mark SMM as already inited (until KVM supports SMM). */
> pci_conf[0x5B] = 0x02;
> }
> + acpi_pm1_cnt_reset(&s->ar);
> pm_io_space_update(s);
> acpi_pcihp_reset(&s->acpi_pci_hotplug, !s->use_acpi_root_pci_hotplug);
> }
> --
> 2.27.0
>
>
--
Isaku Yamahata <isaku.yamahata@gmail.com>
next prev parent reply other threads:[~2021-03-16 20:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-16 20:29 [PATCH for-6.0] x86:acpi:piix4: reinitialize PM1.CNT on reset Igor Mammedov
2021-03-16 20:56 ` Isaku Yamahata [this message]
2021-03-17 9:41 ` Igor Mammedov
2021-03-17 21:49 ` [PATCH] acpi:piix4, vt82c686: reinitialize acpi PM device " isaku.yamahata
2021-03-22 22:57 ` Michael S. Tsirkin
2021-03-17 16:37 ` [PATCH for-6.0] x86:acpi:piix4: reinitialize PM1.CNT " Reinoud Zandijk
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=20210316205603.GA1037316@private.email.ne.jp \
--to=isaku.yamahata@gmail.com \
--cc=berrange@redhat.com \
--cc=f4bug@amsat.org \
--cc=imammedo@redhat.com \
--cc=isaku.yamahata@intel.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=reinoud@NetBSD.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).