qemu-ppc
[Top][All Lists]
Advanced

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

[Qemu-ppc] 答复: [ppc-kvm] a question abo ut kvm interrupts handle


From: Wangkai (Kevin,C)
Subject: [Qemu-ppc] 答复: [ppc-kvm] a question abo ut kvm interrupts handle
Date: Fri, 1 Feb 2013 09:43:12 +0000

Hi alex,

This the latest patch from freescale of e500v2 core.

 

Wangkai

 

发件人: Alexander Graf [mailto:address@hidden
发送时间: 201321 16:02
收件人: Wangkai (Kevin,C)
抄送: qemu-ppc list:PowerPC; address@hidden
主题: Re: [ppc-kvm] a question about kvm interrupts handle

 

 

On 01.02.2013, at 08:47, Wangkai (Kevin,C) wrote:



Dear

 

I find the new version of kvm, for kvmppc_handle_exit function, new function

kvmppc_restart_interrupt was added to process the interrupts of host.

 

I think when the interrupt was enable by calling local_irq_enable(), the

Interrupts can occur and execute from the host interrupt vector again,

So is that needed to call kvmppc_restart_interrupt?

 

Imagine you have EPR enabled. With EPR, the vector is automatically accepted as soon as the interrupt handler gets invoked. But our interrupt handler merely exits from guest context.

 

So this is here to prevent these type of problems. We want to make sure we never lose any interrupts that could potentially only occur once. This way kvm is a shiny nice black box from Linux's perspective. From Linux's point of view, the interrupt simply occured a few cycles later.

 

 

int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,

                       unsigned int exit_nr)

{

         int r = RESUME_HOST;

 

         /* update before a new last_exit_type is rewritten */

         kvmppc_update_timing_stats(vcpu);

 

         /* restart interrupts if they were meant for the host */

         kvmppc_restart_interrupt(vcpu, exit_nr);

 

         if (likely(exit_nr != BOOKE_INTERRUPT_MACHINE_CHECK))

                   local_irq_enable();

 

What version of kvm are you looking at here? This is not the upstream one ;).

 

 

Alex

 


reply via email to

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