[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 4/8] xen/arm: Remove support for Stage-1 translation on SMMUv3.
- To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
- From: Rahul Singh <Rahul.Singh@xxxxxxx>
- Date: Fri, 11 Dec 2020 10:46:48 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5zLMZpv/HzrZx5MO2wX7WXWcoDxwiaK0i66zyzHvxlM=; b=WWoPgKPBTzOXPFct3aqAJdGIspt+hspK6GsLCO3X3J0a+D8dg/PEzmAQsGkp3BahQMJ3bT7kCW+MCmlD78FwVHjrAt5o59svTg+WNcCz01hWjEayU5Ku1re6XiVMT6FesBkLZ1myvX1mLW4W7Klw15EnULFa5z+nPcALgO7mgtm6lEUQQkDOqnwYSzrZxnncsVCMnvHoxpirbdKGHH1FLR9PbI6uDYJ33xlMlRf155r6E4nARuNCVSnLPuFZcmPr6Owehi3MOGo7Qe6lJWtQpMD1AMtijD1vNyksUmjaYWAd03n6JlTEbr1BTHo5s1wUxySvk7JYN+b8HrogmOwVIw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NAq2xfMuabPgpev0p8URFxz5/xeHeEI/Ex07pMxUREFNKxBIp4ZPPYQz/joVYjlMgWBhy6rW6P/1fs21GHEDZKF3IbFmi9VXEkj9XMQpfQPmXFs7I9rJTryF9/C3bwms0MraIcbyBKcG+YvRwJWk8gqGlRx/4gIH/HJhGK2h9wrIqXMy6k0Q2Ys3sjLIWU9b3DQhRHkyJIrUSE1DurtwfqtVxq1yH/MfD23nrvEgvOsh2sX+ifxLUbGFz71CRMztD5g3dt7HR+fyfmfmMCfOdKNzMM7fc6UBJjZVVxY4YhJaWv07XyJCaFnvY9XKqaaBxUIGimAqtQx/Ygd5Msp7jQ==
- Authentication-results-original: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=arm.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Fri, 11 Dec 2020 10:47:32 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=arm.com;
- Thread-index: AQHWzxXY77Y6xwXFHEep3JN+7VkcoanxG7eAgACb9YA=
- Thread-topic: [PATCH v3 4/8] xen/arm: Remove support for Stage-1 translation on SMMUv3.
Hello Stefano,
> On 11 Dec 2020, at 1:28 am, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
>
> On Thu, 10 Dec 2020, Rahul Singh wrote:
>> @@ -2087,29 +1693,8 @@ static int arm_smmu_domain_finalise(struct
>> iommu_domain *domain,
>> }
>>
>> /* Restrict the stage to what we can actually support */
>> - if (!(smmu->features & ARM_SMMU_FEAT_TRANS_S1))
>> - smmu_domain->stage = ARM_SMMU_DOMAIN_S2;
>> - if (!(smmu->features & ARM_SMMU_FEAT_TRANS_S2))
>> - smmu_domain->stage = ARM_SMMU_DOMAIN_S1;
>> -
>> - switch (smmu_domain->stage) {
>> - case ARM_SMMU_DOMAIN_S1:
>> - ias = (smmu->features & ARM_SMMU_FEAT_VAX) ? 52 : 48;
>> - ias = min_t(unsigned long, ias, VA_BITS);
>> - oas = smmu->ias;
>> - fmt = ARM_64_LPAE_S1;
>> - finalise_stage_fn = arm_smmu_domain_finalise_s1;
>> - break;
>> - case ARM_SMMU_DOMAIN_NESTED:
>> - case ARM_SMMU_DOMAIN_S2:
>> - ias = smmu->ias;
>> - oas = smmu->oas;
>> - fmt = ARM_64_LPAE_S2;
>> - finalise_stage_fn = arm_smmu_domain_finalise_s2;
>> - break;
>> - default:
>> - return -EINVAL;
>> - }
>> + smmu_domain->stage = ARM_SMMU_DOMAIN_S2;
>> +
>
> Last time we agreed on adding an error message?
Yes I added in next patch to report error if Stage-2 is not supported
if (reg & IDR0_S2P)
smmu->features |= ARM_SMMU_FEAT_TRANS_S2;
if (!(reg & IDR0_S2P)) {
dev_err(smmu->dev, "no stage-2 translation support!\n");
return -ENXIO;
}
Regards,
Rahul
|