All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [maybe-for-2.0 0/2] hw/arm: Don't specify any default board
@ 2014-03-25 19:26 Peter Maydell
  2014-03-25 19:26 ` [Qemu-devel] [maybe-for-2.0 1/2] hw/arm: Stop specifying integratorcp as the " Peter Maydell
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Peter Maydell @ 2014-03-25 19:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, patches

Currently for both qemu-system-arm and qemu-system-aarch64
the default board model if the user doesn't specify one
is the 'integratorcp'. This is a totally arbitrary historical
accident since it was the first board to be modelled.
That board is now just one target among many for us, and
is a very poor choice of default:
 * it's an ancient board that is now only found in the
   junkpiles of longtime ARM/Linux hackers, if at all
 * it's an ARMv5 CPU, when most distros are now assuming ARMv7
 * it's pretty much unmaintained in QEMU
 * it doesn't even have versatilepb's advantage of supporting PCI
    
Making it or any other board the default serves only to confuse
people new to ARM who expect something more like the x86 monoculture,
and try to run a Linux kernel built for some random devboard on
QEMU's integratorcp model by mistake

This series removes the is_default marker from integratorcp,
to give users a nudge that they need to think about which board
they want a QEMU model of.

Since it's now more likely that users will hit it, patch 2
improves the slightly cryptic error "No machine found." to
align with the rather more helpful text produced if you ask
-M no-such-machine.

This is a little late in the 2.0 cycle, but on the other hand
the patches themselves are trivially simple, and the only
question really is if we want to do this. It does break
backwards compatibility of command lines with anybody who
is still really running integratorcp kernels and not bothering
to specify "-M integratorcp". But 2.0 is a nice round number
to do that, and I think we improve usability for people who
don't realise that the default is wrong for 99%+ of users.

Peter Maydell (2):
  hw/arm: Stop specifying integratorcp as the default board
  vl.c: Improve message when no default machine is found

 hw/arm/integratorcp.c | 1 -
 vl.c                  | 3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
1.9.0

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Qemu-devel] [maybe-for-2.0 1/2] hw/arm: Stop specifying integratorcp as the default board
  2014-03-25 19:26 [Qemu-devel] [maybe-for-2.0 0/2] hw/arm: Don't specify any default board Peter Maydell
@ 2014-03-25 19:26 ` Peter Maydell
  2014-03-28 11:17   ` [Qemu-devel] [maybe-for-2.0 1/2] hw/arm: Stop specifyingintegratorcp as the default boardd Alex Bennée
  2014-03-25 19:26 ` [Qemu-devel] [maybe-for-2.0 2/2] vl.c: Improve message when no default machine is found Peter Maydell
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Peter Maydell @ 2014-03-25 19:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, patches

Currently for both qemu-system-arm and qemu-system-aarch64
the default board model if the user doesn't specify one
is the 'integratorcp'. This is a totally arbitrary historical
accident since it was the first board to be modelled.
That board is now just one target among many for us, and
is a very poor choice of default:
 * it's an ancient board that is now only found in the
   junkpiles of longtime ARM/Linux hackers, if at all
 * it's an ARMv5 CPU, when most distros are now assuming
   ARMv7
 * it's pretty much unmaintained in QEMU
 * it doesn't even have versatilepb's advantage of
   supporting PCI

Making it or any other board the default serves only
to confuse people new to ARM who expect something more
like the x86 monoculture. Remove the is_default marker
from integratorcp, and don't set it for any other board,
to give users a nudge that they need to think about
which board they want a QEMU model of. (QEMU will produce
the admittedly slightly cryptic error "No machine found.")

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/arm/integratorcp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c
index a759689..912af96 100644
--- a/hw/arm/integratorcp.c
+++ b/hw/arm/integratorcp.c
@@ -534,7 +534,6 @@ static QEMUMachine integratorcp_machine = {
     .name = "integratorcp",
     .desc = "ARM Integrator/CP (ARM926EJ-S)",
     .init = integratorcp_init,
-    .is_default = 1,
 };
 
 static void integratorcp_machine_init(void)
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Qemu-devel] [maybe-for-2.0 2/2] vl.c: Improve message when no default machine is found
  2014-03-25 19:26 [Qemu-devel] [maybe-for-2.0 0/2] hw/arm: Don't specify any default board Peter Maydell
  2014-03-25 19:26 ` [Qemu-devel] [maybe-for-2.0 1/2] hw/arm: Stop specifying integratorcp as the " Peter Maydell
@ 2014-03-25 19:26 ` Peter Maydell
  2014-03-26 19:22   ` Marcel Apfelbaum
  2014-03-28 11:16   ` [Qemu-devel] [maybe-for-2.0 2/2] vl.c: Improve message when nodefault machine is foundd Alex Bennée
  2014-03-26  9:53 ` [Qemu-devel] [maybe-for-2.0 0/2] hw/arm: Don't specify any default board Paolo Bonzini
  2014-03-26 15:16 ` Peter Maydell
  3 siblings, 2 replies; 9+ messages in thread
From: Peter Maydell @ 2014-03-25 19:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, patches

Improve the clarity of the message QEMU prints when the user
doesn't specify a machine model to use and there is no default.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 vl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/vl.c b/vl.c
index 2355227..9975e5a 100644
--- a/vl.c
+++ b/vl.c
@@ -3929,7 +3929,8 @@ int main(int argc, char **argv, char **envp)
 #endif
 
     if (machine_class == NULL) {
-        fprintf(stderr, "No machine found.\n");
+        fprintf(stderr, "No machine specified, and there is no default.\n"
+                "Use -machine help to list supported machines!\n");
         exit(1);
     }
 
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] [maybe-for-2.0 0/2] hw/arm: Don't specify any default board
  2014-03-25 19:26 [Qemu-devel] [maybe-for-2.0 0/2] hw/arm: Don't specify any default board Peter Maydell
  2014-03-25 19:26 ` [Qemu-devel] [maybe-for-2.0 1/2] hw/arm: Stop specifying integratorcp as the " Peter Maydell
  2014-03-25 19:26 ` [Qemu-devel] [maybe-for-2.0 2/2] vl.c: Improve message when no default machine is found Peter Maydell
@ 2014-03-26  9:53 ` Paolo Bonzini
  2014-03-26 15:16 ` Peter Maydell
  3 siblings, 0 replies; 9+ messages in thread
From: Paolo Bonzini @ 2014-03-26  9:53 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel; +Cc: patches

Il 25/03/2014 20:26, Peter Maydell ha scritto:
> Currently for both qemu-system-arm and qemu-system-aarch64
> the default board model if the user doesn't specify one
> is the 'integratorcp'. This is a totally arbitrary historical
> accident since it was the first board to be modelled.
> That board is now just one target among many for us, and
> is a very poor choice of default:
>  * it's an ancient board that is now only found in the
>    junkpiles of longtime ARM/Linux hackers, if at all
>  * it's an ARMv5 CPU, when most distros are now assuming ARMv7
>  * it's pretty much unmaintained in QEMU
>  * it doesn't even have versatilepb's advantage of supporting PCI
>
> Making it or any other board the default serves only to confuse
> people new to ARM who expect something more like the x86 monoculture,
> and try to run a Linux kernel built for some random devboard on
> QEMU's integratorcp model by mistake
>
> This series removes the is_default marker from integratorcp,
> to give users a nudge that they need to think about which board
> they want a QEMU model of.
>
> Since it's now more likely that users will hit it, patch 2
> improves the slightly cryptic error "No machine found." to
> align with the rather more helpful text produced if you ask
> -M no-such-machine.
>
> This is a little late in the 2.0 cycle, but on the other hand
> the patches themselves are trivially simple, and the only
> question really is if we want to do this. It does break
> backwards compatibility of command lines with anybody who
> is still really running integratorcp kernels and not bothering
> to specify "-M integratorcp". But 2.0 is a nice round number
> to do that, and I think we improve usability for people who
> don't realise that the default is wrong for 99%+ of users.
>
> Peter Maydell (2):
>   hw/arm: Stop specifying integratorcp as the default board
>   vl.c: Improve message when no default machine is found
>
>  hw/arm/integratorcp.c | 1 -
>  vl.c                  | 3 ++-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>

series

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] [maybe-for-2.0 0/2] hw/arm: Don't specify any default board
  2014-03-25 19:26 [Qemu-devel] [maybe-for-2.0 0/2] hw/arm: Don't specify any default board Peter Maydell
                   ` (2 preceding siblings ...)
  2014-03-26  9:53 ` [Qemu-devel] [maybe-for-2.0 0/2] hw/arm: Don't specify any default board Paolo Bonzini
@ 2014-03-26 15:16 ` Peter Maydell
  3 siblings, 0 replies; 9+ messages in thread
From: Peter Maydell @ 2014-03-26 15:16 UTC (permalink / raw)
  To: QEMU Developers; +Cc: Paolo Bonzini, qemu-ppc, Patch Tracking

On 25 March 2014 19:26, Peter Maydell <peter.maydell@linaro.org> wrote:
> Since it's now more likely that users will hit it, patch 2
> improves the slightly cryptic error "No machine found." to
> align with the rather more helpful text produced if you ask
> -M no-such-machine.

I did a scan of other targets, and it turns out that ppcemb
also currently doesn't specify any default board. So the
improving of the error message will also help there.

thanks
-- PMM

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] [maybe-for-2.0 2/2] vl.c: Improve message when no default machine is found
  2014-03-25 19:26 ` [Qemu-devel] [maybe-for-2.0 2/2] vl.c: Improve message when no default machine is found Peter Maydell
@ 2014-03-26 19:22   ` Marcel Apfelbaum
  2014-03-28 11:16   ` [Qemu-devel] [maybe-for-2.0 2/2] vl.c: Improve message when nodefault machine is foundd Alex Bennée
  1 sibling, 0 replies; 9+ messages in thread
From: Marcel Apfelbaum @ 2014-03-26 19:22 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Paolo Bonzini, qemu-devel, patches

On Tue, 2014-03-25 at 19:26 +0000, Peter Maydell wrote:
> Improve the clarity of the message QEMU prints when the user
> doesn't specify a machine model to use and there is no default.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  vl.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/vl.c b/vl.c
> index 2355227..9975e5a 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -3929,7 +3929,8 @@ int main(int argc, char **argv, char **envp)
>  #endif
>  
>      if (machine_class == NULL) {
> -        fprintf(stderr, "No machine found.\n");
> +        fprintf(stderr, "No machine specified, and there is no default.\n"
> +                "Use -machine help to list supported machines!\n");
+1

Reviewed-by: Marcel Apfelbaum <marcel.a@redhat.com>

>          exit(1);
>      }
>  

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] [maybe-for-2.0 2/2] vl.c: Improve message when nodefault machine is foundd
  2014-03-25 19:26 ` [Qemu-devel] [maybe-for-2.0 2/2] vl.c: Improve message when no default machine is found Peter Maydell
  2014-03-26 19:22   ` Marcel Apfelbaum
@ 2014-03-28 11:16   ` Alex Bennée
  1 sibling, 0 replies; 9+ messages in thread
From: Alex Bennée @ 2014-03-28 11:16 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Paolo Bonzini, qemu-devel, patches


Peter Maydell <peter.maydell@linaro.org> writes:

> Improve the clarity of the message QEMU prints when the user
> doesn't specify a machine model to use and there is no default.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  vl.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/vl.c b/vl.c
> index 2355227..9975e5a 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -3929,7 +3929,8 @@ int main(int argc, char **argv, char **envp)
>  #endif
>  
>      if (machine_class == NULL) {
> -        fprintf(stderr, "No machine found.\n");
> +        fprintf(stderr, "No machine specified, and there is no default.\n"
> +                "Use -machine help to list supported machines!\n");
>          exit(1);
>      }

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] [maybe-for-2.0 1/2] hw/arm: Stop specifyingintegratorcp as the default boardd
  2014-03-25 19:26 ` [Qemu-devel] [maybe-for-2.0 1/2] hw/arm: Stop specifying integratorcp as the " Peter Maydell
@ 2014-03-28 11:17   ` Alex Bennée
  2014-03-28 11:35     ` Peter Maydell
  0 siblings, 1 reply; 9+ messages in thread
From: Alex Bennée @ 2014-03-28 11:17 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Paolo Bonzini, qemu-devel, patches


Peter Maydell <peter.maydell@linaro.org> writes:

<snip>
> -    .is_default = 1,
<snip>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Qemu-devel] [maybe-for-2.0 1/2] hw/arm: Stop specifyingintegratorcp as the default boardd
  2014-03-28 11:17   ` [Qemu-devel] [maybe-for-2.0 1/2] hw/arm: Stop specifyingintegratorcp as the default boardd Alex Bennée
@ 2014-03-28 11:35     ` Peter Maydell
  0 siblings, 0 replies; 9+ messages in thread
From: Peter Maydell @ 2014-03-28 11:35 UTC (permalink / raw)
  To: Alex Bennée; +Cc: Paolo Bonzini, QEMU Developers, Patch Tracking

On 28 March 2014 11:17, Alex Bennée <alex.bennee@linaro.org> wrote:
>
> Peter Maydell <peter.maydell@linaro.org> writes:
>
> <snip>
>> -    .is_default = 1,
> <snip>
>
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

Bit late, this was applied to master yesterday :-)

thanks
-- PMM

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-03-28 11:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-25 19:26 [Qemu-devel] [maybe-for-2.0 0/2] hw/arm: Don't specify any default board Peter Maydell
2014-03-25 19:26 ` [Qemu-devel] [maybe-for-2.0 1/2] hw/arm: Stop specifying integratorcp as the " Peter Maydell
2014-03-28 11:17   ` [Qemu-devel] [maybe-for-2.0 1/2] hw/arm: Stop specifyingintegratorcp as the default boardd Alex Bennée
2014-03-28 11:35     ` Peter Maydell
2014-03-25 19:26 ` [Qemu-devel] [maybe-for-2.0 2/2] vl.c: Improve message when no default machine is found Peter Maydell
2014-03-26 19:22   ` Marcel Apfelbaum
2014-03-28 11:16   ` [Qemu-devel] [maybe-for-2.0 2/2] vl.c: Improve message when nodefault machine is foundd Alex Bennée
2014-03-26  9:53 ` [Qemu-devel] [maybe-for-2.0 0/2] hw/arm: Don't specify any default board Paolo Bonzini
2014-03-26 15:16 ` Peter Maydell

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.