Kick cpu when WFI in single-threaded kvm integration

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

 



Hi all,

 

Currently I am working on a SystemC integration of kvm on arm.

Therefore, I use the kvm api and of course SystemC (library to simulate hardware platforms with C++).

 

As I need the virtual cpu to interrupt its execution loop from time to time to let the rest of the SystemC simulation execute,

I use a perf_event and let the kernel send a signal on overflow to the simulation thread which kicks the virtual cpu (suggested by this mailing list, thanks again).

Thus I am able to simulate a quantum mechanism for the virtual cpu.

 

As I am running benchmarks (e.g. Coremark) on my virtual platform this works fine.

 

I also get to boot Linux until it spawns the terminal and then wait for interrupts from my virtual uart.

Here comes the problem:

The perf event counting mechanism does increment its counted instructions very very slowly when the virtual cpu executes wfi.

Thus my whole simulation starts to hang.

As my simulation is single threaded I need the signal from the kernel to kick my cpu to let the virtual uart deliver its interrupt to react to my input.

I tried to use the request_interrupt_window flag but this does not seem to work.

 

Is there a way to kick the virtual cpu when it is waiting for interrupts? Or do I have to patch my kvm code?

 

Thanks in advance

Jan Bölke

 

_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux