summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorAndre Richter <arichter@nvidia.com>2020-02-13 11:21:51 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2020-02-21 17:40:30 -0500
commit534e799439b0af8f436c69767b5699b317d45606 (patch)
treea702799e099ecfc6b232bf9bb84596197c4fa127 /include/linux
parent7fb74ff5aa49b6a9edfcf715767e92c4494761ca (diff)
Err-inject: Handle generic sync exception reports
This change extends the existing minimal placeholder sample handler for injected synchronous exceptions. It now consumes a generic sync exception report and, showcases how the information can be used to decode the exceptions further using two minimal examples (Data Abort and Instr Abort). This needs to be used only as a reference for any customized elaborate error handling that may be needed. JIRA ESV-312 Bug 2580803 Change-Id: I32cf2322a6002ac00071d3246a32a17eb37165c3 Signed-off-by: Andre Richter <arichter@nvidia.com> (cherry picked from commit 9ce3c05e425607a1acf0a28ea75258fb66f06820) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2300616 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Dmitry Pervushin <dpervushin@nvidia.com> Reviewed-by: Rohit Upadhyay <rupadhyay@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/errinfo.h23
-rw-r--r--include/linux/vm_err.h4
2 files changed, 14 insertions, 13 deletions
diff --git a/include/linux/errinfo.h b/include/linux/errinfo.h
index 074208918..5053919b3 100644
--- a/include/linux/errinfo.h
+++ b/include/linux/errinfo.h
@@ -20,9 +20,7 @@ enum err_reason {
20 REASON_ASYNC_MC, 20 REASON_ASYNC_MC,
21 REASON_ASYNC_MC_T19X, 21 REASON_ASYNC_MC_T19X,
22 REASON_ASYNC_CBB, 22 REASON_ASYNC_CBB,
23 REASON_SYNC_INSTR_ABORT, 23 REASON_SYNC,
24 REASON_SYNC_DATA_ABORT,
25 REASON_SYNC_OTHER,
26 REASON_ENUM_SIZE 24 REASON_ENUM_SIZE
27}; 25};
28 26
@@ -123,15 +121,20 @@ struct __attribute__((__packed__)) async_mc_err_t19x_t {
123 unsigned int write; 121 unsigned int write;
124}; 122};
125 123
126struct __attribute__((__packed__)) sync_data_abort_t { 124struct __attribute__((__packed__)) sync_t {
127 bool is_filled; /* metadata field per vcpu */ 125 bool is_filled; /* metadata field per vcpu */
128 bool is_write;
129 uint8_t access_size;
130 unsigned int offending_vcpu_id; 126 unsigned int offending_vcpu_id;
131 unsigned int esr_el2; 127 uint32_t esr_el2;
132 uint64_t fault_addr; 128 uint64_t elr_el2;
129 uint64_t far_el2;
130 uint64_t hpfar_el2;
131 uint64_t par_hpfar_el2;
133 uint64_t spsr_el2; 132 uint64_t spsr_el2;
134 uint64_t elr_el1; 133 uint64_t elr_el1;
134 uint64_t far_el1;
135 uint64_t spsr_el1;
136 uint32_t esr_el1;
137 uint32_t fault_instr;
135 uint64_t gpr_array[31]; 138 uint64_t gpr_array[31];
136}; 139};
137 140
@@ -147,7 +150,7 @@ struct __attribute__((__packed__)) err_data_t {
147 struct async_cbb_err_t async_cbb_err; 150 struct async_cbb_err_t async_cbb_err;
148 struct async_mc_err_t19x_t async_mc_err_t19x; 151 struct async_mc_err_t19x_t async_mc_err_t19x;
149 /* Synchronous */ 152 /* Synchronous */
150 struct sync_data_abort_t sync_data_abort; 153 struct sync_t sync;
151 }; 154 };
152}; 155};
153 156
diff --git a/include/linux/vm_err.h b/include/linux/vm_err.h
index bcb3f255e..09e819b92 100644
--- a/include/linux/vm_err.h
+++ b/include/linux/vm_err.h
@@ -40,9 +40,7 @@ static const char * const tegra_hv_err_reason_desc[] = {
40 "Memory Controller", 40 "Memory Controller",
41 "Memory Controller T19X", 41 "Memory Controller T19X",
42 "Central Back Bone", 42 "Central Back Bone",
43 "Instruction Abort", 43 "Synchronous exception",
44 "Data Abort",
45 "Other synchronous exception",
46}; 44};
47 45
48int tegra_hv_register_vm_err_hooks(struct tegra_hv_vm_err_handlers *handlers); 46int tegra_hv_register_vm_err_hooks(struct tegra_hv_vm_err_handlers *handlers);