ANDROID: KVM: arm64: Pad IOMMU structs for KMI

KMI is going to be frozen soon, so add padding in IOMMU structs as
it can be helpful to update the driver without changing the ABI.

The updated structs are:
kvm_iommu_ops: kvm_iommu_driver: reserve 8 qwords, this is only
instantiated once, and the most likely one to change, as it
implements the callbacks between the IOMMU code and the hypervisor module.

kvm_iommu_driver: reserve 8 qwords, this is only instantiated once,
this implements the callbacks between the IOMMU code and the kernel module.

kvm_hyp_iommu: reserve 4 qwords, instantiated once per-iommu.

kvm_hyp_iommu_domain: reserve 2 qwords, this is the most instantiated
struct, so we don’t add a lot of padding.

iommu_iotlb_gather: reserve 2 qwords, in case we need to add hypervisor
specific logic in the future.

io_pgtable_ops: reserve 4 qwords, instantiated once per iommu domain.

Bug: 357781595
Bug: 384432312
Change-Id: I1c5c9e0dd4fe1b422c8a20e23df6b9e10f646071
Signed-off-by: Mostafa Saleh <smostafa@google.com>
This commit is contained in:
Mostafa Saleh
2024-05-09 13:59:07 +00:00
parent d0b6d7deda
commit d4772b152b
5 changed files with 31 additions and 0 deletions
+6
View File
@@ -24,6 +24,8 @@ struct kvm_hyp_iommu_domain {
atomic_t refs;
pkvm_handle_t domain_id;
void *priv;
ANDROID_KABI_RESERVE(1);
ANDROID_KABI_RESERVE(2);
};
extern void **kvm_nvhe_sym(kvm_hyp_iommu_domains);
@@ -63,6 +65,10 @@ struct kvm_hyp_iommu {
#endif
struct kvm_power_domain power_domain;
bool power_is_off;
ANDROID_KABI_RESERVE(1);
ANDROID_KABI_RESERVE(2);
ANDROID_KABI_RESERVE(3);
ANDROID_KABI_RESERVE(4);
};
#endif /* __KVM_IOMMU_H */