[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v2 02/11] hw/arm/smmuv3: Update translation config to hold st
From: |
Mostafa Saleh |
Subject: |
[RFC PATCH v2 02/11] hw/arm/smmuv3: Update translation config to hold stage-2 |
Date: |
Sun, 26 Feb 2023 22:06:41 +0000 |
In preparation for adding stage-2 support, add a S2 config
struct(SMMUS2Cfg), composed of the following fields and embedded in
the main SMMUTransCfg:
-tsz: Input range
-sl0: start level of translation
-affd: AF fault disable
-granule_sz: Granule page shift
-vmid: VMID
-vttb: PA of translation table
-oas: Output address size
They will be used in the next patches in stage-2 address translation.
No functional change intended.
Signed-off-by: Mostafa Saleh <smostafa@google.com>
---
Changes in v2:
-Add oas
---
include/hw/arm/smmu-common.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/include/hw/arm/smmu-common.h b/include/hw/arm/smmu-common.h
index 9fcff26357..2deead08d6 100644
--- a/include/hw/arm/smmu-common.h
+++ b/include/hw/arm/smmu-common.h
@@ -58,6 +58,16 @@ typedef struct SMMUTLBEntry {
uint8_t granule;
} SMMUTLBEntry;
+typedef struct SMMUS2Cfg {
+ uint8_t tsz; /* Input range */
+ uint8_t sl0; /* Start level of translation */
+ bool affd; /* AF Fault Disable */
+ uint8_t granule_sz; /* Granule page shift */
+ uint8_t oas; /* Output address size */
+ uint16_t vmid; /* Virtual machine ID */
+ uint64_t vttb; /* PA of translation table */
+} SMMUS2Cfg;
+
/*
* Generic structure populated by derived SMMU devices
* after decoding the configuration information and used as
@@ -77,6 +87,7 @@ typedef struct SMMUTransCfg {
SMMUTransTableInfo tt[2];
uint32_t iotlb_hits; /* counts IOTLB hits for this asid */
uint32_t iotlb_misses; /* counts IOTLB misses for this asid */
+ struct SMMUS2Cfg s2cfg;
} SMMUTransCfg;
typedef struct SMMUDevice {
--
2.39.2.637.g21b0678d19-goog
- [RFC PATCH v2 00/11] Add stage-2 translation for SMMUv3, Mostafa Saleh, 2023/02/26
- [RFC PATCH v2 01/11] hw/arm/smmuv3: Add missing fields for IDR0, Mostafa Saleh, 2023/02/26
- [RFC PATCH v2 02/11] hw/arm/smmuv3: Update translation config to hold stage-2,
Mostafa Saleh <=
- [RFC PATCH v2 03/11] hw/arm/smmuv3: Refactor stage-1 PTW, Mostafa Saleh, 2023/02/26
- [RFC PATCH v2 04/11] hw/arm/smmuv3: Add page table walk for stage-2, Mostafa Saleh, 2023/02/26
- [RFC PATCH v2 05/11] hw/arm/smmuv3: Parse STE config for stage-2, Mostafa Saleh, 2023/02/26
- [RFC PATCH v2 06/11] hw/arm/smmuv3: Make TLB lookup work for stage-2, Mostafa Saleh, 2023/02/26
- [RFC PATCH v2 07/11] hw/arm/smmuv3: Add VMID to tlb tagging, Mostafa Saleh, 2023/02/26
- [RFC PATCH v2 08/11] hw/arm/smmuv3: Add CMDs related to stage-2, Mostafa Saleh, 2023/02/26
- [RFC PATCH v2 09/11] hw/arm/smmuv3: Add stage-2 support in iova notifier, Mostafa Saleh, 2023/02/26
- [RFC PATCH v2 10/11] hw/arm/smmuv3: Populate OAS based on CPU PARANGE, Mostafa Saleh, 2023/02/26
- [RFC PATCH v2 11/11] hw/arm/smmuv3: Add knob to choose translation stage and enable stage-2, Mostafa Saleh, 2023/02/26