mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
ANDROID: KVM: arm64: Add 'host_smc_handler' to kvm_iommu_ops
IOMMU drivers need to intercept power management SMCs between the host
and EL3. Add a hook to hyp's 'handle_host_smc'.
Test: builds, boots
Bug: 190463801
Change-Id: Ied34b60d4bb0e5ae0fbf03f8ce1dc22a09679e37
Signed-off-by: David Brazdil <dbrazdil@google.com>
(cherry picked from commit d2efcdcb2b)
Signed-off-by: Mostafa Saleh <smostafa@google.com>
This commit is contained in:
committed by
Mostafa Saleh
parent
350761f479
commit
71ecd86274
@@ -133,6 +133,7 @@ extern unsigned int kvm_nvhe_sym(kvm_arm_vmid_bits);
|
||||
extern bool kvm_nvhe_sym(smccc_trng_available);
|
||||
struct kvm_iommu_ops {
|
||||
int (*init)(void);
|
||||
bool (*host_smc_handler)(struct kvm_cpu_context *host_ctxt);
|
||||
};
|
||||
|
||||
extern struct kvm_iommu_ops kvm_iommu_ops;
|
||||
|
||||
@@ -1194,6 +1194,8 @@ static void handle_host_smc(struct kvm_cpu_context *host_ctxt)
|
||||
bool handled;
|
||||
|
||||
handled = kvm_host_psci_handler(host_ctxt);
|
||||
if (!handled && kvm_iommu_ops.host_smc_handler)
|
||||
handled = kvm_iommu_ops.host_smc_handler(host_ctxt);
|
||||
if (!handled)
|
||||
handled = kvm_host_ffa_handler(host_ctxt);
|
||||
if (!handled)
|
||||
|
||||
Reference in New Issue
Block a user