qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Zhao Liu" <zhao1.liu@intel.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: [PULL 41/91] i386/apic: Add hint on boot failure because of disabling x2APIC
Date: Tue, 2 Jul 2024 10:09:03 -0400	[thread overview]
Message-ID: <7801fa5054e0eac7a169b32bf630cb237d2652ec.1719929191.git.mst@redhat.com> (raw)
In-Reply-To: <cover.1719929191.git.mst@redhat.com>

From: Zhao Liu <zhao1.liu@intel.com>

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>
---
 hw/intc/apic_common.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c
index d8fc1e2815..c13cdd7994 100644
--- a/hw/intc/apic_common.c
+++ b/hw/intc/apic_common.c
@@ -433,6 +433,7 @@ static void apic_common_set_id(Object *obj, Visitor *v, const char *name,
     APICCommonState *s = APIC_COMMON(obj);
     DeviceState *dev = DEVICE(obj);
     uint32_t value;
+    Error *local_err = NULL;
 
     if (dev->realized) {
         qdev_prop_set_after_realize(dev, name, errp);
@@ -444,7 +445,11 @@ static void apic_common_set_id(Object *obj, Visitor *v, const char *name,
     }
 
     if (value >= 255 && !cpu_has_x2apic_feature(&s->cpu->env)) {
-        error_setg(errp, "APIC ID %d requires x2APIC feature in CPU", value);
+        error_setg(&local_err,
+                   "APIC ID %d requires x2APIC feature in CPU",
+                   value);
+        error_append_hint(&local_err, "Try x2apic=on in -cpu.\n");
+        error_propagate(errp, local_err);
         return;
     }
 
-- 
MST



  parent reply	other threads:[~2024-07-02 14:13 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-02 14:06 [PULL 00/91] virtio: features,fixes Michael S. Tsirkin
2024-07-02 14:06 ` [PULL 01/91] vhost: dirty log should be per backend type Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 02/91] vhost: Perform memory section dirty scans once per iteration Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 03/91] vhost-vdpa: check vhost_vdpa_set_vring_ready() return value Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 04/91] virtio/virtio-pci: Handle extra notification data Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 05/91] virtio: Prevent creation of device using notification-data with ioeventfd Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 06/91] virtio-mmio: Handle extra notification data Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 07/91] virtio-ccw: " Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 08/91] vhost/vhost-user: Add VIRTIO_F_NOTIFICATION_DATA to vhost feature bits Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 09/91] Fix vhost user assertion when sending more than one fd Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 10/91] vhost-vsock: add VIRTIO_F_RING_PACKED to feature_bits Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 11/91] hw/virtio: Fix obtain the buffer id from the last descriptor Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 12/91] virtio-pci: only reset pm state during resetting Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 13/91] vhost-user-gpu: fix import of DMABUF Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 14/91] Revert "vhost-user: fix lost reconnect" Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 15/91] vhost-user: fix lost reconnect again Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 16/91] hw/cxl/mailbox: change CCI cmd set structure to be a member, not a reference Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 17/91] hw/cxl/mailbox: interface to add CCI commands to an existing CCI Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 18/91] hw/cxl/cxl-mailbox-utils: Add dc_event_log_size field to output payload of identify memory device command Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 19/91] hw/cxl/cxl-mailbox-utils: Add dynamic capacity region representative and mailbox command support Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 20/91] include/hw/cxl/cxl_device: Rename mem_size as static_mem_size for type3 memory devices Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 21/91] hw/mem/cxl_type3: Add support to create DC regions to " Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 22/91] hw/mem/cxl-type3: Refactor ct3_build_cdat_entries_for_mr to take mr size instead of mr as argument Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 23/91] hw/mem/cxl_type3: Add host backend and address space handling for DC regions Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 24/91] hw/mem/cxl_type3: Add DC extent list representative and get DC extent list mailbox support Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 25/91] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 26/91] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 27/91] hw/mem/cxl_type3: Add DPA range validation for accesses to DC regions Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 28/91] hw/cxl/cxl-mailbox-utils: Add superset extent release mailbox support Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 29/91] hw/mem/cxl_type3: Allow to release extent superset in QMP interface Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 30/91] linux-headers: update to 6.10-rc1 Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 31/91] hw/misc/pvpanic: centralize definition of supported events Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 32/91] tests/qtest/pvpanic: use centralized " Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 33/91] hw/misc/pvpanic: add support for normal shutdowns Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 34/91] pvpanic: Emit GUEST_PVSHUTDOWN QMP event on pvpanic shutdown signal Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 35/91] tests/qtest/pvpanic: add tests for pvshutdown event Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 36/91] Revert "docs/specs/pvpanic: mark shutdown event as not implemented" Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 37/91] virtio-pci: Fix the failure process in kvm_virtio_pci_vector_use_one() Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 38/91] hw/cxl: Fix read from bogus memory Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 39/91] virtio-pci: implement No_Soft_Reset bit Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 40/91] vhost-user-test: don't set call fd -1 non-blocking Michael S. Tsirkin
2024-07-02 14:09 ` Michael S. Tsirkin [this message]
2024-07-02 14:09 ` [PULL 42/91] hw/virtio: Free vqs after vhost_dev_cleanup() Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 43/91] virtio-iommu: add error check before assert Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 44/91] vhost-user: Skip unnecessary duplicated VHOST_USER_SET_LOG_BASE requests Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 45/91] hw/net/virtio-net.c: fix crash in iov_copy() Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 46/91] qapi: clarify that the default is backend dependent Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 47/91] libvhost-user: set msg.msg_control to NULL when it is empty Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 48/91] libvhost-user: fail vu_message_write() if sendmsg() is failing Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 49/91] libvhost-user: mask F_INFLIGHT_SHMFD if memfd is not supported Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 50/91] vhost-user-server: do not set memory fd non-blocking Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 51/91] contrib/vhost-user-blk: fix bind() using the right size of the address Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 52/91] contrib/vhost-user-*: use QEMU bswap helper functions Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 53/91] vhost-user: enable frontends on any POSIX system Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 54/91] libvhost-user: enable it " Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 55/91] contrib/vhost-user-blk: " Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 56/91] hostmem: add a new memory backend based on POSIX shm_open() Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 57/91] tests/qtest/vhost-user-blk-test: use memory-backend-shm Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 58/91] tests/qtest/vhost-user-test: add a test case for memory-backend-shm Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 59/91] hw/virtio: Fix the de-initialization of vhost-user devices Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 60/91] hw/arm/virt-acpi-build: Drop local iort_node_offset Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 61/91] hw/i386/fw_cfg: Add etc/e820 to fw_cfg late Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 62/91] hw/arm/virt-acpi-build: Fix id_count in build_iort_id_mapping Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 63/91] uefi-test-tools/UefiTestToolsPkg: Add RISC-V support Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 64/91] uefi-test-tools: Add support for python based build script Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 65/91] tests/data/uefi-boot-images: Add RISC-V ISO image Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 66/91] qtest: bios-tables-test: Rename aarch64 tests with aarch64 in them Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 67/91] tests/qtest/bios-tables-test.c: Add support for arch in path Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 68/91] tests/qtest/bios-tables-test.c: Set "arch" for aarch64 tests Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 69/91] tests/qtest/bios-tables-test.c: Set "arch" for x86 tests Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 70/91] tests/data/acpi: Move x86 ACPI tables under x86/${machine} path Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 71/91] tests/data/acpi/virt: Move ARM64 ACPI tables under aarch64/${machine} path Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 72/91] meson.build: Add RISC-V to the edk2-target list Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 73/91] pc-bios/meson.build: Add support for RISC-V in unpack_edk2_blobs Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 74/91] tests/data/acpi/rebuild-expected-aml.sh: Add RISC-V Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 75/91] tests/qtest/bios-tables-test: Add empty ACPI data files for RISC-V Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 76/91] tests/qtest/bios-tables-test.c: Enable basic testing " Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 77/91] tests/qtest/bios-tables-test: Add expected ACPI data files " Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 78/91] hw/cxl/events: Improve QMP interfaces and documentation for add/release dynamic capacity Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 79/91] hw/cxl/events: Mark cxl-add-dynamic-capacity and cxl-release-dynamic-capcity unstable Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 80/91] virtio: remove virtio_tswap16s() call in vring_packed_event_read() Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 81/91] virtio-iommu: Clear IOMMUDevice when VFIO device is unplugged Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 82/91] hw/pci: Rename has_power to enabled Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 83/91] hw/ppc/spapr_pci: Do not create DT for disabled PCI device Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 84/91] hw/ppc/spapr_pci: Do not reject VFs created after a PF Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 85/91] pcie_sriov: Do not manually unrealize Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 86/91] pcie_sriov: Ensure VF function number does not overflow Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 87/91] pcie_sriov: Reuse SR-IOV VF device instances Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 88/91] pcie_sriov: Release VFs failed to realize Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 89/91] pcie_sriov: Remove num_vfs from PCIESriovPF Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 90/91] pcie_sriov: Register VFs after migration Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 91/91] hw/pci: Replace -1 with UINT32_MAX for romsize Michael S. Tsirkin
2024-07-02 14:35 ` [PULL 00/91] virtio: features,fixes Michael S. Tsirkin
2024-07-02 15:25 ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7801fa5054e0eac7a169b32bf630cb237d2652ec.1719929191.git.mst@redhat.com \
    --to=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=zhao1.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).