qemu/hw/loongarch
Li Chen 54401d5abd acpi: Add machine option to disable SPCR table
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>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
Message-Id: <20250528105404.457729-2-me@linux.beauty>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2025-07-14 09:16:40 -04:00
..
boot.c hw/loongarch/virt: Remove global variables about memmap tables 2025-06-10 15:01:41 +08:00
fw_cfg.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
fw_cfg.h hw/loongarch: Rename LoongArchMachineState with LoongArchVirtMachineState 2024-05-09 00:07:21 +02:00
Kconfig hw/loongarch/virt: Update the ACPI table for hotplug cpu 2025-03-05 09:39:18 +08:00
meson.build hw/loongarch/virt: Add separate file for fdt building 2025-02-12 09:52:26 +08:00
virt-acpi-build.c acpi: Add machine option to disable SPCR table 2025-07-14 09:16:40 -04:00
virt-fdt-build.c hw: Centralize handling of -machine dumpdtb option 2025-02-24 15:03:42 +00:00
virt.c hw/loongarch/virt: Add kernel irqchip support 2025-06-19 15:55:21 +08:00