All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhao Liu <zhao1.liu@intel.com>
To: Xiaoyao Li <xiaoyao.li@intel.com>
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [PATCH] i386/apic: Add hint on boot failure because of disabling x2APIC
Date: Fri, 7 Jun 2024 16:30:06 +0800	[thread overview]
Message-ID: <ZmLFDgDiXk6CcoLN@intel.com> (raw)
In-Reply-To: <cfeb1a82-62b6-4fe9-a30d-a49e8209caf8@intel.com>

On Fri, Jun 07, 2024 at 03:47:01PM +0800, Xiaoyao Li wrote:
> Date: Fri, 7 Jun 2024 15:47:01 +0800
> From: Xiaoyao Li <xiaoyao.li@intel.com>
> Subject: Re: [PATCH] i386/apic: Add hint on boot failure because of
>  disabling x2APIC
> 
> On 6/7/2024 3:46 PM, Zhao Liu wrote:
> > Hi Philippe,
> > 
> > On Fri, Jun 07, 2024 at 08:17:36AM +0200, Philippe Mathieu-Daudé wrote:
> > > Date: Fri, 7 Jun 2024 08:17:36 +0200
> > > From: Philippe Mathieu-Daudé <philmd@linaro.org>
> > > Subject: Re: [PATCH] i386/apic: Add hint on boot failure because of
> > >   disabling x2APIC
> > > 
> > > On 6/6/24 16:08, Zhao Liu wrote:
> > > > 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 (
> 
> why bother mentioning TCG case?

I'm restating the problem scenario for this error message. This is a
common use case, which is enough to support adding a simple hint.

> you below example is not for TCG. 

Not?

> And the issue is not caused by TCG but
> default cpu model doesn't have X2APIC enabled.

This is not an issue, and it is normal to report an error in current QEMU.

> > > > 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.
> > > 
> > > Why not automatically set x2apic=on in this case instead?
> > 
> > The default CPU model is qemu64 without x2APIC. I think it might be
> > necessary to update the version to add x2APIC in qemu64, and I'd like to
> > look into it again for any other potential issues.
> > 
> > In addition to adding x2APIC directly to the qemu64, this hint can also
> > help some users who want a large number of vCPUs based on other older
> > CPU models. Though, it's not very common but this hint would be helpful.
> > 
> > > > 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>
> > > > ---
> > > >    hw/intc/apic_common.c | 7 ++++++-
> > > >    1 file changed, 6 insertions(+), 1 deletion(-)
> > > 
> > > Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> > 
> > Thanks!
> > 
> > 
> 


      reply	other threads:[~2024-06-07  8:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-06 14:08 [PATCH] i386/apic: Add hint on boot failure because of disabling x2APIC Zhao Liu
2024-06-07  6:17 ` Philippe Mathieu-Daudé
2024-06-07  7:46   ` Zhao Liu
2024-06-07  7:47     ` Xiaoyao Li
2024-06-07  8:30       ` Zhao Liu [this message]

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=ZmLFDgDiXk6CcoLN@intel.com \
    --to=zhao1.liu@intel.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=xiaoyao.li@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.