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

Re: [XEN v4 10/11] xen/arm: p2m: Use the pa_range_info table to support Arm_32 and Arm_64



Hi,

On 21/03/2023 14:03, Ayan Kumar Halder wrote:
      /* Choose suitable "pa_range" according to the resulted "p2m_ipa_bits". */
      for ( i = 0; i < ARRAY_SIZE(pa_range_info); i++ )
@@ -2324,14 +2323,13 @@ void __init setup_virt_paging(void)
      if ( pa_range >= ARRAY_SIZE(pa_range_info) || 
!pa_range_info[pa_range].pabits )
          panic("Unknown encoding of ID_AA64MMFR0_EL1.PARange %x\n", pa_range);
- val |= VTCR_PS(pa_range);
+#ifdef CONFIG_ARM_64
      val |= VTCR_TG0_4K;
+    val |= VTCR_PS(pa_range);
/* Set the VS bit only if 16 bit VMID is supported. */
      if ( MAX_VMID == MAX_VMID_16_BIT )
          val |= VTCR_VS;
-    val |= VTCR_SL0(pa_range_info[pa_range].sl0);
-    val |= VTCR_T0SZ(pa_range_info[pa_range].t0sz);
p2m_root_order = pa_range_info[pa_range].root_order;
      p2m_root_level = 2 - pa_range_info[pa_range].sl0;

As mentioned in the next patch, this now wants to be outside of the ARM_64 specific section because at least the root order will be different. The root level is the same, but I think you would be better if this is moved out at the same time.

Cheers,

--
Julien Grall



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.