On 01/09/2012 08:15 AM, Alexander Graf wrote:
> 
> On 05.01.2012, at 10:07, Liu Yu wrote:
> 
>> diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
>> index c33f6a7..1242ee1 100644
>> --- a/arch/powerpc/kvm/powerpc.c
>> +++ b/arch/powerpc/kvm/powerpc.c
>> @@ -81,6 +81,10 @@ int kvmppc_kvm_pv(struct kvm_vcpu *vcpu)
>>
>>              /* Second return value is in r4 */
>>              break;
>> +    case HC_VENDOR_EPAPR | HC_EV_IDLE:
>> +            r = HC_EV_SUCCESS;
>> +            kvm_vcpu_block(vcpu);
> 
> Hrm. This will return on signal. So if the guest sends an idle hcall,
> then user space gets a random signal, we'll continue executing the
> guest CPU, getting us out of idle even though the guest didn't expect
> it, since the guest really wants to get an interrupt after the idle
> hcall.

The ePAPR description of this hcall is a little vague (Stuart, put on
list to fix in next ePAPR revision?), but this is expected.  It will
also be the case if a guest directly uses the wait instruction.  Guests
must be able to deal with spurious wakeups.

-Scott

--
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

Reply via email to