qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
To: Claudio Fontana <cfontana@suse.de>, Thomas Huth <thuth@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	qemu-s390x <qemu-s390x@nongnu.org>,
	Ilya Leoshkevich <iii@linux.ibm.com>
Subject: Re: [PATCH] target/s390x: improve cpu compatibility check error message
Date: Thu, 14 Mar 2024 20:44:14 +0100	[thread overview]
Message-ID: <226063093bf4dcb200c981dd5b655135d8a47feb.camel@linux.ibm.com> (raw)
In-Reply-To: <20240314190007.19568-1-cfontana@suse.de>

On Thu, 2024-03-14 at 20:00 +0100, Claudio Fontana wrote:
> some users were confused by this message showing under TCG:
> 
> Selected CPU generation is too new. Maximum supported model
> in the configuration: 'xyz'
> 
> Try to clarify that the maximum can depend on the accel by
> adding also the current accelerator to the message as such:
> 
> Selected CPU generation is too new. Maximum supported model
> in the accelerator 'tcg' configuration: 'xyz'
> 
> Signed-off-by: Claudio Fontana <cfontana@suse.de>
> ---
>  target/s390x/cpu_models.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
> index 1a1c096122..0d6d8fc727 100644
> --- a/target/s390x/cpu_models.c
> +++ b/target/s390x/cpu_models.c
> @@ -508,14 +508,14 @@ static void check_compatibility(const S390CPUModel *max_model,
>  
>      if (model->def->gen > max_model->def->gen) {
>          error_setg(errp, "Selected CPU generation is too new. Maximum "
> -                   "supported model in the configuration: \'%s\'",
> -                   max_model->def->name);
> +                   "supported model in the accelerator \'%s\' configuration: \'%s\'",
> +                   current_accel_name(), max_model->def->name);
>          return;
>      } else if (model->def->gen == max_model->def->gen &&
>                 model->def->ec_ga > max_model->def->ec_ga) {
>          error_setg(errp, "Selected CPU GA level is too new. Maximum "
> -                   "supported model in the configuration: \'%s\'",
> -                   max_model->def->name);
> +                   "supported model in the accelerator \'%s\' configuration: \'%s\'",
> +                   current_accel_name(), max_model->def->name);
>          return;
>      }
>  
> @@ -537,7 +537,8 @@ static void check_compatibility(const S390CPUModel *max_model,
>      error_setg(errp, " ");
>      s390_feat_bitmap_to_ascii(missing, errp, error_prepend_missing_feat);
>      error_prepend(errp, "Some features requested in the CPU model are not "
> -                  "available in the configuration: ");
> +                  "available in the accelerator \'%s\' configuration: ",
> +                  current_accel_name());
>  }

I wonder if these might not be confusing in other circumstances, e.g. when
running with KVM and the Linux version lacks support for some feature.
I think something along the lines of:

error_...(errp, "... supported by the current configuration ...", ...);
error_append_hint(errp, "Consider using a different accelerator, a different QEMU version or, when using KVM, a different kernel");

would be better.

I'm not sure about line breaks in error message, I like the better grepability
of unbroken lines but the coding style guide doesn't mention anything.
>  
>  S390CPUModel *get_max_cpu_model(Error **errp)



  reply	other threads:[~2024-03-14 19:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-14 19:00 [PATCH] target/s390x: improve cpu compatibility check error message Claudio Fontana
2024-03-14 19:44 ` Nina Schoetterl-Glausch [this message]
2024-03-14 20:10   ` Claudio Fontana
2024-03-14 20:26     ` Claudio Fontana
2024-03-15 12:25 ` Christian Borntraeger

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=226063093bf4dcb200c981dd5b655135d8a47feb.camel@linux.ibm.com \
    --to=nsg@linux.ibm.com \
    --cc=cfontana@suse.de \
    --cc=iii@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=thuth@redhat.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).