qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH V2] hw/acpi: fix Q35 support for legacy Windows OS
@ 2016-03-07 19:14 Marcel Apfelbaum
  2016-03-08  9:00 ` Igor Mammedov
  0 siblings, 1 reply; 2+ messages in thread
From: Marcel Apfelbaum @ 2016-03-07 19:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: ehabkost, mst, ghammer, laine, pbonzini, marcel, imammedo, rth

Legacy Windows operating systems like Windows XP and Windows 2003
require _DIS method to be present for all interrupt links.

PC machines already have a no-op implemented for GSI links, add
it also in Q35.

Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
---

Hi,

I tested this patch with WinXP and Win 2003, but also with Win 10, and Fedora.
This solves a BSOD early in the setup process.

WinXP/2003 can be tested using:
     -device piix3-ide,id=legacyide \
     -drive file=winxp-q35.qcow2,if=none,id=disk -device ide-hd,drive=disk,bus=legacyide.0 \
     -drive file=xp_sp3.iso,if=none,id=cdrom -device ide-cd,drive=cdrom,bus=legacyide.1 

Please note that you have to use the piix3-ide because Win2003 (and probably XP)
does not have Q35 AHCI drivers inbox.

v1 -> v2:
  - Added comment for the no-op _DIS (Michael S. Tsirkin)

Thanks,
Marcel

 hw/i386/acpi-build.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 52c9470..adbf354 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1509,6 +1509,12 @@ static Aml *build_gsi_link_dev(const char *name, uint8_t uid, uint8_t gsi)
 
     aml_append(dev, aml_name_decl("_CRS", crs));
 
+    /*
+     * _DIS can be no-op because the interrupt cannot be disabled.
+     */
+    method = aml_method("_DIS", 0, AML_NOTSERIALIZED);
+    aml_append(dev, method);
+
     method = aml_method("_SRS", 1, AML_NOTSERIALIZED);
     aml_append(dev, method);
 
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH V2] hw/acpi: fix Q35 support for legacy Windows OS
  2016-03-07 19:14 [Qemu-devel] [PATCH V2] hw/acpi: fix Q35 support for legacy Windows OS Marcel Apfelbaum
@ 2016-03-08  9:00 ` Igor Mammedov
  0 siblings, 0 replies; 2+ messages in thread
From: Igor Mammedov @ 2016-03-08  9:00 UTC (permalink / raw)
  To: Marcel Apfelbaum; +Cc: ehabkost, mst, ghammer, qemu-devel, laine, pbonzini, rth

On Mon,  7 Mar 2016 21:14:37 +0200
Marcel Apfelbaum <marcel@redhat.com> wrote:

> Legacy Windows operating systems like Windows XP and Windows 2003
> require _DIS method to be present for all interrupt links.
> 
> PC machines already have a no-op implemented for GSI links, add
> it also in Q35.
> 
> Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>

> ---
> 
> Hi,
> 
> I tested this patch with WinXP and Win 2003, but also with Win 10, and Fedora.
> This solves a BSOD early in the setup process.
> 
> WinXP/2003 can be tested using:
>      -device piix3-ide,id=legacyide \
>      -drive file=winxp-q35.qcow2,if=none,id=disk -device ide-hd,drive=disk,bus=legacyide.0 \
>      -drive file=xp_sp3.iso,if=none,id=cdrom -device ide-cd,drive=cdrom,bus=legacyide.1 
> 
> Please note that you have to use the piix3-ide because Win2003 (and probably XP)
> does not have Q35 AHCI drivers inbox.
> 
> v1 -> v2:
>   - Added comment for the no-op _DIS (Michael S. Tsirkin)
> 
> Thanks,
> Marcel
> 
>  hw/i386/acpi-build.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index 52c9470..adbf354 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -1509,6 +1509,12 @@ static Aml *build_gsi_link_dev(const char *name, uint8_t uid, uint8_t gsi)
>  
>      aml_append(dev, aml_name_decl("_CRS", crs));
>  
> +    /*
> +     * _DIS can be no-op because the interrupt cannot be disabled.
> +     */
> +    method = aml_method("_DIS", 0, AML_NOTSERIALIZED);
> +    aml_append(dev, method);
> +
>      method = aml_method("_SRS", 1, AML_NOTSERIALIZED);
>      aml_append(dev, method);
>  

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-08  9:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-07 19:14 [Qemu-devel] [PATCH V2] hw/acpi: fix Q35 support for legacy Windows OS Marcel Apfelbaum
2016-03-08  9:00 ` Igor Mammedov

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).