From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: "Daniel P. Berrangé" <berrange@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
"BALATON Zoltan" <balaton@eik.bme.hu>,
qemu-devel@nongnu.org, "Jared Mauch" <jared+home@puck.nether.net>,
qemu-arm@nongnu.org, devel@lists.libvirt.org
Subject: Re: [PATCH 0/7] hw/arm/raspi4b: Add models with 4GB and 8GB of DRAM
Date: Mon, 3 Feb 2025 17:19:02 +0100 [thread overview]
Message-ID: <7f765a75-d02d-450e-b229-3232d16871c3@linaro.org> (raw)
In-Reply-To: <Z6DXmN-ROswsaDAi@redhat.com>
On 3/2/25 15:50, Daniel P. Berrangé wrote:
> On Mon, Feb 03, 2025 at 02:45:06PM +0000, Peter Maydell wrote:
>> On Mon, 3 Feb 2025 at 14:33, Daniel P. Berrangé <berrange@redhat.com> wrote:
>>>
>>> On Mon, Feb 03, 2025 at 02:29:49PM +0000, Alex Bennée wrote:
>>>> Peter Maydell <peter.maydell@linaro.org> writes:
>>>>
>>>>> On Sat, 1 Feb 2025 at 12:57, BALATON Zoltan <balaton@eik.bme.hu> wrote:
>>>>>>
>>>>>> On Sat, 1 Feb 2025, Philippe Mathieu-Daudé wrote:
>>>>>>> - Deprecate the 'raspi4b' machine name, renaming it as
>>>>>>> 'raspi4b-1g' on 32-bit hosts, 'raspi4b-2g' otherwise.
>>>>>>> - Add the 'raspi4b-4g' and 'raspi4b-8g' machines, with
>>>>>>> respectively 4GB and 8GB of DRAM.
>>>>>>
>>>>>> IMHO (meaning you can ignore it, just my opinion) if the only difference
>>>>>> is the memory size -machine raspi4b -memory 4g would be better user
>>>>>> experience than having a lot of different machines.
>>>>>
>>>>> Yes, I think I agree. We have a way for users to specify
>>>>> how much memory they want, and I think it makes more sense
>>>>> to use that than to have lots of different machine types.
>>>>
>>>> I guess for the Pi we should validate the -memory supplied is on of the
>>>> supported grid of devices rather than an arbitrary value?
>>>
>>> If the user wants to create a rpi4 with 6 GB RAM why should we stop
>>> them ? It is their choice if they want to precisely replicate RAM
>>> size from a physical model, or use something different when virtualized.
>>
>> The board revision code (reported to the guest via the emulated
>> firmware interface) only supports reporting 256MB, 512MB,
>> 1GB, 2GB, 4GB or 8GB:
>>
>> https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#new-style-revision-codes
>
> I think it would be valid to report the revision code for the memory
> size that doesn't exceed what QEMU has configured. eg if configured
> with 6 GB, then report code for 4 GB.
We need to distinct between physical machines VS virtual ones.
Guests on virtual machines have some way to figure the virtual
hardware (ACPI tables, DeviceTree blob, fw-cfg, ...).
Guests for physical machines usually expect fixed hardware (not
considering devices on busses).
For the particular case of the Raspberry Pi machines, their
bootloader gets the board layout by reading the
RPI_FWREQ_GET_BOARD_REVISION constant value.
What would be the point of emulating a raspi machine with 6GB
if the FW is not going to consider besides 4GB?
Besides, someone modify a guest to work with 6GB, it won't work
on real HW.
>> For Arm embedded boards we mostly tend to "restrict the user
>> to what you can actually do", except for older boards where
>> we tended not to write any kind of sanity checking on CPU
>> type, memory size, etc.
>
> If we're going to strictly limit memory size that's accepted I wonder
> how we could information users/mgmt apps about what's permitted ?
>
> Expressing valid combinations of configs across different args gets
> pretty complicated quickly :-(
I'll try to address Zoltan and Peter request to have a dynamic raspi
machine. It is a bit unfortunate we didn't insisted on that when we
decided to expose a fixed set of existing boards in order to not be
bothered by inconsistent bug reports, back in 2019.
Regards,
Phil.
next prev parent reply other threads:[~2025-02-03 16:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-01 9:15 [PATCH 0/7] hw/arm/raspi4b: Add models with 4GB and 8GB of DRAM Philippe Mathieu-Daudé
2025-02-01 9:15 ` [PATCH 1/7] hw/arm/raspi4b: Declare machine types using DEFINE_TYPES() macro Philippe Mathieu-Daudé
2025-02-01 9:15 ` [PATCH 2/7] hw/arm/raspi4b: Introduce abstract raspi4-base machine type Philippe Mathieu-Daudé
2025-02-01 9:15 ` [PATCH 3/7] hw/arm/raspi4b: Split raspi4b_machine_class_init() in two (1g and 2g) Philippe Mathieu-Daudé
2025-02-01 9:15 ` [PATCH 4/7] hw/arm/raspi4b: Rename as raspi4b-1g / raspi4b-2g, deprecating old name Philippe Mathieu-Daudé
2025-02-01 14:30 ` Philippe Mathieu-Daudé
2025-02-01 9:15 ` [PATCH 5/7] hw/arm/raspi4b: Expose the raspi4b-1g machine on 64-bit hosts Philippe Mathieu-Daudé
2025-02-01 9:15 ` [PATCH 6/7] hw/arm/raspi4b: Add the raspi4b-4g machine Philippe Mathieu-Daudé
2025-02-01 9:15 ` [PATCH 7/7] hw/arm/raspi4b: Add the raspi4b-8g machine Philippe Mathieu-Daudé
2025-02-01 12:57 ` [PATCH 0/7] hw/arm/raspi4b: Add models with 4GB and 8GB of DRAM BALATON Zoltan
2025-02-01 13:51 ` Peter Maydell
2025-02-03 14:29 ` Alex Bennée
2025-02-03 14:33 ` Daniel P. Berrangé
2025-02-03 14:45 ` Peter Maydell
2025-02-03 14:50 ` Daniel P. Berrangé
2025-02-03 15:05 ` Peter Maydell
2025-02-03 16:19 ` Philippe Mathieu-Daudé [this message]
2025-02-03 23:20 ` 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=7f765a75-d02d-450e-b229-3232d16871c3@linaro.org \
--to=philmd@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=balaton@eik.bme.hu \
--cc=berrange@redhat.com \
--cc=devel@lists.libvirt.org \
--cc=jared+home@puck.nether.net \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--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).