[PATCH OLK-6.6 0/1] kvm: arm64: Add HIP13 cpu type definition for detecting virtualization features
Add HIP13 cpu type for detecting whether IPIv and DVMBM are supported. liqiqi (1): kvm: arm64: Add HIP13 cpu type definition for detecting virtualization features arch/arm64/kvm/hisilicon/hisi_virt.c | 12 +++++++----- arch/arm64/kvm/hisilicon/hisi_virt.h | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) -- 2.43.0
virt inclusion category: feature bugzilla: https://atomgit.com/openeuler/kernel/issues/8756 CVE: NA ----------------------------------------------------------- Add HIP13 cpu type for detecting whether IPIv and DVMBM are supported. Signed-off-by: liqiqi <liqiqi23@huawei.com> --- arch/arm64/kvm/hisilicon/hisi_virt.c | 12 +++++++----- arch/arm64/kvm/hisilicon/hisi_virt.h | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/arch/arm64/kvm/hisilicon/hisi_virt.c b/arch/arm64/kvm/hisilicon/hisi_virt.c index d82c7691836e..9a04e4052abd 100644 --- a/arch/arm64/kvm/hisilicon/hisi_virt.c +++ b/arch/arm64/kvm/hisilicon/hisi_virt.c @@ -26,6 +26,7 @@ static const char * const hisi_cpu_type_str[] = { "HIP10", "HIP10C", "HIP12", + "HIP13", "Unknown" }; @@ -37,7 +38,8 @@ static const char * const oem_str[] = { "HIP09 ", /* HIP09 */ "HIP10 ", /* HIP10 */ "HIP10C ", /* HIP10C */ - "HIP12 " /* HIP12 */ + "HIP12 ", /* HIP12 */ + "HIP13 ", /* HIP13 */ }; /* @@ -171,7 +173,7 @@ early_param("kvm-arm.ipiv_enabled", early_ipiv_enable); bool hisi_ipiv_supported(void) { - if (cpu_type != HI_IP12) + if (cpu_type != HI_IP12 && cpu_type != HI_IP13) return false; /* Determine whether IPIV is supported by the hardware */ @@ -233,7 +235,7 @@ void ipiv_gicd_init(void) bool hisi_dvmbm_supported(void) { if (cpu_type != HI_IP10 && cpu_type != HI_IP10C && - cpu_type != HI_IP12) + cpu_type != HI_IP12 && cpu_type != HI_IP13) return false; if (!is_kernel_in_hyp_mode()) { @@ -581,7 +583,7 @@ void kvm_tlbi_dvmbm_vcpu_load(struct kvm_vcpu *vcpu) * Re-calculate LSUDVMBM_EL2 for this VM and kick all vcpus * out to reload the LSUDVMBM configuration. */ - if (cpu_type == HI_IP12) + if (cpu_type == HI_IP12 || cpu_type == HI_IP13) kvm_update_vm_lsudvmbm_hip12(kvm); else kvm_update_vm_lsudvmbm(kvm); @@ -609,7 +611,7 @@ void kvm_get_pg_cfg(void) u64 mn_phy_base; u32 val; - if (cpu_type == HI_IP12) + if (cpu_type == HI_IP12 || cpu_type == HI_IP13) return; socket_num = kvm_get_socket_num(); diff --git a/arch/arm64/kvm/hisilicon/hisi_virt.h b/arch/arm64/kvm/hisilicon/hisi_virt.h index 180618e42cbc..8e7a88a267c8 100644 --- a/arch/arm64/kvm/hisilicon/hisi_virt.h +++ b/arch/arm64/kvm/hisilicon/hisi_virt.h @@ -15,6 +15,7 @@ enum hisi_cpu_type { HI_IP10, HI_IP10C, HI_IP12, + HI_IP13, UNKNOWN_HI_TYPE }; -- 2.43.0
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://atomgit.com/openeuler/kernel/merge_requests/22226 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/AMM... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://atomgit.com/openeuler/kernel/merge_requests/22226 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/AMM...
participants (2)
-
liqiqi -
patchwork bot