ANDROID: KVM: arm64: scmi: Rely on donation logic
Instead of using custom functions to map/unmap memory in host, that doesn't check any state, rely on the donation logic which should do the right thing. Bug: 357781595 Bug: 384432312 Change-Id: I311bbcebfb2eb94d627e85da463226e97898c9a5 Signed-off-by: Mostafa Saleh <smostafa@google.com>
This commit is contained in:
@@ -180,12 +180,12 @@ bool kvm_host_scmi_handler(struct kvm_cpu_context *host_ctxt)
|
||||
* it's unlikely with the SMC-based transport, this too requires some
|
||||
* tightening in the spec.
|
||||
*/
|
||||
if (WARN_ON(__pkvm_host_add_remove_page(scmi_channel.shmem_pfn, true)))
|
||||
if (WARN_ON(__pkvm_host_donate_hyp(scmi_channel.shmem_pfn, 1)))
|
||||
return true;
|
||||
|
||||
__kvm_host_scmi_handler(host_ctxt);
|
||||
|
||||
WARN_ON(__pkvm_host_add_remove_page(scmi_channel.shmem_pfn, false));
|
||||
WARN_ON(__pkvm_hyp_donate_host(scmi_channel.shmem_pfn, 1));
|
||||
return true; /* Handled */
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user