Re: Virtual machine does not respond to keyboard input when guest OS idles for a while

2012-06-08 Thread Alexander Graf
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

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Virtual machine does not respond to keyboard input when guest OS idles for a while

2012-06-08 Thread Fei K Chen
 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


--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Virtual machine does not respond to keyboard input when guest OS idles for a while

2012-06-07 Thread Jan Kiszka
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



signature.asc
Description: OpenPGP digital signature


Re: Virtual machine does not respond to keyboard input when guest OS idles for a while

2012-06-07 Thread Alexander Graf

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

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html