写入QEMU来宾系统寄存器&记忆? [英] Write to QEMU guest system registers & memory?

查看:50
本文介绍了写入QEMU来宾系统寄存器&记忆?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何写入QEMU中运行的虚拟系统的处理器寄存器和特定内存地址?

How do you write to the processor registers and specific memory addresses of a virtual system running in QEMU?

我的愿望是从QEMU外部运行的用户空间程序来完成此任务.这将引起中断并精确控制处理器和虚拟硬件的执行.

My desire would be to accomplish this from a user space program running outside of QEMU. This would be to induce interrupts and finely control execution of the processor and virtual hardware.

QEMU Monitor 应该可以读取参数或进行简单的鼠标或键盘注入事件,但我对写作一无所知.

The QEMU Monitor is supposed to read parameters or do simple injects of mouse or keyboard events, but I haven't seen anything about writing.

推荐答案

GDB服务器似乎是最适合您的目的.您的一种选择是实现gdb protocol ,另外一个正在通过命令行驱动gdb本身.

GDB server within QEMU Monitor seems to be the best for your purpose. One of your options is implementing a gdb protocol, another one is driving gdb itself through its command line.

我已经对其进行了一些测试:附加,读取和写入内存似乎可以正常工作(我已读取所写内容);跳到另一个地址似乎也可以. (理论上,如果您可以call注入代码,则可以执行任何操作).写入文本模式的视频存储器不起作用(我什至没有阅读所写内容,显示内容也没有任何变化).

I've tested it a bit: attaching, reading and writing memory seems to work (I read what I write); jumping to another address seems to work too. (If you may call injected code, you can do anything, theoretically). Writing to text-mode video memory doesn't work (I don't even read what I wrote, and nothing changes on display).

这篇关于写入QEMU来宾系统寄存器&记忆?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆