qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
To: "Igor Mammedow" <imammedo@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: qemu-devel@nongnu.org, Artyom Tarasenko <atar4qemu@gmail.com>
Subject: Re: [RFC PATCH] hw/sparc/sun4m: Use memdev backend for main RAM
Date: Mon, 25 May 2020 10:02:00 +0100	[thread overview]
Message-ID: <aa0afa5a-9d71-69b6-0a34-5a829d974878@ilande.co.uk> (raw)
In-Reply-To: <20200520120709.558a52ba@nas.mammed.net>

On 20/05/2020 11:07, Igor Mammedow wrote:

> On Thu, 14 May 2020 14:13:11 +0200
> Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> 
>> On 5/14/20 12:09 PM, Igor Mammedov wrote:
>>> On Sun, 10 May 2020 13:35:05 +0200
>>> Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>>>   
>>>> Since commit 82b911aaff3, machine_run_board_init() checks for
>>>> ram_memdev_id and consume it. As TYPE_SUN4M_MEMORY is no more
>>>> needed, replace it by the generic memdev allocated MemoryRegion
>>>> and remove it. This completes commit b2554752b1da7c8f.  
>>>
>>> I don't get justification here.
>>> You are removing 'frontend' device model that has little/nothing
>>> to do with how backend is instantiated.
>>>
>>> TYPE_SUN4M_MEMORY is analog to pc-dimm, only for builtin RAM
>>> (not really useful but could serve as an example).  
>>
>> I have no idea about the benefits of using memory frontend/backend
>> with emulation. Is there documentation and examples? I'm seeing this
>> code as a complicated way of doing a simple thing, but I guess I'm
>> missing the big picture here.
> 
> Examples are pc-dimm and nv-dimm which thanks to separation easily
> reusable across pc/spapr/virt-arm.
> 
> Having frontend is also useful for mgmt purposes, where HMP/QMP
> just has to enumerate all RAM devices, otherwise boards would have
> to provide a callback to describe their custom mappings.
> 
> But for embed boards with a single blob of RAM nailed down,
> having frontend is probably overkill (at least ATM).
> So I'm fine with this patch /with amended commit message/

I don't feel too strongly about this, however if there is a standard way of doing
things then I would prefer to do that since it makes it easier for me as a maintainer
if there are existing (and up-to-date) examples that I can use as a reference.

Presumably it also means that if HMP/QMP commands are added in relation to machine
RAM then the SPARC machines would get that new functionality automatically...


ATB,

Mark.


  reply	other threads:[~2020-05-25  9:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-10 11:35 [RFC PATCH] hw/sparc/sun4m: Use memdev backend for main RAM Philippe Mathieu-Daudé
2020-05-14 10:09 ` Igor Mammedov
2020-05-14 12:13   ` Philippe Mathieu-Daudé
2020-05-20 10:07     ` Igor Mammedow
2020-05-25  9:02       ` Mark Cave-Ayland [this message]
2020-05-25 13:45         ` Igor Mammedow

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=aa0afa5a-9d71-69b6-0a34-5a829d974878@ilande.co.uk \
    --to=mark.cave-ayland@ilande.co.uk \
    --cc=atar4qemu@gmail.com \
    --cc=f4bug@amsat.org \
    --cc=imammedo@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).