diff mbox

[30/35] pc: ACPI BIOS: name CPU hotplug ACPI0004 device

Message ID 1396618620-27823-31-git-send-email-imammedo@redhat.com
State New
Headers show

Commit Message

Igor Mammedov April 4, 2014, 1:36 p.m. UTC
Following patches will add another ACPI0004 device
to the same scope, and that will make Windows BSOD
because it thinks that the second ACPI0004 device
is duplicate.
Adding to device unique _UID, fixes issue and allows
Windows to distinguish devices with the same _HID

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 hw/i386/acpi-dsdt-cpu-hotplug.dsl | 1 +
 1 file changed, 1 insertion(+)

Comments

Michael S. Tsirkin April 6, 2014, 9:18 a.m. UTC | #1
On Fri, Apr 04, 2014 at 03:36:55PM +0200, Igor Mammedov wrote:
> Following patches will add another ACPI0004 device
> to the same scope, and that will make Windows BSOD
> because it thinks that the second ACPI0004 device
> is duplicate.
> Adding to device unique _UID, fixes issue and allows
> Windows to distinguish devices with the same _HID
> 
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>

Weren't we going to rename ACPI0004 to PNP0C02 or something?
I remember it creates problems for older guests.

> ---
>  hw/i386/acpi-dsdt-cpu-hotplug.dsl | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/i386/acpi-dsdt-cpu-hotplug.dsl b/hw/i386/acpi-dsdt-cpu-hotplug.dsl
> index dee4843..81fb876 100644
> --- a/hw/i386/acpi-dsdt-cpu-hotplug.dsl
> +++ b/hw/i386/acpi-dsdt-cpu-hotplug.dsl
> @@ -94,6 +94,7 @@ Scope(\_SB) {
>  
>      Device(CPU_HOTPLUG_RESOURCE_DEVICE) {
>          Name(_HID, "ACPI0004")
> +        Name(_UID, "CPU hotplug resources")
>  
>          Name(_CRS, ResourceTemplate() {
>              IO(Decode16, CPU_STATUS_BASE, CPU_STATUS_BASE, 0, CPU_STATUS_LEN)
> -- 
> 1.9.0
Igor Mammedov April 7, 2014, 7:13 a.m. UTC | #2
On Sun, 6 Apr 2014 12:18:50 +0300
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> On Fri, Apr 04, 2014 at 03:36:55PM +0200, Igor Mammedov wrote:
> > Following patches will add another ACPI0004 device
> > to the same scope, and that will make Windows BSOD
> > because it thinks that the second ACPI0004 device
> > is duplicate.
> > Adding to device unique _UID, fixes issue and allows
> > Windows to distinguish devices with the same _HID
> > 
> > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> 
> Weren't we going to rename ACPI0004 to PNP0C02 or something?
> I remember it creates problems for older guests.
I've tested it wit XPsp3 and WS2003, and they are fine with it.

The reason why ACPI0004 didn't worked nice at the beginning
was that IO ranges that were exposed as _CRS in it were
conflicting with PCI0._CRS. With Q35 CPU hotplug patches
that was fixed and ACPI0004 works just fine.

PNP0C02 has a small drawback, which is that OSPM (Windows)
doesn't do _CRS verification (i.e. ignores it), so lets
keep it as the last resort/workaround to use if nothing else works.

> 
> > ---
> >  hw/i386/acpi-dsdt-cpu-hotplug.dsl | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/hw/i386/acpi-dsdt-cpu-hotplug.dsl b/hw/i386/acpi-dsdt-cpu-hotplug.dsl
> > index dee4843..81fb876 100644
> > --- a/hw/i386/acpi-dsdt-cpu-hotplug.dsl
> > +++ b/hw/i386/acpi-dsdt-cpu-hotplug.dsl
> > @@ -94,6 +94,7 @@ Scope(\_SB) {
> >  
> >      Device(CPU_HOTPLUG_RESOURCE_DEVICE) {
> >          Name(_HID, "ACPI0004")
> > +        Name(_UID, "CPU hotplug resources")
> >  
> >          Name(_CRS, ResourceTemplate() {
> >              IO(Decode16, CPU_STATUS_BASE, CPU_STATUS_BASE, 0, CPU_STATUS_LEN)
> > -- 
> > 1.9.0
diff mbox

Patch

diff --git a/hw/i386/acpi-dsdt-cpu-hotplug.dsl b/hw/i386/acpi-dsdt-cpu-hotplug.dsl
index dee4843..81fb876 100644
--- a/hw/i386/acpi-dsdt-cpu-hotplug.dsl
+++ b/hw/i386/acpi-dsdt-cpu-hotplug.dsl
@@ -94,6 +94,7 @@  Scope(\_SB) {
 
     Device(CPU_HOTPLUG_RESOURCE_DEVICE) {
         Name(_HID, "ACPI0004")
+        Name(_UID, "CPU hotplug resources")
 
         Name(_CRS, ResourceTemplate() {
             IO(Decode16, CPU_STATUS_BASE, CPU_STATUS_BASE, 0, CPU_STATUS_LEN)