ANDROID: KVM: arm64: Remove stale shadow_handle field

This field is stale and not being used. Remove it.

Bug: 228810735
Signed-off-by: Fuad Tabba <tabba@google.com>
Change-Id: I5a734c22f246186b81ffd7bc73b46e0b60518306
This commit is contained in:
Fuad Tabba
2022-05-16 06:54:41 +00:00
parent bb4c6c0105
commit 729adca51a
3 changed files with 1 additions and 17 deletions

View File

@@ -215,9 +215,6 @@ struct kvm_arch {
};
struct kvm_protected_vcpu {
/* A unique id to the shadow structs in the hyp shadow area. */
int shadow_handle;
/* A pointer to the host's vcpu. */
struct kvm_vcpu *host_vcpu;

View File

@@ -445,7 +445,6 @@ static int init_shadow_structs(struct kvm *kvm, struct kvm_shadow_vm *vm,
shadow_state->vm = vm;
shadow_vcpu->arch.hw_mmu = &vm->arch.mmu;
shadow_vcpu->arch.pkvm.shadow_handle = vm->shadow_handle;
shadow_vcpu->arch.pkvm.shadow_vm = vm;
shadow_vcpu->arch.power_off = true;

View File

@@ -108,14 +108,6 @@ void __init kvm_hyp_reserve(void)
hyp_mem_base);
}
/*
* Updates the state of the host's version of the vcpu state.
*/
static void update_vcpu_state(struct kvm_vcpu *vcpu, int shadow_handle)
{
vcpu->arch.pkvm.shadow_handle = shadow_handle;
}
/*
* Allocates and donates memory for EL2 shadow structs.
*
@@ -133,7 +125,7 @@ static int __create_el2_shadow(struct kvm *kvm)
void *pgd, *shadow_addr;
unsigned long idx;
int shadow_handle;
int ret, i;
int ret;
if (kvm->created_vcpus < 1)
return -EINVAL;
@@ -174,10 +166,6 @@ static int __create_el2_shadow(struct kvm *kvm)
/* Store the shadow handle given by hyp for future call reference. */
kvm->arch.pkvm.shadow_handle = shadow_handle;
/* Adjust host's vcpu state as it doesn't control it anymore. */
for (i = 0; i < kvm->created_vcpus; i++)
update_vcpu_state(kvm->vcpus[i], shadow_handle);
return 0;
free_shadow: