[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V2 1/3] acpi: Add machine option to disable SPCR table
From: |
Li Chen |
Subject: |
Re: [PATCH V2 1/3] acpi: Add machine option to disable SPCR table |
Date: |
Wed, 23 Apr 2025 16:27:26 +0800 |
User-agent: |
Zoho Mail |
Hi Gavin,
---- On Wed, 23 Apr 2025 08:11:24 +0800 Gavin Shan <gshan@redhat.com> wrote
---
> On 4/22/25 10:05 PM, Li Chen wrote:
> > From: Li Chen <chenl311@chinatelecom.cn>
> >
> > The ACPI SPCR (Serial Port Console Redirection) table allows firmware
> > to specify a preferred serial console device to the operating system.
> > On ARM64 systems, Linux by default respects this table: even if the
> > kernel command line does not include a hardware serial console (e.g.,
> > "console=ttyAMA0"), the kernel still register the serial device
> > referenced by SPCR as a printk console.
> >
> > While this behavior is standard-compliant, it can lead to situations
> > where guest console behavior is influenced by platform firmware rather
> > than user-specified configuration. To make guest console behavior more
> > predictable and under user control, this patch introduces a machine
> > option to explicitly disable SPCR table exposure:
> >
> > -machine spcr=off
> >
> > By default, the option is enabled (spcr=on), preserving existing
> > behavior. When disabled, QEMU will omit the SPCR table from the guest's
> > ACPI namespace, ensuring that only consoles explicitly declared in the
> > kernel command line are registered.
> >
> > Signed-off-by: Li Chen <chenl311@chinatelecom.cn>
> > Reviewed-by: Bibo Mao <maobibo@loongson.cn>
> > Acked-by: Michael S. Tsirkin <mst@redhat.com>
> > ---
> >
> > Changes since V1: add Reviewed-by and Acked-by
> >
> > hw/arm/virt-acpi-build.c | 5 ++++-
> > hw/core/machine.c | 22 ++++++++++++++++++++++
> > hw/loongarch/virt-acpi-build.c | 4 +++-
> > hw/riscv/virt-acpi-build.c | 5 ++++-
> > include/hw/boards.h | 1 +
> > qemu-options.hx | 5 +++++
> > 6 files changed, 39 insertions(+), 3 deletions(-)
> >
>
> One coding style issue below. With it fixed:
>
> Reviewed-by: Gavin Shan <gshan@redhat.com>
Thanks for your catch! I would fix it in the next version.
Regards,
Li