[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 03/19] xen/arm: Set and restore HCR_EL2 register for each vCPU separately
Hi Wei, On 31/03/17 14:07, Wei Chen wrote: Different domains may have different HCR_EL2 flags. For example, the 64-bit domain needs HCR_RW flag but the 32-bit does not need it. So we give each domain a default HCR_EL2 value and save it in the vCPU's context. HCR_EL2 register has only one bit can be updated automatically without explicit write (HCR_VSE). But we haven't used this bit currently, so we can consider that the HCR_EL2 register will not be modified while the guest is running. So save the HCR_EL2 while guest exiting to hypervisor is not neccessary. We just have to restore this register for each vCPU while context switching. The p2m_restore_state which will be invoked in context switch progress has included the writing of HCR_EL2 already. It updates the HCR_EL2.RW bit to tell the hardware how to interpret the stage-1 page table as the encodings are different between AArch64 and AArch32. We can reuse this write to restore the HCR_EL2 for each vCPU. Of course, the value of each vCPU's HCR_EL2 should be adjusted to have proper HCR_EL2.RW bit in this function. In the later patch of this series, we will set the HCR_EL2.RW for each vCPU while the domain is creating. Signed-off-by: wei chen <Wei.Chen@xxxxxxx> Reviewed-by: Julien Grall <julien.grall@xxxxxxx> Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |