
From: Kunkun Jiang <jiangkunkun@huawei.com> virt inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IBMHO0 CVE: NA -------------------------------- To support vSVA, we need to open IOMMUFD_VFIO_CONTAINER and close VFIO_CONTAINER. Turning off VFIO_CONTAINER will cause kabi breakage. This patch fixes it and fixes the other kabi breakages. Signed-off-by: Kunkun Jiang <jiangkunkun@huawei.com> Signed-off-by: lishusen <lishusen2@huawei.com> --- arch/arm64/configs/openeuler_defconfig | 1 + arch/arm64/include/asm/kvm_host.h | 2 +- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 2 +- drivers/iommu/iommufd/iommufd_private.h | 2 +- drivers/vfio/vfio.h | 2 ++ 5 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arm64/configs/openeuler_defconfig b/arch/arm64/configs/openeuler_defconfig index f712ec22001b..465d28f5480e 100644 --- a/arch/arm64/configs/openeuler_defconfig +++ b/arch/arm64/configs/openeuler_defconfig @@ -766,6 +766,7 @@ CONFIG_HAVE_KVM_IRQ_BYPASS=y CONFIG_HAVE_KVM_VCPU_RUN_PID_CHANGE=y CONFIG_KVM_XFER_TO_GUEST_WORK=y CONFIG_KVM_GENERIC_HARDWARE_ENABLING=y +CONFIG_HAVE_KVM_PINNED_VMID=y CONFIG_KVM_HISI_VIRT=y CONFIG_VIRTUALIZATION=y CONFIG_KVM=y diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h index 35b56d38bd96..8335e84a8d09 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@ -143,7 +143,7 @@ int topup_hyp_memcache(struct kvm_hyp_memcache *mc, unsigned long min_pages); struct kvm_vmid { atomic64_t id; - refcount_t pinned; + KABI_EXTEND(refcount_t pinned) }; struct kvm_s2_mmu { diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h index 8aa3a46edd6a..164afb978f82 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h @@ -883,7 +883,7 @@ struct arm_smmu_domain { struct list_head node; struct kvm *kvm; #endif - struct kvm *iommufd_kvm; + KABI_EXTEND(struct kvm *iommufd_kvm) }; struct arm_smmu_nested_domain { diff --git a/drivers/iommu/iommufd/iommufd_private.h b/drivers/iommu/iommufd/iommufd_private.h index 53189dfd1879..7f1193f3b638 100644 --- a/drivers/iommu/iommufd/iommufd_private.h +++ b/drivers/iommu/iommufd/iommufd_private.h @@ -31,7 +31,7 @@ struct iommufd_ctx { u8 no_iommu_mode; struct iommufd_ioas *vfio_ioas; /* Associated KVM pointer */ - struct kvm *kvm; + KABI_EXTEND(struct kvm *kvm) }; /* diff --git a/drivers/vfio/vfio.h b/drivers/vfio/vfio.h index bde84ad344e5..488b815db970 100644 --- a/drivers/vfio/vfio.h +++ b/drivers/vfio/vfio.h @@ -85,6 +85,8 @@ struct vfio_group { struct list_head vfio_next; #if IS_ENABLED(CONFIG_VFIO_CONTAINER) struct list_head container_next; +#else + KABI_DEPRECATE(struct list_head, container_next) #endif enum vfio_group_type type; struct mutex group_lock; -- 2.33.0