diff mbox

[v4,1/5] hw/i386: allow SHPC for Q35 machine

Message ID 1501964858-5159-2-git-send-email-zuban32s@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Aleksandr Bezzubikov Aug. 5, 2017, 8:27 p.m. UTC
Unmask previously masked SHPC feature in _OSC method.

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

Comments

Thomas Huth Aug. 8, 2017, 2:48 p.m. UTC | #1
On 05.08.2017 22:27, Aleksandr Bezzubikov wrote:
> Unmask previously masked SHPC feature in _OSC method.
> 
> Signed-off-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
> Reviewed-by: Marcel Apfelbaum <marcel@redhat.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 b9c245c..98dd424 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -1862,9 +1862,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 */
> 

Since this patch has been merged, I now get a bunch of ugly warnings
during "make check":

acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-T2ST4Y.dsl,
aml:/tmp/aml-HVUT4Y], Expected [asl:/tmp/asl-00VT4Y.dsl,
aml:tests/acpi-test-data/q35/DSDT].
acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-3BKN4Y.dsl,
aml:/tmp/aml-CDKN4Y], Expected [asl:/tmp/asl-2CZM4Y.dsl,
aml:tests/acpi-test-data/q35/DSDT.bridge].
acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-ZVPA4Y.dsl,
aml:/tmp/aml-A3PA4Y], Expected [asl:/tmp/asl-F0QA4Y.dsl,
aml:tests/acpi-test-data/q35/DSDT.ipmibt].
acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-TX7P4Y.dsl,
aml:/tmp/aml-S97P4Y], Expected [asl:/tmp/asl-AIJP4Y.dsl,
aml:tests/acpi-test-data/q35/DSDT.cphp].
acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-6J0C4Y.dsl,
aml:/tmp/aml-DCZC4Y], Expected [asl:/tmp/asl-9I1C4Y.dsl,
aml:tests/acpi-test-data/q35/DSDT.memhp].

Did you maybe forget to update the ACPI test table according to the
changes? (and why was this merged during hard-freeze at all? The
ChangeLog text does not sound like a bug fix?)

 Thomas
Michael S. Tsirkin Aug. 8, 2017, 3:35 p.m. UTC | #2
On Tue, Aug 08, 2017 at 04:48:26PM +0200, Thomas Huth wrote:
> On 05.08.2017 22:27, Aleksandr Bezzubikov wrote:
> > Unmask previously masked SHPC feature in _OSC method.
> > 
> > Signed-off-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
> > Reviewed-by: Marcel Apfelbaum <marcel@redhat.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 b9c245c..98dd424 100644
> > --- a/hw/i386/acpi-build.c
> > +++ b/hw/i386/acpi-build.c
> > @@ -1862,9 +1862,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 */
> > 
> 
> Since this patch has been merged, I now get a bunch of ugly warnings
> during "make check":
> 
> acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-T2ST4Y.dsl,
> aml:/tmp/aml-HVUT4Y], Expected [asl:/tmp/asl-00VT4Y.dsl,
> aml:tests/acpi-test-data/q35/DSDT].
> acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-3BKN4Y.dsl,
> aml:/tmp/aml-CDKN4Y], Expected [asl:/tmp/asl-2CZM4Y.dsl,
> aml:tests/acpi-test-data/q35/DSDT.bridge].
> acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-ZVPA4Y.dsl,
> aml:/tmp/aml-A3PA4Y], Expected [asl:/tmp/asl-F0QA4Y.dsl,
> aml:tests/acpi-test-data/q35/DSDT.ipmibt].
> acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-TX7P4Y.dsl,
> aml:/tmp/aml-S97P4Y], Expected [asl:/tmp/asl-AIJP4Y.dsl,
> aml:tests/acpi-test-data/q35/DSDT.cphp].
> acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-6J0C4Y.dsl,
> aml:/tmp/aml-DCZC4Y], Expected [asl:/tmp/asl-9I1C4Y.dsl,
> aml:tests/acpi-test-data/q35/DSDT.memhp].
> 
> Did you maybe forget to update the ACPI test table according to the
> changes? (and why was this merged during hard-freeze at all? The
> ChangeLog text does not sound like a bug fix?)
> 
>  Thomas

My bad will fix ASAP.
Thomas Huth Aug. 8, 2017, 6:38 p.m. UTC | #3
On 08.08.2017 17:35, Michael S. Tsirkin wrote:
> On Tue, Aug 08, 2017 at 04:48:26PM +0200, Thomas Huth wrote:
>> On 05.08.2017 22:27, Aleksandr Bezzubikov wrote:
>>> Unmask previously masked SHPC feature in _OSC method.
>>>
>>> Signed-off-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
>>> Reviewed-by: Marcel Apfelbaum <marcel@redhat.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 b9c245c..98dd424 100644
>>> --- a/hw/i386/acpi-build.c
>>> +++ b/hw/i386/acpi-build.c
>>> @@ -1862,9 +1862,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 */
>>>
>>
>> Since this patch has been merged, I now get a bunch of ugly warnings
>> during "make check":
>>
>> acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-T2ST4Y.dsl,
>> aml:/tmp/aml-HVUT4Y], Expected [asl:/tmp/asl-00VT4Y.dsl,
>> aml:tests/acpi-test-data/q35/DSDT].
>> acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-3BKN4Y.dsl,
>> aml:/tmp/aml-CDKN4Y], Expected [asl:/tmp/asl-2CZM4Y.dsl,
>> aml:tests/acpi-test-data/q35/DSDT.bridge].
>> acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-ZVPA4Y.dsl,
>> aml:/tmp/aml-A3PA4Y], Expected [asl:/tmp/asl-F0QA4Y.dsl,
>> aml:tests/acpi-test-data/q35/DSDT.ipmibt].
>> acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-TX7P4Y.dsl,
>> aml:/tmp/aml-S97P4Y], Expected [asl:/tmp/asl-AIJP4Y.dsl,
>> aml:tests/acpi-test-data/q35/DSDT.cphp].
>> acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-6J0C4Y.dsl,
>> aml:/tmp/aml-DCZC4Y], Expected [asl:/tmp/asl-9I1C4Y.dsl,
>> aml:tests/acpi-test-data/q35/DSDT.memhp].
>>
>> Did you maybe forget to update the ACPI test table according to the
>> changes? (and why was this merged during hard-freeze at all? The
>> ChangeLog text does not sound like a bug fix?)
>>
>>  Thomas
> 
> My bad will fix ASAP.

Thanks! ... while you're at it, maybe it would be better to turn the
warnings into an g_assert() or something similar, too, so that they are
fatal? Otherwise these errors apparently can sneak in without anybody
noticing it...

 Thomas
Michael S. Tsirkin Aug. 8, 2017, 7:37 p.m. UTC | #4
On Tue, Aug 08, 2017 at 08:38:18PM +0200, Thomas Huth wrote:
> On 08.08.2017 17:35, Michael S. Tsirkin wrote:
> > On Tue, Aug 08, 2017 at 04:48:26PM +0200, Thomas Huth wrote:
> >> On 05.08.2017 22:27, Aleksandr Bezzubikov wrote:
> >>> Unmask previously masked SHPC feature in _OSC method.
> >>>
> >>> Signed-off-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
> >>> Reviewed-by: Marcel Apfelbaum <marcel@redhat.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 b9c245c..98dd424 100644
> >>> --- a/hw/i386/acpi-build.c
> >>> +++ b/hw/i386/acpi-build.c
> >>> @@ -1862,9 +1862,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 */
> >>>
> >>
> >> Since this patch has been merged, I now get a bunch of ugly warnings
> >> during "make check":
> >>
> >> acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-T2ST4Y.dsl,
> >> aml:/tmp/aml-HVUT4Y], Expected [asl:/tmp/asl-00VT4Y.dsl,
> >> aml:tests/acpi-test-data/q35/DSDT].
> >> acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-3BKN4Y.dsl,
> >> aml:/tmp/aml-CDKN4Y], Expected [asl:/tmp/asl-2CZM4Y.dsl,
> >> aml:tests/acpi-test-data/q35/DSDT.bridge].
> >> acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-ZVPA4Y.dsl,
> >> aml:/tmp/aml-A3PA4Y], Expected [asl:/tmp/asl-F0QA4Y.dsl,
> >> aml:tests/acpi-test-data/q35/DSDT.ipmibt].
> >> acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-TX7P4Y.dsl,
> >> aml:/tmp/aml-S97P4Y], Expected [asl:/tmp/asl-AIJP4Y.dsl,
> >> aml:tests/acpi-test-data/q35/DSDT.cphp].
> >> acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-6J0C4Y.dsl,
> >> aml:/tmp/aml-DCZC4Y], Expected [asl:/tmp/asl-9I1C4Y.dsl,
> >> aml:tests/acpi-test-data/q35/DSDT.memhp].
> >>
> >> Did you maybe forget to update the ACPI test table according to the
> >> changes? (and why was this merged during hard-freeze at all? The
> >> ChangeLog text does not sound like a bug fix?)
> >>
> >>  Thomas
> > 
> > My bad will fix ASAP.
> 
> Thanks! ... while you're at it, maybe it would be better to turn the
> warnings into an g_assert() or something similar, too, so that they are
> fatal? Otherwise these errors apparently can sneak in without anybody
> noticing it...
> 
>  Thomas
> 

Nope, sorry.  They are warnings intentionally since getting expected
files out of sync or even failing to disassemble the actual ones
is not a necessarily an indication of a bug.
diff mbox

Patch

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index b9c245c..98dd424 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1862,9 +1862,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 */