mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
Revert "FROMGIT: KVM: arm64: Restructure the point where has_run_once is advertised"
This reverts commit f60ecc8f75.
Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Ife37ffa0d41041ed3e5736d68ec91dcbec3f3bc8
This commit is contained in:
@@ -608,6 +608,8 @@ static int kvm_vcpu_first_run_init(struct kvm_vcpu *vcpu)
|
||||
if (!kvm_arm_vcpu_is_finalized(vcpu))
|
||||
return -EPERM;
|
||||
|
||||
vcpu->arch.has_run_once = true;
|
||||
|
||||
kvm_arm_vcpu_init_debug(vcpu);
|
||||
|
||||
if (likely(irqchip_in_kernel(kvm))) {
|
||||
@@ -618,17 +620,7 @@ static int kvm_vcpu_first_run_init(struct kvm_vcpu *vcpu)
|
||||
ret = kvm_vgic_map_resources(kvm);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = kvm_timer_enable(vcpu);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = kvm_arm_pmu_v3_enable(vcpu);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (!irqchip_in_kernel(kvm)) {
|
||||
} else {
|
||||
/*
|
||||
* Tell the rest of the code that there are userspace irqchip
|
||||
* VMs in the wild.
|
||||
@@ -636,7 +628,11 @@ static int kvm_vcpu_first_run_init(struct kvm_vcpu *vcpu)
|
||||
static_branch_inc(&userspace_irqchip_in_use);
|
||||
}
|
||||
|
||||
vcpu->arch.has_run_once = true;
|
||||
ret = kvm_timer_enable(vcpu);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = kvm_arm_pmu_v3_enable(vcpu);
|
||||
|
||||
/*
|
||||
* Initialize traps for protected VMs.
|
||||
|
||||
Reference in New Issue
Block a user