diff options
author | Zhao Liu <zhao1.liu@intel.com> | 2024-06-06 22:08:58 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2024-07-01 17:16:05 -0400 |
commit | e05ee2994a9c188fc49a9ddf70b79ed7f1808e2f (patch) | |
tree | 8370acae01992c2c9a75cbc10ab63dac4cdf05ae /host | |
parent | f72fc16910c8f44edf052f52672e0e63bbbc773c (diff) | |
download | qemu-e05ee2994a9c188fc49a9ddf70b79ed7f1808e2f.zip qemu-e05ee2994a9c188fc49a9ddf70b79ed7f1808e2f.tar.gz qemu-e05ee2994a9c188fc49a9ddf70b79ed7f1808e2f.tar.bz2 |
i386/apic: Add hint on boot failure because of disabling x2APIC
Currently, the Q35 supports up to 4096 vCPUs (since v9.0), but for TCG
cases, if x2APIC is not actively enabled to boot more than 255 vCPUs (
e.g., qemu-system-i386 -M pc-q35-9.0 -smp 666), the following error is
reported:
Unexpected error in apic_common_set_id() at ../hw/intc/apic_common.c:449:
qemu-system-i386: APIC ID 255 requires x2APIC feature in CPU
Aborted (core dumped)
This error can be resolved by setting x2apic=on in -cpu. In order to
better help users deal with this scenario, add the error hint to
instruct users on how to enable the x2apic feature. Then, the error
report becomes the following:
Unexpected error in apic_common_set_id() at ../hw/intc/apic_common.c:448:
qemu-system-i386: APIC ID 255 requires x2APIC feature in CPU
Try x2apic=on in -cpu.
Aborted (core dumped)
Note since @errp is &error_abort, error_append_hint() can't be applied
on @errp. And in order to separate the exact error message from the
(perhaps effectively) hint, adding a hint via error_append_hint() is
also necessary. Therefore, introduce @local_error in
apic_common_set_id() to handle both the error message and the error
hint.
Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Message-Id: <20240606140858.2157106-1-zhao1.liu@intel.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'host')
0 files changed, 0 insertions, 0 deletions