Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61349937 authored by Vladimir Murzin's avatar Vladimir Murzin Committed by Christoffer Dall
Browse files

arm64: KVM: Remove duplicating init code for setting VMID



By now both VHE and non-VHE initialisation sequences query supported
VMID size. Lets keep only single instance of this code under
init_common_resources().

Acked-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarVladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
parent acda5430
Loading
Loading
Loading
Loading
+4 −8
Original line number Original line Diff line number Diff line
@@ -1178,6 +1178,10 @@ static int init_common_resources(void)
		return -ENOMEM;
		return -ENOMEM;
	}
	}


	/* set size of VMID supported by CPU */
	kvm_vmid_bits = kvm_get_vmid_bits();
	kvm_info("%d-bit VMID\n", kvm_vmid_bits);

	return 0;
	return 0;
}
}


@@ -1243,10 +1247,6 @@ static void teardown_hyp_mode(void)


static int init_vhe_mode(void)
static int init_vhe_mode(void)
{
{
	/* set size of VMID supported by CPU */
	kvm_vmid_bits = kvm_get_vmid_bits();
	kvm_info("%d-bit VMID\n", kvm_vmid_bits);

	kvm_info("VHE mode initialized successfully\n");
	kvm_info("VHE mode initialized successfully\n");
	return 0;
	return 0;
}
}
@@ -1330,10 +1330,6 @@ static int init_hyp_mode(void)
		}
		}
	}
	}


	/* set size of VMID supported by CPU */
	kvm_vmid_bits = kvm_get_vmid_bits();
	kvm_info("%d-bit VMID\n", kvm_vmid_bits);

	kvm_info("Hyp mode initialized successfully\n");
	kvm_info("Hyp mode initialized successfully\n");


	return 0;
	return 0;