Google
  Web www.spinics.net

Re: [PATCH v2 2/3] KVM: PPC: epapr: Add idle hcall support for host

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


On 01/09/2012 02:18 PM, Alexander Graf wrote:
> 
> 
> Am 09.01.2012 um 21:00 schrieb Scott Wood <scottwood@xxxxxxxxxxxxx>:
> 
>> 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.
> 
> The wait instruction does get executed in an infinite loop though, while this hcall is only executed once.

Yes, I pointed that out as something that needs to be fixed in the
ev_idle patch.

-Scott


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


[KVM Development]     [KVM ARM]     [KVM ia64]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Photo]     [Video Projectors]     [PDAs]     [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Big List of Linux Books]

  Powered by Linux