Re: [RFC PATCH 07/12] hw/arm/smmu-common: Support nested translation

2024-03-25 Thread Mostafa Saleh
Hi Julien, On Mon, Mar 25, 2024 at 02:20:07PM +, Julien Grall wrote: > Hi Mostafa, > > On 25/03/2024 10:14, Mostafa Saleh wrote: > > @@ -524,7 +551,7 @@ static int smmu_ptw_64_s2(SMMUTransCfg *cfg, > > tlbe->entry.translated_addr = gpa; > > tlbe->entry.iova = ipa & ~mask;

Re: [RFC PATCH 07/12] hw/arm/smmu-common: Support nested translation

2024-03-25 Thread Julien Grall
Hi Mostafa, On 25/03/2024 10:14, Mostafa Saleh wrote: @@ -524,7 +551,7 @@ static int smmu_ptw_64_s2(SMMUTransCfg *cfg, tlbe->entry.translated_addr = gpa; tlbe->entry.iova = ipa & ~mask; tlbe->entry.addr_mask = mask; -tlbe->entry.perm = s2ap; +

[RFC PATCH 07/12] hw/arm/smmu-common: Support nested translation

2024-03-25 Thread Mostafa Saleh
When nested translation is requested, we need to do: - Translate stage-1 IPA using stage-2 to a physical address. - Translate stage-1 PTW walks using stage-2. - Combine both to create a single TLB entry Signed-off-by: Mostafa Saleh --- hw/arm/smmu-common.c | 135