From 02a7ce99ffe2adc39606d6e277be6593e6c9ea0c Mon Sep 17 00:00:00 2001 From: Amith Nuggehalli Date: Tue, 25 Jul 2017 17:17:15 -0700 Subject: Retry NOP smc call when a guest's VIRQ is pending In virtualization use case, if a guest's VIRQ is pending at, the hypervisor, the control returns back control immediately to the guest without transitioning to TOS so that the guest's IRQ is handled in time. In such a case, re-try the NOP smc with the same arguments as the previous call as the SMC wouldn't have reached TOS yet. JIRA: SEC-366 Change-Id: Iff0f4fd6aab1369848736a1a7f2fa75afd3616b9 Signed-off-by: Amith Nuggehalli (cherry picked from commit 585fea50e14410d312c9966f5520af305c56e989) Reviewed-on: https://git-master.nvidia.com/r/1533177 GVS: Gerrit_Virtual_Submit Reviewed-by: Varun Wadekar --- include/linux/trusty/sm_err.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux') diff --git a/include/linux/trusty/sm_err.h b/include/linux/trusty/sm_err.h index 32ee08e49..fb6f3794d 100644 --- a/include/linux/trusty/sm_err.h +++ b/include/linux/trusty/sm_err.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2013 Google Inc. All rights reserved + * Copyright (c) 2017 NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files @@ -39,5 +40,6 @@ #define SM_ERR_CPU_IDLE -13 /* SMC call waiting for another CPU */ #define SM_ERR_NOP_INTERRUPTED -14 /* Got interrupted. Call back with new SMC_SC_NOP */ #define SM_ERR_NOP_DONE -15 /* Cpu idle after SMC_SC_NOP (not an error) */ +#define SM_ERR_NOP_RETRY -16 /* Retry the previous NOP smc as the first may not have reached TOS */ #endif -- cgit v1.2.2