All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aditya Gupta <adityag@linux.ibm.com>
To: "Nicholas Piggin" <npiggin@gmail.com>, "Cédric Le Goater" <clg@kaod.org>
Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
	"Mahesh J Salgaonkar" <mahesh@linux.ibm.com>,
	"Madhavan Srinivasan" <maddy@linux.ibm.com>,
	"Harsh Prateek Bora" <harshpb@linux.ibm.com>,
	"Frédéric Barrat" <fbarrat@linux.ibm.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>
Subject: Re: [PATCH v3] hw/ppc: Implement -dtb support for PowerNV
Date: Mon, 19 Aug 2024 19:36:26 +0530	[thread overview]
Message-ID: <142e8cde-ba89-46cd-80bd-525de88fd6cf@linux.ibm.com> (raw)
In-Reply-To: <D3GZ6RL9K9OQ.1A1YQ9YSZPH3E@gmail.com>

Hello Nick,

On 16/08/24 07:50, Nicholas Piggin wrote:
> <...snip...>
>>> One little nit is MachineState.fdt vs PnvMachineState.fdt
>>> which is now confusing. I would call the new PnvMachineState member
>>> something like fdt_from_dtb, or fdt_override?
>> I agree. this is confusing. machine->fdt could be used instead ?
> Yeah that could be another option. Test pnv.dtb or add a new bool
> to pnv if you need to check whether the fdt has been provided by
> cmdline.

Sure, I will use machine->fdt. Testing pnv.dtb should be good enough to 
check if -dtb was passed I think.


Regarding the conversation about CAS, I don't have idea on it, other 
than the minimum basics. But thanks to you and Cedric, got to know 
somethings.


Thanks,

Aditya Gupta

>>> The other question... Some machines rebuild fdt at init, others at
>>> reset time. As far as I understood, spapr has to rebuild on reset
>>> because C-A-S call can update the fdt so you have to undo that on
>>> reset.
>> C-A-S is a guest OS hcall. reset is called before the guest OS
>> is started.
> Right, but when you reboot it needs to be reverted to initial
> (pre-CAS) fdt.
>
>>> Did powernv just copy that without really needing it, I wonder?
>>> Maybe that rearranged to just do it at init time (e.g., see
>>> hw/riscv/virt.c which is simpler).
>> The machine is aware of user created devices (on the command line)
>> only at reset time.
> Ah, I should have followed a bit closer. riscv, arm use a
> machine_done notifier for that (and x86, loongarch for ACPI / BIOS
> tables). So that avoids fdt rebuild after the first reset I think.
>
> Anyway I don't really mind then, following other archs would be okay,
> but keeping similar with spapr and avoiding code change is also good.
> Maybe add a small comment to we use reset rather than machine_done
> notifier of other archs to be similar to spapr.
>
> Thanks,
> Nick


  reply	other threads:[~2024-08-19 14:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-13 13:45 [PATCH v3] hw/ppc: Implement -dtb support for PowerNV Aditya Gupta
2024-08-15  7:31 ` Nicholas Piggin
2024-08-15 17:52   ` Cédric Le Goater
2024-08-16  2:20     ` Nicholas Piggin
2024-08-19 14:06       ` Aditya Gupta [this message]
2024-08-19 14:02     ` Aditya Gupta

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=142e8cde-ba89-46cd-80bd-525de88fd6cf@linux.ibm.com \
    --to=adityag@linux.ibm.com \
    --cc=berrange@redhat.com \
    --cc=clg@kaod.org \
    --cc=fbarrat@linux.ibm.com \
    --cc=harshpb@linux.ibm.com \
    --cc=maddy@linux.ibm.com \
    --cc=mahesh@linux.ibm.com \
    --cc=npiggin@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.