qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: Chris Wulff <crwulff@gmail.com>,
	Sagar Karandikar <sagark@eecs.berkeley.edu>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Anthony Green <green@moxielogic.com>,
	Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	qemu-devel@nongnu.org,
	Alistair Francis <Alistair.Francis@wdc.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	Guan Xuetao <gxt@mprc.pku.edu.cn>, Marek Vasut <marex@denx.de>,
	Jia Liu <proljc@gmail.com>,
	qemu-trivial@nongnu.org, Helge Deller <deller@gmx.de>,
	David Hildenbrand <david@redhat.com>,
	Magnus Damm <magnus.damm@gmail.com>,
	Halil Pasic <pasic@linux.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>,
	Artyom Tarasenko <atar4qemu@gmail.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	qemu-s390x@nongnu.org, Stafford Horne <shorne@gmail.com>,
	Richard Henderson <rth@twiddle.net>,
	qemu-riscv@nongnu.org, Thomas Huth <huth@tuxfamily.org>,
	Bastian Koppelmann <kbastian@mail.uni-paderborn.de>,
	Cornelia Huck <cohuck@redhat.com>,
	Laurent Vivier <laurent@vivier.eu>,
	Michael Walle <michael@walle.cc>,
	qemu-ppc@nongnu.org, Aleksandar Markovic <amarkovic@wavecomp.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [PATCH v4 1/3] hw: Do not initialize MachineClass::is_default to 0
Date: Sat, 8 Feb 2020 20:23:12 +1100	[thread overview]
Message-ID: <20200208092312.GB219689@umbus.fritz.box> (raw)
In-Reply-To: <20200207161948.15972-2-philmd@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 3308 bytes --]

On Fri, Feb 07, 2020 at 05:19:46PM +0100, Philippe Mathieu-Daudé wrote:
> The MachineClass is already zeroed on creation.
> 
> Note: The code setting is_default=0 in hw/i386/pc_piix.c is
>       different (related to compat options). When adding a
>       new versioned machine, we want it to be the new default,
>       so we have to mark the previous one as not default.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

> ---
> v3: new patch
> ---
>  hw/lm32/lm32_boards.c               | 1 -
>  hw/lm32/milkymist.c                 | 1 -
>  hw/m68k/q800.c                      | 1 -
>  hw/microblaze/petalogix_ml605_mmu.c | 1 -
>  hw/tricore/tricore_testboard.c      | 1 -
>  5 files changed, 5 deletions(-)
> 
> diff --git a/hw/lm32/lm32_boards.c b/hw/lm32/lm32_boards.c
> index d1894adab8..156b050abc 100644
> --- a/hw/lm32/lm32_boards.c
> +++ b/hw/lm32/lm32_boards.c
> @@ -302,7 +302,6 @@ static void lm32_uclinux_class_init(ObjectClass *oc, void *data)
>  
>      mc->desc = "lm32 platform for uClinux and u-boot by Theobroma Systems";
>      mc->init = lm32_uclinux_init;
> -    mc->is_default = 0;
>      mc->default_cpu_type = LM32_CPU_TYPE_NAME("lm32-full");
>  }
>  
> diff --git a/hw/lm32/milkymist.c b/hw/lm32/milkymist.c
> index 6d46134232..9fa5fd7050 100644
> --- a/hw/lm32/milkymist.c
> +++ b/hw/lm32/milkymist.c
> @@ -214,7 +214,6 @@ static void milkymist_machine_init(MachineClass *mc)
>  {
>      mc->desc = "Milkymist One";
>      mc->init = milkymist_init;
> -    mc->is_default = 0;
>      mc->default_cpu_type = LM32_CPU_TYPE_NAME("lm32-full");
>  }
>  
> diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c
> index 1e32363688..788b5d663f 100644
> --- a/hw/m68k/q800.c
> +++ b/hw/m68k/q800.c
> @@ -441,7 +441,6 @@ static void q800_machine_class_init(ObjectClass *oc, void *data)
>      mc->init = q800_init;
>      mc->default_cpu_type = M68K_CPU_TYPE_NAME("m68040");
>      mc->max_cpus = 1;
> -    mc->is_default = 0;
>      mc->block_default_type = IF_SCSI;
>  }
>  
> diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_ml605_mmu.c
> index 09486bc8bf..0a2640c40b 100644
> --- a/hw/microblaze/petalogix_ml605_mmu.c
> +++ b/hw/microblaze/petalogix_ml605_mmu.c
> @@ -216,7 +216,6 @@ static void petalogix_ml605_machine_init(MachineClass *mc)
>  {
>      mc->desc = "PetaLogix linux refdesign for xilinx ml605 little endian";
>      mc->init = petalogix_ml605_init;
> -    mc->is_default = 0;
>  }
>  
>  DEFINE_MACHINE("petalogix-ml605", petalogix_ml605_machine_init)
> diff --git a/hw/tricore/tricore_testboard.c b/hw/tricore/tricore_testboard.c
> index 20c9ccb3ce..8ec2b5bddd 100644
> --- a/hw/tricore/tricore_testboard.c
> +++ b/hw/tricore/tricore_testboard.c
> @@ -105,7 +105,6 @@ static void ttb_machine_init(MachineClass *mc)
>  {
>      mc->desc = "a minimal TriCore board";
>      mc->init = tricoreboard_init;
> -    mc->is_default = 0;
>      mc->default_cpu_type = TRICORE_CPU_TYPE_NAME("tc1796");
>  }
>  

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2020-02-08  9:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-07 16:19 [PATCH v4 0/3] Make MachineClass::is_default boolean, refuse multiple default machines Philippe Mathieu-Daudé
2020-02-07 16:19 ` [PATCH v4 1/3] hw: Do not initialize MachineClass::is_default to 0 Philippe Mathieu-Daudé
2020-02-07 17:44   ` Laurent Vivier
2020-02-08  9:23   ` David Gibson [this message]
2020-02-10  9:35   ` Tricore default machine (was: [PATCH v4 1/3] hw: Do not initialize MachineClass::is_default to 0) Thomas Huth
2020-02-10 10:08     ` Tricore default machine Philippe Mathieu-Daudé
2020-02-10 10:26       ` Thomas Huth
2020-02-10 12:31         ` Bastian Koppelmann
2020-02-10 13:22           ` Peter Maydell
2020-02-10 13:25             ` Philippe Mathieu-Daudé
2020-02-07 16:19 ` [PATCH v4 2/3] hw: Make MachineClass::is_default a boolean type Philippe Mathieu-Daudé
2020-02-07 16:32   ` Marc-André Lureau
2020-02-07 17:48   ` Laurent Vivier
2020-02-08  9:24   ` David Gibson
2020-02-10  8:51   ` Cornelia Huck
2020-02-10  9:22   ` Thomas Huth
2020-02-07 16:19 ` [PATCH v4 3/3] vl: Abort if multiple machines are registered as default Philippe Mathieu-Daudé
2020-02-07 16:31   ` Marc-André Lureau
2020-02-07 18:05   ` Laurent Vivier
2020-02-08  9:25   ` David Gibson
2020-02-07 18:03 ` [PATCH v4 0/3] Make MachineClass::is_default boolean, refuse multiple default machines Eduardo Habkost

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=20200208092312.GB219689@umbus.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=Alistair.Francis@wdc.com \
    --cc=aleksandar.rikalo@rt-rk.com \
    --cc=amarkovic@wavecomp.com \
    --cc=atar4qemu@gmail.com \
    --cc=aurelien@aurel32.net \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=crwulff@gmail.com \
    --cc=david@redhat.com \
    --cc=deller@gmx.de \
    --cc=edgar.iglesias@gmail.com \
    --cc=ehabkost@redhat.com \
    --cc=green@moxielogic.com \
    --cc=gxt@mprc.pku.edu.cn \
    --cc=huth@tuxfamily.org \
    --cc=kbastian@mail.uni-paderborn.de \
    --cc=laurent@vivier.eu \
    --cc=magnus.damm@gmail.com \
    --cc=marex@denx.de \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=michael@walle.cc \
    --cc=mst@redhat.com \
    --cc=palmer@dabbelt.com \
    --cc=pasic@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=proljc@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=rth@twiddle.net \
    --cc=sagark@eecs.berkeley.edu \
    --cc=shorne@gmail.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).