Run Real Time Guest OS?
Is it possible to run a real time OS under qemu? What changes would need to be made? Can it even be done?
The guest OS I'm trying to run sets the RTC System Timer 0 to a 0.25ms interval (~4000Hz)!! The program I'm trying to run on it, expects this time to be accurate, and as such, visually the program seems to be 4-5x too slow in qemu, which makes sense given that it's delivering only a 1024Hz timer irq.
I've noticed in the source code that qemu sets this max value of 1024Hz (1ms) for the timer, which from what I understand is a limit of the Linux kernel itself, ie, that's the most the kernel can support.
If I was to run qemu in an RT version of linux ( I was considering KURT ), or using some other patch to allow for finer granularity of the linux timers, what else would need changing in qemu, ie, what timings are expected & assumed by qemu currently?
Before I waste any time investing KURT or other avenues more closely, I just wanted to get an idea from you guys if this would even be possible. To me it seems like it should be pretty easy to do, but then again, I'm still getting familiar with qemu's internals.
Thanks for any advice-
Steve
Quoted 7 lines · Steve Ellenoff
Is it possible to run a real time OS under qemu? What changes would need to be made? Can it even be done?
The guest OS I'm trying to run sets the RTC System Timer 0 to a 0.25ms interval (~4000Hz)!! The program I'm trying to run on it, expects this time to be accurate, and as such, visually the program seems to be 4-5x too slow in qemu, which makes sense given that it's delivering only a 1024Hz timer irq.
I've noticed in the source code that qemu sets this max value of 1024Hz (1ms) for the timer, which from what I understand is a limit of the Linux kernel itself, ie, that's the most the kernel can support.
Not at all.. for a single qemu instance on linux it tries to use the PIT in the rtc, and I've seen this run upto 8192hz. Why not crank it up in the qemu source t0 4096 and see what happens. It's not going to hurt anything in any case. You would most certainly want a HZ value of 1000 to try this.
Brad
Signature · 3 lines
"Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so." -- Douglas Adams