Re: need help with my config

2021-08-03 Thread Cédric Le Goater
Hello,

On 8/3/21 1:22 AM, Lindsay Ryan wrote:
> Hi Cedric, 
> Thanks for replying.
> I think I want to go down the PowerNV Power 9
> Which I will need the OpenPower firmware. 
> Looks like the webpage for downloading prebuild witherspoon and skiboot is 
> down/dead. Hasn't been working for me for 24hours anyway

Indeed :/

> Is that the only place to download that firmware?

Until we find a new hosting place, probably GH, you can try to build 
the FW images :

  https://github.com/open-power/op-build

from :

  https://github.com/open-power/op-build/archive/refs/tags/v2.6.tar.gz

or you can use these v2.6 files :

  https://www.kaod.org/qemu/powernv/

Cheers,

C. 




Re: Initialize RAM from a file and save it to the file

2021-08-03 Thread Hiroko Shimizu
Thank you, guys!
Generic loader and pmemsave are so useful for me!

But, I have another question.
I would like to reset a memory region initialized generic loader during
qemu running.
I know the reset APIs such as resettable_cold_reset_fn,
but I think these APIs can't use to reset the MemoryRegion because it does
not have ResettableState.
Are there any methods to reset MemoryRegion?


2021年7月19日(月) 22:03 Igor Mammedov :

> On Mon, 19 Jul 2021 12:01:10 +0200
> Philippe Mathieu-Daudé  wrote:
>
> > Hi Hiroko,
> >
> > On 7/19/21 11:34 AM, Hiroko Shimizu wrote:
> > > Hello,
> > > I'd like to initialize RAM from a specific file when RAM is created.
> > > Then,  I tried using memory_region_init_ram_from_file().
> ...
> > > Could you tell me what I need to do or another way to initialize RAM
> > > from a file?
> > >
> > > Also, is it possible to save RAM's value to the file when a value is
> > > written to RAM which is initialized
> memory_region_init_ram_from_file()?
> >
> > 2 years ago I was using -mem-path /dev/shm/ (and maybe -mem-prealloc) to
> > keep the ram sync on a file, pause the VM and analyse the memory, but it
> > stopped working after the global memdev refactor. I don't think my use
>
> -mem-path should still work as it's aliased to default memdev,
> (see: create_default_memdev), that's assumes legacy CLI and that
> board uses MachineState::ram as RAM.
> (it certainly worked on mainstream boards, if you share your CLI
> I can look if it's expected or a bug).
>
> For new CLI:
> it's recommended to use '-machine memory-backend=' which points to
> previously
> specified file backend, ex:
>
>   -object
> memory-backend-file,id=myram,share=yes,size=1G,mem-path=/ram-image-file \
>   -machine memory-backend=myram
>
> Above will create memory region and assign it to MachineState::ram,
> so one should use that instead of manually calling
> memory_region_init_ram_from_file().
>
>
> > case was the expected one. Maybe I simply need to adapt to a new command
> > line format :)
> >
> > Now I use 'pmemsave' from the monitor:
> >
> > pmemsave addr size file -- save to disk physical memory dump starting at
> > 'addr' of size 'size'
> >
> > If attached from GDB:
> >
> > (gdb) monitor pmemsave 0x2000 0x100 /tmp/ram.dump
> >
> > There are other commands and probably a clever way to do that.
> >
> > See also the VM snapshot feature, described here, which might be
> > what you are looking for:
> >
> https://translatedcode.wordpress.com/2015/07/06/tricks-for-debugging-qemu-savevm-snapshots/
> >
> > Regards,
> >
> > Phil.
> >
>
>


Re: Initialize RAM from a file and save it to the file

2021-08-03 Thread Peter Maydell
On Tue, 3 Aug 2021 at 10:23, Hiroko Shimizu  wrote:
>
> Thank you, guys!
> Generic loader and pmemsave are so useful for me!
>
> But, I have another question.
> I would like to reset a memory region initialized generic loader during qemu 
> running.
> I know the reset APIs such as resettable_cold_reset_fn,
> but I think these APIs can't use to reset the MemoryRegion because it does 
> not have ResettableState.
> Are there any methods to reset MemoryRegion?

No. When you reset the system then the reset method for the
various 'rom blobs' will copy the data specified by the
generic loader back into the guest RAM, but there's no way
to do this at some other time.

-- PMM