qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

qemu questions about x86


From: 项晨东
Subject: qemu questions about x86
Date: Sat, 23 Apr 2022 11:25:26 +0800 (GMT+08:00)

Dear qemu developers:
hello~ I'm Xiang Chen dong, a student from Tsinghua University. recently I am trying to  accomplish new X86 feature named user-interrupts which can view here.
I worked for a couple of time, reaching status that new msrs added and access of msrs is work well, also add new CPUID infos to qemu64, also I could catch new instructions by modify `translate.c` file. my code could find here, the correspond linux kernel version could find here.
but now I have some problems when trying to accomplish instructions named SENDUIPI and UIRET.
for SENDUIPI, the main function of it is sending the user-interrupts. the detail way is, machine access memory(address saved in new msr), then read another address from memory, then write some content to this memory. I read the qemu source code, find a lot of functions like tcg_gen_qemu_ld,  but when i click into it from IDE(vscode), i could not find where the function body(maybe due to the macro). So I don't understand how the function works and how can I wirte a new function to access guest machine memory and write back in qemu.
another problem is that I am not quite get the idea of accomplishment of Interrupt, i could find functions like raise_interrupt and raise_exception, but I don't understand how it interact with apic(how the control flow switched to other functions, i find cpu_loop_exit_restore, but can not find the function body), either how the interrupt handled.
the problem is difficult in some ways, I discussed with my classmates and friends, but there is no answer.
so I'm hoping to get important information from you. Is my way of reading code right? Is there any tools for development(finding the function body)?How can I accomplish this quickly?
thank you very very much!
best wishes!
Xiang Chen Dong

reply via email to

[Prev in Thread] Current Thread [Next in Thread]