Re: [kvmarm] [PATCH v6 14/15] KVM: ARM: Power State Coordination Interface implementation

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

 



On Mon, 21 Jan 2013 09:50:18 -0500, Christoffer Dall
<c.dall@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> On Mon, Jan 21, 2013 at 5:04 AM, Marc Zyngier <marc.zyngier@xxxxxxx>
wrote:
>> On Sun, 20 Jan 2013 18:35:51 -0500, Christoffer Dall
>> <c.dall@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>>> On Thu, Jan 17, 2013 at 10:55 AM, Marc Zyngier <marc.zyngier@xxxxxxx>
>>> wrote:
>>>> On 16/01/13 17:59, Christoffer Dall wrote:
>>>>> From: Marc Zyngier <marc.zyngier@xxxxxxx>
>>>>>
>>>>> Implement the PSCI specification (ARM DEN 0022A) to control
>>>>> virtual CPUs being "powered" on or off.
>>>>>
>>>>> PSCI/KVM is detected using the KVM_CAP_ARM_PSCI capability.
>>>>>
>>>>> A virtual CPU can now be initialized in a "powered off" state,
>>>>> using the KVM_ARM_VCPU_POWER_OFF feature flag.
>>>>>
>>>>> The guest can use either SMC or HVC to execute a PSCI function.
>>>>>
>>>>> Reviewed-by: Will Deacon <will.deacon@xxxxxxx>
>>>>> Signed-off-by: Marc Zyngier <marc.zyngier@xxxxxxx>
>>>>> Signed-off-by: Christoffer Dall <c.dall@xxxxxxxxxxxxxxxxxxxxxx>
>>>>
>>>> A few bits went wrong when you reworked this patch. See below.
>>
>> [...]
>>
>>>>> @@ -443,13 +445,17 @@ static int handle_hvc(struct kvm_vcpu *vcpu,
>>>>> struct kvm_run *run)
>>>>>       trace_kvm_hvc(*vcpu_pc(vcpu), *vcpu_reg(vcpu, 0),
>>>>>                     vcpu->arch.hsr & HSR_HVC_IMM_MASK);
>>>>>
>>>>> +     if (kvm_psci_call(vcpu))
>>>>> +             return 1;
>>>>> +
>>>>>       return 1;
>>>>
>>>> No undef injection if there is no PSCI match?
>>
>> You haven't addressed this issue in you patch.
>>
> right, well, it's actually quite nice not having it give you an
> undefined exception when it logs the trace event. The psci protocol
> relies on a confirmation in form of a return value anyhow, so it was
> actually on purpose to remove it, so you can do things like easily
> measure exit times or probe places in the guest.

If that's for tracing purpose, why don't you allocate another hypercall?
Returning to the guest without signalling that nothing was executed seems
very wrong to me.

        M.

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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux