mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
Revert "ANDROID: KVM: arm64: Fix for do not allow memslot changes after first VM run under pKVM"
This reverts commit e2e042c0c4.
Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I9a2364b3afd0cf12c7dba466f2d032424ba901e4
This commit is contained in:
@@ -1796,6 +1796,10 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,
|
||||
hva_t reg_end = hva + mem->memory_size;
|
||||
int ret = 0;
|
||||
|
||||
if (change != KVM_MR_CREATE && change != KVM_MR_MOVE &&
|
||||
change != KVM_MR_FLAGS_ONLY)
|
||||
return 0;
|
||||
|
||||
/* In protected mode, cannot modify memslots once a VM has run. */
|
||||
if (is_protected_kvm_enabled() &&
|
||||
(change == KVM_MR_DELETE || change == KVM_MR_MOVE) &&
|
||||
@@ -1803,10 +1807,6 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
if (change != KVM_MR_CREATE && change != KVM_MR_MOVE &&
|
||||
change != KVM_MR_FLAGS_ONLY)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Prevent userspace from creating a memory region outside of the IPA
|
||||
* space addressable by the KVM guest IPA space.
|
||||
|
||||
Reference in New Issue
Block a user