qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Question about adding new instructions to Qemu


From: Adnan Khaleel
Subject: [Qemu-devel] Question about adding new instructions to Qemu
Date: Tue, 05 May 2009 11:54:30 -0500

Hello Developers,

I plan on using Qemu on a research project and I wanted some feedback from you guys before I started making some changes.

1. I plan on using Qemu as a functional front end to a cycle accurate back end. Essentially what I would like to do is have qemu-system-x86_64 run at full speed i.e with translation cache enabled until it reaches some point of interest in my benchmark. At that point, I would like to disable the translation cache and have qemu single step through the instructions. Looking through the source I see a "singlestep" mode which I think does what I need. Can anybody comment and tell me if this is indeed correct?

2. I'll also need to examine my guests physical memory periodically. Is the function cpu_physical_memory_rw the correct way to do this?

3. I'm still getting familiar with the code, especially the dynamic translation part of it. I've been trying to understand translate.c to see how this is actually done and I'm a bit lost. I'm specifically looking at x86_64 target running on a x86_64 host. What I'd ultimately like to do is add new instructions to my target cpu? How can I do that? I've read all the documentation thats on the website and it looks like a lot of that is out of date since the Usenix paper refers to dyngen and it seems like Qemu now uses tcg to perform this purpose. If somebody could explain with a simple example with say mov or add, that would go a long way in helping me understand how the breakup into uops is done and untimately how the translation into host instructions happens. It seems like everything seems like each translation ends up with

    *gen_opc_ptr++ = opc;
    *gen_opparam_ptr++ = arg1;

and I can't understand the underlying magic.

4. I'm also trying to get qemu-system-x86_64 to boot SuSE 10 as a guest OS with 128 cores and I haven't had any luck getting the system to boot with more than 48 cores. In failsafe mode I can get 64 cores. I know Qemu supports upto 255 cores so I was wondering if any developers have any experience in simulating a large number of cores. Any pointers to a particular linux distribution, kernel version or command line options would be extremely helpful.

Thanks in advance,

-AK

reply via email to

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