diff mbox series

[4/4] target/arm/kvm: Remove kvm_arm_get_max_vm_ipa_size()

Message ID 20240809035134.699830-5-gshan@redhat.com (mailing list archive)
State New, archived
Headers show
Series hw/arm/virt: Improve virt_kvm_type() | expand

Commit Message

Gavin Shan Aug. 9, 2024, 3:51 a.m. UTC
Remove kvm_arm_get_max_vm_ipa_size() after its logics are moved
to its only caller kvm_arch_get_default_type().

Signed-off-by: Gavin Shan <gshan@redhat.com>
---
 target/arm/kvm.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)
diff mbox series

Patch

diff --git a/target/arm/kvm.c b/target/arm/kvm.c
index 65893c9c12..5d9e66d82d 100644
--- a/target/arm/kvm.c
+++ b/target/arm/kvm.c
@@ -526,22 +526,13 @@  bool kvm_arm_pmu_supported(void)
     return kvm_check_extension(kvm_state, KVM_CAP_ARM_PMU_V3);
 }
 
-static int kvm_arm_get_max_vm_ipa_size(MachineState *ms, bool *fixed_ipa)
+int kvm_arch_get_default_type(MachineState *ms)
 {
     KVMState *s = KVM_STATE(ms->accelerator);
     int ret;
 
     ret = kvm_check_extension(s, KVM_CAP_ARM_VM_IPA_SIZE);
-    *fixed_ipa = ret <= 0;
-
-    return ret > 0 ? ret : 40;
-}
-
-int kvm_arch_get_default_type(MachineState *ms)
-{
-    bool fixed_ipa;
-    int size = kvm_arm_get_max_vm_ipa_size(ms, &fixed_ipa);
-    return fixed_ipa ? 0 : size;
+    return (ret <= 0) ? 0 : ret;
 }
 
 int kvm_arch_init(MachineState *ms, KVMState *s)