Skip to contentSkip to conversation

(no subject)

Qemu-devel Stephen Bates 2 participants 3 messages Sep 12, 2016 – Sep 19, 2016

lore
Share & tools
lore
#0 lore raw

Hi

I sent this to qemu-discuss with no success so resending to qemu-devel.

I am doing some very low level OS design work and wanted to be able to alter some values in the physical memory of my QEMU guest. I can see quite a few ways to print/dump both physical and virtual addresses but nothing that can alter arbitrary physical/virtual addresses?

Does such a feature exist in Qemu and if it does are there pointers to documentation for it?

I do see that we can use file backing for very large memory regions via the memory-backing-file option but I am not really trying to alter massive regions of memory in this case.

Cheers

Stephen Bates

#1 lore raw
Quoted 1 line · Stephen Bates

Hi

Hi Stephen,

Quoted 10 lines

I sent this to qemu-discuss with no success so resending to qemu-devel.

I am doing some very low level OS design work and wanted to be able to alter some values in the physical memory of my QEMU guest. I can see quite a few ways to print/dump both physical and virtual addresses but nothing that can alter arbitrary physical/virtual addresses?

Does such a feature exist in Qemu and if it does are there pointers to documentation for it?

Have you tried the builtin gdbstub in QEMU? You can add "-s" to the QEMU command line and then connect to it from gdb with "target remote :1234". There you can inspect or change memory more easily.

Fam

Quoted 9 lines

I do see that we can use file backing for very large memory regions via the memory-backing-file option but I am not really trying to alter massive regions of memory in this case.

Cheers

Stephen Bates

#2 lore raw

Hi Fam

Thanks! Yes gdb provides one approach but I was wondering if there was something built in to QEMU monitor.

Another application I can see for this would be to inject errors into the memory, This will be useful for testing new NVDIMM-P technology that builds NVDIMMs out of material that is less reliable than DRAM...

Cheers

Stephen

Quoted 33 lines · Fam Zheng
Quoted 3 lines · Stephen Bates

Hi

Hi Stephen,

Quoted 10 lines

I sent this to qemu-discuss with no success so resending to qemu-devel.

I am doing some very low level OS design work and wanted to be able to alter some values in the physical memory of my QEMU guest. I can see quite a few ways to print/dump both physical and virtual addresses but nothing that can alter arbitrary physical/virtual addresses?

Does such a feature exist in Qemu and if it does are there pointers to documentation for it?

Have you tried the builtin gdbstub in QEMU? You can add "-s" to the QEMU command line and then connect to it from gdb with "target remote :1234". There you can inspect or change memory more easily.

Fam

Quoted 9 lines

I do see that we can use file backing for very large memory regions via the memory-backing-file option but I am not really trying to alter massive regions of memory in this case.

Cheers

Stephen Bates