|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 02/23] xen/arm: smmuv3: Add support for stage-1 and nested stage translation
Hi Milan, On 19/04/2026 18:34, Milan Djokic wrote: Hi Julien, On 4/14/26 04:17, Julien Grall wrote:Hi Milan, On 24/03/2026 07:51, Milan Djokic wrote:From: Rahul Singh <rahul.singh@xxxxxxx> Xen SMMUv3 driver only supports stage-2 translation. Add support for Stage-1 translation that is required to support nested stage translation. In true nested mode, both s1_cfg and s2_cfg will coexist. Let's remove the union. When nested stage translation is setup, both s1_cfg and s2_cfg are valid. We introduce a new smmu_domain abort field that will be set upon guest stage-1 configuration passing. If no guest stage-1 config has been attached, it is ignored when writing the STE. arm_smmu_write_strtab_ent() is modified to write both stage fields in the STE and deal with the abort field. Signed-off-by: Rahul Singh <rahul.singh@xxxxxxx> Signed-off-by: Milan Djokic <milan_djokic@xxxxxxxx> ---xen/drivers/passthrough/arm/smmu-v3.c | 93 ++++++++++++++++++++++ +----xen/drivers/passthrough/arm/smmu-v3.h | 9 +++ 2 files changed, 91 insertions(+), 11 deletions(-)diff --git a/xen/drivers/passthrough/arm/smmu-v3.c b/xen/drivers/ passthrough/arm/smmu-v3.cindex 73cc4ef08f..f9c6837919 100644 --- a/xen/drivers/passthrough/arm/smmu-v3.c +++ b/xen/drivers/passthrough/arm/smmu-v3.c@@ -683,8 +683,10 @@ static void arm_smmu_write_strtab_ent(struct arm_smmu_master *master, u32 sid, Are we ok to allow the guest to control the bit? For instance, what does it mean if the guest decide to that no abort is necessary but the region is not mapped in stage-2? [...] The original idea was to also allow stage-1-only support. But I'm not sure if stage-1-only usecase is useful or even valid for Xen.. I will update the patch series with the missing parts for stage-1-only support, pointed out by Luca, but the question remains if this is needed at all. If not, I can revert to original state where stage-2 was always required. By "stage-1 only" support, do you mean Xen would use the stage-1 in replacement of the stage-2? Or do you mean the guest will use the stage-1 page-table and there will be no isolation from Xen? If the former, then I believe the page tables don't have the exact same format. Today, the page-tables are shared between the CPU and IOMMU, so this would need to be duplicated. For now, I am not sure this is worth to do. If the latter, this would require the guest to be directly mapped (i.e. IPA == PA) but it would also open a big hole. So I would want to understand the exact use case first. Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |