qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	Artyom Tarasenko <atar4qemu@gmail.com>
Subject: Re: [Qemu-devel] [PATCH] sun4m: obey -vga none
Date: Wed, 3 Apr 2019 14:49:56 +0200	[thread overview]
Message-ID: <6baec386-3040-b84c-930a-2619fee5f32f@redhat.com> (raw)
In-Reply-To: <20190319144013.26584-2-pbonzini@redhat.com>

Hi Paolo,

On 3/19/19 3:40 PM, Paolo Bonzini wrote:
> Do not create a TCX if "-vga none" was passed on the command line.
> Remove some dead code along the way to avoid big reindentation.

Can you add:

This fixes when configuring with --without-default-devices:

  $ sparc-softmmu/qemu-system-sparc
  qemu-system-sparc: Unknown device 'SUNW,tcx' for default sysbus
  Aborted (core dumped)

  (gdb) bt
  #1  0x00007fc78d17d895 in __GI_abort () at abort.c:79
  #2  0x0000560beaf637f3 in qdev_create (bus=bus@entry=0x0,
name=name@entry=0x560beb1be36b "SUNW,tcx") at hw/core/qdev.c:131
  #3  0x0000560beaf1392d in tcx_init (vram_size=1048576, width=1024,
height=768, depth=8, irq=0x560bed1a0230, addr=1342177280) at
hw/sparc/sun4m.c:477
  #4  0x0000560beaf1392d in sun4m_hw_init (hwdef=0x560beb1be780
<sun4m_hwdefs>, machine=0x560becf65f00) at hw/sparc/sun4m.c:943
  #5  0x0000560beaf6b15b in machine_run_board_init
(machine=0x560becf65f00) at hw/core/machine.c:1030
  #6  0x0000560beae86692 in main (argc=<optimized out>, argv=<optimized
out>, envp=<optimized out>) at vl.c:4463

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

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>  hw/sparc/sun4m.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c
> index ca1e3825d5..07d126aea8 100644
> --- a/hw/sparc/sun4m.c
> +++ b/hw/sparc/sun4m.c
> @@ -850,7 +850,6 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef,
>      uint32_t initrd_size;
>      DriveInfo *fd[MAX_FD];
>      FWCfgState *fw_cfg;
> -    unsigned int num_vsimms;
>      DeviceState *dev;
>      SysBusDevice *s;
>  
> @@ -909,8 +908,7 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef,
>          error_report("Unsupported depth: %d", graphic_depth);
>          exit (1);
>      }
> -    num_vsimms = 0;
> -    if (num_vsimms == 0) {
> +    if (vga_interface_type != VGA_NONE) {
>          if (vga_interface_type == VGA_CG3) {
>              if (graphic_depth != 8) {
>                  error_report("Unsupported depth: %d", graphic_depth);
> @@ -945,7 +943,7 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef,
>          }
>      }
>  
> -    for (i = num_vsimms; i < MAX_VSIMMS; i++) {
> +    for (i = 0; i < MAX_VSIMMS; i++) {
>          /* vsimm registers probed by OBP */
>          if (hwdef->vsimm[i].reg_base) {
>              empty_slot_init(hwdef->vsimm[i].reg_base, 0x2000);
> 

       reply	other threads:[~2019-04-03 12:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190319144013.26584-1-pbonzini@redhat.com>
     [not found] ` <20190319144013.26584-2-pbonzini@redhat.com>
2019-04-03 12:49   ` Philippe Mathieu-Daudé [this message]
     [not found] ` <alpine.BSF.2.21.9999.1903192350550.11467@zero.eik.bme.hu>
     [not found]   ` <87imwe847x.fsf_-_@dusky.pond.sub.org>
     [not found]     ` <CAAdtpL5Z1OXqZ_zzA0RLq9soydNtTFt2oCOEfui1rq19bLKUgA@mail.gmail.com>
     [not found]       ` <d9d5ac96-c0f5-dd83-d305-10e20c745dd1@redhat.com>
2020-01-04 21:16         ` [Qemu-devel] What should a virtual board emulate? Philippe Mathieu-Daudé
2020-01-05 10:59           ` BALATON Zoltan
2020-01-06  6:45           ` Gerd Hoffmann
2020-01-10 19:42             ` Aleksandar Markovic
2020-01-10 19:56               ` Aleksandar Markovic
2020-01-18 20:46           ` Paolo Bonzini
2020-01-19 11:36             ` Philippe Mathieu-Daudé
2020-01-21  5:32             ` Markus Armbruster
2020-01-21 14:04               ` BALATON Zoltan

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=6baec386-3040-b84c-930a-2619fee5f32f@redhat.com \
    --to=philmd@redhat.com \
    --cc=atar4qemu@gmail.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).