ARMv8-64 Cache management in a PSCI functions

Hi everyone,

I'm currently working on type-1 hypervisor and would like to provide support of the ARM Power State Coordination Interface. http://infocenter.arm.com/help/topic/com.arm.doc.den0022d/Power_State_Coordination_Interface_PDD_v1_1_DEN0022D.pdf

In order to achieve this, some functionality should be implemented in EL2 mode in response to the hypercalls performed by the guest OSes. According with the Platform Design Document (above) some functions are mandatory such as CPU_OFF, CPU_SUSPEND and CPU_ON. However, in both of them it is required cache and coherency management.

My question is the following, in a scenario that there are multiples vCPUs running on top of physical core0 and one of them wants to perform a hypercall to the hypervisor (CPU_ON), is there any portable way to invalidate the respective cache lines related to the specific vcpu, the one which performs the hypercall?

Thanks in advance,

Cheers.

Jorge

Parents
  • Jorge,

    The cache maintenance requirement is for the purpose of maintaining system coherency over a power down event. If you pull power from the cache RAM arrays they'll lose their data - so cleaning them to a point which will remain powered is necessary, otherwise whatever was still dirty in those arrays (i.e. not consistent with the lower levels of memory) is lost forever.

    Hypervisors shouldn't need to touch the caches in this instance, unless they truly are going to power down the core, in which case the actual PSCI will handle it for you.

    Ta,

    Matt

Reply
  • Jorge,

    The cache maintenance requirement is for the purpose of maintaining system coherency over a power down event. If you pull power from the cache RAM arrays they'll lose their data - so cleaning them to a point which will remain powered is necessary, otherwise whatever was still dirty in those arrays (i.e. not consistent with the lower levels of memory) is lost forever.

    Hypervisors shouldn't need to touch the caches in this instance, unless they truly are going to power down the core, in which case the actual PSCI will handle it for you.

    Ta,

    Matt

Children