[Qemu-devel] [PATCH v3 1/5] hw/i386: allow SHPC for Q35 machine

Aleksandr Bezzubikov posted 5 patches 7 years, 9 months ago
There is a newer version of this series
[Qemu-devel] [PATCH v3 1/5] hw/i386: allow SHPC for Q35 machine
Posted by Aleksandr Bezzubikov 7 years, 9 months ago
Unmask previously masked SHPC feature in _OSC method.

Signed-off-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
---
 hw/i386/acpi-build.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 6b7bade..2ab32f9 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1848,9 +1848,9 @@ static Aml *build_q35_osc_method(void)
 
     /*
      * Always allow native PME, AER (no dependencies)
-     * Never allow SHPC (no SHPC controller in this system)
+     * Allow SHPC (PCI bridges can have SHPC controller)
      */
-    aml_append(if_ctx, aml_and(a_ctrl, aml_int(0x1D), a_ctrl));
+    aml_append(if_ctx, aml_and(a_ctrl, aml_int(0x1F), a_ctrl));
 
     if_ctx2 = aml_if(aml_lnot(aml_equal(aml_arg(1), aml_int(1))));
     /* Unknown revision */
-- 
2.7.4


Re: [SeaBIOS] [PATCH v3 1/5] hw/i386: allow SHPC for Q35 machine
Posted by Marcel Apfelbaum 7 years, 9 months ago
On 29/07/2017 2:37, Aleksandr Bezzubikov wrote:
> Unmask previously masked SHPC feature in _OSC method.
> 
> Signed-off-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
> ---
>   hw/i386/acpi-build.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index 6b7bade..2ab32f9 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -1848,9 +1848,9 @@ static Aml *build_q35_osc_method(void)
>   
>       /*
>        * Always allow native PME, AER (no dependencies)
> -     * Never allow SHPC (no SHPC controller in this system)
> +     * Allow SHPC (PCI bridges can have SHPC controller)
>        */
> -    aml_append(if_ctx, aml_and(a_ctrl, aml_int(0x1D), a_ctrl));
> +    aml_append(if_ctx, aml_and(a_ctrl, aml_int(0x1F), a_ctrl));
>   
>       if_ctx2 = aml_if(aml_lnot(aml_equal(aml_arg(1), aml_int(1))));
>       /* Unknown revision */
> 

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

Thanks,
Marcel

_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://mail.coreboot.org/mailman/listinfo/seabios
Re: [Qemu-devel] [PATCH v3 1/5] hw/i386: allow SHPC for Q35 machine
Posted by Michael S. Tsirkin 7 years, 9 months ago
On Sat, Jul 29, 2017 at 02:37:49AM +0300, Aleksandr Bezzubikov wrote:
> Unmask previously masked SHPC feature in _OSC method.
> 
> Signed-off-by: Aleksandr Bezzubikov <zuban32s@gmail.com>

This does not do what the subject says - it enables
SHPC unconditionally. And I think it will actually break
ACPI hotplug for the PC unless we add an interface to
disable ACPI hotplug and enable SHPC.

Pls limit to Q35 only.

> ---
>  hw/i386/acpi-build.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index 6b7bade..2ab32f9 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -1848,9 +1848,9 @@ static Aml *build_q35_osc_method(void)
>  
>      /*
>       * Always allow native PME, AER (no dependencies)
> -     * Never allow SHPC (no SHPC controller in this system)
> +     * Allow SHPC (PCI bridges can have SHPC controller)
>       */
> -    aml_append(if_ctx, aml_and(a_ctrl, aml_int(0x1D), a_ctrl));
> +    aml_append(if_ctx, aml_and(a_ctrl, aml_int(0x1F), a_ctrl));
>  
>      if_ctx2 = aml_if(aml_lnot(aml_equal(aml_arg(1), aml_int(1))));
>      /* Unknown revision */
> -- 
> 2.7.4

Re: [Qemu-devel] [PATCH v3 1/5] hw/i386: allow SHPC for Q35 machine
Posted by Alexander Bezzubikov 7 years, 9 months ago
чт, 3 авг. 2017 г. в 15:52, Michael S. Tsirkin <mst@redhat.com>:

> On Sat, Jul 29, 2017 at 02:37:49AM +0300, Aleksandr Bezzubikov wrote:
> > Unmask previously masked SHPC feature in _OSC method.
> >
> > Signed-off-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
>
> This does not do what the subject says - it enables
> SHPC unconditionally. And I think it will actually break
> ACPI hotplug for the PC unless we add an interface to
> disable ACPI hotplug and enable SHPC.
>
> Pls limit to Q35 only.
>
>
But this function (build_q35_osc_method) is called only for q35, isn't it?

> ---
> >  hw/i386/acpi-build.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> > index 6b7bade..2ab32f9 100644
> > --- a/hw/i386/acpi-build.c
> > +++ b/hw/i386/acpi-build.c
> > @@ -1848,9 +1848,9 @@ static Aml *build_q35_osc_method(void)
> >
> >      /*
> >       * Always allow native PME, AER (no dependencies)
> > -     * Never allow SHPC (no SHPC controller in this system)
> > +     * Allow SHPC (PCI bridges can have SHPC controller)
> >       */
> > -    aml_append(if_ctx, aml_and(a_ctrl, aml_int(0x1D), a_ctrl));
> > +    aml_append(if_ctx, aml_and(a_ctrl, aml_int(0x1F), a_ctrl));
> >
> >      if_ctx2 = aml_if(aml_lnot(aml_equal(aml_arg(1), aml_int(1))));
> >      /* Unknown revision */
> > --
> > 2.7.4
>
-- 
Aleksandr Bezzubikov
Re: [SeaBIOS] [PATCH v3 1/5] hw/i386: allow SHPC for Q35 machine
Posted by Marcel Apfelbaum 7 years, 9 months ago
On 03/08/2017 15:52, Michael S. Tsirkin wrote:
> On Sat, Jul 29, 2017 at 02:37:49AM +0300, Aleksandr Bezzubikov wrote:
>> Unmask previously masked SHPC feature in _OSC method.
>>
>> Signed-off-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
> 

Hi Michael,


> This does not do what the subject says - it enables
> SHPC unconditionally. And I think it will actually break
> ACPI hotplug for the PC unless we add an interface to
> disable ACPI hotplug and enable SHPC.
> 
> Pls limit to Q35 only.
>

The code is inside build_q35_osc_method,
I don't understand how it affects the PC machine.

Thanks,
Marcel


>> ---
>>   hw/i386/acpi-build.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
>> index 6b7bade..2ab32f9 100644
>> --- a/hw/i386/acpi-build.c
>> +++ b/hw/i386/acpi-build.c
>> @@ -1848,9 +1848,9 @@ static Aml *build_q35_osc_method(void)
>>   
>>       /*
>>        * Always allow native PME, AER (no dependencies)
>> -     * Never allow SHPC (no SHPC controller in this system)
>> +     * Allow SHPC (PCI bridges can have SHPC controller)
>>        */
>> -    aml_append(if_ctx, aml_and(a_ctrl, aml_int(0x1D), a_ctrl));
>> +    aml_append(if_ctx, aml_and(a_ctrl, aml_int(0x1F), a_ctrl));
>>   
>>       if_ctx2 = aml_if(aml_lnot(aml_equal(aml_arg(1), aml_int(1))));
>>       /* Unknown revision */
>> -- 
>> 2.7.4


_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://mail.coreboot.org/mailman/listinfo/seabios