improve error message, when using raspi3 and RAM>4G

Bug #1794187 reported by sedrubal on 2018-09-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Undecided
Unassigned

Bug Description

Running `qemu-system-aarch64 image-aarch64.iso --machine raspi3 -m 8G` prints this error message:

```
Unexpected error in visit_type_uintN() at /builddir/build/BUILD/qemu-3.0.0/qapi/qapi-visit-core.c:164:
qemu-system-aarch64: Parameter 'vcram-base' expects uint32_t
```

The problem is, that you musn't use more than 4 GB RAM for machine raspi3. As it took me some time to figure that out, I'd be glad, if you can print better error message, like you do, when using more than 4 CPU cores with machine raspi3:

```
Invalid SMP CPUs 8. The max CPUs supported by machine 'raspi3' is 4
```

Tags: arm Edit Tag help
Peter Maydell (pmaydell) on 2019-03-26
tags: added: arm
Changed in qemu:
status: New → Confirmed
Peter Maydell (pmaydell) wrote :

I've submitted a patch to the list: http://patchwork.ozlabs.org/patch/1067963/

With it, QEMU will give this error instead:

qemu-system-aarch64: Requested ram size is too large for this machine: maximum is 1GB

(Note that the maximum is 1GB, not 4GB -- it's just that values between 1 and 4GB happened not to make QEMU crash, though it wouldn't handle them very usefully before.)

Changed in qemu:
status: Confirmed → In Progress
Peter Maydell (pmaydell) wrote :

Improved diagnostic message is now in master and will be in QEMU 4.1.

Changed in qemu:
status: In Progress → Fix Committed
Thomas Huth (th-huth) wrote :
Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers