mbox series

[PULL,SRU,Xenial] Support QEMU guests in ACPI mode

Message ID CALdTtnsZhk+7WFkOfr1ZsVwQe1iEMGfhuvwMcWk7g7ibkinnvQ@mail.gmail.com
State New
Headers show
Series [PULL,SRU,Xenial] Support QEMU guests in ACPI mode | expand

Pull-request

git://git.launchpad.net/~dannf/ubuntu/+source/linux/+git/linux minacpi-x

Message

dann frazier Feb. 1, 2018, 11 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1744754

qemu-efi, the UEFI firmware used to boot arm64 KVM guests, has
switched from devicetree to ACPI by default. However, the GA xenial
kernel didn't have enough ACPI support to boot in this mode. That
means, for example, that your bionic-based OpenStack won't be able to
boot xenial cloud images. This series backports the minimum necessary
ACPI support back to 4.4: GICv3 and SPCR console detection.

The testing/risk assessment is all there in the bug, as is a
discussion of other possible solutions. The GICv3 support comprises
all clean cherry-picks. Some backporting was required for the console
stuff - I've annotated each patch with the details in each patch above
my S-o-b.

Test builds are available in ppa:dannf/test.

The following changes since commit 355335ee775c4016a34b22e99e14cf5bc9534c1b:

  UBUNTU: [Packaging] update urgency to medium by default (2018-01-29
13:09:24 +0100)

are available in the Git repository at:

  git://git.launchpad.net/~dannf/ubuntu/+source/linux/+git/linux minacpi-x

for you to fetch changes up to eb0e0630ae2860f70f017a1b11ee356d736edf9e:

  serial: pl011: add console matching function (2018-01-31 16:12:16 -0700)

----------------------------------------------------------------
Aleksey Makarov (4):
      ACPICA: Headers: Add new constants for the DBG2 ACPI table
      ACPI: parse SPCR and enable matching console
      ARM64: ACPI: enable ACPI_SPCR_TABLE
      serial: pl011: add console matching function

Hanjun Guo (1):
      irqchip/gic-v3: Remove gic_root_node variable from the ITS code

Leif Lindholm (1):
      of/serial: move earlycon early_param handling to serial

Tomasz Nowicki (4):
      irqchip/gic-v3: Refactor gic_of_init() for GICv3 driver
      irqchip/gic-v3: Add ACPI support for GICv3/4 initialization
      irqchip/gic-v3: ACPI: Add redistributor support via GICC structures
      irqchip/gic-v3-its: Mark its_init() and its children as __init

dann frazier (1):
      UBUNTU: [Config] CONFIG_ACPI_SPCR_TABLE=y

 arch/arm64/Kconfig                        |   1 +
 arch/arm64/kernel/acpi.c                  |  11 +-
 debian.master/config/config.common.ubuntu |   1 +
 drivers/acpi/Kconfig                      |   3 +
 drivers/acpi/Makefile                     |   1 +
 drivers/acpi/spcr.c                       | 111 ++++++++++
 drivers/irqchip/irq-gic-v3-its.c          |  10 +-
 drivers/irqchip/irq-gic-v3.c              | 347 +++++++++++++++++++++++++-----
 drivers/of/fdt.c                          |  11 +-
 drivers/tty/serial/amba-pl011.c           |  55 +++++
 drivers/tty/serial/earlycon.c             |  20 +-
 include/acpi/actbl2.h                     |   7 +-
 include/linux/acpi.h                      |   6 +
 include/linux/of_fdt.h                    |   3 +
 include/linux/serial_core.h               |   9 +-
 15 files changed, 527 insertions(+), 69 deletions(-)
 create mode 100644 drivers/acpi/spcr.c

Comments

Kleber Sacilotto de Souza Feb. 26, 2018, 6:12 p.m. UTC | #1
Hi Dann,

Regarding patch 9/11 there's a comment on the bug:

"Patch 9 turns on CONFIG_ACPI_SPCR_TABLE - however, this driver will
only be built for arm64. TBH, I'm not 100% sure how Kconfig knows not to
build this for other archs - but I checked the logs, and there's no
spcr.o built on other archs. (Not that that should be a problem - they
would just grow a bit of unused code)."

Indeed the CONFIG_ACPI_SPCR_TABLE is not set for arches other than
arm64, that's because the config option is added as non-visible and it's
only selected by arch/arm64/Kconfig. But I'm a bit concerned about the
possibility of an accidental enablement of this config option for
another arch in the future.

To solve this problem, my suggestion would be to set the default of the
config option to 'n' on drivers/acpi/Kconfig and set it to =y only on
debian.master/config/arm64/config.common.arm64 (this would be done
automatically by 'updateconfigs'). It's probably a good idea to add an
entry on the annotations file as well.


Thanks,
Kleber


On 02/02/18 00:00, dann frazier wrote:
> BugLink: https://bugs.launchpad.net/bugs/1744754
> 
> qemu-efi, the UEFI firmware used to boot arm64 KVM guests, has
> switched from devicetree to ACPI by default. However, the GA xenial
> kernel didn't have enough ACPI support to boot in this mode. That
> means, for example, that your bionic-based OpenStack won't be able to
> boot xenial cloud images. This series backports the minimum necessary
> ACPI support back to 4.4: GICv3 and SPCR console detection.
> 
> The testing/risk assessment is all there in the bug, as is a
> discussion of other possible solutions. The GICv3 support comprises
> all clean cherry-picks. Some backporting was required for the console
> stuff - I've annotated each patch with the details in each patch above
> my S-o-b.
> 
> Test builds are available in ppa:dannf/test.
> 
> The following changes since commit 355335ee775c4016a34b22e99e14cf5bc9534c1b:
> 
>   UBUNTU: [Packaging] update urgency to medium by default (2018-01-29
> 13:09:24 +0100)
> 
> are available in the Git repository at:
> 
>   git://git.launchpad.net/~dannf/ubuntu/+source/linux/+git/linux minacpi-x
> 
> for you to fetch changes up to eb0e0630ae2860f70f017a1b11ee356d736edf9e:
> 
>   serial: pl011: add console matching function (2018-01-31 16:12:16 -0700)
> 
> ----------------------------------------------------------------
> Aleksey Makarov (4):
>       ACPICA: Headers: Add new constants for the DBG2 ACPI table
>       ACPI: parse SPCR and enable matching console
>       ARM64: ACPI: enable ACPI_SPCR_TABLE
>       serial: pl011: add console matching function
> 
> Hanjun Guo (1):
>       irqchip/gic-v3: Remove gic_root_node variable from the ITS code
> 
> Leif Lindholm (1):
>       of/serial: move earlycon early_param handling to serial
> 
> Tomasz Nowicki (4):
>       irqchip/gic-v3: Refactor gic_of_init() for GICv3 driver
>       irqchip/gic-v3: Add ACPI support for GICv3/4 initialization
>       irqchip/gic-v3: ACPI: Add redistributor support via GICC structures
>       irqchip/gic-v3-its: Mark its_init() and its children as __init
> 
> dann frazier (1):
>       UBUNTU: [Config] CONFIG_ACPI_SPCR_TABLE=y
> 
>  arch/arm64/Kconfig                        |   1 +
>  arch/arm64/kernel/acpi.c                  |  11 +-
>  debian.master/config/config.common.ubuntu |   1 +
>  drivers/acpi/Kconfig                      |   3 +
>  drivers/acpi/Makefile                     |   1 +
>  drivers/acpi/spcr.c                       | 111 ++++++++++
>  drivers/irqchip/irq-gic-v3-its.c          |  10 +-
>  drivers/irqchip/irq-gic-v3.c              | 347 +++++++++++++++++++++++++-----
>  drivers/of/fdt.c                          |  11 +-
>  drivers/tty/serial/amba-pl011.c           |  55 +++++
>  drivers/tty/serial/earlycon.c             |  20 +-
>  include/acpi/actbl2.h                     |   7 +-
>  include/linux/acpi.h                      |   6 +
>  include/linux/of_fdt.h                    |   3 +
>  include/linux/serial_core.h               |   9 +-
>  15 files changed, 527 insertions(+), 69 deletions(-)
>  create mode 100644 drivers/acpi/spcr.c
>
dann frazier Feb. 27, 2018, 9:12 p.m. UTC | #2
Thanks Kleber,
  Can you elaborate on your concern regarding this option on other
architectures?
I know that work is going on upstream to enable this code for x86:
  https://lkml.org/lkml/2018/1/18/440

If we grow those patches, wouldn't we want to parse the SPCR table on
platforms that provide it?

  -dann

On Mon, Feb 26, 2018 at 11:12 AM, Kleber Souza
<kleber.souza@canonical.com> wrote:
> Hi Dann,
>
> Regarding patch 9/11 there's a comment on the bug:
>
> "Patch 9 turns on CONFIG_ACPI_SPCR_TABLE - however, this driver will
> only be built for arm64. TBH, I'm not 100% sure how Kconfig knows not to
> build this for other archs - but I checked the logs, and there's no
> spcr.o built on other archs. (Not that that should be a problem - they
> would just grow a bit of unused code)."
>
> Indeed the CONFIG_ACPI_SPCR_TABLE is not set for arches other than
> arm64, that's because the config option is added as non-visible and it's
> only selected by arch/arm64/Kconfig. But I'm a bit concerned about the
> possibility of an accidental enablement of this config option for
> another arch in the future.
>
> To solve this problem, my suggestion would be to set the default of the
> config option to 'n' on drivers/acpi/Kconfig and set it to =y only on
> debian.master/config/arm64/config.common.arm64 (this would be done
> automatically by 'updateconfigs'). It's probably a good idea to add an
> entry on the annotations file as well.
>
>
> Thanks,
> Kleber
>
>
> On 02/02/18 00:00, dann frazier wrote:
>> BugLink: https://bugs.launchpad.net/bugs/1744754
>>
>> qemu-efi, the UEFI firmware used to boot arm64 KVM guests, has
>> switched from devicetree to ACPI by default. However, the GA xenial
>> kernel didn't have enough ACPI support to boot in this mode. That
>> means, for example, that your bionic-based OpenStack won't be able to
>> boot xenial cloud images. This series backports the minimum necessary
>> ACPI support back to 4.4: GICv3 and SPCR console detection.
>>
>> The testing/risk assessment is all there in the bug, as is a
>> discussion of other possible solutions. The GICv3 support comprises
>> all clean cherry-picks. Some backporting was required for the console
>> stuff - I've annotated each patch with the details in each patch above
>> my S-o-b.
>>
>> Test builds are available in ppa:dannf/test.
>>
>> The following changes since commit 355335ee775c4016a34b22e99e14cf5bc9534c1b:
>>
>>   UBUNTU: [Packaging] update urgency to medium by default (2018-01-29
>> 13:09:24 +0100)
>>
>> are available in the Git repository at:
>>
>>   git://git.launchpad.net/~dannf/ubuntu/+source/linux/+git/linux minacpi-x
>>
>> for you to fetch changes up to eb0e0630ae2860f70f017a1b11ee356d736edf9e:
>>
>>   serial: pl011: add console matching function (2018-01-31 16:12:16 -0700)
>>
>> ----------------------------------------------------------------
>> Aleksey Makarov (4):
>>       ACPICA: Headers: Add new constants for the DBG2 ACPI table
>>       ACPI: parse SPCR and enable matching console
>>       ARM64: ACPI: enable ACPI_SPCR_TABLE
>>       serial: pl011: add console matching function
>>
>> Hanjun Guo (1):
>>       irqchip/gic-v3: Remove gic_root_node variable from the ITS code
>>
>> Leif Lindholm (1):
>>       of/serial: move earlycon early_param handling to serial
>>
>> Tomasz Nowicki (4):
>>       irqchip/gic-v3: Refactor gic_of_init() for GICv3 driver
>>       irqchip/gic-v3: Add ACPI support for GICv3/4 initialization
>>       irqchip/gic-v3: ACPI: Add redistributor support via GICC structures
>>       irqchip/gic-v3-its: Mark its_init() and its children as __init
>>
>> dann frazier (1):
>>       UBUNTU: [Config] CONFIG_ACPI_SPCR_TABLE=y
>>
>>  arch/arm64/Kconfig                        |   1 +
>>  arch/arm64/kernel/acpi.c                  |  11 +-
>>  debian.master/config/config.common.ubuntu |   1 +
>>  drivers/acpi/Kconfig                      |   3 +
>>  drivers/acpi/Makefile                     |   1 +
>>  drivers/acpi/spcr.c                       | 111 ++++++++++
>>  drivers/irqchip/irq-gic-v3-its.c          |  10 +-
>>  drivers/irqchip/irq-gic-v3.c              | 347 +++++++++++++++++++++++++-----
>>  drivers/of/fdt.c                          |  11 +-
>>  drivers/tty/serial/amba-pl011.c           |  55 +++++
>>  drivers/tty/serial/earlycon.c             |  20 +-
>>  include/acpi/actbl2.h                     |   7 +-
>>  include/linux/acpi.h                      |   6 +
>>  include/linux/of_fdt.h                    |   3 +
>>  include/linux/serial_core.h               |   9 +-
>>  15 files changed, 527 insertions(+), 69 deletions(-)
>>  create mode 100644 drivers/acpi/spcr.c
>>
Stefan Bader Feb. 28, 2018, 10:28 a.m. UTC | #3
On 26.02.2018 19:12, Kleber Souza wrote:
> Hi Dann,
> 
> Regarding patch 9/11 there's a comment on the bug:
> 
> "Patch 9 turns on CONFIG_ACPI_SPCR_TABLE - however, this driver will
> only be built for arm64. TBH, I'm not 100% sure how Kconfig knows not to
> build this for other archs - but I checked the logs, and there's no
> spcr.o built on other archs. (Not that that should be a problem - they
> would just grow a bit of unused code)."
> 
> Indeed the CONFIG_ACPI_SPCR_TABLE is not set for arches other than
> arm64, that's because the config option is added as non-visible and it's
> only selected by arch/arm64/Kconfig. But I'm a bit concerned about the
> possibility of an accidental enablement of this config option for
> another arch in the future.
> 
> To solve this problem, my suggestion would be to set the default of the
> config option to 'n' on drivers/acpi/Kconfig and set it to =y only on
> debian.master/config/arm64/config.common.arm64 (this would be done
> automatically by 'updateconfigs'). It's probably a good idea to add an
> entry on the annotations file as well.
> 
> 
> Thanks,
> Kleber
> 
> 
> On 02/02/18 00:00, dann frazier wrote:
>> BugLink: https://bugs.launchpad.net/bugs/1744754
>>
>> qemu-efi, the UEFI firmware used to boot arm64 KVM guests, has
>> switched from devicetree to ACPI by default. However, the GA xenial
>> kernel didn't have enough ACPI support to boot in this mode. That
>> means, for example, that your bionic-based OpenStack won't be able to
>> boot xenial cloud images. This series backports the minimum necessary
>> ACPI support back to 4.4: GICv3 and SPCR console detection.
>>
>> The testing/risk assessment is all there in the bug, as is a
>> discussion of other possible solutions. The GICv3 support comprises
>> all clean cherry-picks. Some backporting was required for the console
>> stuff - I've annotated each patch with the details in each patch above
>> my S-o-b.

I think this actually may be the doing of updateconfigs. IIRC it tries to put as
much as possible into the common file. Usually things that cannot be enabled due
to some dependencies are just silently dropped when running config.

That said, there is also the annotations file which probably should be updated
to match the expected setup.

-Stefan

>>
>> Test builds are available in ppa:dannf/test.
>>
>> The following changes since commit 355335ee775c4016a34b22e99e14cf5bc9534c1b:
>>
>>   UBUNTU: [Packaging] update urgency to medium by default (2018-01-29
>> 13:09:24 +0100)
>>
>> are available in the Git repository at:
>>
>>   git://git.launchpad.net/~dannf/ubuntu/+source/linux/+git/linux minacpi-x
>>
>> for you to fetch changes up to eb0e0630ae2860f70f017a1b11ee356d736edf9e:
>>
>>   serial: pl011: add console matching function (2018-01-31 16:12:16 -0700)
>>
>> ----------------------------------------------------------------
>> Aleksey Makarov (4):
>>       ACPICA: Headers: Add new constants for the DBG2 ACPI table
>>       ACPI: parse SPCR and enable matching console
>>       ARM64: ACPI: enable ACPI_SPCR_TABLE
>>       serial: pl011: add console matching function
>>
>> Hanjun Guo (1):
>>       irqchip/gic-v3: Remove gic_root_node variable from the ITS code
>>
>> Leif Lindholm (1):
>>       of/serial: move earlycon early_param handling to serial
>>
>> Tomasz Nowicki (4):
>>       irqchip/gic-v3: Refactor gic_of_init() for GICv3 driver
>>       irqchip/gic-v3: Add ACPI support for GICv3/4 initialization
>>       irqchip/gic-v3: ACPI: Add redistributor support via GICC structures
>>       irqchip/gic-v3-its: Mark its_init() and its children as __init
>>
>> dann frazier (1):
>>       UBUNTU: [Config] CONFIG_ACPI_SPCR_TABLE=y
>>
>>  arch/arm64/Kconfig                        |   1 +
>>  arch/arm64/kernel/acpi.c                  |  11 +-
>>  debian.master/config/config.common.ubuntu |   1 +
>>  drivers/acpi/Kconfig                      |   3 +
>>  drivers/acpi/Makefile                     |   1 +
>>  drivers/acpi/spcr.c                       | 111 ++++++++++
>>  drivers/irqchip/irq-gic-v3-its.c          |  10 +-
>>  drivers/irqchip/irq-gic-v3.c              | 347 +++++++++++++++++++++++++-----
>>  drivers/of/fdt.c                          |  11 +-
>>  drivers/tty/serial/amba-pl011.c           |  55 +++++
>>  drivers/tty/serial/earlycon.c             |  20 +-
>>  include/acpi/actbl2.h                     |   7 +-
>>  include/linux/acpi.h                      |   6 +
>>  include/linux/of_fdt.h                    |   3 +
>>  include/linux/serial_core.h               |   9 +-
>>  15 files changed, 527 insertions(+), 69 deletions(-)
>>  create mode 100644 drivers/acpi/spcr.c
>>
>
Kleber Sacilotto de Souza Feb. 28, 2018, 12:23 p.m. UTC | #4
On 02/27/18 22:12, dann frazier wrote:
> Thanks Kleber,
>   Can you elaborate on your concern regarding this option on other
> architectures?
> I know that work is going on upstream to enable this code for x86:
>   https://lkml.org/lkml/2018/1/18/440
> 
> If we grow those patches, wouldn't we want to parse the SPCR table on
> platforms that provide it?

On a second thought and looking better at where upstream is heading, if
we ever backport the patch you mentioned to enable the code for x86,
there won't be any reason not to enable the config option as well, and
having an annotation entry doesn't seem to bring much benefit in that case.

So the pull request looks good to me, I'll send my ACK.


Thanks!
Kleber

> 
>   -dann
> 
> On Mon, Feb 26, 2018 at 11:12 AM, Kleber Souza
> <kleber.souza@canonical.com> wrote:
>> Hi Dann,
>>
>> Regarding patch 9/11 there's a comment on the bug:
>>
>> "Patch 9 turns on CONFIG_ACPI_SPCR_TABLE - however, this driver will
>> only be built for arm64. TBH, I'm not 100% sure how Kconfig knows not to
>> build this for other archs - but I checked the logs, and there's no
>> spcr.o built on other archs. (Not that that should be a problem - they
>> would just grow a bit of unused code)."
>>
>> Indeed the CONFIG_ACPI_SPCR_TABLE is not set for arches other than
>> arm64, that's because the config option is added as non-visible and it's
>> only selected by arch/arm64/Kconfig. But I'm a bit concerned about the
>> possibility of an accidental enablement of this config option for
>> another arch in the future.
>>
>> To solve this problem, my suggestion would be to set the default of the
>> config option to 'n' on drivers/acpi/Kconfig and set it to =y only on
>> debian.master/config/arm64/config.common.arm64 (this would be done
>> automatically by 'updateconfigs'). It's probably a good idea to add an
>> entry on the annotations file as well.
>>
>>
>> Thanks,
>> Kleber
>>
>>
>> On 02/02/18 00:00, dann frazier wrote:
>>> BugLink: https://bugs.launchpad.net/bugs/1744754
>>>
>>> qemu-efi, the UEFI firmware used to boot arm64 KVM guests, has
>>> switched from devicetree to ACPI by default. However, the GA xenial
>>> kernel didn't have enough ACPI support to boot in this mode. That
>>> means, for example, that your bionic-based OpenStack won't be able to
>>> boot xenial cloud images. This series backports the minimum necessary
>>> ACPI support back to 4.4: GICv3 and SPCR console detection.
>>>
>>> The testing/risk assessment is all there in the bug, as is a
>>> discussion of other possible solutions. The GICv3 support comprises
>>> all clean cherry-picks. Some backporting was required for the console
>>> stuff - I've annotated each patch with the details in each patch above
>>> my S-o-b.
>>>
>>> Test builds are available in ppa:dannf/test.
>>>
>>> The following changes since commit 355335ee775c4016a34b22e99e14cf5bc9534c1b:
>>>
>>>   UBUNTU: [Packaging] update urgency to medium by default (2018-01-29
>>> 13:09:24 +0100)
>>>
>>> are available in the Git repository at:
>>>
>>>   git://git.launchpad.net/~dannf/ubuntu/+source/linux/+git/linux minacpi-x
>>>
>>> for you to fetch changes up to eb0e0630ae2860f70f017a1b11ee356d736edf9e:
>>>
>>>   serial: pl011: add console matching function (2018-01-31 16:12:16 -0700)
>>>
>>> ----------------------------------------------------------------
>>> Aleksey Makarov (4):
>>>       ACPICA: Headers: Add new constants for the DBG2 ACPI table
>>>       ACPI: parse SPCR and enable matching console
>>>       ARM64: ACPI: enable ACPI_SPCR_TABLE
>>>       serial: pl011: add console matching function
>>>
>>> Hanjun Guo (1):
>>>       irqchip/gic-v3: Remove gic_root_node variable from the ITS code
>>>
>>> Leif Lindholm (1):
>>>       of/serial: move earlycon early_param handling to serial
>>>
>>> Tomasz Nowicki (4):
>>>       irqchip/gic-v3: Refactor gic_of_init() for GICv3 driver
>>>       irqchip/gic-v3: Add ACPI support for GICv3/4 initialization
>>>       irqchip/gic-v3: ACPI: Add redistributor support via GICC structures
>>>       irqchip/gic-v3-its: Mark its_init() and its children as __init
>>>
>>> dann frazier (1):
>>>       UBUNTU: [Config] CONFIG_ACPI_SPCR_TABLE=y
>>>
>>>  arch/arm64/Kconfig                        |   1 +
>>>  arch/arm64/kernel/acpi.c                  |  11 +-
>>>  debian.master/config/config.common.ubuntu |   1 +
>>>  drivers/acpi/Kconfig                      |   3 +
>>>  drivers/acpi/Makefile                     |   1 +
>>>  drivers/acpi/spcr.c                       | 111 ++++++++++
>>>  drivers/irqchip/irq-gic-v3-its.c          |  10 +-
>>>  drivers/irqchip/irq-gic-v3.c              | 347 +++++++++++++++++++++++++-----
>>>  drivers/of/fdt.c                          |  11 +-
>>>  drivers/tty/serial/amba-pl011.c           |  55 +++++
>>>  drivers/tty/serial/earlycon.c             |  20 +-
>>>  include/acpi/actbl2.h                     |   7 +-
>>>  include/linux/acpi.h                      |   6 +
>>>  include/linux/of_fdt.h                    |   3 +
>>>  include/linux/serial_core.h               |   9 +-
>>>  15 files changed, 527 insertions(+), 69 deletions(-)
>>>  create mode 100644 drivers/acpi/spcr.c
>>>
Kleber Sacilotto de Souza Feb. 28, 2018, 12:26 p.m. UTC | #5
On 02/02/18 00:00, dann frazier wrote:
> BugLink: https://bugs.launchpad.net/bugs/1744754
> 
> qemu-efi, the UEFI firmware used to boot arm64 KVM guests, has
> switched from devicetree to ACPI by default. However, the GA xenial
> kernel didn't have enough ACPI support to boot in this mode. That
> means, for example, that your bionic-based OpenStack won't be able to
> boot xenial cloud images. This series backports the minimum necessary
> ACPI support back to 4.4: GICv3 and SPCR console detection.
> 
> The testing/risk assessment is all there in the bug, as is a
> discussion of other possible solutions. The GICv3 support comprises
> all clean cherry-picks. Some backporting was required for the console
> stuff - I've annotated each patch with the details in each patch above
> my S-o-b.
> 
> Test builds are available in ppa:dannf/test.
> 
> The following changes since commit 355335ee775c4016a34b22e99e14cf5bc9534c1b:
> 
>   UBUNTU: [Packaging] update urgency to medium by default (2018-01-29
> 13:09:24 +0100)
> 
> are available in the Git repository at:
> 
>   git://git.launchpad.net/~dannf/ubuntu/+source/linux/+git/linux minacpi-x
> 
> for you to fetch changes up to eb0e0630ae2860f70f017a1b11ee356d736edf9e:
> 
>   serial: pl011: add console matching function (2018-01-31 16:12:16 -0700)
> 
> ----------------------------------------------------------------
> Aleksey Makarov (4):
>       ACPICA: Headers: Add new constants for the DBG2 ACPI table
>       ACPI: parse SPCR and enable matching console
>       ARM64: ACPI: enable ACPI_SPCR_TABLE
>       serial: pl011: add console matching function
> 
> Hanjun Guo (1):
>       irqchip/gic-v3: Remove gic_root_node variable from the ITS code
> 
> Leif Lindholm (1):
>       of/serial: move earlycon early_param handling to serial
> 
> Tomasz Nowicki (4):
>       irqchip/gic-v3: Refactor gic_of_init() for GICv3 driver
>       irqchip/gic-v3: Add ACPI support for GICv3/4 initialization
>       irqchip/gic-v3: ACPI: Add redistributor support via GICC structures
>       irqchip/gic-v3-its: Mark its_init() and its children as __init
> 
> dann frazier (1):
>       UBUNTU: [Config] CONFIG_ACPI_SPCR_TABLE=y
> 
>  arch/arm64/Kconfig                        |   1 +
>  arch/arm64/kernel/acpi.c                  |  11 +-
>  debian.master/config/config.common.ubuntu |   1 +
>  drivers/acpi/Kconfig                      |   3 +
>  drivers/acpi/Makefile                     |   1 +
>  drivers/acpi/spcr.c                       | 111 ++++++++++
>  drivers/irqchip/irq-gic-v3-its.c          |  10 +-
>  drivers/irqchip/irq-gic-v3.c              | 347 +++++++++++++++++++++++++-----
>  drivers/of/fdt.c                          |  11 +-
>  drivers/tty/serial/amba-pl011.c           |  55 +++++
>  drivers/tty/serial/earlycon.c             |  20 +-
>  include/acpi/actbl2.h                     |   7 +-
>  include/linux/acpi.h                      |   6 +
>  include/linux/of_fdt.h                    |   3 +
>  include/linux/serial_core.h               |   9 +-
>  15 files changed, 527 insertions(+), 69 deletions(-)
>  create mode 100644 drivers/acpi/spcr.c
> 

The changes seem to be relatively contained and were regression tested
on x86.

Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
dann frazier Feb. 28, 2018, 5:18 p.m. UTC | #6
On Wed, Feb 28, 2018 at 3:28 AM, Stefan Bader
<stefan.bader@canonical.com> wrote:
> On 26.02.2018 19:12, Kleber Souza wrote:
>> Hi Dann,
>>
>> Regarding patch 9/11 there's a comment on the bug:
>>
>> "Patch 9 turns on CONFIG_ACPI_SPCR_TABLE - however, this driver will
>> only be built for arm64. TBH, I'm not 100% sure how Kconfig knows not to
>> build this for other archs - but I checked the logs, and there's no
>> spcr.o built on other archs. (Not that that should be a problem - they
>> would just grow a bit of unused code)."
>>
>> Indeed the CONFIG_ACPI_SPCR_TABLE is not set for arches other than
>> arm64, that's because the config option is added as non-visible and it's
>> only selected by arch/arm64/Kconfig. But I'm a bit concerned about the
>> possibility of an accidental enablement of this config option for
>> another arch in the future.
>>
>> To solve this problem, my suggestion would be to set the default of the
>> config option to 'n' on drivers/acpi/Kconfig and set it to =y only on
>> debian.master/config/arm64/config.common.arm64 (this would be done
>> automatically by 'updateconfigs'). It's probably a good idea to add an
>> entry on the annotations file as well.
>>
>>
>> Thanks,
>> Kleber
>>
>>
>> On 02/02/18 00:00, dann frazier wrote:
>>> BugLink: https://bugs.launchpad.net/bugs/1744754
>>>
>>> qemu-efi, the UEFI firmware used to boot arm64 KVM guests, has
>>> switched from devicetree to ACPI by default. However, the GA xenial
>>> kernel didn't have enough ACPI support to boot in this mode. That
>>> means, for example, that your bionic-based OpenStack won't be able to
>>> boot xenial cloud images. This series backports the minimum necessary
>>> ACPI support back to 4.4: GICv3 and SPCR console detection.
>>>
>>> The testing/risk assessment is all there in the bug, as is a
>>> discussion of other possible solutions. The GICv3 support comprises
>>> all clean cherry-picks. Some backporting was required for the console
>>> stuff - I've annotated each patch with the details in each patch above
>>> my S-o-b.
>
> I think this actually may be the doing of updateconfigs. IIRC it tries to put as
> much as possible into the common file. Usually things that cannot be enabled due
> to some dependencies are just silently dropped when running config.
>
> That said, there is also the annotations file which probably should be updated
> to match the expected setup.

OK - will follow up with a v2.

  -dann

> -Stefan
>
>>>
>>> Test builds are available in ppa:dannf/test.
>>>
>>> The following changes since commit 355335ee775c4016a34b22e99e14cf5bc9534c1b:
>>>
>>>   UBUNTU: [Packaging] update urgency to medium by default (2018-01-29
>>> 13:09:24 +0100)
>>>
>>> are available in the Git repository at:
>>>
>>>   git://git.launchpad.net/~dannf/ubuntu/+source/linux/+git/linux minacpi-x
>>>
>>> for you to fetch changes up to eb0e0630ae2860f70f017a1b11ee356d736edf9e:
>>>
>>>   serial: pl011: add console matching function (2018-01-31 16:12:16 -0700)
>>>
>>> ----------------------------------------------------------------
>>> Aleksey Makarov (4):
>>>       ACPICA: Headers: Add new constants for the DBG2 ACPI table
>>>       ACPI: parse SPCR and enable matching console
>>>       ARM64: ACPI: enable ACPI_SPCR_TABLE
>>>       serial: pl011: add console matching function
>>>
>>> Hanjun Guo (1):
>>>       irqchip/gic-v3: Remove gic_root_node variable from the ITS code
>>>
>>> Leif Lindholm (1):
>>>       of/serial: move earlycon early_param handling to serial
>>>
>>> Tomasz Nowicki (4):
>>>       irqchip/gic-v3: Refactor gic_of_init() for GICv3 driver
>>>       irqchip/gic-v3: Add ACPI support for GICv3/4 initialization
>>>       irqchip/gic-v3: ACPI: Add redistributor support via GICC structures
>>>       irqchip/gic-v3-its: Mark its_init() and its children as __init
>>>
>>> dann frazier (1):
>>>       UBUNTU: [Config] CONFIG_ACPI_SPCR_TABLE=y
>>>
>>>  arch/arm64/Kconfig                        |   1 +
>>>  arch/arm64/kernel/acpi.c                  |  11 +-
>>>  debian.master/config/config.common.ubuntu |   1 +
>>>  drivers/acpi/Kconfig                      |   3 +
>>>  drivers/acpi/Makefile                     |   1 +
>>>  drivers/acpi/spcr.c                       | 111 ++++++++++
>>>  drivers/irqchip/irq-gic-v3-its.c          |  10 +-
>>>  drivers/irqchip/irq-gic-v3.c              | 347 +++++++++++++++++++++++++-----
>>>  drivers/of/fdt.c                          |  11 +-
>>>  drivers/tty/serial/amba-pl011.c           |  55 +++++
>>>  drivers/tty/serial/earlycon.c             |  20 +-
>>>  include/acpi/actbl2.h                     |   7 +-
>>>  include/linux/acpi.h                      |   6 +
>>>  include/linux/of_fdt.h                    |   3 +
>>>  include/linux/serial_core.h               |   9 +-
>>>  15 files changed, 527 insertions(+), 69 deletions(-)
>>>  create mode 100644 drivers/acpi/spcr.c
>>>
>>
>
>
>
> --
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>
Kleber Sacilotto de Souza March 2, 2018, 11:09 a.m. UTC | #7
On 02/02/18 00:00, dann frazier wrote:
> BugLink: https://bugs.launchpad.net/bugs/1744754
> 
> qemu-efi, the UEFI firmware used to boot arm64 KVM guests, has
> switched from devicetree to ACPI by default. However, the GA xenial
> kernel didn't have enough ACPI support to boot in this mode. That
> means, for example, that your bionic-based OpenStack won't be able to
> boot xenial cloud images. This series backports the minimum necessary
> ACPI support back to 4.4: GICv3 and SPCR console detection.
> 
> The testing/risk assessment is all there in the bug, as is a
> discussion of other possible solutions. The GICv3 support comprises
> all clean cherry-picks. Some backporting was required for the console
> stuff - I've annotated each patch with the details in each patch above
> my S-o-b.
> 
> Test builds are available in ppa:dannf/test.
> 
> The following changes since commit 355335ee775c4016a34b22e99e14cf5bc9534c1b:
> 
>   UBUNTU: [Packaging] update urgency to medium by default (2018-01-29
> 13:09:24 +0100)
> 
> are available in the Git repository at:
> 
>   git://git.launchpad.net/~dannf/ubuntu/+source/linux/+git/linux minacpi-x
> 
> for you to fetch changes up to eb0e0630ae2860f70f017a1b11ee356d736edf9e:
> 
>   serial: pl011: add console matching function (2018-01-31 16:12:16 -0700)
> 
> ----------------------------------------------------------------
> Aleksey Makarov (4):
>       ACPICA: Headers: Add new constants for the DBG2 ACPI table
>       ACPI: parse SPCR and enable matching console
>       ARM64: ACPI: enable ACPI_SPCR_TABLE
>       serial: pl011: add console matching function
> 
> Hanjun Guo (1):
>       irqchip/gic-v3: Remove gic_root_node variable from the ITS code
> 
> Leif Lindholm (1):
>       of/serial: move earlycon early_param handling to serial
> 
> Tomasz Nowicki (4):
>       irqchip/gic-v3: Refactor gic_of_init() for GICv3 driver
>       irqchip/gic-v3: Add ACPI support for GICv3/4 initialization
>       irqchip/gic-v3: ACPI: Add redistributor support via GICC structures
>       irqchip/gic-v3-its: Mark its_init() and its children as __init
> 
> dann frazier (1):
>       UBUNTU: [Config] CONFIG_ACPI_SPCR_TABLE=y
> 
>  arch/arm64/Kconfig                        |   1 +
>  arch/arm64/kernel/acpi.c                  |  11 +-
>  debian.master/config/config.common.ubuntu |   1 +
>  drivers/acpi/Kconfig                      |   3 +
>  drivers/acpi/Makefile                     |   1 +
>  drivers/acpi/spcr.c                       | 111 ++++++++++
>  drivers/irqchip/irq-gic-v3-its.c          |  10 +-
>  drivers/irqchip/irq-gic-v3.c              | 347 +++++++++++++++++++++++++-----
>  drivers/of/fdt.c                          |  11 +-
>  drivers/tty/serial/amba-pl011.c           |  55 +++++
>  drivers/tty/serial/earlycon.c             |  20 +-
>  include/acpi/actbl2.h                     |   7 +-
>  include/linux/acpi.h                      |   6 +
>  include/linux/of_fdt.h                    |   3 +
>  include/linux/serial_core.h               |   9 +-
>  15 files changed, 527 insertions(+), 69 deletions(-)
>  create mode 100644 drivers/acpi/spcr.c
> 

A v2 of the patch set has been sent to the mailing-list.

Thanks,
Kleber