* Virtual machine does not respond to keyboard input when guest OS idles for a while
@ 2012-06-07 1:26 Fei K Chen
2012-06-07 10:37 ` Alexander Graf
2012-06-07 11:23 ` Jan Kiszka
0 siblings, 2 replies; 5+ messages in thread
From: Fei K Chen @ 2012-06-07 1:26 UTC (permalink / raw)
To: kvm, kvm-ppc
hi everyone,
This is Fei Chen from IBM Research China. I and my team are working on enabling qemu-kvm on IBM prism A2 processor. After guest OS booted up, we can run linux commands on bash, such as "ls", "dmesg". However, if we stop input and let the guest OS idle for a while, such as 15 seconds, the guest OS will not respond to keyboard input anymore.
Since interrupt controller is not ready for virtual machine, our guest OS boots up with "irqpoll" argument. Is it possible that when guest OS idle, it will not trap into kvm, so kvm can not inject a timer interrupt to guest OS? Have you got the similar problems?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Virtual machine does not respond to keyboard input when guest OS idles for a while
2012-06-07 1:26 Virtual machine does not respond to keyboard input when guest OS idles for a while Fei K Chen
@ 2012-06-07 10:37 ` Alexander Graf
2012-06-08 7:55 ` Fei K Chen
2012-06-07 11:23 ` Jan Kiszka
1 sibling, 1 reply; 5+ messages in thread
From: Alexander Graf @ 2012-06-07 10:37 UTC (permalink / raw)
To: Fei K Chen; +Cc: kvm, kvm-ppc
On 07.06.2012, at 03:26, Fei K Chen wrote:
> hi everyone,
>
> This is Fei Chen from IBM Research China. I and my team are working on enabling qemu-kvm on IBM prism A2 processor. After guest OS booted up, we can run linux commands on bash, such as "ls", "dmesg". However, if we stop input and let the guest OS idle for a while, such as 15 seconds, the guest OS will not respond to keyboard input anymore.
>
> Since interrupt controller is not ready for virtual machine, our guest OS boots up with "irqpoll" argument. Is it possible that when guest OS idle, it will not trap into kvm, so kvm can not inject a timer interrupt to guest OS? Have you got the similar problems?
It might be related to the way you implement idle. But without seeing the code, I can't tell too much there. We certainly can run VMs with IRQs for more than 15 seconds on other ppc platforms though :).
Btw, is there anything keeping you from just reusing QEMU's MPIC code for IRQ delivery?
Alex
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Virtual machine does not respond to keyboard input when guest OS idles for a while
2012-06-07 1:26 Virtual machine does not respond to keyboard input when guest OS idles for a while Fei K Chen
2012-06-07 10:37 ` Alexander Graf
@ 2012-06-07 11:23 ` Jan Kiszka
1 sibling, 0 replies; 5+ messages in thread
From: Jan Kiszka @ 2012-06-07 11:23 UTC (permalink / raw)
To: Fei K Chen; +Cc: kvm, kvm-ppc
[-- Attachment #1: Type: text/plain, Size: 378 bytes --]
On 2012-06-07 03:26, Fei K Chen wrote:
> hi everyone,
>
> This is Fei Chen from IBM Research China. I and my team are working on enabling qemu-kvm on IBM prism A2 processor.
Just a note: Don't use qemu-kvm as basis, use upstream QEMU or
qemu-kvm's uq/master branch (if you have generic kvm subsystem changes).
qemu-kvm is an x86-only fork that is fading out.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Virtual machine does not respond to keyboard input when guest OS idles for a while
2012-06-07 10:37 ` Alexander Graf
@ 2012-06-08 7:55 ` Fei K Chen
2012-06-08 11:04 ` Alexander Graf
0 siblings, 1 reply; 5+ messages in thread
From: Fei K Chen @ 2012-06-08 7:55 UTC (permalink / raw)
To: Alexander Graf; +Cc: kvm-ppc, kvm
I know that when simulating x86, kvm is using the "halt" instruction in guest OS to trap the VM idle, and then return to qemu to simulate I/O input for VM.
Is there any suitable instruction in ppc platform like "halt" in x86? kvm should not return to qemu when emulating all of the private instructions.
Teaching prism platform in linux kernel to use MPIC and teaching Qemu to use XICS are two choices for us. And finally we decide to teaching Qemu to use XICS. There is something to do to write a correct device-tree used in qemu for our platform.
Any suggestions for us? thanks.
CHEN Fei
> hi everyone,
>
> This is Fei Chen from IBM Research China. I and my team are working on enabling qemu-kvm on IBM prism A2 processor. After guest OS booted up, we can run linux commands on bash, such as "ls", "dmesg". However, if we stop input and let the guest OS idle for a while, such as 15 seconds, the guest OS will not respond to keyboard input anymore.
>
> Since interrupt controller is not ready for virtual machine, our guest OS boots up with "irqpoll" argument. Is it possible that when guest OS idle, it will not trap into kvm, so kvm can not inject a timer interrupt to guest OS? Have you got the similar problems?
It might be related to the way you implement idle. But without seeing the code, I can't tell too much there. We certainly can run VMs with IRQs for more than 15 seconds on other ppc platforms though :).
Btw, is there anything keeping you from just reusing QEMU's MPIC code for IRQ delivery?
Alex
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Virtual machine does not respond to keyboard input when guest OS idles for a while
2012-06-08 7:55 ` Fei K Chen
@ 2012-06-08 11:04 ` Alexander Graf
0 siblings, 0 replies; 5+ messages in thread
From: Alexander Graf @ 2012-06-08 11:04 UTC (permalink / raw)
To: Fei K Chen; +Cc: kvm-ppc, kvm
Please don't top post.
On 08.06.2012, at 09:55, Fei K Chen wrote:
> I know that when simulating x86, kvm is using the "halt" instruction in guest OS to trap the VM idle, and then return to qemu to simulate I/O input for VM.
> Is there any suitable instruction in ppc platform like "halt" in x86?
The actual idle call is implementation specific. Some implementations use MSR_POW, but I don't know what A2 does. Check your spec for details :).
> kvm should not return to qemu when emulating all of the private instructions.
Kvm does not return to QEMU for emulation of instructions, except for MMIO.
> Teaching prism platform in linux kernel to use MPIC and teaching Qemu to use XICS are two choices for us. And finally we decide to teaching Qemu to use XICS.
Ah, A2 has an XICS? Nice :). We could certainly use emulation for that one, yeah.
> There is something to do to write a correct device-tree used in qemu for our platform. Any suggestions for us? thanks.
For prototyping, keep the device tree external - it makes your development cycles shorter. Once you know what to put in and you know that everything works just fine, you can move the device tree generation into QEMU, like we're doing for e500 now.
Unless you're really into libfdt of course - then you can start off with the in-QEMU generation like David did :).
Alex
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-06-08 11:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-07 1:26 Virtual machine does not respond to keyboard input when guest OS idles for a while Fei K Chen
2012-06-07 10:37 ` Alexander Graf
2012-06-08 7:55 ` Fei K Chen
2012-06-08 11:04 ` Alexander Graf
2012-06-07 11:23 ` Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox